diff options
author | Steve Langasek <vorlon@debian.org> | 2008-08-22 10:30:03 -0700 |
---|---|---|
committer | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 17:28:27 -0800 |
commit | 60f74ffddeeee22099a658c24aad2d82cf4ca8ef (patch) | |
tree | 5c0b19c3cae6d73a5e61eb73cae5b9824324d5da /debian/local | |
parent | c9108bfcc12006e4529895162926c101e33ac5b5 (diff) | |
download | pam-60f74ffddeeee22099a658c24aad2d82cf4ca8ef.tar.gz pam-60f74ffddeeee22099a658c24aad2d82cf4ca8ef.tar.bz2 pam-60f74ffddeeee22099a658c24aad2d82cf4ca8ef.zip |
priority alone doesn't guarantee a complete sort; sort by the profile name as
a second field, to be sure we get out all the duplicates
Diffstat (limited to 'debian/local')
-rwxr-xr-x | debian/local/pam-auth-update | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/debian/local/pam-auth-update b/debian/local/pam-auth-update index 2d590ff2..7c4db060 100755 --- a/debian/local/pam-auth-update +++ b/debian/local/pam-auth-update @@ -76,8 +76,9 @@ x_loadtemplatefile('/var/lib/dpkg/info/libpam-runtime.templates','libpam-runtime # always sort by priority, so we have consistency and don't have to # shuffle later -@sorted = sort { $profiles{$b}->{'Priority'} <=> $profiles{$a}->{'Priority'} } - keys(%profiles); +@sorted = sort { $profiles{$b}->{'Priority'} <=> $profiles{$a}->{'Priority'} + || $b cmp $a } + keys(%profiles); # If we're being called for package removal, filter out those options here @sorted = grep { !$removals{$_} } @sorted; @@ -110,7 +111,9 @@ if (!@enabled) { close(SEEN); push(@enabled, grep { $profiles{$_}->{'Default'} eq 'yes' && !$seen{$_} } @sorted); - @enabled = sort { $profiles{$b}->{'Priority'} <=> $profiles{$a}->{'Priority'} } @enabled; + @enabled = sort { $profiles{$b}->{'Priority'} <=> $profiles{$a}->{'Priority'} + || $b cmp $a } + @enabled; my $prev = ''; @enabled = grep { $_ ne $prev && (($prev) = $_) } @enabled; } |