Subject: Marking files for update
To: None <tech-pkg@NetBSD.ORG>
From: Martin Husemann <martin@duskware.de>
List: tech-pkg
Date: 05/27/2001 10:20:54
Hi!
I wonder if it would be easy to implement & sensible to add a variant of
the "show-downlevel" target that marks all pkgs it displays as "need to be
updated" by creating a tag file in there?
Then, whenever an "update" target checks dependencies for the installed
version of this pkg, it would make the version comparision fail and descend
into the marked pkg.
This would be very useable to create a minimal-rebuild-update-all script,
which then could be similar to this pseudo code:
while true;
do
PKG=`make mark-show-downlevel | fgrep -v '===>' | awk '{ print $1}' | sed 1q`
if [ x$PKG = x ]; then exit 0
cd into $PKG's dir
make update
done
At the moment this would result in multiple builds if somewhere in the
dependency graph an installed pkg is found that is not up to date but enough
to match the required dependency. The make update in question would proceed
without updating that pkg and later the pkg will be seleceted in another
iteration and be updated - by rebuilding all the things just rebuild again.
An alternative would be an environment variable that makes any version check
look into the -current version in the refered pkg and only succeed if installed
version == -current version; which actually may be even simpler to implement.
Martin