summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-09-19 16:04:28 +0000
committerFrancois Pons <fpons@mandriva.com>2001-09-19 16:04:28 +0000
commitf1f4c511fe2b75a7857d6aba3221294859fd1a88 (patch)
treed2a68c4ec8d664bdbfac1035ed773420be293a69 /perl-install/pkgs.pm
parent4394d9ed5a9057336873aa3368777fd57ba7ea92 (diff)
downloaddrakx-f1f4c511fe2b75a7857d6aba3221294859fd1a88.tar
drakx-f1f4c511fe2b75a7857d6aba3221294859fd1a88.tar.gz
drakx-f1f4c511fe2b75a7857d6aba3221294859fd1a88.tar.bz2
drakx-f1f4c511fe2b75a7857d6aba3221294859fd1a88.tar.xz
drakx-f1f4c511fe2b75a7857d6aba3221294859fd1a88.zip
added code to check if package are really installed.
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 2f0aeaaac..76ebba342 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -1388,7 +1388,13 @@ sub install($$$;$$) {
log::l("rpmRunTransactions start");
my @probs = c::rpmRunTransactions($trans, $callbackOpen,
sub { #- callbackClose
- print OUTPUT "close:$_[0]\n"; },
+ my $p = $packages{$_[0]} or return;
+ my $check_installed;
+ c::rpmdbNameTraverse($db, packageName($p), sub {
+ my ($header) = @_;
+ $check_installed = c::headerGetEntry($header, 'version') eq packageVersion($p) && c::headerGetEntry($header, 'release') eq packageRelease($p);
+ });
+ $check_installed and print OUTPUT "close:$_[0]\n"; },
sub { #- installCallback
print OUTPUT join(":", @_), "\n"; },
1);