summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-10-05 18:22:30 +0000
committerOlivier Blin <oblin@mandriva.com>2007-10-05 18:22:30 +0000
commitb239fea2d952cbbec18af06e15d3bf7d8b2b0088 (patch)
treef13744dcc013216b3f9ad9be0a74dc93f07fee42
parent43f8e7ba44fca196eba2eaa4530efc35e0525b62 (diff)
downloaddraklive-install-b239fea2d952cbbec18af06e15d3bf7d8b2b0088.tar
draklive-install-b239fea2d952cbbec18af06e15d3bf7d8b2b0088.tar.gz
draklive-install-b239fea2d952cbbec18af06e15d3bf7d8b2b0088.tar.bz2
draklive-install-b239fea2d952cbbec18af06e15d3bf7d8b2b0088.tar.xz
draklive-install-b239fea2d952cbbec18af06e15d3bf7d8b2b0088.zip
brute force clean of rpm db to fix draklive-install removal
-rwxr-xr-xdraklive-install4
1 files changed, 4 insertions, 0 deletions
diff --git a/draklive-install b/draklive-install
index 51c118e..11a86e9 100755
--- a/draklive-install
+++ b/draklive-install
@@ -131,6 +131,8 @@ open(my $OUTPUT, '-|', build_copy_command('/', $::prefix));
undef $update_progress;
undef $wait;
+sub clean_rpm_db { unlink(glob_(map { $_ . "/var/lib/rpm/__db.*" } "", $::prefix)) }
+
#- FIXME: maybe factorize with draklive, using draklive --clean-chroot ?
#- remove unwanted files and packages
my $live_user_desktop = chomp_(run_program::rooted_get_stdout($::prefix, "su - $live_user -c 'xdg-user-dir DESKTOP'"));
@@ -138,7 +140,9 @@ unlink(map { $::prefix . $_ } '/.autofsck',
'/etc/modprobe.d/mandriva-live',
$live_user_desktop . '/draklive-copy-wizard.desktop',
$live_user_desktop . '/draklive-install.desktop');
+clean_rpm_db();
system('chroot', $::prefix, 'rpm', '-e', 'draklive-install');
+clean_rpm_db();
#- enable first boot wizard at system boot
output($::prefix . '/etc/sysconfig/firstboot', 'FIRSTBOOT=yes');