Mail Archives: cygwin/2003/01/03/09:14:12
--Boundary_(ID_bKv3mW9UKEvdkIYKBzm+qQ)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
Michael,
The attached patch enables clean_setup.pl to handle binary-only
caches/mirrors. Specifically, when no "source:" tags are in the
setup.ini file. AFAICT, this patch does not affect operation with a
normal setup.ini file.
I'm a Perl novice, so the second hunk probably could be improved.
Anyway, are you willing to accept this patch?
Thanks,
Jason
--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6
--Boundary_(ID_bKv3mW9UKEvdkIYKBzm+qQ)
Content-type: text/plain; charset=us-ascii; NAME=clean_setup.pl.diff
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=clean_setup.pl.diff
--- clean_setup.pl.orig 2002-12-18 07:44:50.000000000 -0500
+++ clean_setup.pl 2002-12-18 08:37:59.000000000 -0500
@@ -410,7 +410,7 @@ my $wanted = sub {
}
close SETUP;
usage( 'die', 1, "Nothing found in $sSetup" )
- if 3 != @aSetup || ! $aSetup[0];
+ if @aSetup < 2 || ! $aSetup[0];
$aSetup{$sRel} = \@aSetup;
}
elsif ( ".tar.bz2" eq substr( $_, -8 ) || ".tar.gz" eq substr( $_, -7 ) ) {
@@ -450,7 +450,11 @@ foreach ( @sOldSetup ) {
# Check found files against those listed in latest setup.ini
my ( @sDir, $sDir, $sFile, @sDup, %sMove, @sUnlisted, @sWrongSize );
my %aInstall = ( %{$aSetup{$sNewest}[1]} );
-my %aSource = ( %{$aSetup{$sNewest}[2]} );
+my %aSource;
+if (exists $aSetup{$sNewest}[2]) {
+ %aSource = ( %{$aSetup{$sNewest}[2]} );
+}
+
foreach $sName ( sort keys %sTarBall ) {
@sDir = sort keys %{$sTarBall{$sName}};
$sDir = $sDir[0];
--Boundary_(ID_bKv3mW9UKEvdkIYKBzm+qQ)
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
--Boundary_(ID_bKv3mW9UKEvdkIYKBzm+qQ)--
- Raw text -