reopen 653411 severity 653411 normal tags 653411 + patch thanks Bob Proulx wrote: > Kamal Mostafa wrote: > > I'll upload a new unixcw package shortly, which I think fixes the > > problem. Bob, please advise if you find otherwise. > > I will wait for your latest upload to show up in the archive (probably > by tomorrow morning) and then will test it.
The upgrade with the new package now "reports" a successful installation. But it is not actually fully successful. Versions previously installed: ii cw 2.3-13 ii unixcw 2.3-13 # apt-get install cw Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libcw3 The following packages will be REMOVED: unixcw The following NEW packages will be installed: libcw3 The following held packages will be changed: cw unixcw The following packages will be upgraded: cw 1 upgraded, 1 newly installed, 1 to remove and 1 not upgraded. Need to get 77.4 kB of archives. After this operation, 39.9 kB of additional disk space will be used. Do you want to continue [Y/n]? Y Get:1 http://ftp.us.debian.org/debian/ sid/main cw amd64 3.0-4 [36.6 kB] Get:2 http://ftp.us.debian.org/debian/ sid/main libcw3 amd64 3.0-4 [40.8 kB] Fetched 77.4 kB in 0s (78.2 kB/s) Preconfiguring packages ... (Reading database ... 411784 files and directories currently installed.) Preparing to replace cw 2.3-13 (using .../archives/cw_3.0-4_amd64.deb) ... Unpacking replacement cw ... Processing triggers for man-db ... (Reading database ... 411783 files and directories currently installed.) Removing unixcw ... Processing triggers for man-db ... (Reading database ... 411778 files and directories currently installed.) Unpacking libcw3 (from .../libcw3_3.0-4_amd64.deb) ... Processing triggers for man-db ... Setting up libcw3 (3.0-4) ... Setting up cw (3.0-4) ... That all looks good upon the installation. However unfortunately the resulting installation is broken in a different way now. The problem is a symlink left behind by the previous package version. $ ls -l /usr/share/doc/cw lrwxrwxrwx 1 root root 6 Dec 25 2009 /usr/share/doc/cw -> unixcw $ ls -l /usr/share/doc/cw/ ls: cannot access /usr/share/doc/cw/: No such file or directory $ ls -l /usr/share/doc/unixcw ls: cannot access /usr/share/doc/unixcw: No such file or directory The problem is that in the previous version 2.3-13 of cw included a symlink in a bad spot. lrwxrwxrwx 1 root root 6 Dec 25 2009 /usr/share/doc/cw -> unixcw That is the problem. And that means that upon upgrade to the new package that symlink isn't corrected and it is left dangling. I built a test package with the following cw.preinst script. I think this is the best solution to the symlink upgrade problem. Here is my suggestion: #!/bin/sh #DEBHELPER# if [ -h /usr/share/doc/cw ]; then # Previously in cw version 2.3-13 /usr/share/doc/cw was a symlink to # unixcw. Removing this symlink must be handled explicitly so that # the new version of the package can be placed into a real directory # there otherwise the symlink will be preserved and the doc files # will be missing after the install. This is required to upgrade # from Squeeze to Wheezy. This may be removed after Wheezy. rm -f /usr/share/doc/cw fi It simply checks to see if /usr/share/doc/cw is already existing as a symlink before the current package is unpacked and if it is then it removes the symlink. This allows the current package to be unpacked and the package manager will create the new /usr/share/doc/cw directory. Thanks! Bob
signature.asc
Description: Digital signature