From e40d3f8508fa5028d4597790aefa66ac0ece20b6 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 19 Aug 2008 13:18:10 +0000 Subject: enable to use a package repository different from installer one; this enables to use a locally build installer with an official distro repository --- perl-install/install/NEWS | 1 + tools/drakx-in-chroot | 16 ++++++++++++++-- 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 [options]\n \nOptions specific to drakx-in-chroot: - --resolution=XXXxYYYY (eg: --resolution=1024x768)\n"; + --resolution=XXXxYYYY (eg: --resolution=1024x768)\n + --repository= 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"); -- cgit v1.2.1