summaryrefslogtreecommitdiffstats
path: root/urpmq
diff options
context:
space:
mode:
Diffstat (limited to 'urpmq')
-rwxr-xr-xurpmq6
1 files changed, 4 insertions, 2 deletions
diff --git a/urpmq b/urpmq
index c493d06d..94505fc5 100755
--- a/urpmq
+++ b/urpmq
@@ -76,6 +76,7 @@ for (@ARGV) {
/^--headers$/ and do { $query->{headers} = 1; next };
/^--sources$/ and do { $query->{sources} = 1; next };
/^--force$/ and do { $query->{force} = 1; next };
+ /^--root$/ and do { push @nextargv, \$query->{root}; next };
/^-(.*)$/ and do { foreach (split //, $1) {
/[\?h]/ and do { usage; next };
/d/ and do { $query->{deps} = 1; next };
@@ -152,7 +153,7 @@ if (@src_names) {
if ($query->{auto_select}) {
my (%to_remove, %keep_files);
- $urpm->select_packages_to_upgrade('', \%packages, \%to_remove, \%keep_files);
+ $urpm->select_packages_to_upgrade($query->{root}, \%packages, \%to_remove, \%keep_files);
if (keys(%to_remove) > 0) {
$urpm->{error}(_("some packages have to be removed for being upgraded, this is not supported yet\n"));
@@ -161,7 +162,8 @@ if ($query->{auto_select}) {
#- filter to add in packages selected required packages.
$query->{deps} and $urpm->filter_packages_to_upgrade(\%packages, undef,
- keep_alldeps => !$query->{upgrade});
+ keep_alldeps => !$query->{upgrade},
+ root => $query->{root});
#- get out of package that should not be upgraded.
$urpm->deselect_unwanted_packages(\%packages);