Bug 196590

Summary: Feature request: add patch-list target
Product: Ports & Packages Reporter: Vsevolod Stakhov <vsevolod>
Component: Ports FrameworkAssignee: Port Management Team <portmgr>
Status: Closed Feedback Timeout    
Severity: Affects Many People CC: ak, portmgr, vsevolod
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch-list
none
patch-list none

Description Vsevolod Stakhov freebsd_committer freebsd_triage 2015-01-07 13:36:06 UTC
Created attachment 151456 [details]
patch-list

This target allows to list all optional and mandatory patches for a port:

% make patch-list   
/usr/ports/mail/exim/files/extra-patch-xclient
/usr/ports/mail/exim/files/patch-Makefile
/usr/ports/mail/exim/files/patch-OS__Makefile-FreeBSD
/usr/ports/mail/exim/files/patch-pass-fd-to-tcpwrappers
/usr/ports/mail/exim/files/patch-scripts__exim_install
/usr/ports/mail/exim/files/patch-src__EDITME
/usr/ports/mail/exim/files/patch-src__auths__call_radius.c
/usr/ports/mail/exim/files/patch-src__configure.default
/usr/ports/mail/exim/files/patch-src__mime.c
Comment 1 Baptiste Daroussin freebsd_committer freebsd_triage 2015-01-07 13:39:45 UTC
I do like it, let's wait a bit on other portmgr reactions before approving  :)
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2015-01-07 13:48:46 UTC
Shouldn't:

if [ "`${ECHO_CMD} ${PATCHDIR}/patch-*`" != "${PATCHDIR}/patch-*" ]; then \
    for i in ${PATCHDIR}/patch-*; do \

Be written as

for i in ${PATCHDIR}/patch-*; do \
    if [ "$i" != "${PATCHDIR}/patch-*" ]; then \

One less fork to go around, no ?
Comment 3 Alex Kozlov freebsd_committer freebsd_triage 2015-01-07 14:50:05 UTC
> One less fork to go around, no ?
It's copy-paste from do-patch target, but IMHO, your variant is better.

It seems to not work for some ports:
$make -C /usr/ports/editors/vim patch-list
cd: /usr/obj/distfiles/vim: No such file or directory
*** Error code 2

Stop.
make: stopped in /var/ports/editors/vim
Comment 4 Vsevolod Stakhov freebsd_committer freebsd_triage 2015-01-07 16:46:17 UTC
Created attachment 151465 [details]
patch-list
Comment 5 Vsevolod Stakhov freebsd_committer freebsd_triage 2015-01-07 16:47:40 UTC
(In reply to Alex Kozlov from comment #3)

I have fixed the case of editors/vim, thanks for the notice!
Comment 6 Vsevolod Stakhov freebsd_committer freebsd_triage 2015-01-07 16:49:16 UTC
(In reply to Mathieu Arnold from comment #2)

But in your version, if is called inside `for` loop. I'm not sure that we gain anything from this change, to tell the truth.