Debian Bug report logs - #559153
Unable to purge mindi

version graph

Package: mindi; Maintainer for mindi is (unknown);

Reported by: Jon Ander Peñalba <jonan88@gmail.com>

Date: Wed, 2 Dec 2009 11:03:02 UTC

Severity: serious

Tags: patch

Fixed in version mindi/1:2.0.4-1.1

Done: Didier Raboud <didier@raboud.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, jonan88@gmail.com, Andree Leidenfrost <andree@debian.org>:
Bug#559153; Package mindi. (Wed, 02 Dec 2009 11:03:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jon Ander Peñalba <jonan88@gmail.com>:
New Bug report received and forwarded. Copy sent to jonan88@gmail.com, Andree Leidenfrost <andree@debian.org>. (Wed, 02 Dec 2009 11:03:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Jon Ander Peñalba <jonan88@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Unable to purge mindi
Date: Wed, 02 Dec 2009 11:59:19 +0100
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-3        high-quality block-sorting file co
pn  dosfstools                <none>         (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             <none>         (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                    <none>         (no description available)
pn  syslinux                  <none>         (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                         <none>     (no description available)
pn  ntfsprogs                     <none>     (no description available)

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




Information forwarded to debian-bugs-dist@lists.debian.org, Andree Leidenfrost <andree@debian.org>:
Bug#559153; Package mindi. (Thu, 14 Jan 2010 15:03:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonan <jonan88@gmail.com>:
Extra info received and forwarded to list. Copy sent to Andree Leidenfrost <andree@debian.org>. (Thu, 14 Jan 2010 15:03:05 GMT) Full text and rfc822 format available.

Message #10 received at 559153@bugs.debian.org (full text, mbox):

From: Jonan <jonan88@gmail.com>
To: 559153@bugs.debian.org
Subject: Solved
Date: Thu, 14 Jan 2010 16:01:50 +0100
[Message part 1 (text/plain, inline)]
Surprisingly today I did 'aptitude purge ~c' to purge some other packages
and when it was mindi's turn this message appeared:

Removing mindi ...
Purging configuration files for mindi ...
cd: 12: can't cd to /usr/lib/mindi

Besides the error, the package isn't in my system anymore. So I think this
bug can be closed.


-- 
Live Free or Die Hard
[Message part 2 (text/html, inline)]

Severity set to 'serious' from 'minor' Request was from Lucas Nussbaum <lucas@lucas-nussbaum.net> to control@bugs.debian.org. (Sun, 21 Nov 2010 10:10:35 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Andree Leidenfrost <andree@debian.org>:
Bug#559153; Package mindi. (Thu, 25 Nov 2010 12:54:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alexander Reichle-Schmehl <tolimar@debian.org>:
Extra info received and forwarded to list. Copy sent to Andree Leidenfrost <andree@debian.org>. (Thu, 25 Nov 2010 12:54:03 GMT) Full text and rfc822 format available.

Message #17 received at 559153@bugs.debian.org (full text, mbox):

From: Alexander Reichle-Schmehl <tolimar@debian.org>
To: 559153@bugs.debian.org
Subject: Re: Bug#559153: Unable to purge mindi
Date: Thu, 25 Nov 2010 13:52:15 +0100
Hi!

* Jon Ander Peñalba <jonan88@gmail.com> [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




Added tag(s) pending. Request was from Bilal Akhtar <bilalakhtar@ubuntu.com> to control@bugs.debian.org. (Sun, 28 Nov 2010 11:27:08 GMT) Full text and rfc822 format available.

Removed tag(s) pending. Request was from Didier Raboud <didier@raboud.com> to control@bugs.debian.org. (Sun, 28 Nov 2010 12:33:09 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Andree Leidenfrost <andree@debian.org>:
Bug#559153; Package mindi. (Sun, 28 Nov 2010 14:03:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Didier Raboud <didier@raboud.com>:
Extra info received and forwarded to list. Copy sent to Andree Leidenfrost <andree@debian.org>. (Sun, 28 Nov 2010 14:03:06 GMT) Full text and rfc822 format available.

Message #26 received at 559153@bugs.debian.org (full text, mbox):

From: Didier Raboud <didier@raboud.com>
To: 559153@bugs.debian.org
Subject: mindi: diff for NMU version 1:2.0.4-1.1
Date: Sun, 28 Nov 2010 14:59:53 +0100
tags 559153 + patch
tags 559153 + pending
thanks

Dear maintainer,

I've prepared an NMU for mindi (versioned as 1:2.0.4-1.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

Regards.
diff -u mindi-2.0.4/debian/changelog mindi-2.0.4/debian/changelog
--- mindi-2.0.4/debian/changelog
+++ mindi-2.0.4/debian/changelog
@@ -1,3 +1,11 @@
+mindi (1:2.0.4-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Enhance the postrm maintainer script to only remove the files in
+    /usr/lib/mindi/ on purge. (Closes: #559153)
+
+ -- Didier Raboud <didier@raboud.com>  Sun, 28 Nov 2010 14:31:17 +0100
+
 mindi (1:2.0.4-1) unstable; urgency=high
 
   * New upstream release.
diff -u mindi-2.0.4/debian/postrm mindi-2.0.4/debian/postrm
--- mindi-2.0.4/debian/postrm
+++ mindi-2.0.4/debian/postrm
@@ -7,9 +7,16 @@
 
 MINDI_LIB=/usr/lib/mindi
 
-# Remove configuration files for isolinux and syslinux that are included in
-# upstream but generated on the fly in the Debian package
-( cd $MINDI_LIB && rm -f isolinux-H.cfg isolinux.cfg syslinux-H.cfg syslinux.cfg )
+if [ "$1" = purge ] ; then
+
+    # Remove configuration files for isolinux and syslinux that are included in
+    # upstream but generated on the fly in the Debian package
+    rm -f $MINDI_LIB/isolinux-H.cfg
+    rm -f $MINDI_LIB/isolinux.cfg
+    rm -f $MINDI_LIB/syslinux.cfg
+    rm -f $MINDI_LIB/syslinux-H.cfg
+
+fi
 
 # dh_installdeb will replace this with shell code automatically
 # generated by other debhelper scripts.




Added tag(s) patch. Request was from Didier Raboud <didier@raboud.com> to control@bugs.debian.org. (Sun, 28 Nov 2010 14:03:16 GMT) Full text and rfc822 format available.

Added tag(s) pending. Request was from Didier Raboud <didier@raboud.com> to control@bugs.debian.org. (Sun, 28 Nov 2010 14:03:17 GMT) Full text and rfc822 format available.

Reply sent to Didier Raboud <didier@raboud.com>:
You have taken responsibility. (Tue, 30 Nov 2010 14:51:06 GMT) Full text and rfc822 format available.

Notification sent to Jon Ander Peñalba <jonan88@gmail.com>:
Bug acknowledged by developer. (Tue, 30 Nov 2010 14:51:06 GMT) Full text and rfc822 format available.

Message #35 received at 559153-close@bugs.debian.org (full text, mbox):

From: Didier Raboud <didier@raboud.com>
To: 559153-close@bugs.debian.org
Subject: Bug#559153: fixed in mindi 1:2.0.4-1.1
Date: Tue, 30 Nov 2010 14:47:06 +0000
Source: mindi
Source-Version: 1:2.0.4-1.1

We believe that the bug you reported is fixed in the latest version of
mindi, which is due to be installed in the Debian FTP archive:

mindi_2.0.4-1.1.diff.gz
  to main/m/mindi/mindi_2.0.4-1.1.diff.gz
mindi_2.0.4-1.1.dsc
  to main/m/mindi/mindi_2.0.4-1.1.dsc
mindi_2.0.4-1.1_amd64.deb
  to main/m/mindi/mindi_2.0.4-1.1_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 559153@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Didier Raboud <didier@raboud.com> (supplier of updated mindi package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 28 Nov 2010 14:31:17 +0100
Source: mindi
Binary: mindi
Architecture: source amd64
Version: 1:2.0.4-1.1
Distribution: unstable
Urgency: low
Maintainer: Andree Leidenfrost <andree@debian.org>
Changed-By: Didier Raboud <didier@raboud.com>
Description: 
 mindi      - creates boot/root disks based on your system
Closes: 559153
Changes: 
 mindi (1:2.0.4-1.1) unstable; urgency=low
 .
   * Non-maintainer upload.
   * Enhance the postrm maintainer script to only remove the files in
     /usr/lib/mindi/ on purge. (Closes: #559153)
Checksums-Sha1: 
 26800f6d3a98d79208b7e40763d3d672b95477d8 1663 mindi_2.0.4-1.1.dsc
 a34569ef76e64c504f36cf70a119fc7f20d8d910 17506 mindi_2.0.4-1.1.diff.gz
 12d7e34c3acce994a1880d6373e69488490d484b 152540 mindi_2.0.4-1.1_amd64.deb
Checksums-Sha256: 
 11e145c1598e067f5dc02823e773d2a8f57306ec4e197618f83e5a9eddfd3705 1663 mindi_2.0.4-1.1.dsc
 b14972ec29e9831a2063aba9d5907d473d91d3546912abac25cd493813c53612 17506 mindi_2.0.4-1.1.diff.gz
 9f85e4af8bc94a24a2c01417b0c4b95b32b86a338e250d1ae867b86642f996fc 152540 mindi_2.0.4-1.1_amd64.deb
Files: 
 2b353e1072a9897ced090fdfa7433814 1663 utils optional mindi_2.0.4-1.1.dsc
 51d238e5be7a917e6aef0ed3d663ada2 17506 utils optional mindi_2.0.4-1.1.diff.gz
 777a9dc87fcb6a34a011b510a333a432 152540 utils optional mindi_2.0.4-1.1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBCgAGBQJM8mPhAAoJENkdV6A76fNtExYQALd9IzneZY2/FI/apjWLtmzY
ekWNp7KahqsS1k1UZiurcEdDlZWQIqO59TGjgI0wtHrOhXQDaVyjbHjfN2oy4NYU
Br65O3JWvK352oW4msbhLrc4aLey6Cwuo3gpj4D3Tv80sJxLKuB0+FcTT5A6aTs0
QKUiuE89zlt4bmCLO/acRIdhmJ1ZSNtTDVm4apjIKg8Pyvc/CESmZKa1YWUdpJx9
bDYuTeJfINo/YSP/N+6a7sMIqDjxcTVKM7bmKpJQ45Uu7cT8Q0Yo8bBU+YAIt/Cg
AD5btBzTQNMNw8FtRzKDXX/DFHhz2nZ0hpx7vXJ+KR8cIypnH5v2xD72Odi7J31K
bB6sm0RCPlBYWifgZlSVrnRk6MaW9SKHYWsjyLAHLjQFMLOno/pKK5MsH5F/frGg
C6PqyL3zOBYPHKdTHvVtzlVTmiFgUl7PEfx+zWmtjQoqHqhs6rfAgyS5o1v6YD+8
R2+C/GeFuTiVO4hdHUBIKJri0HxjonHZvmNgv04ScWLSAzWPPeiwSok1yS/dDCYM
DeY5sdDPwilV1J+lKOsEvXKSX/3iGZ/Iq5Ff62srT+Tmu4e8U/sK+44qMPE/6UMK
FiFdbl//jIFbxv1hJlDN369+XcDGs2lfby/kOeegPhiKZYPDvnkz/xzl28rzPvzC
4ODygqyB9tkUVkPrf/06
=nFyh
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 29 Dec 2010 07:32:42 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 22:33:48 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.