On Tue, Feb 18, 2014 at 08:06:42AM GMT, Andrew Shadura wrote:

> Hello,

Hi,

> Yes, that's true; I don't currently know how to solve that issue
> properly. I've added a check in preinst script to remove that bogus
> directory, but that won't help with removing broken versions of the
> package co-installed with pkg-config: the only way to fix them is to
> upgrade then to a new version (or to fix the issue manually).

Such, such check (like the one below) will only work if the package is
upgraded, not removed. Broken packages can only be fixed by manua
intervention when a user decides to purge them from the system, rather
than trying to install to a newer version.

Something like this would at least allow users to get passed the broken
package state, install the new version and, if they choose to do so,
remove the package from their system using apt/dpkg.

pkgconfwrap="/usr/share/pkg-config-crosswrapper"
[ -f $pkgconfwrap/pkg-config-crosswrapper ] && mv 
$pkgconfwrap/pkg-config-crosswrapper ${pkgconfwrap}.orig
[ -d $pkgconfwrap ] && rmdir $pkgconfwrap && mv ${pkgconfwrap}.orig $pkgconfwrap

Variable has been used for brevity but feel free to expand it.

Since both, the script and the directory are created by an earlier
version of 'pkgconf' package, it is safe to assume that '.orig' file
does not exist and the directory is empty, hence the lack of any
additional tests in the above example.

Regards,

Raf


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

Reply via email to