summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-07-01 13:59:53 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-07-01 13:59:53 +0300
commitc685667475d70daabac9ae224979abbd1f86987a (patch)
tree2673d4b8413f9fdec7abbf2875c435ca078d6c81
parentd3956140c2757a5929d4517cf54e5d9c06e11355 (diff)
downloadrpm-c685667475d70daabac9ae224979abbd1f86987a.tar.gz
rpm-c685667475d70daabac9ae224979abbd1f86987a.tar.bz2
rpm-c685667475d70daabac9ae224979abbd1f86987a.zip
Band-aid to dependency caching misbehaving with chrooted verify (RhBug:508074)
- disable dependency caching on chrooted verify to avoid ugly spew from paths containing outside paths while we're actually inside the root during verification - correct fix would be to fix the temporary db path calculation
-rw-r--r--lib/depends.c2
-rw-r--r--lib/verify.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/depends.c b/lib/depends.c
index a871f7f30..60c1df5a0 100644
--- a/lib/depends.c
+++ b/lib/depends.c
@@ -19,7 +19,7 @@
#include "debug.h"
-static int _cacheDependsRC = 1;
+RPM_GNUC_INTERNAL int _cacheDependsRC = 1;
const char * const rpmNAME = PACKAGE;
diff --git a/lib/verify.c b/lib/verify.c
index c7ffc5151..dd8f19de8 100644
--- a/lib/verify.c
+++ b/lib/verify.c
@@ -22,6 +22,7 @@
#define S_ISDEV(m) (S_ISBLK((m)) || S_ISCHR((m)))
extern int _rpmds_unspecified_epoch_noise;
+extern int _cacheDependsRC;
/* If cap_compare() (Linux extension) not available, do it the hard way */
#if WITH_CAP && !defined(HAVE_CAP_COMPARE)
@@ -467,6 +468,7 @@ int rpmcliVerify(rpmts ts, QVA_t qva, char * const * argv)
rpmVSFlags vsflags, ovsflags;
int ec = 0, xx;
const char * rootDir = rpmtsRootDir(ts);
+ int cachingDeps = _cacheDependsRC;
/*
* Open the DB + indices explicitly before possible chroot,
@@ -481,6 +483,8 @@ int rpmcliVerify(rpmts ts, QVA_t qva, char * const * argv)
goto exit;
} else {
rpmtsSetChrootDone(ts, 1);
+ /* XXX temporary db path is wrong when chrooted, disable caching */
+ _cacheDependsRC = 0;
}
}
@@ -513,6 +517,7 @@ int rpmcliVerify(rpmts ts, QVA_t qva, char * const * argv)
}
exit:
+ _cacheDependsRC = cachingDeps;
return ec;
}