delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/03/09:14:12

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 03 Jan 2003 09:19:27 -0500
From: Jason Tishler <jason AT tishler DOT net>
Subject: clean_setup.pl binary-only cache patch
To: mchase AT ix DOT netcom DOT com
Cc: Cygwin <cygwin AT cygwin DOT com>
Mail-followup-to: mchase AT ix DOT netcom DOT com, Cygwin <cygwin AT cygwin DOT com>
Message-id: <20030103141927.GB1712@tishler.net>
MIME-version: 1.0
User-Agent: Mutt/1.4i

--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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019