cil packages fail to uninstall on lucid->precise upgrade due to prerm script use of perl-modules via /usr/share/cli-common/gac-package-remove -> /usr/share/cli-common/runtimes.d/mono (Can't locate File/Basename.pm in @INC)

Bug #948848 reported by Jean-Baptiste Lallement
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mono (Debian)
Fix Released
Unknown
mono (Ubuntu)
Fix Released
High
Steve Langasek
Precise
Fix Released
High
Steve Langasek
perl (Debian)
Fix Released
Unknown
perl (Ubuntu)
Fix Released
High
Canonical Foundations Team
Precise
Fix Released
High
Canonical Foundations Team

Bug Description

Lucid to Precise upgrade main-all amd64
https://jenkins.qa.ubuntu.com/job/precise-upgrade-lucid-main/ARCH=amd64,LTS=lts,PROFILE=main-all,label=upgrade-test/45/

System fails to upgrade with error:
Removing libgnomedesktop2.20-cil ...
Can't locate File/Basename.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/share/cli-common/runtimes.d/mono line 12.
BEGIN failed--compilation aborted at /usr/share/cli-common/runtimes.d/mono line 12.
Removing libgnomedesktop2.20-cil from
Can't locate File/Basename.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/share/cli-common/runtimes.d/mono line 12.
BEGIN failed--compilation aborted at /usr/share/cli-common/runtimes.d/mono line 12.
dpkg: error processing libgnomedesktop2.20-cil (--remove):
 subprocess installed pre-removal script returned error exit status 2
Errors were encountered while processing:
 libgnomedesktop2.20-cil

Full log: https://jenkins.qa.ubuntu.com/job/precise-upgrade-lucid-main/ARCH=amd64,LTS=lts,PROFILE=main-all,label=upgrade-test/45/artifact/lts-main-all-amd64/apt-term.log

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libgnomedesktop2.20-cil (not installed)
ProcVersionSignature: Ubuntu 3.2.0-18.28-generic 3.2.9
Uname: Linux 3.2.0-18-generic x86_64
ApportVersion: 1.94-0ubuntu2
Architecture: amd64
Date: Wed Mar 7 10:34:20 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
ProcEnviron:
 TERM=xterm
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: gnome-desktop-sharp2
UpgradeStatus: No upgrade log present (probably fresh install)

Changed in gnome-desktop-sharp2 (Ubuntu Precise):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
Revision history for this message
Martin Pitt (pitti) wrote :

lucid's prerm does:

if [ "$1" = "remove" ] || [ "$1" = "upgrade" ] && [ -x /usr/share/cli-common/gac-package-remove ]; then
        /usr/share/cli-common/gac-package-remove libgnomedesktop2.20-cil
fi

This seems to crash when calling gac-package-remove, which I assume is a Perl script. Seems lucid is missing a dependency there, or the dependency has already been removed/is being upgraded.

This is hopefully fixable by doing a precise upload and handle the failure in prerm "$1" = "failed-upgrade". (See http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-unpackphase).

Chris, as you are most familiar with the Mono packages, can you please have a look at this? Thanks!

Changed in gnome-desktop-sharp2 (Ubuntu Precise):
assignee: Canonical Desktop Team (canonical-desktop-team) → Chris Halse Rogers (raof)
Revision history for this message
Steve Langasek (vorlon) wrote :

This problem is hitting the current main-all upgrade test with a different package affected (libqyoto4.5-cil). cli-common is *not* missing a dependency, it depends on perl-modules as it should; but the new perl-modules is unpacked but not actually usable because the version of perl-base unpacked on the system doesn't match.

See bug #901741 for some more analysis of this general problem wrt perl on the upgrade.

affects: gnome-desktop-sharp2 (Ubuntu Precise) → cli-common (Ubuntu Precise)
Changed in cli-common (Ubuntu Precise):
importance: Undecided → High
status: New → Triaged
assignee: Chris Halse Rogers (raof) → Canonical Foundations Team (canonical-foundations)
Revision history for this message
Steve Langasek (vorlon) wrote :

Sticking this on cli-common for the time being, as the package providing the perl script that depends on File::Basename; not sure if we'll be fixing it there or elsewhere.

Revision history for this message
Steve Langasek (vorlon) wrote : Re: cil packages fail to uninstall on lucid->precise upgrade due to prerm script use of perl-base via /usr/share/cli-common/gac-package-remove -> /usr/share/cli-common/runtimes.d/mono (Can't locate File/Basename.pm in @INC)

actually, the script is in mono-gac, not in cil-common.

summary: - lucid to precise upgrade: libgnomedesktop2.20-cil failed to remove :
- Can't locate File/Basename.pm in @INC (@INC contains: /etc/perl
- /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5
- /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
- /usr/local/lib/site_perl .) at /usr/share/cli-common/runtimes.d/mono
- line 12. BEGIN failed--compilation aborted at /usr/share/cli-
- common/runtimes.d/mono line 12.
+ cil packages fail to uninstall on lucid->precise upgrade due to prerm
+ script use of perl-base via /usr/share/cli-common/gac-package-install
+ (Can't locate File/Basename.pm in @INC)
summary: - cil packages fail to uninstall on lucid->precise upgrade due to prerm
- script use of perl-base via /usr/share/cli-common/gac-package-install
- (Can't locate File/Basename.pm in @INC)
+ cil packages fail to uninstall on lucid->precise upgrade due to prerm
+ script use of perl-base via /usr/share/cli-common/gac-package-remove ->
+ /usr/share/cli-common/runtimes.d/mono (Can't locate File/Basename.pm in
+ @INC)
affects: cli-common (Ubuntu Precise) → mono (Ubuntu Precise)
Revision history for this message
Steve Langasek (vorlon) wrote :

The /usr/share/cli-common/runtimes.d/mono in lucid calls 'use File::Basename', but it doesn't actually *use* it. The only uses of basename/dirname are embedded in a system() call:

    my $cmd = "(cd `dirname $dll` && "
        . "/usr/bin/gacutil -i `basename $dll`"
           . " > /dev/null)";
    system($cmd) == 0 or die "E: installing Assembly $dll failed\n";

So that's not using File::Basename at all. Dropping this spurious 'use' in SRU may be enough to fix this upgrade problem.

Steve Langasek (vorlon)
tags: added: rls-p-tracking
Revision history for this message
Colin Watson (cjwatson) wrote :

I think we should get this fixed in Debian and then get the Debian Perl maintainers to add Conflicts as appropriate (there's already a reasonable list of such; if I remember correctly, Breaks is too weak). Obviously we can apply those changes locally in Ubuntu if necessary.

I agree that simply removing 'use File::Basename;' looks as though it should be sufficient.

summary: cil packages fail to uninstall on lucid->precise upgrade due to prerm
- script use of perl-base via /usr/share/cli-common/gac-package-remove ->
- /usr/share/cli-common/runtimes.d/mono (Can't locate File/Basename.pm in
- @INC)
+ script use of perl-modules via /usr/share/cli-common/gac-package-remove
+ -> /usr/share/cli-common/runtimes.d/mono (Can't locate File/Basename.pm
+ in @INC)
Revision history for this message
Colin Watson (cjwatson) wrote :

... by which I mean that I don't think an SRU is either necessary or sufficient. I've looked into mono-gac's dependency structure, and I see no reason why apt would have trouble at least unpacking the new version before perl-base.

Steve Langasek (vorlon)
Changed in perl (Ubuntu Precise):
status: New → Triaged
importance: Undecided → High
Changed in mono (Ubuntu Precise):
assignee: Canonical Foundations Team (canonical-foundations) → Steve Langasek (vorlon)
Steve Langasek (vorlon)
Changed in perl (Ubuntu Precise):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Revision history for this message
Steve Langasek (vorlon) wrote :

This bug is currently a blocker in automated upgrade testing that may be hiding other upgrade bugs, so I've gone ahead with uploading the mono change to the freeze queue and will follow up with perl tomorrow morning (unless someone beats me to it).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mono - 2.10.8.1-1ubuntu1

---------------
mono (2.10.8.1-1ubuntu1) precise; urgency=low

  * debian/mono.runtime-script: Don't use File::Basename, because it's not
    actually being *used*, and the 'use' statement causes failures if this
    script is called while perl-base and perl-modules are not in a consistent
    state. LP: #948848.
 -- Steve Langasek <email address hidden> Thu, 22 Mar 2012 23:00:53 -0700

Changed in mono (Ubuntu Precise):
status: Triaged → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package perl - 5.14.2-6ubuntu2

---------------
perl (5.14.2-6ubuntu2) precise; urgency=low

  * Have perl, perl-modules, and perl-base conflict with versions of
    mono-gac requiring File::Basename, to ensure a smooth upgrade from lucid.
    LP: #948848.
 -- Steve Langasek <email address hidden> Fri, 23 Mar 2012 07:59:20 -0700

Changed in perl (Ubuntu Precise):
status: Triaged → Fix Released
Changed in mono (Debian):
status: Unknown → Fix Committed
Changed in perl (Debian):
status: Unknown → New
Changed in mono (Debian):
status: Fix Committed → Fix Released
Changed in perl (Debian):
status: New → Fix Committed
Changed in perl (Debian):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.