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

Re: Renaming packages: maintscripts

On Sun, Sep 02, 2012 at 08:54:39PM +0100, Ben Hutchings wrote:
> On Sun, 2012-09-02 at 23:17 +0400, Michael Tokarev wrote:
> [...]
> > But the OP system does not have old autofs5 package installed,
> > only the config files from it, and the maintscripts.  Which is
> > exactly the problem.

> > I want to ensure that if old autofs5 is installed, installing
> > new autofs should pull new autofs5 TOO.

> > The only way currently I see to do it is to declare autofs
> > as DEPENDING on autofs5.  This is obviously ugly, but it will
> > save from this very situation, and I don't see any other way.
> > Is there?

> # in autofs.postinst
> rm -f /var/lib/dpkg/info/autofs5.postrm

> (There may be a cleaner way to do this.)

if postrm=$(dpkg-query -c autofs5 postrm 2>/dev/null); then
	rm -f "$postrm"

Not sure about cleaner, but that's the supported dpkg interface.

And yeah, short of time travel, I also don't see any cleaner alternative to
manually hacking the old maintainer scripts.

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org

Attachment: signature.asc
Description: Digital signature

Reply to: