This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=940f86c37f9fc069079e16d3cfd2eda1be97ca27

commit 940f86c37f9fc069079e16d3cfd2eda1be97ca27
Author: Guillem Jover <guil...@debian.org>
AuthorDate: Tue Dec 14 23:30:16 2021 +0100

    debian: Ignore directories for the alternatives state fixup
    
    We should only consider regular files for the fix ups. Ignore anything
    else, and stop explicitly ignoring known directories.
    
    Closes: #1001695
---
 debian/dpkg.postinst | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/debian/dpkg.postinst b/debian/dpkg.postinst
index 223acef0a..ff2e53cf6 100644
--- a/debian/dpkg.postinst
+++ b/debian/dpkg.postinst
@@ -12,14 +12,17 @@ fixup_misplaced_alternatives()
   cd "$admindir"
 
   for file in *; do
+    if ! [ -f "$file" ]; then
+      # Ignore anything that is not a file.
+      continue
+    fi
+
     # Check whether this is a known file we do not want to act on.
     case "$file" in
-    alternatives|\
     arch|\
     available|available-old|\
-    cmethopt|methlock|methods|\
+    cmethopt|methlock|\
     diversions|diversions-old|\
-    info|parts|triggers|updates|\
     lock|lock-frontend|\
     statoverride|statoverride-old|\
     status|status-old)

-- 
Dpkg.Org's dpkg

Reply via email to