Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Bug#670494: fixing this
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Andreas Beckmann  
View profile  
 More options May 10 2012, 9:50 pm
Newsgroups: linux.debian.bugs.dist
From: Andreas Beckmann <deb...@abeckmann.de>
Date: Fri, 11 May 2012 03:50:01 +0200
Local: Thurs, May 10 2012 9:50 pm
Subject: Bug#670494: fixing this
Hi Norbert,

[don't forget to Cc: the -submitter]

On Friday, 11. May 2012 01:21:10 Norbert Preining wrote:

> I have made the following additions to the preinst of ptex-bin:

preinst is probably too early to remove the diversions (the old package is
still installed so both orig_file (the version from ptex-bin) and
diverted_file (from whatever package) could exist in the file system.
But postinst should be fine to do the cleanup.

>   if dpkg --compare-versions "$2" le "2011.20120509-1" ; then

use 'le-nl' unless you want to run this on initial install ($2=""), too

>     # these will give a warning message for installations who
>     # did install ptex-bin only from 2011 and not the old one

For noiseless removal of diversions you could use something like:

Pre-Depends: dpkg (>= 1.15)
(plain Depends: would be sufficient if this gets into postinst only)

undivert()
{
  file_orig="$1"
  diverter="$(dpkg-divert --listpackage "$file_orig")"
  if [ -n "$diverter" ]; then
    file_diverted="$(dpkg-divert --truename "$file_orig")"
    dpkg-divert --remove --rename --package "$diverter" \
                --divert "$file_diverted" "$file_orig"
  fi

}

undivert /usr/bin/pltotf
undivert /usr/share/man/man1/pltotf.1.gz
undivert /usr/bin/tftopl
undivert /usr/share/man/man1/tftopl.1.gz

(untested, but in glx-diversions.postinst I used something much more complex
to cleanup+migrate some diversions)

> Please let me know if you think this appropriate or if we need anything
> more?

You only need to remove the old diversions, there are no new diversions to be
created?

Andreas

--
To UNSUBSCRIBE, email to debian-bugs-dist-REQU...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.