* RE: setup 2.194.2.21: Questions about the "per-mirror directories" feature
@ 2002-04-22 22:44 Billinghurst, David (CRTS)
2002-04-22 23:24 ` Michael A Chase
0 siblings, 1 reply; 5+ messages in thread
From: Billinghurst, David (CRTS) @ 2002-04-22 22:44 UTC (permalink / raw)
To: Michael A Chase, cygwin
> From: Michael A Chase [mailto:mchase@ix.netcom.com]
> Sent: Wednesday, 27 March 2002 8:49
> To: Alexei Lioubimov; cygwin@cygwin.com
> Subject: Re: setup 2.194.2.21: Questions about the "per-mirror directories" feature
> I've written a Perl script
> (http://home.ix.netcom.com/~mchase/zip/clean_setup.zip) that identifies
> module versions that aren't in the latest setup.ini and optionally deletes
> them. Extract the script to the base directory of you local cache and run
> it with '-h' to see the available options.
>
> The script will also move the archive files to the base directory tree if
> you select the '-Move' option.
Just grabbed a copy of this script. Much better than doing it by hand, but there are
some problems with upper-case letters in filenames. For example:
Missing Install Files:
[curr] release/squid/squid-2.4-stable20010508.tar.gz
[curr] release/xfree86/xfree86-base/xfree86-base-4.2.0-1.tar.bz2
(... etc ...)
Not Removing files not in setup.ini
release/XFree86/XFree86-base/XFree86-base-4.2.0-1.tar.bz2
release/squid/squid-2.4-STABLE20010508.tar.gz
(... etc ...)
--
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/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: setup 2.194.2.21: Questions about the "per-mirror directories" feature
2002-04-22 22:44 setup 2.194.2.21: Questions about the "per-mirror directories" feature Billinghurst, David (CRTS)
@ 2002-04-22 23:24 ` Michael A Chase
2002-04-23 6:48 ` clean_setup.pl proposed addition Max Bowsher
0 siblings, 1 reply; 5+ messages in thread
From: Michael A Chase @ 2002-04-22 23:24 UTC (permalink / raw)
To: Billinghurst, David (CRTS), cygwin
On Tue, 23 Apr 2002 15:17:55 +1000 "Billinghurst, David (CRTS)" <David.Billinghurst@riotinto.com> wrote:
> > From: Michael A Chase [mailto:mchase@ix.netcom.com]
> > Sent: Wednesday, 27 March 2002 8:49
> > To: Alexei Lioubimov; cygwin@cygwin.com
> > Subject: Re: setup 2.194.2.21: Questions about the "per-mirror
> directories" feature
> Just grabbed a copy of this script. Much better than doing it by hand,
> but there are
> some problems with upper-case letters in filenames. For example:
Thanks for the reminder. Someone pointed that out to me last week and I
forgot to upload the fix. It's available now in
http://home.ix.netcom.com/~mchase/zip/clean_setup.zip .
--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.htm
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.
--
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/
^ permalink raw reply [flat|nested] 5+ messages in thread
* clean_setup.pl proposed addition
2002-04-22 23:24 ` Michael A Chase
@ 2002-04-23 6:48 ` Max Bowsher
2002-04-23 12:28 ` Michael A Chase
0 siblings, 1 reply; 5+ messages in thread
From: Max Bowsher @ 2002-04-23 6:48 UTC (permalink / raw)
To: Michael A Chase, cygwin
[-- Attachment #1: Type: text/plain, Size: 248 bytes --]
Could you add a feature to report missing source tarball? Nothing more
complicated than copy/pasting the current missing install tarball code and
changeing aInstall to aSource, etc.
If you would prefer a patch, say so, and I will send one.
Max.
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 2688 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: clean_setup.pl proposed addition
2002-04-23 6:48 ` clean_setup.pl proposed addition Max Bowsher
@ 2002-04-23 12:28 ` Michael A Chase
2002-04-24 6:59 ` Max Bowsher
0 siblings, 1 reply; 5+ messages in thread
From: Michael A Chase @ 2002-04-23 12:28 UTC (permalink / raw)
To: Max Bowsher, cygwin
On Tue, 23 Apr 2002 13:56:54 +0100 Max Bowsher <maxb@ukf.net> wrote:
> Could you add a feature to report missing source tarball? Nothing more
> complicated than copy/pasting the current missing install tarball code
> and
> changeing aInstall to aSource, etc.
>
> If you would prefer a patch, say so, and I will send one.
No need for a patch. I've added options -install and -source to control
reporting of missing install or source tarballs. I also added '-H mask'
to let you skip packages that aren't of interest.
The script is in http://home.ix.netcom.com/~mchase/zip/clean_setup.zip .
--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.htm
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.
--
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/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: clean_setup.pl proposed addition
2002-04-23 12:28 ` Michael A Chase
@ 2002-04-24 6:59 ` Max Bowsher
0 siblings, 0 replies; 5+ messages in thread
From: Max Bowsher @ 2002-04-24 6:59 UTC (permalink / raw)
To: Michael A Chase, cygwin
[-- Attachment #1: Type: text/plain, Size: 455 bytes --]
> No need for a patch. I've added options -install and -source to control
> reporting of missing install or source tarballs. I also added '-H mask'
> to let you skip packages that aren't of interest.
Excellent! Thanks.
Here is another suggestion, this time with patch:
Split the delete files and delete empty directories actions invoked by the Arch
option.
The patch keeps Arch meaning to delete archives, and adds EDir for empty
directories.
Max.
[-- Attachment #2: clean_setup_1.0302_edir.patch --]
[-- Type: application/octet-stream, Size: 2055 bytes --]
--- clean_setup_1.0302orig.pl Tue Apr 23 11:40:48 2002
+++ clean_setup_1.0302m.pl Wed Apr 24 13:04:04 2002
@@ -50,6 +50,7 @@
# Initialize options
my $bArch = 0;
+my $bEDir = 1;
my $bMove = 0;
my $bSetup = 0;
my $bCurr = 1;
@@ -71,7 +72,8 @@
syntax: $RealScript [opt]
Opt: ($VERSION)
-[no]Move = [Don't] Move archive files to base directory tree ($bMove)
- -[no]Arch = [Don't] Delete obsolete archives and directories ($bArch)
+ -[no]Arch = [Don't] Delete obsolete archives ($bArch)
+ -[no]EDir = [Don't] Delete empty directories ($bEDir)
-[no]Setup = [Don't] Delete obsolete setup.ini files ($bSetup), forces -Move
-[no]curr = [Don't] Report missing [curr] files ($bCurr)
-[no]prev = [Don't] Report missing [prev] files ($bPrev)
@@ -97,6 +99,7 @@
Getopt::Long::config( qw( no_ignore_case no_auto_abbrev require_order ) );
GetOptions(
'Arch!' => \$bArch,
+ 'EDir!' => \$bEDir,
'Move!' => \$bMove,
'Setup!' => \$bSetup,
'curr!' => \$bCurr,
@@ -119,7 +122,8 @@
$sDir0 =~ s,\\,/,g;
my $sOpt = '';
$sOpt .= "\nMoving archives to base directory tree" if $bMove;
-$sOpt .= "\nDeleting unused files and empty directores" if $bArch;
+$sOpt .= "\nDeleting unused files" if $bArch;
+$sOpt .= "\nDeleting empty directores" if $bEDir;
$sOpt .= "\nDeleting obsolete setup.ini files" if $bSetup;
$sOpt .= "\nIgnoring files and directories: " . join ' ', map { "'$_'" }
@sIgnore if @sIgnore;
@@ -345,10 +349,10 @@
foreach $sRel ( sort { length $b <=> length $a || $a cmp $b } keys %bDir ) {
@g = glob( File::Spec -> catfile( $sRel, "*" ) );
if ( ! @g ) {
- print $bArch ? "\n" : "\nNot ", "Removing Empty Directories\n"
+ print $bEDir ? "\n" : "\nNot ", "Removing Empty Directories\n"
if ! $bFound++;
print sUnPercent( " $sRel\n" );
- if ( $bArch ) {
+ if ( $bEDir ) {
rmdir $sRel or print " *** Can't rmdir, $!\n";
}
}
[-- Attachment #3: Type: text/plain, Size: 214 bytes --]
--
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/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-04-24 12:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-22 22:44 setup 2.194.2.21: Questions about the "per-mirror directories" feature Billinghurst, David (CRTS)
2002-04-22 23:24 ` Michael A Chase
2002-04-23 6:48 ` clean_setup.pl proposed addition Max Bowsher
2002-04-23 12:28 ` Michael A Chase
2002-04-24 6:59 ` Max Bowsher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).