Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian dpkg (http://www.linux-archive.org/debian-dpkg/)
-   -   dpkg: native package in rc state prevents installation of m-a:foreign counterpart (http://www.linux-archive.org/debian-dpkg/686088-dpkg-native-package-rc-state-prevents-installation-m-foreign-counterpart.html)

Jonathan Nieder 07-22-2012 05:23 AM

dpkg: native package in rc state prevents installation of m-a:foreign counterpart
 
Guillem Jover wrote:
> On Sat, 2012-07-21 at 22:30:30 -0500, Jonathan Nieder wrote:

>> What dpkg commands should apt run to upgrade from this state?
>
> In this particular case, apt would need to check that there's no multiple
> instances present if the new package is switching from M-A:same to
> non-M-A:same. And in that case notify the user that the package instance
> in config-files state would need to be purged.

Makes sense. Thanks for explaining.

This idea of purging one arch of a package while keeping other arches
is still new to me.

+ Most libraries' post-removal scripts run 'ldconfig' on removal and
do nothing on purge, which should work fine.

+ "libc6.postrm purge" runs db_purge. The corresponding 'owner' is
arch-qualified, making this safe.

+ Likewise for libpam0g, libpam-modules, libssl1.0.0, etc.

? "libc6-i686.postrm remove" and other optimized libc packages use
dpkg-query -l to find the version of all optimized libc packages.
The parsing does not take the colon in "Multi-Arch: same" packages
into account, so it never notices that all have been upgraded in
order to remove /etc/ld.so.nohwcap.

+ libgdk-pixbuf2.0-0.postrm is a model citizen.

+ libglib2.0-0.postrm purges some caches that are not
architecture-specific. This is probably harmless because they are
caches.

- libgphoto2-2.postrm purges .dpkg-bak files representing user
customized obsolete configuration files without checking if another
arch is staying around to take responsibility for them.

- "libgtk-2.0-0.postrm purge" wipes out /etc/gtk-2.0/*

- likewise for libgtk-3-0

- "liblockfile1.postrm remove" wipes out its documentation directory
(!)

- "libpaper1.postrm purge" removes /etc/papersize and the
corresponding ucf configuration

- "libuuid1.postrm purge" removes /var/lib/libuuid

- "libwrap0.postrm purge" removes /etc/hosts.{allow,deny}

- "libzvbi0.postrm purge" removes /etc/default/libzvbi0

Those are just the libraries I currently have installed on the machine
I am using to type this.

I guess a "general" bug is in order.

Jonathan


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120722052343.GB3010@burratino

Guillem Jover 07-23-2012 03:06 PM

dpkg: native package in rc state prevents installation of m-a:foreign counterpart
 
Hi!

On Sun, 2012-07-22 at 00:23:43 -0500, Jonathan Nieder wrote:
> Guillem Jover wrote:
> > On Sat, 2012-07-21 at 22:30:30 -0500, Jonathan Nieder wrote:
> > > What dpkg commands should apt run to upgrade from this state?
> >
> > In this particular case, apt would need to check that there's no multiple
> > instances present if the new package is switching from M-A:same to
> > non-M-A:same. And in that case notify the user that the package instance
> > in config-files state would need to be purged.
>
> Makes sense. Thanks for explaining.

No problem. :)

> This idea of purging one arch of a package while keeping other arches
> is still new to me.

Well that could happen still due to explicit user request, so it's
something that needs to work correctly from the maintainer script
point of view anyway, and the consequences of this are due to the
file ref-counting, which in the maintainer scripts case will need
to be handled semi-manually for files not tracked by dpkg.

> + "libc6.postrm purge" runs db_purge. The corresponding 'owner' is
> arch-qualified, making this safe.
>
> + Likewise for libpam0g, libpam-modules, libssl1.0.0, etc.

That's been one of the reasons to always arch-qualify package names
for M-A:same packages, yes.

> ? "libc6-i686.postrm remove" and other optimized libc packages use
> dpkg-query -l to find the version of all optimized libc packages.
> The parsing does not take the colon in "Multi-Arch: same" packages
> into account, so it never notices that all have been upgraded in
> order to remove /etc/ld.so.nohwcap.

This might need to be checked, I pointed to watch for this kind of
issue in my mail to d-d-a, though.

> + libglib2.0-0.postrm purges some caches that are not
> architecture-specific. This is probably harmless because they are
> caches.

It's still wasteful and unneeded, should get fixed, but not too
serious.

> - libgphoto2-2.postrm purges .dpkg-bak files representing user
> customized obsolete configuration files without checking if another
> arch is staying around to take responsibility for them.
>
> - "libgtk-2.0-0.postrm purge" wipes out /etc/gtk-2.0/*
>
> - likewise for libgtk-3-0
>
> - "liblockfile1.postrm remove" wipes out its documentation directory
> (!)
>
> - "libpaper1.postrm purge" removes /etc/papersize and the
> corresponding ucf configuration
>
> - "libuuid1.postrm purge" removes /var/lib/libuuid
>
> - "libwrap0.postrm purge" removes /etc/hosts.{allow,deny}
>
> - "libzvbi0.postrm purge" removes /etc/default/libzvbi0

Yeah, all the above should get bugs reports.

> Those are just the libraries I currently have installed on the machine
> I am using to type this.
>
> I guess a "general" bug is in order.

I'm not sure that will help much. Instead I guess a mail to d-d might be
bettet given that people seems to have not realized the consequences of
ref-counting files. And then individual bugs being filed.

thanks,
guillem


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120723150617.GC17071@gaara.hadrons.org">http://lists.debian.org/20120723150617.GC17071@gaara.hadrons.org

Guillem Jover 07-28-2012 06:00 PM

dpkg: native package in rc state prevents installation of m-a:foreign counterpart
 
Hi!

On Mon, 2012-07-23 at 17:06:18 +0200, Guillem Jover wrote:
> On Sun, 2012-07-22 at 00:23:43 -0500, Jonathan Nieder wrote:
> > Those are just the libraries I currently have installed on the machine
> > I am using to type this.
> >
> > I guess a "general" bug is in order.
>
> I'm not sure that will help much. Instead I guess a mail to d-d might be
> bettet given that people seems to have not realized the consequences of
> ref-counting files. And then individual bugs being filed.

Jonathan, if you are not currently drafting, or considering doing so,
I think I'll prepare such mail (otherwise just go ahead :), because
there might be quite some more cases that have not been uncovered yet.

thanks,
guillem


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120728180021.GC14357@gaara.hadrons.org">http://lists.debian.org/20120728180021.GC14357@gaara.hadrons.org

Jonathan Nieder 07-28-2012 09:01 PM

dpkg: native package in rc state prevents installation of m-a:foreign counterpart
 
Guillem Jover wrote:
> On Mon, 2012-07-23 at 17:06:18 +0200, Guillem Jover wrote:
>> On Sun, 2012-07-22 at 00:23:43 -0500, Jonathan Nieder wrote:

>>> Those are just the libraries I currently have installed on the machine
>>> I am using to type this.
>>>
>>> I guess a "general" bug is in order.
>>
>> I'm not sure that will help much. Instead I guess a mail to d-d might be
>> bettet given that people seems to have not realized the consequences of
>> ref-counting files. And then individual bugs being filed.
>
> Jonathan, if you are not currently drafting, or considering doing so,
> I think I'll prepare such mail (otherwise just go ahead :), because
> there might be quite some more cases that have not been uncovered yet.

Feel free. :) Thanks.

More eyes looking over maintainer scripts would be nice. Lintian
tests to find maintainer scripts that use common commands (rm,
dpkg-maintscript-helper) to remove files with non arch-qualified paths
would be even better, though getting pattern matching code for this to
work well is presumably tricky.


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120728210139.GA3034@burratino


All times are GMT. The time now is 08:19 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.