这是indexloc提供的服务,不要输入任何密码

Debian Bug report logs - #752279
dpkg: Add --force-script-errors

version graph

Package: dpkg; Maintainer for dpkg is Dpkg Developers <debian-dpkg@lists.debian.org>; Source for dpkg is src:dpkg (PTS, buildd, popcon).

Reported by: Harald Dunkel <harri@afaics.de>

Date: Sun, 22 Jun 2014 04:48:02 UTC

Severity: wishlist

Merged with 8639

Found in versions 1.4.0.6, dpkg/1.17.10

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#752279; Package dpkg. (Sun, 22 Jun 2014 04:48:06 GMT) (full text, mbox, link).


Acknowledgement sent to Harald Dunkel <harri@afaics.de>:
New Bug report received and forwarded. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Sun, 22 Jun 2014 04:48:06 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Harald Dunkel <harri@afaics.de>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: how to remove package with broken systemd.service file?
Date: Sun, 22 Jun 2014 06:45:35 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Package: dpkg
Version: 1.17.10

I had installed a package with broken systemd support. When I
try to purge this package again, then I get


# dpkg -P plxc
(Reading database ... 283820 files and directories currently installed.)
Removing plxc (1.0.4.140618-1) ...
Failed to issue method call: Unit plxc.service not loaded.
dpkg: error processing package plxc (--purge):
 subprocess installed pre-removal script returned error exit status 5
Failed to issue method call: Unit plxc.service failed to load: Invalid argument. See system logs and 'systemctl status plxc.service' for details.
Errors were encountered while processing:
 plxc
# dpkg --force-all -P plxc
(Reading database ... 283820 files and directories currently installed.)
Removing plxc (1.0.4.140618-1) ...
Failed to issue method call: Unit plxc.service not loaded.
dpkg: error processing package plxc (--purge):
 subprocess installed pre-removal script returned error exit status 5
Failed to issue method call: Unit plxc.service failed to load: Invalid argument. See system logs and 'systemctl status plxc.service' for details.
Errors were encountered while processing:
 plxc


The package doesn't provide a pre-removal script; it was added
by debhelper.

Upgrading the package to a fixed version doesn't work, either.
What would you suggest to get rid of the bad package (without
cheating, of course)? Is there a --force option I could use?


Regards
Harri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBCAAGBQJTpl9uAAoJEAqeKp5m04HL/h0H/1pPvfT3mN6Da36mhmTMt66D
kaVA0epMCySrORkBSakMqUDgWXFszhLsQ47l0MokcNgjHgp6z5znQVhbdFfCyY4F
XpDLz/XEtHDbxXlAMjYVW2qKGwA6fhu08NbjJboZx3X6VEFKRKCch0iC2suXFRlv
WiIV54jf0TbV+TH5ej6rA8bikBRBFIJ5fEN+Ja6pP0rtgYlwVG7zPZo8AfOsT1PC
wI2GmDXkliBonf0PNDs/uiPASrNww73wT4YK5ZG93EDWucn4hWOxvp3+gjgef137
7Dtz452nPLj1RbCPUGy3rhHIAHX5uapXZ8MYUfebotSBmB9/C26RDHMdWIG4YzI=
=vtHD
-----END PGP SIGNATURE-----



Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#752279; Package dpkg. (Tue, 24 Jun 2014 10:30:04 GMT) (full text, mbox, link).


Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Tue, 24 Jun 2014 10:30:04 GMT) (full text, mbox, link).


Message #10 received at 752279@bugs.debian.org (full text, mbox, reply):

From: Guillem Jover <guillem@debian.org>
To: Harald Dunkel <harri@afaics.de>, 752279@bugs.debian.org
Subject: Re: Bug#752279: how to remove package with broken systemd.service file?
Date: Tue, 24 Jun 2014 12:27:24 +0200
Hi!

On Sun, 2014-06-22 at 06:45:35 +0200, Harald Dunkel wrote:
> Package: dpkg
> Version: 1.17.10

> # dpkg -P plxc
> (Reading database ... 283820 files and directories currently installed.)
> Removing plxc (1.0.4.140618-1) ...
> Failed to issue method call: Unit plxc.service not loaded.
> dpkg: error processing package plxc (--purge):
>  subprocess installed pre-removal script returned error exit status 5
> Failed to issue method call: Unit plxc.service failed to load: Invalid argument. See system logs and 'systemctl status plxc.service' for details.
> Errors were encountered while processing:
>  plxc
> # dpkg --force-all -P plxc
> (Reading database ... 283820 files and directories currently installed.)
> Removing plxc (1.0.4.140618-1) ...
> Failed to issue method call: Unit plxc.service not loaded.
> dpkg: error processing package plxc (--purge):
>  subprocess installed pre-removal script returned error exit status 5
> Failed to issue method call: Unit plxc.service failed to load: Invalid argument. See system logs and 'systemctl status plxc.service' for details.
> Errors were encountered while processing:
>  plxc

