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 --- tools/drakx-in-chroot | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'tools') 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