Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 201045 - emerge --depclean and emerge --unmerge should respect dependencies
Summary: emerge --depclean and emerge --unmerge should respect dependencies
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 233261 (view as bug list)
Depends on:
Blocks: 216231
  Show dependency tree
 
Reported: 2007-12-03 01:26 UTC by Ed Catmur
Modified: 2010-09-23 01:59 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Catmur 2007-12-03 01:26:44 UTC
Recently, emerge --depclean decided to unmerge sys-auth/policykit and gnome-extra/policykit-gnome.  However, even though policykit-gnome DEPENDs on policykit, policykit was unmerged first.

This causes issues with the binary dependency hack:

 * pre_pkg_prerm: bindepcheck.sh ...
 * Binary object libpolkit.so.2.0.0 will be removed, checking for dependencies:
 *      (none)
 * Binary object libpolkit.so.2 will be removed, checking for dependencies:
 *      gnome-extra/policykit-gnome-0.7_pre20071106
 * Binary object libpolkit.so will be removed, checking for dependencies:
 *      (none)
 * Binary object libpolkit-dbus.so.2.0.0 will be removed, checking for dependencies:
 *      (none)
 * Binary object libpolkit-dbus.so.2 will be removed, checking for dependencies:
 *      gnome-extra/policykit-gnome-0.7_pre20071106
 * Binary object libpolkit-dbus.so will be removed, checking for dependencies:
 *      (none)
 * Binary object libpolkit-grant.so.2.0.0 will be removed, checking for dependencies:
 *      (none)
 * Binary object libpolkit-grant.so.2 will be removed, checking for dependencies:
 *      gnome-extra/policykit-gnome-0.7_pre20071106
 * Binary object libpolkit-grant.so will be removed, checking for dependencies:
 *      (none)
 * Removing policykit-0.7_pre20071101 will break binary dependencies of the above listed
 * packages.  Remerging the above packages may prevent this.
 * 
 * ERROR: sys-auth/policykit-0.7_pre20071101 failed.
 * Call stack:
 *               ebuild.sh, line 1741:  Called qa_call 'pre_pkg_prerm'
 *               ebuild.sh, line   35:  Called pre_pkg_prerm
 *        10phase_hooks.sh, line   20:  Called source '/etc/portage/phase_hooks.d/pre_pkg_prerm/bindepcheck.sh'
 *          bindepcheck.sh, line   86:  Called bindep_removed_objs
 *          bindepcheck.sh, line   81:  Called die
 * The specific snippet of code:
 *              die "bindep"
 *  The die message:
 *   bindep
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/sys-auth:policykit-0.7_pre20071101:20071117-012745.log'.
 * 

emerge --unmerge gnome-extra/policykit-gnome sys-auth/policykit has the same issue; in both cases the unmerge list appears to be coming from arbitrary-order traversal of a dict (unlike merging, where dependencies are respected).

This has a pretty trivial workaround (emerge --unmerge gnome-extra/policykit-gnome && emerge --unmerge sys-auth/policykit), but it'd still be useful, esp. as depclean already has a full dependency tree calculated.  Perhaps it'd be enough for emerge --unmerge to respect the command-line order?
Comment 1 Zac Medico gentoo-dev 2007-12-03 01:38:17 UTC
(In reply to comment #0)
> Recently, emerge --depclean decided to unmerge sys-auth/policykit and
> gnome-extra/policykit-gnome.  However, even though policykit-gnome DEPENDs on
> policykit, policykit was unmerged first.

Technically, it's the RDEPEND and PDEPEND (runtime deps) that should matter here. The DEPEND is supposed to be completely optional at this stage.

The digraph that depclean currently creates does not include any information about dependency priority. It needs to be more like the one that depgraph creates for installation actions, which places DepPriority objects in the digraph.
Comment 2 Zac Medico gentoo-dev 2008-02-29 19:28:25 UTC
This is fixed in 2.2_pre3.
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2008-03-20 18:14:55 UTC
This is supposed to be fixed in portage-2.2_pre5 or earlier.
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2008-03-20 18:15:40 UTC
This is supposed to be fixed in portage-2.2_pre5 or earlier.
Comment 5 Carsten Lohrke (RETIRED) gentoo-dev 2008-07-29 12:52:22 UTC
*** Bug 233261 has been marked as a duplicate of this bug. ***