Subject: Re: pkgsrc progress bar?
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 01/20/2005 12:57:43
On Thu, 20 Jan 2005, Eric Haszlakiewicz wrote:

> > This is not possible.
>
> 	sure it is.  it's just hard to do it accurately.  At the very least,
> you could get a count of the number of packages you have left to build
> vs. the total number needed.  e.g. something like this will give you at
> least a rough idea:
>
> pkglist=`make print-build-depends-list | sed -e'<magic to put each package on a line>'`
> total=`echo $pkglist | wc -l`
> pkginst=0
> previnst=0
> while [ $pkginst -lt $total ] ; do
> 	pkginst=`pkg_info -I $pkglist 2>&1 | grep -v "can't find" | wc -l`
> 	if [ $pkginst -ne $previnst ] ; then
> 		echo -n "$pkginst / $total	"
> 		date
> 	fi
> 	sleep 60
> done
>
> of course, anything more than that gets a lot harder real quick.

I believe this different than the original inquiry which was about showing
progress during the build including progress of a single package.

I say it is not possible because there are too many variables: different
operating systems, different compilers, different dependencies (native
versus pkgsrc for example), different supplementary tools (like sed, awk,
grep). I don't see how we can estimate how long something takes. And
building some database of known build times won't scale well. Even my AMD
K6-400 machines builds many packages faster than my 1000Mhz+ machines.


 Jeremy C. Reed

 	  	 	 technical support & remote administration
	  	 	 http://www.pugetsoundtechnology.com/