summaryrefslogtreecommitdiffstats
path: root/tools/draklive
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2006-03-07 18:26:37 +0000
committerOlivier Blin <oblin@mandriva.org>2006-03-07 18:26:37 +0000
commit0d578f2597d197fddded16704395148bd1593e5f (patch)
tree32fb7263ad0ad318b7e5b30bf876f495cd5e4491 /tools/draklive
parent407a752731e57751326c4b15fc37ea1b07429e23 (diff)
downloaddrakx-backup-do-not-use-0d578f2597d197fddded16704395148bd1593e5f.tar
drakx-backup-do-not-use-0d578f2597d197fddded16704395148bd1593e5f.tar.gz
drakx-backup-do-not-use-0d578f2597d197fddded16704395148bd1593e5f.tar.bz2
drakx-backup-do-not-use-0d578f2597d197fddded16704395148bd1593e5f.tar.xz
drakx-backup-do-not-use-0d578f2597d197fddded16704395148bd1593e5f.zip
add all additional media first, there may be some interaction between them, and allow additional rpms to pull dependencies from additional media
Diffstat (limited to 'tools/draklive')
-rwxr-xr-xtools/draklive15
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/draklive b/tools/draklive
index 33d7846fe..a3c129155 100755
--- a/tools/draklive
+++ b/tools/draklive
@@ -453,22 +453,23 @@ sub install_system {
if_($live->{system}{patch_install}, '--defcfg', Cwd::abs_path($live->{system}{patch_install})),
if_($live->{system}{rpmsrate}, '--rpmsrate', Cwd::abs_path($live->{system}{rpmsrate})))
or die "unable to install system chroot";
- #- remove urpmi media added by drakx-in-chroot, they're unusable
- run_({ root => get_system_root($live) }, 'urpmi.removemedia', '-a');
post_install_system($live);
}
sub post_install_system {
my ($live) = @_;
+ #- add all additional media first, there may be some interaction between them
foreach (@{$live->{system}{additional_media}}) {
- run_({ root => get_system_root($live) }, 'urpmi.addmedia', ($_->{distrib} ? '--distrib' : 'draklive-media'), $_->{path})
+ run_({ root => get_system_root($live) }, 'urpmi.addmedia', if_($_->{distrib}, '--distrib'), $_->{name}, $_->{path})
or die "unable to add media from $_->{path}";
- run_({ root => get_system_root($live) }, 'urpmi', '--auto', '--no-verify-rpm', @{$_->{packages}})
+ }
+ foreach (@{$live->{system}{additional_media}}) {
+ run_({ root => get_system_root($live) }, 'urpmi', '--auto', '--no-verify-rpm', if_(!$_->{distrib}, '--searchmedia', $_->{name}), @{$_->{packages}})
or die "unable to install packages from $_->{path}";
- run_({ root => get_system_root($live) }, 'urpmi.removemedia', '-a');
}
+ #- they may have dependencies in addtionnal media
if (@{$live->{system}{rpms}}) {
my $rpm_tmp_dir = '/tmp/draklive_rpms';
mkdir_p(get_system_root($live) . $rpm_tmp_dir);
@@ -478,6 +479,10 @@ sub post_install_system {
or die "unable to install additionnal system rpms";
rm_rf(get_system_root($live) . $rpm_tmp_dir);
}
+
+ #- remove urpmi media added by drakx-in-chroot and additional media, they're unusable
+ run_({ root => get_system_root($live) }, 'urpmi.removemedia', '-a');
+
my $erase = join(' ', @{$live->{system}{erase_rpms}});
run_({ root => get_system_root($live) }, 'sh', '-c', "rpm -qa $erase | xargs rpm -e ") if $erase;