ports/112745: Patch: Add a package-smart target
ADAM David Alan Martin
adamartin at FreeBSD.org
Thu May 17 20:10:05 UTC 2007
>Number: 112745
>Category: ports
>Synopsis: Patch: Add a package-smart target
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu May 17 20:10:03 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: ADAM David Alan Martin
>Release: FreeBSD 6.2, mostly
>Organization:
Filesystem and Storage Lab, Stony Brook University
>Environment:
FreeBSD with ports tree
>Description:
The "make package-recursive" target for ports will rebuild all tarballs for packages that are installed, even if the tarball exists in /usr/ports/packages.
When upgrading existing ports, or installing new ports with unbuilt dependencies, it is unnecessary to rebuild the existing tarballs.
>How-To-Repeat:
Run make package-recursive on any port with deep dependencies -- ports will rebuild every tarball dependancy, not just the ones that are unbuilt.
>Fix:
This patch, to /usr/ports/Mk/bsd.port.mk will add a target, "package-smart", which will build package tarballs recursively skipping those which exist already.
--- bsd.port.orig Wed Feb 21 00:37:56 2007
+++ bsd.port.mk Fri Jan 26 19:58:07 2007
@@ -5199,6 +5211,23 @@
(cd $$dir; ${MAKE} package-noinstall); \
done
+#Changes to add the package-smart target by ADAM David Alan Martin,
+#2006.10.17
+.if exists(${PACKAGES})
+package-smart: package
+ @for dir in $$(${ALL-DEPENDS-LIST}); do \
+ (cd $$dir; ${MAKE} package-smart-dependancy); \
+ done
+
+package-smart-dependancy:
+ @if [ ! -e ${PKGFILE} ]; then \
+ ${MAKE} package-noinstall; \
+ else\
+ ${ECHO} "Package ${PKGFILE} exists... skipping.";\
+ fi;\
+
+.endif
+
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list