gar2vcheck patch
Bill Immerman <[email protected]>
| Newsgroups | gmane.linux.bbc.devel |
|---|---|
| Message-ID | <[email protected]> |
Here is a patch to the gar2vcheck script I'd submitted to add a
configuration section. There should be no change for simply checking for
updated upstream packages, but when used with the
"vcheck -d"
option to automatically download new upstream packages, it puts them into a
garchive-like directory (i.e., with each package downloaded into its own
automatically determined version numbered subdirectory). The parent
directory is hard-coded; edit the gar2vcheck script to set the $G variable
to the desired directory. I've used it and it seems to work fine, subject
to the limitations of the original. I've found that I can use it as is, or
can hand-edit the resulting vcheck config file to handle some odd cases
that weren't as easy to determine automatically (e.g., needing dlexplicit
to spell out the download url...unfortunately hand edited files won't be
preserved across applications of gar2vcheck).
I haven't tried, but I believe it would be safe to set $G to point to a
garchive and this would merge the new directories in beside the old ones.
(Of course not for some publicly mirrored garchive...).
==================================================================
--- gar2vcheck.orig Wed Dec 10 09:11:54 2003
+++ gar2vcheck Wed Dec 10 09:10:44 2003
@@ -6,6 +6,8 @@
use strict;
$|= 1;
+print_config_section();
+
use File::Find;
find( \&wanted, ".");
@@ -65,4 +67,16 @@
print " url = $url\n";
print " regex = $regex\n";
print "}\n";
+}
+
+sub print_config_section {
+ my $G= "/export/data/bldsys/garchive-from-vc";
+
+ print qq(config = {
+ dldir = $G
+ dlexec = "D=$G; mkdir -p \$D/__PROG__-__RAWVER__; mv __FILE__
\$D/__PROG__-__RAWVER__"
+}
+
+)
+
}
==================================================================
Bill Immerman