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

[Pkg-fonts-devel] Bug#699905: marked as done (fonts-vlgothic: does not remove ttf-japanese-gothic.ttf alternative on upgrades from squeeze)



Your message dated Mon, 01 Apr 2013 00:32:33 +0000
with message-id <E1UMSfp-0008Oi-0n@franck.debian.org>
and subject line Bug#699905: fixed in fonts-vlgothic 20120629-2
has caused the Debian Bug report #699905,
regarding fonts-vlgothic: does not remove ttf-japanese-gothic.ttf alternative on upgrades from squeeze
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
699905: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699905
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: fonts-vlgothic
Version: 20120629-1
Severity: important
User: debian-qa@lists.debian.org
Usertags: piuparts

Hi,

<template>

during a test with piuparts I noticed your package left unowned files on
the system after purge, which is a violation of policy 6.8:

http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-removedetails

The leftover files are actually alternatives that were installed by the
package but have not been properly removed.

While there is ongoing discussion how to remove alternatives correctly
(see http://bugs.debian.org/71621 for details) the following strategy
should work for regular cases:
* 'postinst configure' always installs the alternative
* 'prerm remove' removes the alternative
* 'postrm remove' and 'postrm disappear' remove the alternative
In all other cases a maintainer script is invoked (e.g. upgrade,
deconfigure) the alternatives are not modified to preserve user
configuration.
Removing the alternative in 'prerm remove' avoids having a dangling link
once the actual file gets removed, but 'prerm remove' is not called in
all cases (e.g. unpacked but not configured packages or disappearing
packages) so the postrm must remove the alternative again
(update-alternatives gracefully handles removal of non-existing
alternatives).

Note that the arguments for adding and removing alternatives differ, for
removal it's 'update-alternatives --remove <name> <path>'.

Filing this as important as having a piuparts clean archive is a release
goal since lenny.

</template>

>From the attached log (scroll to the bottom...):

0m57.5s INFO: Warning: Package purging left files on system:
  /etc/alternatives/ttf-japanese-gothic.ttf -> /usr/share/fonts/truetype/vlgothic/VL-Gothic-Regular.ttf	 not owned
  /usr/share/fonts/	 owned by: fonts-vlgothic
  /usr/share/fonts/truetype/	 owned by: fonts-vlgothic
  /usr/share/fonts/truetype/ttf-japanese-gothic.ttf -> /etc/alternatives/ttf-japanese-gothic.ttf	 not owned


Due to the package rename, the stuff in the preinst script is not being
run at all during upgrades from squeeze: fonts-vlgothic will always be a
new install, so "$2" will be empty and all the
  dpkg --compare-versions "$2" lt-nl "$someversion"
will evaluate to false.

I'm not sure about the impact of this bug for stable users: what happens
if both ttf-japanese-gothic.ttf and fonts-japanese-gothic.ttf are
available on the system? (On a fresh upgrade from squeeze both will
point to the same existing file.)
And worse: what will happen if fonts-vlgothic is removed later on and
replaced by another font that provides the fonts-japanese-gothic.ttf
alternative? At that point only fonts-japanese-gothic.ttf will exist and
ttf-japanese-gothic.ttf will be a dangling symlink. May this have
negative impact on applications using such fonts?

If this is really bad, please raise severity to RC and fix via TPU.

I'm attaching a patch for the version in wheezy, but it should apply in
experimental or sid as well. I have not tried to "fix" the preinst, just
added another instance of alternative removal (that is probably already
existing but inactive in the code above it) that should qualify for TPU
if needed.

cheers,

Andreas

PS: another remark for the preinst stuff: getting rid of the old
conffile should nowadays be a job for dpkg-maintscript-helper, except
that it does not work for removing an obsolete conffile owned by another
package and the "current" package is a fresh installation (well, I think
that you can work around this with passing ${2:-0} as an argument so
that the old version is not empty ...)

PPS:
once the patch gets applied to experimental (or sid, in a version that
supersedes experimental), you can put guards around it:

if dpkg --compare-versions "$2" lt "$THEVERSIONWHEREYOUINTRODUCETHISINTOSID"
then
  u-a remove ...
fi

Note the "lt" not "lt-nl" - this needs to be run on initial install and
upgrades from any version that did not have this piece of code.
But then again, update-alternatives --remove works gracefully on not
existing alternatives - no errors, no noise


Andreas
diffstat for fonts-vlgothic-20120629 fonts-vlgothic-20120629

 changelog              |   10 ++++++++++
 fonts-vlgothic.preinst |    6 ++++++
 2 files changed, 16 insertions(+)

diff -Nru fonts-vlgothic-20120629/debian/changelog fonts-vlgothic-20120629/debian/changelog
--- fonts-vlgothic-20120629/debian/changelog	2012-06-29 09:29:25.000000000 +0200
+++ fonts-vlgothic-20120629/debian/changelog	2013-02-06 15:18:40.000000000 +0100
@@ -1,3 +1,13 @@
+fonts-vlgothic (20120629-1.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * fonts-vlgothic.preinst: Remove the alternative set up by ttf-vlgothic in
+    squeeze. This needs to be done unconditionally as it is not possible to
+    distinguish between new installation of fonts-vlgothic and upgrade from
+    ttf-vlgothic.  (Closes: #xxxxxx)
+
+ -- Andreas Beckmann <anbe@debian.org>  Wed, 06 Feb 2013 15:13:01 +0100
+
 fonts-vlgothic (20120629-1) unstable; urgency=low
 
   * New upstream release 
diff -Nru fonts-vlgothic-20120629/debian/fonts-vlgothic.preinst fonts-vlgothic-20120629/debian/fonts-vlgothic.preinst
--- fonts-vlgothic-20120629/debian/fonts-vlgothic.preinst	2011-09-18 16:16:57.000000000 +0200
+++ fonts-vlgothic-20120629/debian/fonts-vlgothic.preinst	2013-02-06 15:12:57.000000000 +0100
@@ -72,6 +72,12 @@
       fi
   fi
 
+  # Unconditionally remove the alternative set up by the old
+  # ttf-vlgothic package. We can't distinguish between new
+  # installations and "upgrades" from the old package name.
+  update-alternatives --remove ttf-japanese-gothic.ttf \
+	  /usr/share/fonts/truetype/vlgothic/VL-Gothic-Regular.ttf
+
 esac
 
 #DEBHELPER#

--- End Message ---
--- Begin Message ---
Source: fonts-vlgothic
Source-Version: 20120629-2

We believe that the bug you reported is fixed in the latest version of
fonts-vlgothic, which is due to be installed in the Debian FTP archive.

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 699905@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Hideki Yamane <henrich@debian.org> (supplier of updated fonts-vlgothic 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, 24 Mar 2013 13:41:11 +0900
Source: fonts-vlgothic
Binary: fonts-vlgothic ttf-vlgothic
Architecture: source all
Version: 20120629-2
Distribution: testing-proposed-updates
Urgency: low
Maintainer: Debian Fonts Task Force <pkg-fonts-devel@lists.alioth.debian.org>
Changed-By: Hideki Yamane <henrich@debian.org>
Description: 
 fonts-vlgothic - Japanese TrueType font from Vine Linux
 ttf-vlgothic - transitional dummy package
Closes: 699905
Changes: 
 fonts-vlgothic (20120629-2) testing-proposed-updates; urgency=low
 .
   [ Andreas Beckmann <anbe@debian.org> ]
   * ttf-vlgothic.preinst: Unregister the ttf-japanese-gothic.ttf alternative.
   * fonts-vlgothic.preinst: Clean up the ttf-japanese-gothic.ttf alternative
     set up by ttf-vlgothic in squeeze. This needs to be done in fonts-vlgothic
     as well since there is no guarantee that the transitional ttf-vlgothic
     package was installed and has cleaned this up. Since new installations of
     fonts-vlgothic cannot be distinguished from "upgrades" from ttf-vlgothic,
     this needs to be run on new installations, too.  (Closes: #699905)
Checksums-Sha1: 
 39ae66593481632a2ea760bf1d65511fc2a50a4d 2062 fonts-vlgothic_20120629-2.dsc
 96008164068992e70b15d78e6b02e3c8ada4ed8f 10446 fonts-vlgothic_20120629-2.debian.tar.gz
 ff8a46020de42bb065b6b3a768386f1ee2fa163b 2160188 fonts-vlgothic_20120629-2_all.deb
 aa21626d87c4f3e1efdc5679d52ecbc0fda69382 19824 ttf-vlgothic_20120629-2_all.deb
Checksums-Sha256: 
 ba6ead8b73843f38a6860a9a54eb8f802a217ef12fd711c00fef024e73b3af46 2062 fonts-vlgothic_20120629-2.dsc
 61d60a5798f7d16834855a68ddbf7a931a4f79e7191019ea4a4c04bf43920314 10446 fonts-vlgothic_20120629-2.debian.tar.gz
 53990914db20308dcd799edc3a184a95784200c3264f81631dbc48ee889c9c16 2160188 fonts-vlgothic_20120629-2_all.deb
 c866b38f51a6d92c94bb7ab500ab0fa2292952a75e48578c7342439bcd7d95d7 19824 ttf-vlgothic_20120629-2_all.deb
Files: 
 b7d6804a362d419b3fc54623475b0afd 2062 fonts optional fonts-vlgothic_20120629-2.dsc
 8d6643b6d80d1c42fff424ede668cf4b 10446 fonts optional fonts-vlgothic_20120629-2.debian.tar.gz
 fa9da1648ed47819ec7b026cc1cf4341 2160188 fonts optional fonts-vlgothic_20120629-2_all.deb
 cb96abb5d4009966af5b5bf215685e3d 19824 oldlibs extra ttf-vlgothic_20120629-2_all.deb

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

iQIcBAEBCgAGBQJRWNGzAAoJEF0yjQgqqrFAnpEQAJWKFjJTa+HCAdIe58ZdCWO4
7glBWGGw0NMKRSiTWXBbgoBmU1lISy40X91C+hUtaWzzjw176ly+GpcjXXZpnJ0W
uC350MBwVN3h58pyAMMkMxC2vlweg88LOEtj870ApaAOsQDb/ake9Aps8hIdsF7x
NxkZrEZ6UhqEkiMgDds5xyePTVg+4JM6XgfyzyyQEDdgcmSonvm+Ocqx9GhRu14P
COvDYfVShlnRPwZwinbhM/fJYL1t1cgZv2HeXUma84dVtasEHlgRzL3RvR9HbYV0
c4ORL0R0tvoVWkozCqZpvR/11KeL1zqLhCBj8qHOpBXIJJo7eVF62d4AgmNYpq+x
Hhu91iVgSzeffCtbNnFKIckiVbNTeb4K/7i3rcIVmmgz0nFja/uO15T5Tyj3b1mJ
YO/Aml3QEnHZ+SrA7vrEvWyk8mN5VE+Gwle5JbiTWOfj3ZID1h3Hce7zNGjf0Nid
D/CcqSDCQFze0XSLRblFpVGX9ltOJzO63C/wK4j2KdIU0/D/9KsSF/S/3XQH4bZL
WFvGujmDNj3a4oSlDNSE8f3lTHBM9MTfMgwJ7XU8NghHzI7H6I9xoVK59EC98N+1
OR9ubZqttDSOvWE81JhbfZrPQwBby4iUsJly3BHGtcOkGKkNS51erNyzYJivOkfp
A3A4xcioLZW/IZC1DN8u
=U6/Q
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: