summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2011-03-23 12:14:23 +0200
committerPanu Matilainen <pmatilai@redhat.com>2011-03-23 12:14:23 +0200
commit8b4e66d3576aefbcf74e760462979bea7942dafd (patch)
treea77a78e3233965570029206ef22d29cf39ee45cb /lib
parent850fe79da6bdaef7fd228d2b314d51ceea24aff1 (diff)
downloadlibrpm-tizen-8b4e66d3576aefbcf74e760462979bea7942dafd.tar.gz
librpm-tizen-8b4e66d3576aefbcf74e760462979bea7942dafd.tar.bz2
librpm-tizen-8b4e66d3576aefbcf74e760462979bea7942dafd.zip
Reduce vsflags flip-flop
- Transaction set vsflags gets set early in rpmInstall(), remove redundant set + restore on tryReadHeader()
Diffstat (limited to 'lib')
-rw-r--r--lib/rpminstall.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/rpminstall.c b/lib/rpminstall.c
index 9289030be..ea951d8fa 100644
--- a/lib/rpminstall.c
+++ b/lib/rpminstall.c
@@ -313,10 +313,8 @@ static int tryReadManifest(struct rpmEIU * eiu)
return rc;
}
-static int tryReadHeader(rpmts ts, struct rpmEIU * eiu, rpmVSFlags vsflags)
+static int tryReadHeader(rpmts ts, struct rpmEIU * eiu)
{
- rpmVSFlags tvsflags;
-
/* Try to read the header from a package file. */
FD_t fd = Fopen(*eiu->fnp, "r.ufdio");
if (fd == NULL || Ferror(fd)) {
@@ -331,9 +329,7 @@ static int tryReadHeader(rpmts ts, struct rpmEIU * eiu, rpmVSFlags vsflags)
}
/* Read the header, verifying signatures (if present). */
- tvsflags = rpmtsSetVSFlags(ts, vsflags);
eiu->rpmrc = rpmReadPackageFile(ts, fd, *eiu->fnp, &eiu->h);
- tvsflags = rpmtsSetVSFlags(ts, tvsflags);
Fclose(fd);
fd = NULL;
@@ -497,7 +493,7 @@ restart:
rpmlog(RPMLOG_DEBUG, "============== %s\n", *eiu->fnp);
(void) urlPath(*eiu->fnp, &fileName);
- if (tryReadHeader(ts, eiu, vsflags) == RPMRC_FAIL)
+ if (tryReadHeader(ts, eiu) == RPMRC_FAIL)
continue;
if (eiu->rpmrc == RPMRC_NOTFOUND) {