- my @packages;
- darcs @_;
- for my $dir (@top_dirs) {
- if (-d $dir && -d "$dir/_darcs") {
- darcs (@_, "--repodir", $dir);
- }
- else {
- message "== $dir not present or not a repository; skipping";
- }
- }
- for my $path (<libraries/*/_darcs>) {
- chomp $path;
- if ($path =~ m#/(.*)/#) {
- my $pkg = $1;
- darcs (@_, "--repodir", "libraries/$pkg");
- }
- else {
- die "that pattern can't fail!";
- }
- }
- @packages = `cat libraries/boot-packages`;
- # @packages = `cat libraries/boot-packages libraries/extra-packages`;
- for my $pkg (@packages) {
- chomp $pkg;
- if (! -d "libraries/$pkg") {
- warning("$pkg doesn't exist, use 'darcs-all get' to get it");
- }
- }
-}
-
-sub darcsgetpackage {
- my ($get_it, $r_flags, $repo_root, $package) = @_;
-
- if ($get_it) {
- if (-d $package) {
- warning("$package already present; omitting");
+ my $localpath;
+ my $path;
+ my $tag;
+
+ open IN, "< packages" or die "Can't open packages file";
+ while (<IN>) {
+ chomp;
+ if (/^([^# ]+) +(?:([^ ]+) +)?([^ ]+) +([^ ]+)$/) {
+ $localpath = $1;
+ $tag = defined($2) ? $2 : "";
+
+ if (-d "$localpath/_darcs") {
+ darcs (@_, "--repodir", $localpath);
+ }
+ elsif ($tag eq "") {
+ message "== Required repo $localpath is missing! Skipping";
+ }
+ else {
+ message "== $localpath repo not present; skipping";
+ }