Bug 65329 - bug in sysutils/pkg_cutleaves exclude file processing
Summary: bug in sysutils/pkg_cutleaves exclude file processing
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Mathieu Arnold
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-08 17:40 UTC by Mark Linimon
Modified: 2004-05-04 16:33 UTC (History)
1 user (show)

See Also:


Attachments
pkg_cutleaves-20040414.patch (3.02 KB, patch)
2004-04-14 17:11 UTC, Stefan Walter
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Linimon freebsd_committer freebsd_triage 2004-04-08 17:40:07 UTC
	The useful pkg_cutleaves port cannot handle the special character
	'+' (plus sign) in its pkg_leaves.exclude file; the program
	refuses to run if this is the case, with the following error.
	(I have inserted linebreaks, and edited, for readability).

	Nested quantifiers in regex; marked by <-- HERE in
	m/^GimpUserManual-HTML-.*|^KrossWordPlayer-.*| [ ... ]
	|^mozilla-.*|^mysql++ <-- HERE -.*|^mysql-client.*| [ ... ]

Fix: 

Not known.  (Maintainer Cc:ed)
How-To-Repeat: 	Add, e.g., the following to the exclude file: 'mysql++-'
Comment 1 Kirill Ponomarev freebsd_committer freebsd_triage 2004-04-08 19:35:37 UTC
Responsible Changed
From-To: freebsd-ports-bugs->linimon

Over to originator.
Comment 2 Ceri Davies freebsd_committer freebsd_triage 2004-04-13 19:26:28 UTC
Adding to audit trail from misfiled PR ports/65352:

Date: Fri, 9 Apr 2004 11:08:09 +0200
From: Stefan Walter <sw@gegenunendlich.de>
Message-Id: <20040409090809.GA1537@kyuzo.dunkelkammer.void>
References: <200404081631.i38GVlH1074060@freefall.freebsd.org>

 Thanks for the report. The attached patch for the port fixes this - all
 unescaped plus signs in the exclusion file are escaped by pkg_cutleaves;
 those that are escaped already are left as they are. (As far as I can
 see, plus signs should be the only special case.)
 
 Could you commit this?
 
 Stefan
 
 --zYM0uCDKw75PZbzx
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="pkg_cutleaves-20040409.patch"
 
 diff -urN pkg_cutleaves.old/Makefile pkg_cutleaves/Makefile
 --- pkg_cutleaves.old/Makefile	Fri Apr  9 10:46:23 2004
 +++ pkg_cutleaves/Makefile	Fri Apr  9 10:49:46 2004
 @@ -8,7 +8,7 @@
  #
  
  PORTNAME=	pkg_cutleaves
 -PORTVERSION=	20040207
 +PORTVERSION=	20040409
  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	Fri Apr  9 10:46:23 2004
 +++ pkg_cutleaves/src/pkg_cutleaves	Fri Apr  9 10:48:52 2004
 @@ -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;
  			}
 
 --zYM0uCDKw75PZbzx--
Comment 3 Stefan Walter 2004-04-14 17:11:03 UTC
Stefan Walter, 14.04.04, 16:48h CEST:

> > Could you commit this?
> 
> Please don't, I'll send a patch with some more changes soon.

Here they are.

Stefan
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2004-05-01 20:53:42 UTC
Responsible Changed
From-To: linimon->mat

I'll let mat be the Perl guru for this one.
Comment 5 Mathieu Arnold freebsd_committer freebsd_triage 2004-05-04 16:23:42 UTC
State Changed
From-To: open->closed

Committed