summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2016-12-14 18:57:58 +0200
committerPanu Matilainen <pmatilai@redhat.com>2016-12-14 18:57:58 +0200
commitb728665bc88b917e4476f59c5be7701136cb9ba0 (patch)
tree3236b3a7d4eac1e512959d4d697807c80c2200b1
parentab676d630088eff17c8237ad8b6d07303d58a652 (diff)
downloadrpm-b728665bc88b917e4476f59c5be7701136cb9ba0.tar.gz
Replace rpmdbCheckSignals() with rpmsqPoll() everywhere, eliminate from API
rpmdbCheckSignals() is a public function and it'd be trivial to keep it but there are no known callers and its such a hysterical name that lets just get rid of it while we're breaking the ABI anyway...
-rw-r--r--lib/fprint.c6
-rw-r--r--lib/query.c7
-rw-r--r--lib/rpmchecksig.c4
-rw-r--r--lib/rpmdb.c15
-rw-r--r--lib/rpmdb.h5
-rw-r--r--lib/rpminstall.c3
-rw-r--r--lib/transaction.c3
-rw-r--r--python/rpmmodule.c2
8 files changed, 19 insertions, 26 deletions
diff --git a/lib/fprint.c b/lib/fprint.c
index 65eaeec66..b810e4d2b 100644
--- a/lib/fprint.c
+++ b/lib/fprint.c
@@ -6,7 +6,7 @@
#include <rpm/rpmfileutil.h> /* for rpmCleanPath */
#include <rpm/rpmts.h>
-#include <rpm/rpmdb.h>
+#include <rpm/rpmsq.h>
#include "lib/rpmdb_internal.h"
#include "lib/rpmfi_internal.h"
@@ -485,7 +485,7 @@ void fpCachePopulate(fingerPrintCache fpc, rpmts ts, int fileCount)
pi = rpmtsiInit(ts);
while ((p = rpmtsiNext(pi, 0)) != NULL) {
fingerPrint *fpList;
- (void) rpmdbCheckSignals();
+ (void) rpmsqPoll();
if ((fi = rpmteFiles(p)) == NULL)
continue; /* XXX can't happen */
@@ -520,7 +520,7 @@ void fpCachePopulate(fingerPrintCache fpc, rpmts ts, int fileCount)
pi = rpmtsiInit(ts);
while ((p = rpmtsiNext(pi, 0)) != NULL) {
- (void) rpmdbCheckSignals();
+ (void) rpmsqPoll();
fs = rpmteGetFileStates(p);
fc = rpmfsFC(fs);
diff --git a/lib/query.c b/lib/query.c
index c053e9bf6..a5256ec05 100644
--- a/lib/query.c
+++ b/lib/query.c
@@ -14,6 +14,7 @@
#include <rpm/rpmdb.h>
#include <rpm/rpmfi.h>
#include <rpm/rpmts.h>
+#include <rpm/rpmsq.h>
#include <rpm/rpmlog.h>
#include <rpm/rpmfileutil.h> /* rpmCleanPath */
@@ -273,7 +274,7 @@ static int rpmgiShowMatches(QVA_t qva, rpmts ts, rpmgi gi)
while ((h = rpmgiNext(gi)) != NULL) {
int rc;
- rpmdbCheckSignals();
+ rpmsqPoll();
if ((rc = qva->qva_showPackage(qva, ts, h)) != 0)
ec = rc;
headerFree(h);
@@ -291,7 +292,7 @@ static int rpmcliShowMatches(QVA_t qva, rpmts ts, rpmdbMatchIterator mi)
while ((h = rpmdbNextIterator(mi)) != NULL) {
int rc;
- rpmdbCheckSignals();
+ rpmsqPoll();
if ((rc = qva->qva_showPackage(qva, ts, h)) != 0)
ec = rc;
}
@@ -304,7 +305,7 @@ static rpmdbMatchIterator initQueryIterator(QVA_t qva, rpmts ts, const char * ar
int i;
rpmdbMatchIterator mi = NULL;
- (void) rpmdbCheckSignals();
+ (void) rpmsqPoll();
if (qva->qva_showPackage == NULL)
goto exit;
diff --git a/lib/rpmchecksig.c b/lib/rpmchecksig.c
index bc95fef39..ca7405eb1 100644
--- a/lib/rpmchecksig.c
+++ b/lib/rpmchecksig.c
@@ -11,7 +11,7 @@
#include <rpm/rpmpgp.h>
#include <rpm/rpmcli.h>
#include <rpm/rpmfileutil.h> /* rpmMkTemp() */
-#include <rpm/rpmdb.h>
+#include <rpm/rpmsq.h>
#include <rpm/rpmts.h>
#include <rpm/rpmlog.h>
#include <rpm/rpmstring.h>
@@ -382,7 +382,7 @@ int rpmcliVerifySignatures(rpmts ts, ARGV_const_t argv)
}
Fclose(fd);
- rpmdbCheckSignals();
+ rpmsqPoll();
}
rpmKeyringFree(keyring);
return res;
diff --git a/lib/rpmdb.c b/lib/rpmdb.c
index ca166335f..82b083e00 100644
--- a/lib/rpmdb.c
+++ b/lib/rpmdb.c
@@ -327,11 +327,6 @@ void rpmAtExit(void)
(void) rpmdbClose(db);
}
-int rpmdbCheckSignals(void)
-{
- return rpmsqPoll();
-}
-
/**
* Block all signals, returning previous signal mask.
*/
@@ -354,7 +349,7 @@ static int blockSignals(sigset_t * oldMask)
*/
static int unblockSignals(sigset_t * oldMask)
{
- (void) rpmdbCheckSignals();
+ (void) rpmsqPoll();
return sigprocmask(SIG_SETMASK, oldMask, NULL);
}
@@ -1082,7 +1077,7 @@ rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi)
mi = _free(mi);
- (void) rpmdbCheckSignals();
+ (void) rpmsqPoll();
return NULL;
}
@@ -1808,7 +1803,7 @@ rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpmDbiTagVal rpmtag,
rpmdbMatchIterator mi = NULL;
if (db != NULL) {
- (void) rpmdbCheckSignals();
+ (void) rpmsqPoll();
if (rpmtag == RPMDBI_PACKAGES)
mi = pkgdbIterInit(db, keyp, keylen);
@@ -1831,7 +1826,7 @@ rpmdbMatchIterator rpmdbInitPrefixIterator(rpmdb db, rpmDbiTagVal rpmtag,
return NULL;
if (db != NULL && rpmtag != RPMDBI_PACKAGES) {
- (void) rpmdbCheckSignals();
+ (void) rpmsqPoll();
if (indexOpen(db, dbtag, 0, &dbi) == 0) {
@@ -1917,7 +1912,7 @@ rpmdbIndexIterator rpmdbIndexIteratorInit(rpmdb db, rpmDbiTag rpmtag)
if (db == NULL)
return NULL;
- (void) rpmdbCheckSignals();
+ (void) rpmsqPoll();
if (indexOpen(db, rpmtag, 0, &dbi))
return NULL;
diff --git a/lib/rpmdb.h b/lib/rpmdb.h
index 3a782738b..78765bb15 100644
--- a/lib/rpmdb.h
+++ b/lib/rpmdb.h
@@ -146,11 +146,6 @@ rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpmDbiTagVal rpmtag,
Header rpmdbNextIterator(rpmdbMatchIterator mi);
/** \ingroup rpmdb
- * Check for and exit on termination signals.
- */
-int rpmdbCheckSignals(void);
-
-/** \ingroup rpmdb
* Destroy rpm database iterator.
* @param mi rpm database iterator
* @return NULL always
diff --git a/lib/rpminstall.c b/lib/rpminstall.c
index d8462e519..f7c019008 100644
--- a/lib/rpminstall.c
+++ b/lib/rpminstall.c
@@ -10,6 +10,7 @@
#include <rpm/rpmdb.h>
#include <rpm/rpmds.h>
#include <rpm/rpmts.h>
+#include <rpm/rpmsq.h>
#include <rpm/rpmlog.h>
#include <rpm/rpmfileutil.h>
@@ -626,7 +627,7 @@ restart:
rpmcliProgressTotal = 0;
rpmcliProgressCurrent = 0;
for (i = 0; i < eiu->numSRPMS; i++) {
- rpmdbCheckSignals();
+ rpmsqPoll();
if (eiu->sourceURL[i] != NULL) {
rc = RPMRC_OK;
if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_TEST))
diff --git a/lib/transaction.c b/lib/transaction.c
index cc312eb1d..d8cd1e6e9 100644
--- a/lib/transaction.c
+++ b/lib/transaction.c
@@ -14,6 +14,7 @@
#include <rpm/rpmds.h>
#include <rpm/rpmfileutil.h>
#include <rpm/rpmstring.h>
+#include <rpm/rpmsq.h>
#include "lib/fprint.h"
#include "lib/misc.h"
@@ -978,7 +979,7 @@ rpmdbMatchIterator rpmFindBaseNamesInDB(rpmts ts, uint64_t fileCount)
pi = rpmtsiInit(ts);
while ((p = rpmtsiNext(pi, 0)) != NULL) {
- (void) rpmdbCheckSignals();
+ (void) rpmsqPoll();
rpmtsNotify(ts, NULL, RPMCALLBACK_TRANS_PROGRESS, oc++, tsmem->orderCount);
diff --git a/python/rpmmodule.c b/python/rpmmodule.c
index 6f4a6f3ed..51f04db7e 100644
--- a/python/rpmmodule.c
+++ b/python/rpmmodule.c
@@ -49,7 +49,7 @@ static PyObject * signalCaught(PyObject *self, PyObject *o)
static PyObject * checkSignals(PyObject * self)
{
- rpmdbCheckSignals();
+ rpmsqPoll();
Py_RETURN_NONE;
}