Date: Mon, 15 Feb 2010 15:46:16 GMT From: pluknet <pluknet@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/143955: 'make search' doesn't skip comments in /usr/ports/MOVED Message-ID: <201002151546.o1FFkGCM037379@www.freebsd.org> Resent-Message-ID: <201002151550.o1FFo2Ur016955@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 143955 >Category: ports >Synopsis: 'make search' doesn't skip comments in /usr/ports/MOVED >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Feb 15 15:50:02 UTC 2010 >Closed-Date: >Last-Modified: >Originator: pluknet >Release: FreeBSD 7.2-STABLE i386 >Organization: >Environment: FreeBSD host 7.2-STABLE FreeBSD 7.2-STABLE #4: Wed Jan 13 11:26:44 MSK 2010 root@host:/usr/obj/usr/home/pluknet/cvs-7/src/sys/JAW i386 >Description: Abstract: When ports are moved, renamed or deleted, they're added to /usr/ports/MOVED. ports/104161 let 'make search' also search in /usr/ports/MOVED Problem: 'make search' also searches in /usr/ports/MOVED's comments. While here, there's an unwrapped line around my generated diff (see attached patch), which would be nice to fix as well. >How-To-Repeat: Specify name's argument in 'make search' to match something that's in MOVED's comments. # make search name=MOVED Port: # MOVED - a list of (recently) moved or removed ports Moved: Date: Reason: Port: # Moved to: Where the port was moved to, or which port users Moved: Date: Reason: Port: # Why: The reason why the port was moved or removed. Moved: Date: Reason: Port: # If previously removed port gets restored, make sure to delete the relevant Moved: Date: Reason: >Fix: Apply the patch. Patch attached with submission follows: --- Mk/bsd.port.subdir.mk.orig 2010-02-15 18:31:30.000000000 +0300 +++ Mk/bsd.port.subdir.mk 2010-02-15 18:33:10.000000000 +0300 @@ -517,8 +517,10 @@ } \ { \ oldname = $$1; newname = $$2; \ + if (oldname ~ /^\#/) next; \ sub(".*\/", "", oldname); newname = sub(".*\/", "", newname); \ - if (((icase ? tolower(oldname) : oldname) ~ name) || ((icase ? tolower(newname) : newname) ~ name)) { \ + if (((icase ? tolower(oldname) : oldname) ~ name) || \ + ((icase ? tolower(newname) : newname) ~ name)) { \ for (i = 1; i <= 4; i++) { \ printf("%s:\t%s\n", names[i], $$i); \ } \ >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002151546.o1FFkGCM037379>