- darcsgetpackage($nofib, $r_flags, $defaultrepo_base, "nofib");
- darcsgetpackage($testsuite, $r_flags, $defaultrepo_base, "testsuite");
-
- chdir "libraries";
-
- my @packages;
- if ($extra) {
- @packages = `cat core-packages extra-packages`;
- }
- else {
- @packages = `cat core-packages`;
- }
-
- for my $pkg (@packages) {
- chomp $pkg;
- darcsgetpackage(1, $r_flags, $defaultrepo_lib, $pkg);
+ open IN, "< packages" or die "Can't open packages file";
+ while (<IN>) {
+ chomp;
+ if (/^([^ ]+) +(?:([^ ]+) +)?([^ ]+) +([^ ]+)$/) {
+ $localpath = $1;
+ $tag = defined($2) ? $2 : "";
+ $remotepath = $3;
+
+ if ($checked_out_tree) {
+ $path = "$defaultrepo_base/$localpath";
+ }
+ else {
+ $path = "$defaultrepo_base/$remotepath";
+ }
+
+ if (($tag eq "") || defined($tags{$tag})) {
+ if (-d $localpath) {
+ warning("$localpath already present; omitting");
+ }
+ else {
+ darcs (@$r_flags, $path, $localpath);
+ }
+ }
+ }
+ elsif (! /^(#.*)?$/) {
+ die "Bad line: $_";
+ }