From d55878a5021b7fdae4025d70832188cb94562d08 Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Mon, 29 Nov 2010 10:17:19 +0000 Subject: add urpmqlogs parameter --- BCD/Common.pm | 7 +++++-- BCD/Web.pm | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'BCD') diff --git a/BCD/Common.pm b/BCD/Common.pm index df200b5..c5a71ae 100644 --- a/BCD/Common.pm +++ b/BCD/Common.pm @@ -12,7 +12,7 @@ use BCD::Bcd qw(:DEFAULT); our @ISA = qw(Exporter); our @EXPORT = qw(create_needed_dir check_dir clean_all print_color); # export all needed var -our @EXPORT_OK = qw($isoconf $wd $name $arch $file $based_on $version $repo $isodir $builddir $distrib_path $error_color $DISTRIB $THEME $tmp_rpmsrate $NB_FORK $dir_deps @list_of_removed $rpmrc $pwd_file $conf_file $date); +our @EXPORT_OK = qw($isoconf $wd $name $arch $file $based_on $version $repo $isodir $builddir $distrib_path $error_color $DISTRIB $THEME $tmp_rpmsrate $NB_FORK $dir_deps @list_of_removed $rpmrc $pwd_file $conf_file $date $urpmqlogs); my $LOG="COMMON -"; my $color = "red"; @@ -64,7 +64,10 @@ our $pwd_file = $isoconf->{signature}; our $rpmrc = $isoconf->{rpmrc}; # where to store urpmq queries results -our $dir_deps = "/var/lib/bcd/$name-$version-$arch"; +my $urpmqlogs; +$isoconf->{urpmqlogs} and $urpmqlogs=$isoconf->{urpmqlogs} or $urpmqlogs="/var/lib/bcd/"; +create_needed_dir($urpmqlogs); +our $dir_deps = "$urpmqlogs/$name-$version-$arch"; our $builddir = "$wd/$isoconf->{iso}{genisoimage}{builddir}/$name-$version-$arch/$arch"; our $isodir = "$wd/$isoconf->{iso}{genisoimage}{isodir}/$name-$version-$arch"; # distrib path in chroot (mounted loop) diff --git a/BCD/Web.pm b/BCD/Web.pm index 235e375..f5630f6 100644 --- a/BCD/Web.pm +++ b/BCD/Web.pm @@ -7,7 +7,7 @@ use URPM; use File::Slurp; use MDK::Common; -use BCD::Common qw(:DEFAULT $isoconf $isodir $wd $arch $version $based_on $repo $THEME $name $conf_file $date); +use BCD::Common qw(:DEFAULT $isoconf $isodir $wd $arch $version $based_on $repo $THEME $name $conf_file $date $urpmqlogs); our @ISA = qw(Exporter); our @EXPORT = qw(main_html); @@ -161,7 +161,7 @@ Pubkey: $media->{pubkey} } sub prep_build_log { - system("cp -af /var/lib/bcd/$name-$version-$arch/* $webdir/log/"); + system("cp -af $urpmqlogs/$name-$version-$arch/* $webdir/log/"); } sub show_rpmcheck { -- cgit v1.2.1