diff --git a/.github/workflows/check-profiles.yml b/.github/workflows/check-profiles.yml index 895be1c2ac..d7a2e89be6 100644 --- a/.github/workflows/check-profiles.yml +++ b/.github/workflows/check-profiles.yml @@ -48,7 +48,9 @@ jobs: - name: sort.py run: > ./ci/check/profiles/sort.py - etc/inc/*.inc etc/{profile-a-l,profile-m-z}/*.profile + etc/inc/*.inc etc/{profile-a-l,profile-m-z}/*.profile; + echo; + git diff --exit-code # Currently broken (see #5610) # - name: private-etc-always-required.sh # run: > diff --git a/contrib/sort.py b/contrib/sort.py index 5dd5da94db..1728384e4c 100755 --- a/contrib/sort.py +++ b/contrib/sort.py @@ -99,11 +99,20 @@ def check_profile(filename, overwrite): ) fixed_profile.append(line) + fixed_profile_str = "\n".join(fixed_profile) + stripped_profile_str = fixed_profile_str.strip() + "\n" + while "\n\n\n" in stripped_profile_str: + stripped_profile_str = stripped_profile_str.replace("\n\n\n", "\n\n") + + if stripped_profile_str != fixed_profile_str: + was_fixed = True + print(f"{filename}:(fixed whitespace)") + if was_fixed: if overwrite: profile.seek(0) profile.truncate() - profile.write("\n".join(fixed_profile)) + profile.write(stripped_profile_str) profile.flush() print(f"[ Fixed ] {filename}") return 101 diff --git a/etc/profile-a-l/devhelp.profile b/etc/profile-a-l/devhelp.profile index 7b5e692a0c..415ceeeba2 100644 --- a/etc/profile-a-l/devhelp.profile +++ b/etc/profile-a-l/devhelp.profile @@ -6,7 +6,6 @@ include devhelp.local # Persistent global definitions include globals.local - include disable-common.inc include disable-devel.inc include disable-exec.inc diff --git a/etc/profile-a-l/display-im6.q16.profile b/etc/profile-a-l/display-im6.q16.profile index b80afc3fa0..33c4a42def 100644 --- a/etc/profile-a-l/display-im6.q16.profile +++ b/etc/profile-a-l/display-im6.q16.profile @@ -5,6 +5,5 @@ include display-im6.q16.local # Persistent global definitions include globals.local - # Redirect include display.profile diff --git a/etc/profile-a-l/empathy.profile b/etc/profile-a-l/empathy.profile index 9a128d7af1..5765d27142 100644 --- a/etc/profile-a-l/empathy.profile +++ b/etc/profile-a-l/empathy.profile @@ -6,7 +6,6 @@ include empathy.local # Persistent global definitions include globals.local - include disable-common.inc include disable-devel.inc include disable-interpreters.inc diff --git a/etc/profile-a-l/gnome-font-viewer.profile b/etc/profile-a-l/gnome-font-viewer.profile index 17d2665370..aaaeca3252 100644 --- a/etc/profile-a-l/gnome-font-viewer.profile +++ b/etc/profile-a-l/gnome-font-viewer.profile @@ -6,7 +6,6 @@ include gnome-font-viewer.local # Persistent global definitions include globals.local - include disable-common.inc include disable-devel.inc include disable-exec.inc diff --git a/etc/profile-a-l/gnome-recipes.profile b/etc/profile-a-l/gnome-recipes.profile index aa1ded5162..5072b3646c 100644 --- a/etc/profile-a-l/gnome-recipes.profile +++ b/etc/profile-a-l/gnome-recipes.profile @@ -6,7 +6,6 @@ include gnome-recipes.local # Persistent global definitions include globals.local - noblacklist ${HOME}/.cache/gnome-recipes noblacklist ${HOME}/.local/share/gnome-recipes diff --git a/etc/profile-a-l/godot.profile b/etc/profile-a-l/godot.profile index 96bbffc41d..ae052991a8 100644 --- a/etc/profile-a-l/godot.profile +++ b/etc/profile-a-l/godot.profile @@ -33,7 +33,6 @@ protocol unix,inet,inet6,netlink seccomp tracelog - #private-bin godot private-cache private-dev diff --git a/etc/profile-m-z/quassel.profile b/etc/profile-m-z/quassel.profile index 4ec990e95e..30bd244405 100644 --- a/etc/profile-m-z/quassel.profile +++ b/etc/profile-m-z/quassel.profile @@ -6,7 +6,6 @@ include quassel.local # Persistent global definitions include globals.local - include disable-common.inc include disable-devel.inc include disable-interpreters.inc diff --git a/etc/profile-m-z/rtorrent.profile b/etc/profile-m-z/rtorrent.profile index a1c7356458..81884ed02b 100644 --- a/etc/profile-m-z/rtorrent.profile +++ b/etc/profile-m-z/rtorrent.profile @@ -6,7 +6,6 @@ include rtorrent.local # Persistent global definitions include globals.local - include disable-common.inc include disable-devel.inc include disable-interpreters.inc diff --git a/etc/profile-m-z/silentarmy.profile b/etc/profile-m-z/silentarmy.profile index 154e29ccf9..1296bf287e 100644 --- a/etc/profile-m-z/silentarmy.profile +++ b/etc/profile-m-z/silentarmy.profile @@ -5,7 +5,6 @@ include silentarmy.local # Persistent global definitions include globals.local - include disable-common.inc #include disable-devel.inc include disable-exec.inc