Fair enough - no need to bloat the tool. I thought of the proxy solution,
but it is difficult to save all those source rpm's to an archive from the
cache. I don't want to mirror all of the release at this point so instead I
filter the shell script generated by openpkg build. Pretty easy:
#!/usr/bin/env perl
#
# Filter output of "openpkg build" so that source rpms are saved to a local
# directory.
my $localdir = '/var/tmp/oosrc';
while (<>) {
if (($rpm, $opts, $url, $end) =
( m{^([^#]\S*/rpm)(\s.*--rebuild )(ftp:\S*)(.*)} )) {
$url =~ m{([^/]*)$};
my $local = "$localdir/$1";
print "$rpm --checksig $local || curl $url -o $local || exit \$?\n";
print "$rpm$opts$local$end\n";
} else {
print $_;
}
}
> -----Original Message-----
> From: Michael van Elst [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 28, 2003 11:58 AM
> To: [EMAIL PROTECTED]
> Subject: Re: saving source RPM's with "openpkg build"
>
>
> On Tue, Jan 28, 2003, Andrews, Martin wrote:
>
> > I love the new openpkg tool for updating RPM's, but I would
> like to hold
> > onto the source RPM's that it downloads - to avoid multiple
> downloads for
> > each platform I maintain and to keep an archive of the
> source for all
> > software I install. I am writing a script that reads output
> of "openpkg
> > build -s" and does the download and build itself - but I
> wonder if there is
> > an easier way? Is there some configuration option to the
> openpkg tool or rpm
> > itself that will cause it to hold onto the source RPM's?
>
> We discussed this topic some time ago. The conclusion was that
> this can be done easiest with a simple WebCache like squid or
> apache with mod_proxy and didn't need to be built into the
> build script.
>
> Another possibility is to create a mirror of the FTP server
> (internally we use rsync) and use the -f/-r options to direct
> the build script to the copy.
>
> Greetings,
> --
> Michael van Elst
> [EMAIL PROTECTED]
> ______________________________________________________________________
> The OpenPKG Project www.openpkg.org
> User Communication List [EMAIL PROTECTED]
>
______________________________________________________________________
The OpenPKG Project www.openpkg.org
User Communication List [EMAIL PROTECTED]