diff options
-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"; |