summaryrefslogtreecommitdiffstats
path: root/urpmi
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-01-13 14:09:05 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-01-13 14:09:05 +0000
commitf8c1eabb7d685ee517ecac69b682b96398cec860 (patch)
treee7588525df2162f3958794a13b8544fea48a9a99 /urpmi
parente39d69aa09e8489351ae23a12d7a88a90ea9db32 (diff)
downloadurpmi-f8c1eabb7d685ee517ecac69b682b96398cec860.tar
urpmi-f8c1eabb7d685ee517ecac69b682b96398cec860.tar.gz
urpmi-f8c1eabb7d685ee517ecac69b682b96398cec860.tar.bz2
urpmi-f8c1eabb7d685ee517ecac69b682b96398cec860.tar.xz
urpmi-f8c1eabb7d685ee517ecac69b682b96398cec860.zip
Mark packages as "manually installed"
With the orphan mechanism, there is no way to manually mark a package that was installed as a dep of another package as not being a potential orphan. Mimic apt and if an already package is passed as an argument to urpmi, remove it from the potential orphans list. Fixes bug #45054.
Diffstat (limited to 'urpmi')
-rwxr-xr-xurpmi9
1 files changed, 9 insertions, 0 deletions
diff --git a/urpmi b/urpmi
index 18eabe11..fec56f1a 100755
--- a/urpmi
+++ b/urpmi
@@ -574,6 +574,15 @@ if (@to_install && $options{auto_orphans}) {
}
}
+#- this cleans up the list of potential orphan packages:
+#- - if a package is explicitly requested on the command line, then
+#- we assume the user doesn't want this package to be auto orphaned
+#- so we remove it from installed-through-deps
+#- - this also takes care of removing packages from
+#- installed-through-deps if the package was first installed as a
+#- dep of another package, then removed and then explicitly installed
+urpm::orphans::mark_as_requested($urpm, $state, $test);
+
foreach my $pkg (@to_install) {
#- reflect change in flag usage, now requested is set whatever a package is selected or not,
#- but required is always set (so a required but not requested is a pure dependency).