Bug#559153: Unable to purge mindi

2010-11-25 Thread Alexander Reichle-Schmehl
Hi!

* Jon Ander Peñalba  [091202 11:59]:

> When I try to purge mindi with aptitude I get this error: 
> /var/lib/dpkg/info/mindi.postrm: line 12: cd: /usr/lib/mindi: No such file or 
> directory
> Aparently mindi is trying to delete the files isolinux-H.cfg, isolinux.cfg, 
> syslinux-H.cfg and syslinux.cfg that are in that directory, but the directory 
> doesn't exisct.

Looking through the list of rc bugs, I found that one, which seems
fixable, but as I don't know how to fix #539678, I just write down, what
I found out:

Steps to reproduce:

1. Log into a clean chroot (e.g. pbuilder --login)
2. Install mindi
3. apt-get remove mindi _and_ mindi-busybox
4. apt-get purge mindi


The problem is, that mindi's postrm script doesn't distinguish between
removal and purge (and doesn't check, if /usr/lib/mindi exists).  When
the package is removed, the postrm script is called, the files are
removed, and since this directory is know empty, it is also removed.

When the package is purged, the postrm script is called again, trying to
change into the now no longer existing directory.


Ways to fix this:

* Distinguish between remove and purge actions of the script and only
  act once
* Check if the directory exists before changing into it
* Remove the files with complete path, instead of the cd and remove
  stuff
* ignore errors on cd

I guess the third option is the best, so the trivial patch would be:

- ( cd $MINDI_LIB && rm -f isolinux-H.cfg isolinux.cfg syslinux-H.cfg 
syslinux.cfg )
+ rm -f $MINDI_LIB/isolinux-H.cfg
+ rm -f $MINDI_LIB/isolinux.cfg
+ rm -f $MINDI_LIB/syslinux-H.cfg
+ rm -f $MINDI_LIB/syslinux.cfg


Best Regards,
  Alexander



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



Bug#559153: Unable to purge mindi

2009-12-02 Thread Jon Ander Peñalba
Package: mindi
Severity: minor

When I try to purge mindi with aptitude I get this error: 
/var/lib/dpkg/info/mindi.postrm: line 12: cd: /usr/lib/mindi: No such file or 
directory
Aparently mindi is trying to delete the files isolinux-H.cfg, isolinux.cfg, 
syslinux-H.cfg and syslinux.cfg that are in that directory, but the directory 
doesn't exisct.


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages mindi depends on:
ii  binutils  2.20-4 The GNU assembler, linker and bina
ii  bzip2 1.0.5-3high-quality block-sorting file co
pn  dosfstools (no description available)
ii  file  5.03-3 Determines file type using "magic"
ii  gawk  1:3.1.6.dfsg-4 GNU awk, a pattern scanning and pr
ii  genisoimage   9:1.1.9-1  Creates ISO-9660 CD-ROM filesystem
pn  mindi-busybox  (no description available)
ii  module-init-tools 3.11-1 tools for managing Linux kernel mo
ii  nano  2.1.99pre1-1   small, friendly text editor inspir
pn  parted (no description available)
pn  syslinux   (no description available)

Versions of packages mindi recommends:
ii  cpio  2.10-1 GNU cpio -- a program to manage ar
ii  linux-image-2.6-486   2.6.30+21  Linux 2.6 image on x86
pn  mdadm  (no description available)
pn  ntfsprogs  (no description available)

Versions of packages mindi suggests:
pn  acl(no description available)
pn  afio   (no description available)
pn  attr   (no description available)
ii  eject   2.1.5+deb1+cvs20081104-7 ejects CDs and operates CD-Changer
ii  less436-1pager program similar to more
pn  lilo   (no description available)
pn  lzop   (no description available)
pn  petris (no description available)



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