[78] in athena10

home help back first fref pref prev next nref lref last post

Re: /svn/athena r22745 - trunk/debathena/scripts

daemon@ATHENA.MIT.EDU (Tim Abbott)
Sat Feb 9 17:04:35 2008

Date: Sat, 9 Feb 2008 17:03:51 -0500 (EST)
From: Tim Abbott <tabbott@MIT.EDU>
To: Greg Hudson <ghudson@mit.edu>
cc: athena10@mit.edu
In-Reply-To: <200802082304.SAA19258@drugstore.mit.edu>
Message-ID: <Pine.LNX.4.64L.0802081808501.4059@vinegar-pot.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

I think we should make the gen-packages script faster.  It is intended to 
be run when you don't have an svn checkout?  Because currently it takes 
long enough that you wouldn't want to run it to checkout some package into 
/tmp to test a build; with an avn checkout this can be made much faster:

[tabbott@vinegar-pot packages$] time ./scripts/gen-packages >/dev/null

real    1m40.296s
user    0m3.540s
sys     0m3.060s

[tabbott@vinegar-pot debathena$] time ls -d */*/*/debian/control >/dev/null

real    0m1.906s
user    0m0.009s
sys     0m0.100s

(and once the checkout is in cache)
[tabbott@vinegar-pot debathena$] time ls -d */*/*/debian/control >/dev/null

real    0m0.022s
user    0m0.000s
sys     0m0.020s

 	-Tim Abbott

On Fri, 8 Feb 2008, ghudson@MIT.EDU wrote:

> Author: ghudson
> Date: 2008-02-08 18:04:08 -0500 (Fri, 08 Feb 2008)
> New Revision: 22745
>
> Added:
>   trunk/debathena/scripts/gen-packages
> Removed:
>   trunk/debathena/scripts/packages
> Modified:
>   trunk/debathena/scripts/dasource
> Log:
> * debathena/scripts/gen-packages: New file to generate packages.
> * debathena/scripts/dasource: Expect to find packages in cwd.
> * debathena/scripts/packages: Remove.
>
>
> Modified: trunk/debathena/scripts/dasource
> ===================================================================
> --- trunk/debathena/scripts/dasource	2008-02-08 17:26:16 UTC (rev 22744)
> +++ trunk/debathena/scripts/dasource	2008-02-08 23:04:08 UTC (rev 22745)
> @@ -26,7 +26,6 @@
>
> : ${DEBATHENA_APT=/mit/debathena/apt}
> basedir=$(dirname "$0")
> -pkgfile=$basedir/packages
> repo=svn+ssh://svn.mit.edu/athena/trunk
>
> while getopts r: opt; do
> @@ -103,16 +102,20 @@
>   (cd $dir && debuild -S -i -I -sa -us -uc)
> }
>
> +if [ ! -r packages ]; then
> +  die "Can't read packages file; create with gen-packages"
> +fi
> +
> if [ $# -gt 0 ]; then
>   # Build specific source packages.
>   for pkgname; do
> -    pkgpath=$(sed -nre "s/^$pkgname[[:space:]]+//p" $pkgfile)
> +    pkgpath=$(sed -nre "s/^$pkgname[[:space:]]+//p" packages)
>     [ -n "$pkgpath" ] || die "Can't find package $pkgname"
>     do_package $pkgname $pkgpath
>   done
> else
>   # Build all source packages.
> -  exec <$pkgfile
> +  exec <packages
>   while read pkgname pkgpath; do
>     do_package $pkgname $pkgpath
>   done
>
> Added: trunk/debathena/scripts/gen-packages
>
>
> Property changes on: trunk/debathena/scripts/gen-packages
> ___________________________________________________________________
> Name: svn:executable
>   + *
>
> Deleted: trunk/debathena/scripts/packages
>
>

home help back first fref pref prev next nref lref last post