diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-02-21 17:49:23 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-02-21 17:49:23 +0000 |
commit | c5937dc3e09ec5268f95e6020c64e561cf152abd (patch) | |
tree | 448df2fa5a13754acbeb97cb8bfb5daccf061691 | |
parent | 2053a013097a00df964948bac30b35e19fd23d86 (diff) | |
download | urpmi-c5937dc3e09ec5268f95e6020c64e561cf152abd.tar urpmi-c5937dc3e09ec5268f95e6020c64e561cf152abd.tar.gz urpmi-c5937dc3e09ec5268f95e6020c64e561cf152abd.tar.bz2 urpmi-c5937dc3e09ec5268f95e6020c64e561cf152abd.tar.xz urpmi-c5937dc3e09ec5268f95e6020c64e561cf152abd.zip |
(migrate_back_rpmdb_db_to_4_6) downgrade from rpm-4.9 to 4.8 db when
installing mga1 in a chroot from mga2+ (mga#4590)
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | urpm/sys.pm | 12 |
2 files changed, 14 insertions, 0 deletions
@@ -2,6 +2,8 @@ o return the proper error code in some cases when failing to install some packages o kill unused DUDF support (mga#4493) + o downgrade from rpm-4.9 to 4.8 db when installing mga1 in a chroot from + mga2+ (mga#4590) o --test: do not display "More information on package" o --test: do not update /var/lib/rpm/installed-through-deps.list - fix $ARCH and $VERSION keyword substition in media url diff --git a/urpm/sys.pm b/urpm/sys.pm index da0c26e7..0ac01aec 100644 --- a/urpm/sys.pm +++ b/urpm/sys.pm @@ -254,11 +254,23 @@ sub migrate_back_rpmdb_db_to_hash_8 { } } +sub migrate_back_rpmdb_db_to_4_6 { + my ($urpm, $root) = @_; + $urpm->{info}("migrating back the created rpm db from rpm-4.9 to rpm-4.6/4.8"); + if (system('chroot', $root, 'rpm', '--rebuilddb') == 0) { + $urpm->{log}("rpm db downgraded successfully"); + } else { + $urpm->{error}("rpm db downgrade failed. You will not be able to run rpm chrooted"); + } +} + sub migrate_back_rpmdb_db_version { my ($urpm, $root) = @_; if ($urpm->{need_migrate_rpmdb} eq '4.6') { migrate_back_rpmdb_db_to_hash_8($urpm, $root); + } elsif ($urpm->{need_migrate_rpmdb} eq '4.8') { + migrate_back_rpmdb_db_to_4_6($urpm, $root); } clean_rpmdb_shared_regions($root); |