package apt-cacher
tag 657834 pending
thanks

On Sun, Jan 29, 2012 at 11:08:01AM +0100, Holger Levsen wrote:
> Package: apt-cacher
> Version: 1.7.2
> Severity: serious
> User: debian...@lists.debian.org
> Usertags: piuparts
> 
> Hi,
> 
> during a test with piuparts I noticed your package fails to upgrade from
> squeeze. It installed fine in squeeze, then the upgrade to wheezy fails.
> 
> From the attached log (scroll to the bottom...):
> 
>   Preparing to replace apt-cacher 1.6.12 (using .../apt-cacher_1.7.2_all.deb) 
> ...
>   Running apt-cacher upgrade script
>   Can't locate IO/Uncompress/AnyUncompress.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/apt-cacher/apt-cacher-lib.pl line 
> 16.
>   BEGIN failed--compilation aborted at 
> /usr/share/apt-cacher/apt-cacher-lib.pl 
> line 16.
>   Compilation failed in require at /usr/share/apt-cacher/upgrade.pl line 16.
>   dpkg: warning: subprocess old pre-removal script returned error exit status 
> 2
>   dpkg - trying script from the new package instead ...
>   Stopping libcurl backend
>   /var/lib/dpkg/tmp.ci/prerm: 39: /usr/share/apt-cacher/libcurl.pl: not found
>   dpkg: error processing /var/cache/apt/archives/apt-cacher_1.7.2_all.deb (--
> unpack):
>    subprocess new pre-removal script returned error exit status 127
>   configured to not write apport reports
>   invoke-rc.d: policy-rc.d denied execution of start.
>   Errors were encountered while processing:
>    /var/cache/apt/archives/apt-cacher_1.7.2_all.deb
>   E: Sub-process /usr/bin/dpkg returned an error code (1)

Thanks. I think the patch below fixes it. I have queued it for the next 
release.

Mark
commit 54efcd73bc195f1917f7b4c3313d2da2de9d7f40
Author: Mark Hindley <m...@hindley.org.uk>
Date:   Mon Jan 30 11:34:14 2012 +0000

    Check for existence of libcurl.pl in prerm. In the case of failed-upgrade 
the
    script might be missing, only try to run it if it is present (Closes 
#657834).

diff --git a/debian/prerm b/debian/prerm
index 7607b35..700dc63 100755
--- a/debian/prerm
+++ b/debian/prerm
@@ -34,9 +34,12 @@ case "$1" in
     ;;
 esac
 
-# Stop any running libcurl backend
-echo "Stopping libcurl backend"
-/usr/share/apt-cacher/libcurl.pl EXIT
+# Script might not be present in the case of failed-upgrade, so check first
+if [ -x /usr/share/apt-cacher/libcurl.pl ] ; then
+    # Stop any running libcurl backend
+    echo "Stopping libcurl backend"
+    /usr/share/apt-cacher/libcurl.pl EXIT
+fi
 
 # dh_installdeb will replace this with shell code automatically
 # generated by other debhelper scripts.



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to