aboutsummaryrefslogtreecommitdiff
path: root/loader/loader.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-11-03 13:39:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-11-11 17:47:02 +0200
commite70163685afe5cae1ebe055a53ce353ae9cbe590 (patch)
tree8d5edf96bbe86164ec5c82feff55d2343a2e651c /loader/loader.cxx
parent1ce84922e3008cad6cf1b9056b705f2642bd3772 (diff)
Make loader loading external repository complements
Diffstat (limited to 'loader/loader.cxx')
-rw-r--r--loader/loader.cxx20
1 files changed, 8 insertions, 12 deletions
diff --git a/loader/loader.cxx b/loader/loader.cxx
index 633521f..ecc6032 100644
--- a/loader/loader.cxx
+++ b/loader/loader.cxx
@@ -372,9 +372,9 @@ load_packages (const shared_ptr<repository>& rp, database& db)
db.persist (rp); // Save the repository state.
}
-// Load the prerequsite repositories state from the 'repositories' file.
-// Update the repository persistent state to save repositories_timestamp
-// member. Should be called once per internal repository.
+// Load the prerequsite repositories and their complements state from the
+// 'repositories' file. Update the repository persistent state to save
+// repositories_timestamp member. Should be called once per internal repository.
//
static void
load_prerequisites (const shared_ptr<repository>& rp, database& db)
@@ -384,10 +384,6 @@ load_prerequisites (const shared_ptr<repository>& rp, database& db)
//
assert (rp->repositories_timestamp == timestamp_nonexistent);
- // Load prerequisites for internal repositories only.
- //
- assert (rp->internal);
-
// Only locally accessible repositories allowed until package manager API is
// ready.
//
@@ -399,6 +395,7 @@ load_prerequisites (const shared_ptr<repository>& rp, database& db)
ifstream ifs;
path p (rp->local_path / path ("repositories"));
rp->repositories_timestamp = manifest_stream (p, ifs);
+ db.update (rp);
manifest_parser mp (ifs, p.string ());
rpm = repository_manifests (mp);
@@ -406,7 +403,9 @@ load_prerequisites (const shared_ptr<repository>& rp, database& db)
for (auto& rm: rpm)
{
- if (rm.location.empty ())
+ if (rm.location.empty () ||
+ (!rp->internal &&
+ rm.effective_role () == repository_role::prerequisite))
continue; // Ignore entry for this repository.
repository_location rl;
@@ -472,11 +471,8 @@ load_prerequisites (const shared_ptr<repository>& rp, database& db)
}
load_packages (pr, db);
+ load_prerequisites (pr, db);
}
-
- // Updates repositories_timestamp member.
- //
- db.update (rp);
}
int