summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-08-19 13:18:10 +0000
committerThierry Vignaud <tv@mandriva.org>2008-08-19 13:18:10 +0000
commite40d3f8508fa5028d4597790aefa66ac0ece20b6 (patch)
treed59d1916d98e26280c24dedf2de34f7c6f232545
parent8856c8f96431d149865eb02f41ef933fe35f64fb (diff)
downloaddrakx-e40d3f8508fa5028d4597790aefa66ac0ece20b6.tar
drakx-e40d3f8508fa5028d4597790aefa66ac0ece20b6.tar.gz
drakx-e40d3f8508fa5028d4597790aefa66ac0ece20b6.tar.bz2
drakx-e40d3f8508fa5028d4597790aefa66ac0ece20b6.tar.xz
drakx-e40d3f8508fa5028d4597790aefa66ac0ece20b6.zip
enable to use a package repository different from installer one; this enables
to use a locally build installer with an official distro repository
-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");