Subject: Re: using bulk build mechanism for a pre-selected list of packages
To: None <tech-pkg@netbsd.org>
From: Ron Roskens <roskens@elfin.net>
List: tech-pkg
Date: 12/10/2003 18:18:08
* Jeremy C. Reed <reed@reedmedia.net> [2003-12-09 15:04:12 -0800]:

> Is there a way to use the bulk build mechanism to only install a
> pre-selected list of packages?

I haven't noticed anything that it would. The problem with the current bulk
build system is that it blindly assumes you want to visit all directories
underneath pkgsrc/. To make it simpler, there should be a quick method of
asking for all the category and package directories.

I looked at using:

====
--- mk/bulk/printpkglist      2003-10-25 18:36:00.000000000 -0500
+++ mk/bulk/printpkglist.old    2003-10-25 18:35:25.000000000 -0500
@@ -52,5 +52,18 @@
 SED=`${BMAKE} show-var VARNAME=SED`
 cd $cwd

-list=`${GREP} '^[[:space:]]*'SUBDIR */Makefile | ${SED} 's,/Makefile.*=[[:space:]]*,/,'`
+# List of all pkgs, from pkgsrc/*/Makefile
+for pkgdir in `${BMAKE} -VSUBDIR`
+do
+       case "${pkgdir}" in
+       */*)    list="${list} ${pkgdir}"
+               ;;
+       *)
+               cd $cwd/$pkgdir
+               for pkg in `${BMAKE} -VSUBDIR`
+               do
+                       list="${list} ${pkgdir}/${pkg}"
+               done
+       esac
+done
 echo ${list}
====

Then you can define SPECIFIC_PKGS for the bulk build to do.

> For example, I'd like to use the bulk build scripts to attempt build the
> packages as defined in doc/STATUS as supported, fully supported and
> maybe later, yowza.
> 
> I don't have time or resources on this system to do the complete bulk
> builds.
> 
> The Packages.txt mentions example of using pre-build.local to stop from
> building packages, but I'd rather not waste time listing nearly every
> package.
> 
> Also, Packages.txt mentions that /usr/pkg will be completely deleted.
> Can't a bulk build be done with alternative PKG_DBDIR, LOCALBASE, and
> X11BASE settings so it won't touch current packages installation?

see mk/bulk/mksandbox.

Ron