From 40ec74bd50001b275bae032d993a6f8461198192 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 9 Feb 2006 18:29:34 +0000 Subject: copy rpms in chroot and use rpm from the chroot (to avoid rpm version mismatch) --- tools/draklive | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/draklive b/tools/draklive index 680175af6..1b5901ed9 100755 --- a/tools/draklive +++ b/tools/draklive @@ -433,9 +433,14 @@ sub install_system { sub post_install_system { my ($live) = @_; - my @rpms = map { abs_path($_) } @{$live->{system}{rpms}}; - each_index { !defined $_ and die "unable to find file " . $live->{system}{rpms}[$::i] } @rpms; - run_('urpmi', '--auto', '--root', $live->{system}{root}, @rpms) if @rpms; + if (@{$live->{system}{rpms}}) { + my $rpm_tmp_dir = '/tmp/draklive_rpms'; + mkdir_p($live->{system}{root} . $rpm_tmp_dir); + cp_f(@{$live->{system}{rpms}}, $live->{system}{root} . $rpm_tmp_dir); + run_('chroot', $live->{system}{root}, 'urpmi', '--auto', + map { $rpm_tmp_dir . '/' . basename($_) } @{$live->{system}{rpms}}); + rm_rf($live->{system}{root} . $rpm_tmp_dir); + } my @patches = map { abs_path($_) } @{$live->{system}{patches}}; each_index { !defined $_ and die "unable to find file " . $live->{system}{patches}[$::i] } @patches; -- cgit v1.2.1