Browse Source

handle diversions. From Robert Luberda [#865748]

tags/popcon-1.66^0
Bill Allombert 3 years ago
parent
commit
f0311da391
2 changed files with 16 additions and 1 deletions
  1. +3
    -1
      debian/changelog
  2. +13
    -0
      popularity-contest

+ 3
- 1
debian/changelog View File

@@ -15,12 +15,14 @@ popularity-contest (1.66) unstable; urgency=medium
* examples/bin/popcon-process.sh:
- add support for gpg2
* Update example server-side scripts to popcon.d.o version.
[Robert Luberda]
* popularity-contest: handle dpkg diversions. Closes: #865748
[Paul Wise]
* Change the Linux Counter URL to the new domain.
* Use https instead of http in URLs where possible.
Closes: #865718

-- Bill Allombert <ballombe@debian.org> Wed, 14 Feb 2018 20:00:33 +0100
-- Bill Allombert <ballombe@debian.org> Tue, 20 Feb 2018 14:56:14 +0100

popularity-contest (1.65) unstable; urgency=low



+ 13
- 0
popularity-contest View File

@@ -107,6 +107,18 @@ if (opendir(PROC, "/proc"))
}
}

# List files diverted by dpkg
my %diverted;
if (open DIVERSIONS, "env LC_ALL=C dpkg-divert --list|")
{
while (<DIVERSIONS>)
{
next unless /^(?:local )?diversion of (\S+) to (?:\S+)(?: by (\S+))?\s*$/;
$diverted{$1} = defined $2 ? $2 : ""
}
close DIVERSIONS;
}

# Read dpkg database of installed packages
open PACKAGES, "dpkg-query --show --showformat='\${status} \${package}\\n'|";
while (<PACKAGES>)
@@ -127,6 +139,7 @@ while (<PACKAGES>)
&& ! m{/lib/.+-.+-.+/} && ! m{^/usr/lib/mime/packages/}
|| defined $mapped{$_} )
&& -f $_);
next if defined $diverted{$_} and $diverted{$_} ne $pkg;
my($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
$atime,$mtime,$ctime,$blksize,$blocks)
= stat;


Loading…
Cancel
Save