summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm16
1 files changed, 14 insertions, 2 deletions
diff --git a/urpm.pm b/urpm.pm
index 37433399..43c64a8c 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -1623,6 +1623,9 @@ sub register_rpms {
$error and $urpm->{fatal}(1, _("error registering local packages"));
$start <= $id and @requested{($start .. $id)} = (1) x ($id-$start+1);
+ #- distribute local packages to distant nodes directly in cache of each machine.
+ $urpm->{parallel_handler} and $urpm->{parallel_handler}->parallel_register_rpms(@_);
+
%requested;
}
@@ -1738,8 +1741,15 @@ sub search_packages {
sub resolve_dependencies {
my ($urpm, $state, $requested, %options) = @_;
- require URPM::Resolve;
-
+ if ($options{install_src}) {
+ #- only src will be installed, so only update $state->{selected} according
+ #- to src status of files.
+ foreach (%$requested) {
+ my $pkg = $urpm->{depslist}[$_] or next;
+ $pkg->arch eq 'src' or next;
+ $state->{selected}{$_} = undef;
+ }
+ }
if ($urpm->{parallel_handler}) {
#- build the global synthesis file first.
my $file = "$urpm->{cachedir}/partial/parallel.cz";
@@ -1753,6 +1763,8 @@ sub resolve_dependencies {
} else {
my $db;
+ require URPM::Resolve;
+
if ($options{rpmdb}) {
$db = new URPM;
$db->parse_synthesis($options{rpmdb});