summaryrefslogtreecommitdiffstats
path: root/tools/draklive
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2006-02-09 18:29:34 +0000
committerOlivier Blin <oblin@mandriva.org>2006-02-09 18:29:34 +0000
commit40ec74bd50001b275bae032d993a6f8461198192 (patch)
tree9aee4d9c94b9b1b9408dbddeee6d27a69eecabc6 /tools/draklive
parent0527cc9faae2663db65c4c451277557717ee0572 (diff)
downloaddrakx-backup-do-not-use-40ec74bd50001b275bae032d993a6f8461198192.tar
drakx-backup-do-not-use-40ec74bd50001b275bae032d993a6f8461198192.tar.gz
drakx-backup-do-not-use-40ec74bd50001b275bae032d993a6f8461198192.tar.bz2
drakx-backup-do-not-use-40ec74bd50001b275bae032d993a6f8461198192.tar.xz
drakx-backup-do-not-use-40ec74bd50001b275bae032d993a6f8461198192.zip
copy rpms in chroot and use rpm from the chroot (to avoid rpm version mismatch)
Diffstat (limited to 'tools/draklive')
-rwxr-xr-xtools/draklive11
1 files 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;