> The package doesn't provide a pre-removal script; it was added
> by debhelper.
> 
> Upgrading the package to a fixed version doesn't work, either.

How so?

> What would you suggest to get rid of the bad package (without
> cheating, of course)? Is there a --force option I could use?

The correct solution is usually to upgrade to a fixed version. The
second best might be a proposed workaround [W]. And, no there's
currently no force option available, but there are bug reports filed
for many if not all those. So I'd say this bug report is in principle
redundant given the above.

[W] <https://wiki.debian.org/Teams/Dpkg/FAQ#Q:_Can_dpkg_be_told_to_avoid_invoking_a_harmful_prerm_from_an_installed_package_on_upgrade.3F>.

Thanks,
Guillem



Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#752279; Package dpkg. (Tue, 24 Jun 2014 16:39:08 GMT) (full text, mbox, link).


Acknowledgement sent to Harald Dunkel <harri@afaics.de>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Tue, 24 Jun 2014 16:39:08 GMT) (full text, mbox, link).


Message #15 received at 752279@bugs.debian.org (full text, mbox, reply):

From: Harald Dunkel <harri@afaics.de>
To: Guillem Jover <guillem@debian.org>, 752279@bugs.debian.org
Subject: Re: Bug#752279: how to remove package with broken systemd.service file?
Date: Tue, 24 Jun 2014 18:28:43 +0200
Hi Guillem,

On 06/24/14 12:27, Guillem Jover wrote:
> 
> The correct solution is usually to upgrade to a fixed version. 

Sorry to say, but I disagree. Removing a package should not be
blocked completely, if it is not in a dependency chain of
something else. Installing a newer version might not be an
option.

If you think this is a dup, then please merge.


Many thanx
Harri




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#752279; Package dpkg. (Fri, 04 Jul 2014 19:42:04 GMT) (full text, mbox, link).


Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Fri, 04 Jul 2014 19:42:05 GMT) (full text, mbox, link).


Message #20 received at 752279@bugs.debian.org (full text, mbox, reply):

From: Guillem Jover <guillem@debian.org>
To: Harald Dunkel <harri@afaics.de>, 752279@bugs.debian.org
Subject: Re: Bug#752279: how to remove package with broken systemd.service file?
Date: Fri, 4 Jul 2014 21:38:54 +0200
Control: forcemerge 8639 -1

Hi!

On Tue, 2014-06-24 at 18:28:43 +0200, Harald Dunkel wrote:
> On 06/24/14 12:27, Guillem Jover wrote:
> > The correct solution is usually to upgrade to a fixed version.
> 
> Sorry to say, but I disagree. Removing a package should not be
> blocked completely, if it is not in a dependency chain of
> something else. Installing a newer version might not be an
> option.

A packages that cannot be removed/purged is (RC) buggy, and needs
to be fixed, even on stable. dpkg cannot know if the contents of
the maintainer scripts are important, and required for a proper
cleanup of the package. Not running the scripts might leave junk
on the filesystem, stray processes running or worse.

I can agree that having a --force-script-errors or similar (as
requested in the other bug report) can be convenient in this kind of
situations if one does not want or cannot wait for a fixed packages.
It's still not the correct solution, which should be obvious by the
fact one would have to use a --force option. :)

> If you think this is a dup, then please merge.

Yeah, merged now.

Thanks,
Guillem



Severity set to 'wishlist' from 'normal' Request was from Guillem Jover <guillem@debian.org> to 752279-submit@bugs.debian.org. (Fri, 04 Jul 2014 19:42:05 GMT) (full text, mbox, link).


Marked as found in versions 1.4.0.6. Request was from Guillem Jover <guillem@debian.org> to 752279-submit@bugs.debian.org. (Fri, 04 Jul 2014 19:42:05 GMT) (full text, mbox, link).


Merged 752279 8639 Request was from Guillem Jover <guillem@debian.org> to 752279-submit@bugs.debian.org. (Fri, 04 Jul 2014 19:42:07 GMT) (full text, mbox, link).


Changed Bug title to 'dpkg: Add --force-script-errors' from 'how to remove package with broken systemd.service file?'. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Mon, 04 Mar 2019 21:45:06 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Tue Jul 29 06:53:52 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.