Bug#518754: gcc-snapshot: gcc-..-base postinst needs additional error prevention
This issue affects Emdebian Grip in gcc-4.3 but I'm filing it here because Grip has
a workaround that is OK for 4.3 and I'm trying to fix the problem before 4.4 arrives.
Please let me know if I did that wrong.
The -base postinst script does check if a copyright file already exists but then does not
check that .copyright also exists.
Emdebian Grip has specialised handling of ./usr/share/doc/ to remove documentation and
compress all copyright files to save space. Therefore, the postinst fails because
..copyright does not exist, ./copyright.gz does instead. (changelog.Debian.gz is also
removed, along with everything else in ./usr/share/doc/$package/). Emdebian currently
has an adapted Policy for such changes with a hope to include suitable exceptions at
some point in the future.
Emdebian Grip does not recompile packages, it is binary-compatible with Debian so that
users can choose to install the equivalent Debian package if appropriate, so the underlying
functionality needs to be retained, even if the Grip package lacks the data files.
(Cross-building is used for Emdebian Crush, a smaller variant that is not binary-compatible
with Debian or Grip.)
It would be much appreciated if the postinst could check for .copyright and do nothing
if it does not exist.
#! /bin/sh -e
case "$1" in
# see #355439, packaging error in 4.0.2-9*
if [ ! -f $docdir/copyright ]; then
+ if [ -f $docdir/.copyright ]; then
ln $docdir/.copyright $docdir/copyright
if [ ! -f $docdir/changelog.Debian.gz ]; then
+ if [ -f $docdir/.changelog.Debian.gz ]; then
ln $docdir/.changelog.Debian.gz $docdir/changelog.Debian.gz
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/bash