Bug#838184: chdist: compare-bin-packages not always uses the latest versions
James McCoy
jamessan at debian.org
Fri Sep 30 00:37:39 UTC 2016
Thanks for the analysis and patch.
On Sun, Sep 18, 2016 at 10:09:01AM +0200, Christoph Biedl wrote:
> --- /usr/bin/chdist
> +++ /tmp/chdist
> @@ -471,10 +471,17 @@
> my $parsed_file = parseFile($file);
> foreach my $package ( keys(%{$parsed_file}) ) {
> if ( $packages{$dist}{$package} ) {
> - warn "W: Package $package is already listed for $dist. Not overriding.\n";
> - } else {
> - $packages{$dist}{$package} = $parsed_file->{$package};
> - }
> + my $version = $packages{$dist}{$package}{'Version'};
> + my $alt_ver = $parsed_file->{$package}{'Version'};
> + my $delta = $version && $alt_ver && version_compare($version, $alt_ver);
> + if (defined ($delta) && $delta < 0) {
> + $packages{$dist}{$package} = $parsed_file->{$package};
> + } elsif (!defined ($delta) || $delta < 0) {
Did you mean this to be "(!defined ($delta) || $delta >= 0)"?
> + warn "W: Package $package is already listed for $dist. Not overriding.\n";
Cheers,
--
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7 2D23 DFE6 91AE 331B A3DB
More information about the devscripts-devel
mailing list