[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#167185: tetex-bin: postrm script fails when homedirectory of user calling the script is non-existant



Package: tetex-bin
Version: 1.0.7+20011202-7
Severity: normal

I was building a package for m68k that requires tetex-bin. The build takes
place in a chroot. I do not have a home directory there for the user (cts)
that started sbuild, the script used by all buildds. After the sucessful
build of the package, sbuild tried to remove tetex-bin again, and fails:

Purging configuration files for tetex-bin ...
/var/lib/dpkg/info/tetex-bin.postrm: line 36: cd: /home/cts: No such file or directory
dpkg: error processing tetex-bin (--purge):  subprocess post-removal script returned error exit status 1

The full log is at:
http://buildd.debian.org/fetch.php?&pkg=geomview&ver=1.8.1-3&arch=m68k&stamp=1035996566&file=log&as=raw

This is where the script fails:
            if [ -d /var/cache/fonts ]; then
                cd /var/cache/fonts
                rm -rf source tfm pk
                cd
                ^^ fails because the user has no homedir
                rmdir /var/cache/fonts 2>/dev/null || true
            fi
            ;;

I suggest you change that to cd / or something else that definetely exists.
I aggree its pretty uncommon for the home directory of the user who calls
the postrm script not to exist, but maybe for buildd's its more common.

Christian

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux gleep 2.4.19 #1 Tue Sep 3 19:04:17 EDT 2002 i686
Locale: LANG=C, LC_CTYPE=de_DE@euro

Versions of packages tetex-bin depends on:
ii  debianutils             1.16             Miscellaneous utilities specific t
ii  dpkg                    1.9.21           Package maintenance system for Deb
ii  ed                      0.2-19           The classic unix line editor
ii  libc6                   2.2.5-14.3       GNU C Library: Shared libraries an
ii  libkpathsea3            1.0.7+20011202-7 shared libkpathsea for teTeX
ii  libpng2                 1.0.12-3.woody.2 PNG library - runtime
ii  libstdc++2.10-glibc2.2  1:2.95.4-7       The GNU stdc++ library
ii  libtiff3g               3.5.5-6          Tag Image File Format library
ii  libxaw7                 4.1.0-16         X Athena widget set library
ii  tetex-base              1.0.2+20011202-2 basic teTeX library files
ii  xlibs                   4.1.0-16         X Window System client libraries
ii  zlib1g                  1:1.1.4-6        compression library - runtime




Reply to: