mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-01 08:05:05 -04:00
e63366ae5e
With --unneeded option 'pacman -R' doesn't stop in case of dependency error; it removes the needed-dependency targets from the target-list instead. See also: http://archlinux.org/pipermail/pacman-dev/2007-October/009653.html . The patch also adds a new causingpkg field to pmdepmissing_t which indicates the to-be-removed package which would cause a dependency break. This is needed, because miss->depend.name may be a provision. miss->causingpkg will be useful in -R dependency error messages too. [Xavier: renamed inducer to causingpkg, removed the _alpm_pkgname_pkg_cmp helper function as requested by Aaron. This might be added by a further commit. Other small cleanups, updated manpage and bash completion.] Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
19 lines
389 B
Python
19 lines
389 B
Python
self.description = "-Ru test"
|
|
|
|
lp1 = pmpkg("pkg1")
|
|
lp1.requiredby = [ "pkg3" ]
|
|
self.addpkg2db("local", lp1)
|
|
|
|
lp2 = pmpkg("pkg2")
|
|
self.addpkg2db("local", lp2)
|
|
|
|
lp3 = pmpkg("pkg3")
|
|
lp3.depends = [ "pkg1" ]
|
|
self.addpkg2db("local", lp3)
|
|
|
|
self.args = "-Ru pkg1 pkg2"
|
|
|
|
self.addrule("PACMAN_RETCODE=0")
|
|
self.addrule("PKG_EXIST=pkg1")
|
|
self.addrule("!PKG_EXIST=pkg2")
|
|
self.addrule("PKG_EXIST=pkg3") |