From: Tom Yu Date: Fri, 10 Aug 2007 00:21:16 +0000 (+0000) Subject: pull up r19521 from trunk X-Git-Tag: kfw-3.2.1-beta1~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=60945efe0ad34b68f7195d2f7afe4f6b280568ab;p=krb5.git pull up r19521 from trunk r19521@cathode-dark-space: kpkoch | 2007-04-23 11:54:19 -0400 Ticket: new Subject: Optimize file/directory pruning Target_Version: 1.6.1 Not tagged yet so it can be evaluated first. Consolidate find and rm operations in prunefiles.pl as suggested by Ken. Remove pruning of SDK files. This hasn't been needed since the installer builds moved from staging to temp directories. Remove debug statement not cleaned up previously. Add a troubleshooting tip to the doc. ticket: 5542 version_fixed: 1.6.3 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@19800 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/windows/build/BKWconfig.xml b/src/windows/build/BKWconfig.xml index 30c77f918..42cf1543b 100644 --- a/src/windows/build/BKWconfig.xml +++ b/src/windows/build/BKWconfig.xml @@ -67,11 +67,9 @@ - - @@ -155,16 +153,6 @@ - - - - - - - - - - diff --git a/src/windows/build/bkw-automation.html b/src/windows/build/bkw-automation.html index ab0ef7d3c..637c9c9b8 100644 --- a/src/windows/build/bkw-automation.html +++ b/src/windows/build/bkw-automation.html @@ -349,6 +349,8 @@ Default is bkw.pl.log.
 

Can't clean directory; can't delete file or directory
Make sure a file in the named directory isn't open in another application.

+

Can't find kerberos.ver
+ You skipped the repository step and are trying to build in an empty directory.

diff --git a/src/windows/build/bkw.pl b/src/windows/build/bkw.pl index 94cc86dbd..9321bf69b 100644 --- a/src/windows/build/bkw.pl +++ b/src/windows/build/bkw.pl @@ -355,7 +355,6 @@ sub main { 'pismere/athena/util/lib/getopt', 'pismere/athena/util/guiwrap' ); - local $logging = $odr->{logfile}->{def} ? ">> $odr->{logfile}->{value} 2>&1" : " "; foreach my $module (@cvsmodules) { local $cvscmd = $cvscmdroot." ".$module; if ($verbose) {print "Info -- cvs command: $cvscmd\n";} diff --git a/src/windows/build/pruneFiles.pl b/src/windows/build/pruneFiles.pl index 091a6a090..9e47b1777 100644 --- a/src/windows/build/pruneFiles.pl +++ b/src/windows/build/pruneFiles.pl @@ -1,33 +1,35 @@ #!perl -w #use strict; -require "makeZip.pl"; +use Data::Dumper; sub pruneFiles { local ($xml, $config) = @_; - local $prunes = $xml->{Prunes}; + local $prunes = $xml->{Prunes}; if (! $prunes) {return 0;} - + # Use Unix find instead of Windows find. Save PATH so we can restore it when we're done: local $savedPATH = $ENV{PATH}; $ENV{PATH} = $config->{Config}->{unixfind}->{value}.";".$savedPATH; - local $j=0; print "Info -- Processing prunes in ".`cd`."\n" if ($verbose); - while ($prunes->{Prune}->[$j]) { - if (exists $prunes->{Prune}->[$j]->{name}) { ## Don't process dummy entry! - local $prune = $prunes->{Prune}->[$j]->{name}; - local $flags = $prunes->{Prune}->[$j]->{flags}; - $flags = "" if (!$flags); - local $cmd = "find . -".$flags."name $prune"; - print "Info -- Looking for filenames containing $prune\n"; - local $list = `$cmd`; - foreach $target (split("\n", $list)) { - print "Info -- Pruning $target\n" if ($verbose); - ! system("rm -rf $target") or die "Unable to prune $target"; - } - } - $j++; + local $pru = $prunes->{Prune}; + local $files = "( "; + local $bFirst = 1; + while (($key, $val) = each %$pru) { + local $flags = $val->{flags}; + $flags = "" if (!$flags); + if (!$bFirst) {$files .= " -or ";} + $bFirst = 0; + $files .= "-".$flags."name $key"; + print "Info -- Looking for filenames matching $key\n" if ($verbose); + } + $files .= " )"; + local $list = `find . $files`; + if (length($list) > 1) { + print "Info -- Pruning $list\n" if ($verbose); + ! system("rm -rf $list") or die "Unable to prune $list"; } + $ENV{PATH} = $savedPATH; } diff --git a/src/windows/build/sdkfiles.xml b/src/windows/build/sdkfiles.xml index 3c1481f17..37a5f422c 100644 --- a/src/windows/build/sdkfiles.xml +++ b/src/windows/build/sdkfiles.xml @@ -7,7 +7,7 @@ - +