summaryrefslogtreecommitdiff
path: root/rpmqv.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-10-26 04:16:19 +0000
committerjbj <devnull@localhost>2001-10-26 04:16:19 +0000
commit4a1a5e81483a2f81b22c3a0d2cb054d93055998e (patch)
tree13e0de60dd990c9e799bc0975c80741b1b5880de /rpmqv.c
parentf03b462b1ef0ad128b7732c0492eefeff9c2248e (diff)
downloadrpm-4a1a5e81483a2f81b22c3a0d2cb054d93055998e.tar.gz
rpm-4a1a5e81483a2f81b22c3a0d2cb054d93055998e.tar.bz2
rpm-4a1a5e81483a2f81b22c3a0d2cb054d93055998e.zip
- wire transactions through rpmcli install/erase modes.
- legacy signatures always checked on package read. CVS patchset: 5134 CVS date: 2001/10/26 04:16:19
Diffstat (limited to 'rpmqv.c')
-rwxr-xr-xrpmqv.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/rpmqv.c b/rpmqv.c
index 0e16f4070..3f5817252 100755
--- a/rpmqv.c
+++ b/rpmqv.c
@@ -951,7 +951,11 @@ int main(int argc, const char ** argv)
#ifdef IAM_RPMBT
case MODE_REBUILD:
case MODE_RECOMPILE:
- { const char * pkg;
+ { const char * pkg;
+ const char * rootDir = "";
+ rpmdb db = NULL;
+ rpmTransactionSet ts = NULL;
+
while (!rpmIsVerbose())
rpmIncreaseVerbosity();
@@ -967,11 +971,17 @@ int main(int argc, const char ** argv)
ba->buildAmount |= RPMBUILD_RMBUILD;
}
+ if (rpmdbOpen(rootDir, &db, O_RDONLY, 0644)) {
+ ec = 1;
+ break;
+ }
+ ts = rpmtransCreateSet(db, rootDir);
+
while ((pkg = poptGetArg(optCon))) {
const char * specFile = NULL;
ba->cookie = NULL;
- ec = rpmInstallSource("", pkg, &specFile, &ba->cookie);
+ ec = rpmInstallSource(ts, pkg, &specFile, &ba->cookie);
if (ec == 0) {
ba->rootdir = rootdir;
ba->passPhrase = passPhrase;
@@ -983,11 +993,13 @@ int main(int argc, const char ** argv)
if (ec)
/*@loopbreak@*/ break;
}
- } break;
- case MODE_BUILD:
- case MODE_TARBUILD:
- { const char * pkg;
+ ts = rpmtransFree(ts);
+ } break;
+
+ case MODE_BUILD:
+ case MODE_TARBUILD:
+ { const char * pkg;
while (!rpmIsVerbose())
rpmIncreaseVerbosity();
@@ -1038,7 +1050,7 @@ int main(int argc, const char ** argv)
rpmFreeMacros(NULL);
(void) rpmReadConfigFiles(rcfile, NULL);
}
- } break;
+ } break;
#endif /* IAM_RPMBT */
#ifdef IAM_RPMEIU