[Fai-commit] r5523 - trunk/bin
Thomas Lange
lange at alioth.debian.org
Fri Sep 25 10:22:16 UTC 2009
Author: lange
Date: 2009-09-25 10:22:15 +0000 (Fri, 25 Sep 2009)
New Revision: 5523
Modified:
trunk/bin/install_packages
Log:
use sh -c to execute cd and apt-get in one shell, change path for downloading
Modified: trunk/bin/install_packages
===================================================================
--- trunk/bin/install_packages 2009-09-25 09:26:14 UTC (rev 5522)
+++ trunk/bin/install_packages 2009-09-25 10:22:15 UTC (rev 5523)
@@ -63,7 +63,7 @@
my $use_aptpkg=0;
my $aptopt='-y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"';
my $downloaddir="/var/cache/apt/archives/partial/"; # where to download packages that gets only unpacked
-my $debsourcesdir='/var/tmp';
+my $debsourcesdir='/var/tmp/package';
$| = 1;
@@ -464,9 +464,10 @@
close(LIST);
return unless ($ENV{'FAI_DEBSOURCESDIR'});
+
# download debian source packages if $ENV{'FAI_DEBSOURCESDIR'} is defined
- execute("$rootcmd (cd $debsourcesdir ; apt-get sources @known)");
- execute("mv $FAI_ROOT/$debsourcesdir/*.deb $ENV{'FAI_DEBSOURCESDIR'}");
+ execute("$rootcmd sh -c \"mkdir $debsourcesdir;cd $debsourcesdir ; apt-get --download-only source @known\"");
+ execute("mkdir -p $ENV{'FAI_DEBSOURCESDIR'}; mv $FAI_ROOT/$debsourcesdir/* $ENV{'FAI_DEBSOURCESDIR'}");
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub usage {
More information about the Fai-commit
mailing list