Subject: proposed patch for bsd.pkg.mk
To: None <tech-pkg@netbsd.org>
From: Georg Schwarz <georg.schwarz@freenet.de>
List: tech-pkg
Date: 04/13/2005 22:00:14
I would like to propose the following patch to bsd.pkg.mk. It prevents dist
files not existing locally (any more) from being fetched when the package
in question is resumed building, installing or packaging and has already
completed the patch stage.
After this stage (please correct me if I am wrong here since that's
critical to my proposed solution!) any dist files will no longer be used,
so fetching them serves no purpose and wastes resources.
This situation can occur if one does a bmake install or package for an
already (at least partly) built package whose previously-fetched dist files
have been removed in the mean time (e.g. to save disk space).
--- bsd.pkg.mk.orig Wed Apr 13 19:17:04 2005
+++ bsd.pkg.mk Wed Apr 13 19:49:05 2005
@@ -2956,7 +2956,14 @@
.PHONY: patch
.if !target(patch)
+.if !exists(${PATCH_COOKIE})
patch: extract acquire-patch-lock ${PATCH_COOKIE} release-patch-lock
+.else
+# do not waste resources fetching missing files (if any) since extracting
+# and patching have already been completed anyway
+patch:
+ @${DO_NADA}
+.endif
.endif
.PHONY: tools
I have previously addressed that issue in PR#25432.
I would be happy to hear your comments.
Thanks,
Georg
--
Georg Schwarz http://home.pages.de/~schwarz/
georg.schwarz@freenet.de +49 178 8545053