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

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



Your message dated Sun, 24 Mar 2013 22:17:36 +0000
with message-id <E1UJtEO-0004CT-4n@franck.debian.org>
and subject line Bug#703856: fixed in fonts-vlgothic 20121230-2
has caused the Debian Bug report #703856,
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.)


-- 
703856: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=703856
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: 20121230-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 703856@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: Mon, 25 Mar 2013 06:50:11 +0900
Source: fonts-vlgothic
Binary: fonts-vlgothic ttf-vlgothic
Architecture: source all
Version: 20121230-2
Distribution: unstable
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: 703856
Changes: 
 fonts-vlgothic (20121230-2) unstable; urgency=low
 .
   [ Andreas Beckmann ]
   * 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 in case this was not handled by the
     transitional ttf-vlgothic package.  (Closes: #703856)
 .
   [ Hideki Yamane ]
   * Upload to unstable
Checksums-Sha1: 
 b6d6066a0590d8468b269714918044e58ef8789f 2062 fonts-vlgothic_20121230-2.dsc
 9da4749247eb198e0cfafece2abf4b70fed8ae45 10608 fonts-vlgothic_20121230-2.debian.tar.gz
 72175755d394ba0a0e2efdede0c5555bddb8aa12 2231792 fonts-vlgothic_20121230-2_all.deb
 587977b3af28e0b4416b42f72ecfaf7e525de8d3 24816 ttf-vlgothic_20121230-2_all.deb
Checksums-Sha256: 
 c4a43b581c179a7ccf095344ff767d5fe2b9e9863a60ea603f80eab43b05680f 2062 fonts-vlgothic_20121230-2.dsc
 4fc9d7b11e2f71b599ef74b322fb760da357cf5334619e5be68e4eea2931506d 10608 fonts-vlgothic_20121230-2.debian.tar.gz
 919607fd937f4ee34293349eae313a1270a64210e9cad21c14c6b0f09883efeb 2231792 fonts-vlgothic_20121230-2_all.deb
 bebe739fd0865f4c2b2a151f2f9cd3008682f27d61602c427a4d163a0d2b8c48 24816 ttf-vlgothic_20121230-2_all.deb
Files: 
 646cb8985d336c1b778658fac2506bb6 2062 fonts optional fonts-vlgothic_20121230-2.dsc
 7975d25b6e823fdbfed607b1ae92de5b 10608 fonts optional fonts-vlgothic_20121230-2.debian.tar.gz
 a8be60dc82302f2210a1360abd31907a 2231792 fonts optional fonts-vlgothic_20121230-2_all.deb
 b3d5106e9d7593d4c31c0938b5c93494 24816 oldlibs extra ttf-vlgothic_20121230-2_all.deb

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

iQIcBAEBCgAGBQJRT3hcAAoJEF0yjQgqqrFAi6kQAJ74EPiAfJRvz6pskdVRnBec
lScw1QwvymGgQQrKOm9OjneeFTKFqixU99ISX9vRzQO3rDhgGMjDqvZTJEg0xQHv
YEOZdPVz52WH9o6LEDdFHcRh8lTGNLO5VegoZKVaYoV+mVOAYCr7h4Mli7nGGgqH
ezTevr/9YINcQmWqMou4FWWtNRop34mQSU7EF7p/lvRHHxVZYLi7haiSauMeqkPK
zsDq0WkaP5Os/ljAK76mvaUBEBzj0GCKBv6kAbg9cgkYHK6BjBVq113NF3AwsQ/d
9uHA46mHV8lKfC+aN8QfcqEgzipSnFt4YHDOLlflE4+gy6INbl3+obT/YzSbwCob
ZUik7puSPJxGjs5os6ExqvYthlGgTJgMBvmsGQz2jAKjTyarNPPKRakq3+HMh/sx
ZcdLDwSrHHrmzd2brSYM9MYtxVFnHgMItu/yXfggS5YjjSsJgq1qJtpB1VPFpT4I
c/IzFf9CHyaI/BclfvU3UWanBUzmd+1P3tGZQvqHSTHPcPsEF/tv9AprrFlgKOWu
hr0pgyL5ylp4FMxi8nlTdnhky4dWcWD9mEnnC7ZXDt17w2rpkKKlFh3WbgWMew+s
qbws8wZk1LR8d2f+tMq1FponB5pq8tNiJxOg0Okg/YS9wRJX0tlQ15RzHciufiLA
oiPPJgHraEm1bQrufU1J
=Owp2
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: