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

Bug#138038: Help offered with report #138038



reopen 138038
quit

The fix in gcc-defaults 1.3 does not work:

bash-2.05b# find /usr -name "*c++filt*" -print0 | xargs -0 ls -ld
-rwxr-xr-x    1 root     root        30028 1998-12-04 06:05 /usr/bin/c++filt
-rwxr-xr-x    1 root     root        62408 2002-12-05 00:58 /usr/bin/c++filt.binutils
-rw-r--r--    1 root     root         1461 1998-11-14 01:48 /usr/man/man1/c++filt.1.gz
-rw-r--r--    1 root     root         3265 2002-12-05 00:58 /usr/share/man/man1/c++filt.1.gz
bash-2.05b# dpkg-divert --list | fgrep c++filt
diversion of /usr/bin/c++filt to /usr/bin/c++filt.binutils by g++
diversion of /usr/man/man1/c++filt.1.gz to /usr/man/man1/c++filt.binutils.1.gz by g++
bash-2.05b# dpkg -i ~ftp/pub/Debian/pools/Niemitalo/main/gcc-defaults/g++_3.2.2-0_i386.deb 
(Reading database ... 90228 files and directories currently installed.)
Preparing to replace g++ 2:2.95.4-8 (using .../g++_3.2.2-0_i386.deb) ...
Unpacking replacement g++ ...
Setting up g++ (3.2.2-0) ...
Removing `diversion of /usr/bin/c++filt to /usr/bin/c++filt.binutils by g++'
dpkg-divert: rename involves overwriting `/usr/bin/c++filt' with
  different file `/usr/bin/c++filt.binutils', not allowed
Removing `diversion of /usr/man/man1/c++filt.1.gz to /usr/man/man1/c++filt.binutils.1.gz by g++'

bash-2.05b# find /usr -name "*c++filt*" -print0 | xargs -0 ls -ld
-rwxr-xr-x    1 root     root        30028 1998-12-04 06:05 /usr/bin/c++filt
-rwxr-xr-x    1 root     root        62408 2002-12-05 00:58 /usr/bin/c++filt.binutils
-rw-r--r--    1 root     root         1461 1998-11-14 01:48 /usr/man/man1/c++filt.1.gz
-rw-r--r--    1 root     root         3265 2002-12-05 00:58 /usr/share/man/man1/c++filt.1.gz
bash-2.05b# dpkg-divert --list | fgrep c++filt
diversion of /usr/bin/c++filt to /usr/bin/c++filt.binutils by g++
bash-2.05b# 

The postinst script failed to undivert /usr/bin/c++filt,
and left /usr/man/man1/c++filt.1.gz loose in the filesystem.

Why didn't you use the snippet that I mailed to you?
Here it is again:

# fix for report #138038: remove old diversions
if [ -n "`dpkg-divert --list /usr/bin/c++filt.binutils`" ]; then
    # diversion of /usr/bin/c++filt
    #   to /usr/bin/c++filt.binutils
    # /usr/bin/c++filt is from old g++
    # /usr/bin/c++filt.binutils is from current binutils
    rm -f /usr/bin/c++filt
    dpkg-divert --package g++ --rename --remove /usr/bin/c++filt
fi
if [ -n "`dpkg-divert --list /usr/man/man1/c++filt.binutils.1.gz`" ]; then
    # diversion of /usr/man/man1/c++filt.1.gz
    #   to /usr/man/man1/c++filt.binutils.1.gz
    # /usr/man/man1/c++filt.1.gz is from old g++
    # /usr/man/man1/c++filt.binutils.1.gz does not exist any more
    # /usr/share/man/man1/c++filt.1.gz is from current binutils
    rm -f /usr/man/man1/c++filt.1.gz
    dpkg-divert --package g++ --rename --remove /usr/man/man1/c++filt.1.gz
fi



Reply to: