Author: eddyp-guest Date: 2007-03-08 21:08:44 +0000 (Thu, 08 Mar 2007) New Revision: 2492
Modified: people/goneri/update-pkg-games/etc/config people/goneri/update-pkg-games/refresh.pl Log: drop the dependency on Source::Shell and impose some constraints on the configuration file, as a consequence Modified: people/goneri/update-pkg-games/etc/config =================================================================== --- people/goneri/update-pkg-games/etc/config 2007-03-08 21:05:33 UTC (rev 2491) +++ people/goneri/update-pkg-games/etc/config 2007-03-08 21:08:44 UTC (rev 2492) @@ -1,36 +1,43 @@ -export IAM=$USER +# this is file is NOT a regular shell script +# You MUST respect the following: +# * all values MUST be quoted with "" or '' +# * fields containing email addresses must be quoted between '' +# * ONLY attributions are allowed +# * variables values which should be expanded MUST be quoted with "" + +IAM="$USER" # do not define this if you dont use externals -#export USEEXTERNALS='Yup Sir' -export ENTITY=pkg-games -export ENTITYNAME='Debian Games Team' -export TEAMEMAIL='[email protected]' -export BUILDERADMIN='[EMAIL PROTECTED]' +#USEEXTERNALS='Yup Sir' +ENTITY='pkg-games' +ENTITYNAME='Debian Games Team' +TEAMEMAIL='[email protected]' +BUILDERADMIN='[EMAIL PROTECTED]' -export UPDATELOCATION="/home/$IAM/update-$ENTITY" +UPDATELOCATION="/home/$IAM/update-$ENTITY" # repo location -export SVN="svn://svn.debian.org/$ENTITY/packages/trunk/" +SVN="svn://svn.debian.org/$ENTITY/packages/trunk/" # useful if a custom svn-buildpackage is used #SVNBUILDPACKAGE="/home/$IAM/update-$ENTITY/bin/svn-buildpackage" -export SVNBUILDPACKAGE="/usr/bin/svn-buildpackage" +SVNBUILDPACKAGE="/usr/bin/svn-buildpackage" -export TMPDIR="/home/$IAM/tmp/update-$ENTITY/" -export CHECKSDIR="$UPDATELOCATION/checks/" +TMPDIR="/home/$IAM/tmp/update-$ENTITY/" +CHECKSDIR="$UPDATELOCATION/checks/" -export HTTPDIR="/home/$IAM/public_html/$ENTITY" -export HTTPRESULT="$HTTPDIR/debian" -export HTTPLOG="$HTTPDIR/log" +HTTPDIR="/home/$IAM/public_html/$ENTITY" +HTTPRESULT="$HTTPDIR/debian" +HTTPLOG="$HTTPDIR/log" -export LOGDIR="$UPDATELOCATION/log" +LOGDIR="$UPDATELOCATION/log" -export PBUILDER="sudo /usr/sbin/pbuilder" -export PDEBUILD="sudo /usr/bin/pdebuild" -export PBUILDERRC="$UPDATELOCATION/etc/pbuilderrc" +PBUILDER="sudo /usr/sbin/pbuilder" +PDEBUILD="sudo /usr/bin/pdebuild" +PBUILDERRC="$UPDATELOCATION/etc/pbuilderrc" #do not stop building the package is SVN didn't change (0/1) -export FORCE_BUILD=0 +FORCE_BUILD="0" # any params you might need to pass to pbuilder; recommended for overrides #BUILDEREXTRAPARAMS="--svn-override=origDir=http://pkg-games.alioth.debian.org/tarballs" -export BUILDEREXTRAPARAMS="--svn-noninteractive" +BUILDEREXTRAPARAMS="--svn-noninteractive" Modified: people/goneri/update-pkg-games/refresh.pl =================================================================== --- people/goneri/update-pkg-games/refresh.pl 2007-03-08 21:05:33 UTC (rev 2491) +++ people/goneri/update-pkg-games/refresh.pl 2007-03-08 21:08:44 UTC (rev 2492) @@ -9,12 +9,15 @@ use warnings; use strict; -# just import the configuration here, too -use Shell::Source; -my $shell = Shell::Source->new(shell => "sh", file => "etc/config"); -$shell->inherit; +################################################## +# import configuration +my $USER=$ENV{USER}; -#exit 0; +open CONFIG, "<etc/config" or die; +while (<CONFIG>) { + eval "\$$1=$2; return (1);" if ( /^\s*(\w+)=(('|")(.+?)('|"))\s*$/ ) ; +} +################################################## my $green = "#6be053"; my $yellow = "#f7e583"; @@ -27,10 +30,10 @@ # Configuration my $destcharset = 'ISO-8859-1'; -my @teams_email = ("$ENV{TEAMEMAIL}"); -my $html_output_dir = "$ENV{HTTPDIR}"; -my $local_builddir = "$ENV{HTTPDIR}"; -my $remote_builddir = "/~$ENV{IAM}/$ENV{ENTITY}"; +my @teams_email = ("$TEAMEMAIL"); +my $html_output_dir = "$HTTPDIR"; +my $local_builddir = "$HTTPDIR"; +my $remote_builddir = "/~$IAM/$ENTITY"; sub showBugs { @@ -130,12 +133,12 @@ my $email = shift; open PAGE, ">$html_output_dir/$email.html" or die "can't open $html_output_dir/$email.html file: $!";; print PAGE "<html><head> - <title>$ENV{ENTITYNAME} : $maintainers->{name_by_email}->{$email}</title> + <title>$ENTITYNAME : $maintainers->{name_by_email}->{$email}</title> </header> <body>"; print PAGE "<table border=1>"; - print PAGE "<tr><th>Package</th><th>Last check (min)</th><th>Build</th><th>Upload Request</th><th>Lintian</th><th>Linda</th><th>Bugs</th><th>$ENV{ENTITYNAME} Policy</th></tr>\n"; + print PAGE "<tr><th>Package</th><th>Last check (min)</th><th>Build</th><th>Upload Request</th><th>Lintian</th><th>Linda</th><th>Bugs</th><th>$ENTITYNAME Policy</th></tr>\n"; @@ -170,8 +173,8 @@ $linda = (@lindaerrs)?"<a href=\"$remote_builddir/log/$pkg/linda.log\">".int (@lindaerrs)."</a>":''; my @pkggamespolicyerrs; - @pkggamespolicyerrs = <DGP> if (open DGP,'<'."$remote_builddir/log/".$pkg."/$ENV{ENTITY}-policy.log"); - $pkggamespolicy = (@pkggamespolicyerrs)?"<a href=\"$remote_builddir/log/$pkg/$ENV{ENTITY}-policy.log\">".int (@pkggamespolicyerrs)."</a>":''; + @pkggamespolicyerrs = <DGP> if (open DGP,'<'."$remote_builddir/log/".$pkg."/$ENTITY-policy.log"); + $pkggamespolicy = (@pkggamespolicyerrs)?"<a href=\"$remote_builddir/log/$pkg/$ENTITY-policy.log\">".int (@pkggamespolicyerrs)."</a>":''; my $bugs = showBugs($pkg); my $ur = (exists &uploadrequest()->{$pkg})?'Yes':''; @@ -230,7 +233,7 @@ open PAGE, ">$html_output_dir/index.html" or die "can't open $html_output_dir/index.html file: $!"; print PAGE "<html><head> - <title>$ENV{ENTITYNAME} : Maintainers list</title> + <title>$ENTITYNAME : Maintainers list</title> </header> <body>"; _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/pkg-games-commits

