Package: perl Version: 5.24.1~rc3-3 Severity: wishlist In the Perl 5.24 transition we made four dual life module packages in sid uninstallable because the bundled version was newer.
In itself this is normal and fine: there's no need for a separate package with an older version of a bundled module, so those can be removed (from either testing or also from unstable) without losing any functionality. However, any versioned dependencies on these packages must first be changed, at least as long as we don't use versioned Provides (see #758100). It seems that we forgot to check these versioned dependencies before the upload, as libio-compress-lzma-perl became uninstallable and unbuildable due to such a dependency. See #838933. Speaking for myself, I know that I completely forgot about checking this, and I suspect we were just lucky that the collateral damage was limited to only one package, which was easily (and quickly) fixed. The attached patch adds a maintainer test to debian/t/control.t that fails for each package in sid (or, more precisely, whatever is in the local apt cache) that becomes uninstallable because of the current Breaks relations in debian/control. The idea is that this should make us less prone to forget this step, but I'm not sure if the uninstallability of those packages in sid is going to be long-standing enough that the test failures become sort of false positives and we become blind to them. Possibly we should go further and iterate over all packages hunting for versioned dependencies on these uninstallable packages. I'm not sure how cleanly this could be implemented, and I'm still not sure where to draw the line for failures. Filing this to at least track the issue. Thoughts? -- Niko Tyni nt...@debian.org
>From d6d687f07aa8534deb5119bdcc751c1020850fcb Mon Sep 17 00:00:00 2001 From: Niko Tyni <nt...@debian.org> Date: Mon, 26 Sep 2016 21:57:16 +0300 Subject: [PATCH] Add a maintainer test to find archive packages that become uninstallable This makes sure we don't accidentally upload src:perl that Breaks current sid versions of separate packages of dual life modules. --- debian/t/control.t | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/debian/t/control.t b/debian/t/control.t index e1d1d54..924ecee 100755 --- a/debian/t/control.t +++ b/debian/t/control.t @@ -129,7 +129,7 @@ my %is_perl_binary; my %deps_found; my $breaks_total = 0; -my $tests_per_breaks = 4; +my $tests_per_breaks = 5; for my $perl_package_info ($control->get_packages) { my $perl_package_name = $perl_package_info->{Package}; @@ -169,14 +169,16 @@ for my $perl_package_name (keys %deps_found) { # how many we need for my $broken (keys %{$dep_found->{$breaksname}}) { my $module = deb2cpan($broken); - my ($archive_epoch, $archive_digits) = get_archive_info($broken); + my ($archive_epoch, $archive_digits, $archive_version) + = get_archive_info($broken); SKIP: { - my $broken_version = $dep_found->{$breaksname}{$broken}{version}; + my $full_broken_version = $dep_found->{$breaksname}{$broken}{version}; skip("$module Breaks entry is unversioned", $tests_per_breaks) - if !defined $broken_version; + if !defined $full_broken_version; + my $broken_version = $full_broken_version; $broken_version =~ s/-\d+$//; # remove the Debian revision skip("$module is unknown to Module::CoreList", $tests_per_breaks) @@ -215,6 +217,11 @@ for my $perl_package_name (keys %deps_found) { ok(exists $dep_found->{Provides}{$broken}, "Breaks for $broken in $perl_package_name implies Provides"); } + skip("No version of $broken package in the archive", 1) + if !defined $archive_version; + + ok($versioning->compare($full_broken_version, $archive_version) <= 0, + "Newest version $archive_version of package $broken is not older than broken version $full_broken_version"); } } } @@ -286,14 +293,14 @@ sub cpan_version_to_deb { sub get_archive_info { my $p = shift; - return (0, 0) if !exists $apt->{$p}; - return (0, 0) if !exists $apt->{$p}{VersionList}; # virtual package + return (0, 0, undef) if !exists $apt->{$p}; + return (0, 0, undef) if !exists $apt->{$p}{VersionList}; # virtual package my $latest = (sort byversion @{$apt->{$p}{VersionList}})[-1]; my $v = $latest->{VerStr}; $v =~ s/\+dfsg//; my ($epoch, $major, $prefix, $suffix, $revision) = ($v =~ /^(?:(\d+):)?((?:\d+\.))+(\d+)(?:_(\d+))?(-[^-]+)$/); - return ($epoch, length $prefix); + return ($epoch, length $prefix, $latest->{VerStr}); } sub byversion { -- 2.9.3