FreeBSD Bugzilla – Attachment 41821 Details for
Bug 65329
bug in sysutils/pkg_cutleaves exclude file processing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
pkg_cutleaves-20040414.patch
pkg_cutleaves-20040414.patch (text/plain; charset=us-ascii), 3.02 KB, created by
Stefan Walter
on 2004-04-14 17:11:03 UTC
(
hide
)
Description:
pkg_cutleaves-20040414.patch
Filename:
MIME Type:
Creator:
Stefan Walter
Created:
2004-04-14 17:11:03 UTC
Size:
3.02 KB
patch
obsolete
>diff -urN pkg_cutleaves.old/Makefile pkg_cutleaves/Makefile >--- pkg_cutleaves.old/Makefile Wed Apr 14 17:49:50 2004 >+++ pkg_cutleaves/Makefile Wed Apr 14 17:50:39 2004 >@@ -8,7 +8,7 @@ > # > > PORTNAME= pkg_cutleaves >-PORTVERSION= 20040207 >+PORTVERSION= 20040414 > CATEGORIES= sysutils > MASTER_SITES= # none > DISTFILES= # none >diff -urN pkg_cutleaves.old/src/pkg_cutleaves pkg_cutleaves/src/pkg_cutleaves >--- pkg_cutleaves.old/src/pkg_cutleaves Wed Apr 14 17:49:50 2004 >+++ pkg_cutleaves/src/pkg_cutleaves Wed Apr 14 17:50:17 2004 >@@ -25,7 +25,7 @@ > # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > # SUCH DAMAGE. > # >-# $FreeBSD: ports/sysutils/pkg_cutleaves/src/pkg_cutleaves,v 1.5 2004/02/08 22:25:19 pav Exp $ >+# $FreeBSD$ > > # Interactive script for deinstalling "leaf" packages; > # requires the portupgrade tools >@@ -64,6 +64,8 @@ > chomp($exclude); > # Ignore comments and empty lines, add others as regular expressions > unless (($exclude =~ m/(^ *#)|(^ *$)/)) { >+ # Escape any '+' that isn't already escaped >+ $exclude =~ s/(?<!\\)(\+|\.)/\\$1/g; > $exclude = "^" . $exclude . ".*"; > push @excludes, $exclude; > } >@@ -156,28 +158,26 @@ > } > } > } else { >+ my %leaves; > my %leavestokeep; > my %leavestocut; > my @cutleaves; >- my ($nleaves, $i); >+ my ($nleaves, $i, $again); >+ >+ # Get list of leaf packages and put them into a hash >+ %leaves = get_leaves($dbdir, $exclpattern); >+ # Any leaves to work with? >+ $nleaves = keys %leaves; >+ if ($nleaves > 0) { >+ $again = "y"; >+ } else { >+ # If not, don't go on, there's nothing to do. >+ print "** Didn't find any leaves to work with, exiting.\n"; >+ print "** If this is unexpected, check your exclude file, please.\n"; >+ $again = "n"; >+ } > # Loop while the user wants to >- my $again = "y"; > ROUND: while($again eq "y") { >- # Get list of leaf packages and put them into a hash >- my %leaves = get_leaves($dbdir, $exclpattern); >- # Ignore all leaves the user already told us to keep >- foreach my $leaf (keys %leavestokeep) { >- if ($leaves{$leaf}) { >- delete $leaves{$leaf}; >- } >- } >- # Any leaves left? >- $nleaves = keys %leaves; >- if ($nleaves == 0) { >- # If not, don't go on, there's nothing left to do. >- print "Didn't find any new leaves, exiting.\n"; >- last ROUND; >- } > # Always start with an empty list of leaves to cut > %leavestocut = (); > # Initialize counter for progress status >@@ -235,6 +235,22 @@ > print STDERR "\n\n$0: pkgdb returned $status - exiting, fix this first.\n\n"; > last ROUND; > } >+ } >+ >+ # Get new list of leaf packages and put them into a hash >+ %leaves = get_leaves($dbdir, $exclpattern); >+ # Ignore all leaves the user already told us to keep >+ foreach my $leaf (keys %leavestokeep) { >+ if ($leaves{$leaf}) { >+ delete $leaves{$leaf}; >+ } >+ } >+ # Any leaves left? >+ $nleaves = keys %leaves; >+ if ($nleaves == 0) { >+ # If not, don't go on, there's nothing left to do. >+ print "** Didn't find any new leaves to work with, exiting.\n"; >+ last ROUND; > } > > print "Go on with new leaf packages ((y)es/[no])? ";
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 65329
: 41821