diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-07-11 16:57:01 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-07-11 16:57:01 +0000 |
commit | a378443bee2334e130b573c276e7e54be47dc9b4 (patch) | |
tree | 1f185fd4ff1598d10ddbd5eb8bece68f82091fa9 | |
parent | 1dea794cad3576057b6c7f3c837f7cb103861973 (diff) | |
download | drakx-backup-do-not-use-a378443bee2334e130b573c276e7e54be47dc9b4.tar drakx-backup-do-not-use-a378443bee2334e130b573c276e7e54be47dc9b4.tar.gz drakx-backup-do-not-use-a378443bee2334e130b573c276e7e54be47dc9b4.tar.bz2 drakx-backup-do-not-use-a378443bee2334e130b573c276e7e54be47dc9b4.tar.xz drakx-backup-do-not-use-a378443bee2334e130b573c276e7e54be47dc9b4.zip |
- allow using sqlite for rpmdb when using option rpm_dbapi=4
-rw-r--r-- | perl-install/install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/install/any.pm | 2 | ||||
-rw-r--r-- | perl-install/install/install2.pm | 1 | ||||
-rw-r--r-- | perl-install/install/pkgs.pm | 10 |
4 files changed, 11 insertions, 3 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 4385f667e..3455b4f36 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,4 @@ +- allow using sqlite for rpmdb when using option rpm_dbapi=4 - add /lib/udev/usb_id which is needed by mouse.pm to generate /dev/input/by-id/xxx Version 10.4.142 - 2 July 2007, by Pascal "Pixel" Rigaux diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm index 19d3dff22..1ce4dc6d2 100644 --- a/perl-install/install/any.pm +++ b/perl-install/install/any.pm @@ -373,7 +373,7 @@ sub setPackages { } #- open rpm db according to right mode needed (ie rebuilding database if upgrading) - $o->{packages}{rpmdb} ||= install::pkgs::rpmDbOpen($o->{isUpgrade}); + $o->{packages}{rpmdb} ||= install::pkgs::rpmDbOpen($o->{isUpgrade}, $o->{rpm_dbapi}); { my $_wait = $o->wait_message('', N("Looking at packages already installed...")); diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm index 66d0cbee3..8532a02c5 100644 --- a/perl-install/install/install2.pm +++ b/perl-install/install/install2.pm @@ -391,6 +391,7 @@ sub main { useless_thing_accepted => sub { $o->{useless_thing_accepted} = 1 }, alawindows => sub { $o->{security} = 0; $o->{partitioning}{clearall} = 1; $o->{bootloader}{crushMbr} = 1 }, fdisk => sub { $o->{partitioning}{fdisk} = 1 }, + rpm_dbapi => sub { $o->{rpm_dbapi} = $v }, nomouseprobe => sub { $o->{nomouseprobe} = $v }, updatemodules => sub { $o->{updatemodules} = 1 }, move => sub { $::move = 1 }, diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm index 1d2f82ff3..a5452c3d5 100644 --- a/perl-install/install/pkgs.pm +++ b/perl-install/install/pkgs.pm @@ -548,11 +548,17 @@ sub openInstallLog() { } sub rpmDbOpen { - my ($b_rebuild_needed) = @_; + my ($b_rebuild_needed, $o_rpm_dbapi) = @_; clean_rpmdb_shared_regions(); + + if (my $wanted_dbapi = $o_rpm_dbapi) { + log::l("setting %_dbapi to $wanted_dbapi"); + substInFile { s/%_dbapi.*//; $_ .= "%_dbapi $wanted_dbapi\n" if eof } "$::prefix/etc/rpm/macros"; + URPM::add_macro("_dbapi $wanted_dbapi"); + } - if ($b_rebuild_needed) { + if ($b_rebuild_needed && !$o_rpm_dbapi) { if (my $pid = fork()) { waitpid $pid, 0; $? & 0xff00 and die "rebuilding of rpm database failed"; |