[Bug 227387] Mk/bsd.port.mk: Try to fix make clean for non-flavored dependency

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Apr 9 11:40:10 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227387

--- Comment #2 from Fukang Chen <loader at FreeBSD.org> ---
Sure. Thanks koobs at .

FLAVOR=py27 is passed to the dependency ftp/curl through env:
https://svnweb.freebsd.org/ports/head/Mk/bsd.port.mk?revision=466532&view=markup#l3814
3813  limited-clean-depends-${_f}:
3814          @cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE}
limited-clean-depends
3815  .endif

then ${WRKDIR} turns to be /usr/ports/ftp/curl/work-py27 when it reaches here:
https://svnweb.freebsd.org/ports/head/Mk/bsd.port.mk?revision=466532&view=markup#l1663
1663    .if empty(FLAVOR)
1664    _WRKDIR=        work
1665    .else
1666    _WRKDIR=        work-${FLAVOR}
1667    .endif
1668    
1669    WRKDIR?=                ${WRKDIRPREFIX}${.CURDIR}/${_WRKDIR}

The first "===>  Cleaning for curl-7.59.0" is executed by the
pre-clean-noflavor: target:
https://svnweb.freebsd.org/ports/head/Mk/bsd.port.mk?revision=466532&view=markup#l3789
3789    pre-clean-noflavor:
3790            @cd ${.CURDIR} && ${SETENV} ${MAKE} pre-clean
3791    .endif

The Second "===>  Cleaning for curl-7.59.0" is excuted by the pre-clean-py27:
target:
https://svnweb.freebsd.org/ports/head/Mk/bsd.port.mk?revision=466532&view=markup#l3818
3818    pre-clean-${_f}:
3819            @cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE} pre-clean
3820    .endif



Current behaviour:
# cd /usr/ports/ftp/py-pycurl
# make -C /usr/ports/ftp/curl BATCH=1 extract
===>  License MIT accepted by the user
===>   curl-7.59.0 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by curl-7.59.0 for building
===>  Extracting for curl-7.59.0
=> SHA256 Checksum OK for curl-7.59.0.tar.xz.
# make clean
===>  Cleaning for curl-7.59.0
===>  Cleaning for curl-7.59.0
===>  Cleaning for py27-pycurl-7.43.0.1
===>  Cleaning for curl-7.59.0
===>  Cleaning for curl-7.59.0
===>  Cleaning for py36-pycurl-7.43.0.1
# test -d /usr/ports/ftp/curl/work ; echo $?
0

Expected behaviour (with patch):
# cd /usr/ports/ftp/py-pycurl
# make -C /usr/ports/ftp/curl BATCH=1 extract
===>  License MIT accepted by the user
===>   curl-7.59.0 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by curl-7.59.0 for building
===>  Extracting for curl-7.59.0
=> SHA256 Checksum OK for curl-7.59.0.tar.xz.
# make clean
===>  Cleaning for curl-7.59.0
===>  Cleaning for py27-pycurl-7.43.0.1
===>  Cleaning for py36-pycurl-7.43.0.1
# test -d /usr/ports/ftp/curl/work ; echo $?
1

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-ports-bugs mailing list