summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/install/NEWS1
-rwxr-xr-xtools/drakx-in-chroot16
2 files changed, 15 insertions, 2 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index a1f75ef6a..12ac7aba2 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,5 +1,6 @@
- drakx-in-chroot:
o enable to choose resolution of Xvfb
+ o enable to use a package repository different from installer one
Version 11.15 - 19 August 2008
diff --git a/tools/drakx-in-chroot b/tools/drakx-in-chroot
index 15828e53d..6073ce236 100755
--- a/tools/drakx-in-chroot
+++ b/tools/drakx-in-chroot
@@ -16,16 +16,21 @@ my $AUTO_INSTALL_ROOTED = '/tmp/auto_inst.cfg.pl';
my $DEFCFG_ROOTED = '/tmp/defcfg.pl';
my $RPMSRATE_ROOTED = '/tmp/rpmsrate';
my $resolution = '800x600';
+my $repository_uri;
@ARGV >= 2 or die "usage: drakx-in-chroot <root of distrib> <dir to install to> [options]\n
\nOptions specific to drakx-in-chroot:
- --resolution=XXXxYYYY (eg: --resolution=1024x768)\n";
+ --resolution=XXXxYYYY (eg: --resolution=1024x768)\n
+ --repository=<path> path of packages repository
+";
(my $repository, my $dir, @ARGV) = @ARGV;
foreach (@ARGV) {
$i++;
if (/--resolution=(.*)/) {
$resolution = $1;
+ } elsif (/--repository=(.*)/) {
+ $repository_uri = $1;
}
}
my ($repository_without_arch, $repository_arch) = basename($repository) eq arch() ? (dirname($repository), '/' . arch()) : ($repository, '');
@@ -64,7 +69,14 @@ if ($remote_repository) {
}
sys("$sudo mount -o bind $dir $SLASH_LOCATION$prefix_ROOTED");
-sys("$sudo mount -o bind $repository_without_arch $SLASH_LOCATION$MEDIA_LOCATION_ROOTED") if !$remote_repository;
+
+if ($repository_uri) {
+ $repository_uri = '/C/cooker/i586';
+} elsif (!$remote_repository) {
+ $repository_uri = $repository_without_arch;
+}
+sys("$sudo mount -o bind $repository_uri $SLASH_LOCATION$MEDIA_LOCATION_ROOTED") if $repository_uri;
+
sys("$sudo mount -t proc none $SLASH_LOCATION/proc");
sys("$sudo mount -t sysfs none $SLASH_LOCATION/sys");
symlinkf('media' . $repository_arch, "$SLASH_LOCATION$IMAGE_LOCATION_ROOTED");