diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-09-20 15:09:52 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-09-20 15:09:52 +0300 |
commit | 3b8da4ed118c6da6dab1cb7c0ecd0933c6d14f14 (patch) | |
tree | f1e29034af384acc2a63ab7cd5e7fcf423c6d6a5 | |
parent | bbf7574d7f368e8d11600b54dfd24a0dafd555fb (diff) | |
download | librpm-tizen-3b8da4ed118c6da6dab1cb7c0ecd0933c6d14f14.tar.gz librpm-tizen-3b8da4ed118c6da6dab1cb7c0ecd0933c6d14f14.tar.bz2 librpm-tizen-3b8da4ed118c6da6dab1cb7c0ecd0933c6d14f14.zip |
Rename tagName/Value/Type() to rpmTagGet*()
- namespacing
- avoid collisions with tagtype definitions
-rw-r--r-- | build/parsePreamble.c | 10 | ||||
-rw-r--r-- | build/spec.c | 2 | ||||
-rw-r--r-- | lib/formats.c | 2 | ||||
-rw-r--r-- | lib/rpmgi.c | 4 | ||||
-rw-r--r-- | lib/rpmlib.h | 8 | ||||
-rw-r--r-- | lib/tgi.c | 2 | ||||
-rw-r--r-- | python/header-py.c | 6 | ||||
-rw-r--r-- | rpmdb/db3.c | 16 | ||||
-rw-r--r-- | rpmdb/dbconfig.c | 2 | ||||
-rw-r--r-- | rpmdb/rpmdb.c | 44 | ||||
-rw-r--r-- | rpmdb/sqlite.c | 10 | ||||
-rw-r--r-- | tools/rpminject.c | 8 |
12 files changed, 57 insertions, 57 deletions
diff --git a/build/parsePreamble.c b/build/parsePreamble.c index 34098ef90..5568f066c 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -255,7 +255,7 @@ static int checkForRequired(Header h, const char * NVR) if (!headerIsEntry(h, *p)) { rpmError(RPMERR_BADSPEC, _("%s field must be present in package: %s\n"), - tagName(*p), NVR); + rpmTagGetName(*p), NVR); res = 1; } } @@ -282,7 +282,7 @@ static int checkForDuplicates(Header h, const char * NVR) if (tag != lastTag) continue; rpmError(RPMERR_BADSPEC, _("Duplicate %s entries in package: %s\n"), - tagName(tag), NVR); + rpmTagGetName(tag), NVR); res = 1; } hi = headerFreeIterator(hi); @@ -398,7 +398,7 @@ spectag stashSt(Spec spec, Header h, int tag, const char * lang) char *n; if (hge(h, RPMTAG_NAME, NULL, (void **) &n, NULL)) { char buf[1024]; - sprintf(buf, "%s(%s)", n, tagName(tag)); + sprintf(buf, "%s(%s)", n, rpmTagGetName(tag)); t->t_msgid = xstrdup(buf); } } @@ -612,7 +612,7 @@ static int handlePreambleTag(Spec spec, Package pkg, rpmTag tag, if ((rc = parseBits(lang, buildScriptBits, &tagflags))) { rpmError(RPMERR_BADSPEC, _("line %d: Bad %s: qualifiers: %s\n"), - spec->lineNum, tagName(tag), spec->line); + spec->lineNum, rpmTagGetName(tag), spec->line); return rc; } if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags))) @@ -623,7 +623,7 @@ static int handlePreambleTag(Spec spec, Package pkg, rpmTag tag, if ((rc = parseBits(lang, installScriptBits, &tagflags))) { rpmError(RPMERR_BADSPEC, _("line %d: Bad %s: qualifiers: %s\n"), - spec->lineNum, tagName(tag), spec->line); + spec->lineNum, rpmTagGetName(tag), spec->line); return rc; } if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags))) diff --git a/build/spec.c b/build/spec.c index c3272b334..cb67097e0 100644 --- a/build/spec.c +++ b/build/spec.c @@ -550,7 +550,7 @@ printNewSpecfile(Spec spec) for (i = 0; i < st->st_ntags; i++) { spectag t = st->st_t + i; - const char * tn = tagName(t->t_tag); + const char * tn = rpmTagGetName(t->t_tag); const char * errstr; char fmt[1024]; diff --git a/lib/formats.c b/lib/formats.c index 4248cacc0..b9699832d 100644 --- a/lib/formats.c +++ b/lib/formats.c @@ -831,7 +831,7 @@ static int i18nTag(Header h, int_32 tag, rpmTagType * type, const char * msgkey; const char * msgid; - { const char * tn = tagName(tag); + { const char * tn = rpmTagGetName(tag); const char * n; char * mk; size_t nb = sizeof("()"); diff --git a/lib/rpmgi.c b/lib/rpmgi.c index 49ea93a35..3c7bba556 100644 --- a/lib/rpmgi.c +++ b/lib/rpmgi.c @@ -318,7 +318,7 @@ fprintf(stderr, "*** gi %p\tmi %p\n", gi, gi->mi); /* Parse for "tag=pattern" args. */ if ((ae = strchr(a, '=')) != NULL) { *ae++ = '\0'; - tag = tagValue(a); + tag = rpmTagGetValue(a); if (tag < 0) { rpmError(RPMERR_QUERYINFO, _("unknown tag: \"%s\"\n"), a); res = 1; @@ -328,7 +328,7 @@ fprintf(stderr, "*** gi %p\tmi %p\n", gi, gi->mi); if (!res) { if (_rpmgi_debug < 0) -fprintf(stderr, "\tav %p[%ld]: \"%s\" -> %s ~= \"%s\"\n", gi->argv, (av - gi->argv), *av, tagName(tag), pat); +fprintf(stderr, "\tav %p[%ld]: \"%s\" -> %s ~= \"%s\"\n", gi->argv, (av - gi->argv), *av, rpmTagGetName(tag), pat); res = rpmdbSetIteratorRE(gi->mi, tag, RPMMIRE_DEFAULT, pat); } a = _free(a); diff --git a/lib/rpmlib.h b/lib/rpmlib.h index 7535ccb7e..4f8fc3fd4 100644 --- a/lib/rpmlib.h +++ b/lib/rpmlib.h @@ -198,7 +198,7 @@ typedef enum rpmTag_e { RPMTAG_HEADERI18NTABLE = HEADER_I18NTABLE, /*!< I18N string locales. */ -/* Retrofit (and uniqify) signature tags for use by tagName() and rpmQuery. */ +/* Retrofit (and uniqify) signature tags for use by rpmTagGetName() and rpmQuery. */ /* the md5 sum was broken *twice* on big endian machines */ /* XXX 2nd underscore prevents tagTable generation */ RPMTAG_SIG_BASE = HEADER_SIGBASE, @@ -976,7 +976,7 @@ void rpmShowRpmlibProvides(FILE * fp); * @return tag name, "(unknown)" on not found */ static inline -const char * tagName(int tag) +const char * rpmTagGetName(int tag) { return ((*rpmTags->tagName)(tag)); } @@ -987,7 +987,7 @@ const char * tagName(int tag) * @return tag data type, RPM_NULL_TYPE on not found. */ static inline -int tagType(int tag) +int rpmTagGetType(int tag) { return ((*rpmTags->tagType)(tag)); } @@ -998,7 +998,7 @@ int tagType(int tag) * @return tag value, -1 on not found */ static inline -int tagValue(const char * tagstr) +int rpmTagGetValue(const char * tagstr) { return ((*rpmTags->tagValue)(tagstr)); } @@ -103,7 +103,7 @@ main(int argc, char *argv[]) ftsOpts = (FTS_COMFOLLOW | FTS_LOGICAL | FTS_NOSTAT); if (gitagstr != NULL) { - gitag = tagValue(gitagstr); + gitag = rpmTagGetValue(gitagstr); if (gitag < 0) { fprintf(stderr, _("unknown --tag argument: %s\n"), gitagstr); exit(EXIT_FAILURE); diff --git a/python/header-py.c b/python/header-py.c index 4e2b83070..feccf180c 100644 --- a/python/header-py.c +++ b/python/header-py.c @@ -357,7 +357,7 @@ long tagNumFromPyObject (PyObject *item) return PyInt_AsLong(item); } else if (PyString_Check(item)) { str = PyString_AsString(item); - return tagValue(str); + return rpmTagGetValue(str); } return -1; } @@ -401,7 +401,7 @@ static int dressedHeaderGetEntry(Header h, int_32 tag, int_32 *type, const char * errstr; fmt[0] = '\0'; - (void) stpcpy( stpcpy( stpcpy( fmt, "%{"), tagName(tag)), "}\n"); + (void) stpcpy( stpcpy( stpcpy( fmt, "%{"), rpmTagGetName(tag)), "}\n"); /* XXX FIXME: memory leak. */ msgstr = headerSprintf(h, fmt, rpmTagTable, rpmHeaderFormats, &errstr); @@ -480,7 +480,7 @@ static PyObject * hdr_subscript(hdrObject * s, PyObject * item) } } - tagtype = tagType(tag); + tagtype = rpmTagGetType(tag); #if NOTYET /* this blows up with header extension types */ type = tagtype & RPM_MASK_TYPE; diff --git a/rpmdb/db3.c b/rpmdb/db3.c index e0231862c..92d23af02 100644 --- a/rpmdb/db3.c +++ b/rpmdb/db3.c @@ -663,9 +663,9 @@ static int db3close(dbiIndex dbi, unsigned int flags) } else { #ifdef HACK /* XXX necessary to support dbsubfile */ dbfile = (dbi->dbi_file ? dbi->dbi_file : db3basename); - dbsubfile = (dbi->dbi_subfile ? dbi->dbi_subfile : tagName(dbi->dbi_rpmtag)); + dbsubfile = (dbi->dbi_subfile ? dbi->dbi_subfile : rpmTagGetName(dbi->dbi_rpmtag)); #else - dbfile = (dbi->dbi_file ? dbi->dbi_file : tagName(dbi->dbi_rpmtag)); + dbfile = (dbi->dbi_file ? dbi->dbi_file : rpmTagGetName(dbi->dbi_rpmtag)); dbsubfile = NULL; #endif } @@ -678,7 +678,7 @@ static int db3close(dbiIndex dbi, unsigned int flags) db = dbi->dbi_db = NULL; rpmMessage(RPMMESS_DEBUG, _("closed db index %s/%s\n"), - dbhome, (dbfile ? dbfile : tagName(dbi->dbi_rpmtag))); + dbhome, (dbfile ? dbfile : rpmTagGetName(dbi->dbi_rpmtag))); } @@ -736,7 +736,7 @@ static int db3close(dbiIndex dbi, unsigned int flags) rpmMessage(RPMMESS_DEBUG, _("verified db index %s/%s\n"), (dbhome ? dbhome : ""), - (dbfile ? dbfile : tagName(dbi->dbi_rpmtag))); + (dbfile ? dbfile : rpmTagGetName(dbi->dbi_rpmtag))); /* * The DB handle may not be accessed again after @@ -809,9 +809,9 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip) } else { #ifdef HACK /* XXX necessary to support dbsubfile */ dbfile = (dbi->dbi_file ? dbi->dbi_file : db3basename); - dbsubfile = (dbi->dbi_subfile ? dbi->dbi_subfile : tagName(dbi->dbi_rpmtag)); + dbsubfile = (dbi->dbi_subfile ? dbi->dbi_subfile : rpmTagGetName(dbi->dbi_rpmtag)); #else - dbfile = (dbi->dbi_file ? dbi->dbi_file : tagName(dbi->dbi_rpmtag)); + dbfile = (dbi->dbi_file ? dbi->dbi_file : rpmTagGetName(dbi->dbi_rpmtag)); dbsubfile = NULL; #endif } @@ -906,7 +906,7 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip) */ if ((oflags & DB_CREATE) && (oflags & DB_RDONLY)) { /* dbhome is writable, and DB->open flags may conflict. */ - const char * dbfn = (dbfile ? dbfile : tagName(dbi->dbi_rpmtag)); + const char * dbfn = (dbfile ? dbfile : rpmTagGetName(dbi->dbi_rpmtag)); const char * dbf = rpmGetPath(dbhome, "/", dbfn, NULL); if (access(dbf, F_OK) == -1) { @@ -946,7 +946,7 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip) } rpmMessage(RPMMESS_DEBUG, _("opening db index %s/%s %s mode=0x%x\n"), - dbhome, (dbfile ? dbfile : tagName(dbi->dbi_rpmtag)), + dbhome, (dbfile ? dbfile : rpmTagGetName(dbi->dbi_rpmtag)), prDbiOpenFlags(oflags, 0), dbi->dbi_mode); if (rc == 0) { diff --git a/rpmdb/dbconfig.c b/rpmdb/dbconfig.c index 63ec6941a..93ad1e817 100644 --- a/rpmdb/dbconfig.c +++ b/rpmdb/dbconfig.c @@ -267,7 +267,7 @@ dbiIndex db3New(rpmdb rpmdb, rpmTag rpmtag) char dbiTagMacro[128]; char * dbOpts; - sprintf(dbiTagMacro, "%%{_dbi_config_%s}", tagName(rpmtag)); + sprintf(dbiTagMacro, "%%{_dbi_config_%s}", rpmTagGetName(rpmtag)); dbOpts = rpmExpand(dbiTagMacro, NULL); if (!(dbOpts && *dbOpts && *dbOpts != '%')) { dbOpts = _free(dbOpts); diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c index 8f5182c23..7f2ded765 100644 --- a/rpmdb/rpmdb.c +++ b/rpmdb/rpmdb.c @@ -168,7 +168,7 @@ static void dbiTagsInit(void) } if (oe && *oe) *oe++ = '\0'; - rpmtag = tagValue(o); + rpmtag = rpmTagGetValue(o); if (rpmtag < 0) { rpmMessage(RPMMESS_WARNING, _("dbiTagsInit: unrecognized tag name: \"%s\" ignored\n"), o); @@ -245,7 +245,7 @@ dbiIndex dbiOpen(rpmdb db, rpmTag rpmtag, unsigned int flags) if (!_printed[dbix & 0x1f]++) rpmError(RPMERR_DBOPEN, _("cannot open %s index using db%d - %s (%d)\n"), - tagName(rpmtag), _dbapi, + rpmTagGetName(rpmtag), _dbapi, (rc > 0 ? strerror(rc) : ""), rc); _dbapi = -1; } @@ -265,7 +265,7 @@ dbiIndex dbiOpen(rpmdb db, rpmTag rpmtag, unsigned int flags) static int _printed[32]; if (!_printed[dbix & 0x1f]++) rpmError(RPMERR_DBOPEN, _("cannot open %s index\n"), - tagName(rpmtag)); + rpmTagGetName(rpmtag)); rc = 1; goto exit; } @@ -1138,7 +1138,7 @@ if (key->size == 0) key->size++; /* XXX "/" fixup. */ if (rc > 0) { rpmError(RPMERR_DBGETINDEX, _("error(%d) getting \"%s\" records from %s index\n"), - rc, key->data, tagName(dbi->dbi_rpmtag)); + rc, key->data, rpmTagGetName(dbi->dbi_rpmtag)); } if (rc == 0) @@ -1263,7 +1263,7 @@ key->size = strlen(name); } else { /* error */ rpmError(RPMERR_DBGETINDEX, _("error(%d) getting \"%s\" records from %s index\n"), - rc, key->data, tagName(dbi->dbi_rpmtag)); + rc, key->data, rpmTagGetName(dbi->dbi_rpmtag)); rc = -1; } @@ -1313,7 +1313,7 @@ key->size = strlen(name); } else { /* error */ rpmError(RPMERR_DBGETINDEX, _("error(%d) getting \"%s\" records from %s index\n"), - rc, key->data, tagName(dbi->dbi_rpmtag)); + rc, key->data, rpmTagGetName(dbi->dbi_rpmtag)); return RPMRC_FAIL; } @@ -1498,7 +1498,7 @@ static int miFreeHeader(rpmdbMatchIterator mi, dbiIndex dbi) if (rc) { rpmError(RPMERR_DBPUTINDEX, _("error(%d) storing record #%d into %s\n"), - rc, mi->mi_prevoffset, tagName(dbi->dbi_rpmtag)); + rc, mi->mi_prevoffset, rpmTagGetName(dbi->dbi_rpmtag)); } xx = dbiSync(dbi, 0); (void) unblockSignals(dbi->dbi_rpmdb, &signalMask); @@ -1925,7 +1925,7 @@ static int mireSkip (const rpmdbMatchIterator mi) break; } - if ((tagType(mire->tag) & RPM_MASK_RETURN_TYPE) == + if ((rpmTagGetType(mire->tag) & RPM_MASK_RETURN_TYPE) == RPM_ARRAY_RETURN_TYPE) { u.ptr = hfd(u.ptr, t); } @@ -2217,7 +2217,7 @@ static int rpmdbGrowIterator(rpmdbMatchIterator mi, int fpNum) if (rc != DB_NOTFOUND) rpmError(RPMERR_DBGETINDEX, _("error(%d) getting \"%s\" records from %s index\n"), - rc, key->data, tagName(dbi->dbi_rpmtag)); + rc, key->data, rpmTagGetName(dbi->dbi_rpmtag)); #ifdef SQLITE_HACK xx = dbiCclose(dbi, dbcursor, 0); dbcursor = NULL; @@ -2336,7 +2336,7 @@ if (key->data && key->size == 0) key->size++; /* XXX "/" fixup. */ if (rc > 0) { rpmError(RPMERR_DBGETINDEX, _("error(%d) getting \"%s\" records from %s index\n"), - rc, (key->data ? key->data : "???"), tagName(dbi->dbi_rpmtag)); + rc, (key->data ? key->data : "???"), rpmTagGetName(dbi->dbi_rpmtag)); } /* Join keys need to be native endian internally. */ @@ -2495,7 +2495,7 @@ if (dbiByteSwapped(dbi) == 1) if (rc) { rpmError(RPMERR_DBGETINDEX, _("error(%d) setting header #%d record for %s removal\n"), - rc, hdrNum, tagName(dbi->dbi_rpmtag)); + rc, hdrNum, rpmTagGetName(dbi->dbi_rpmtag)); } else rc = dbiDel(dbi, dbcursor, key, data, 0); xx = dbiCclose(dbi, dbcursor, DB_WRITECURSOR); @@ -2602,11 +2602,11 @@ if (dbiByteSwapped(dbi) == 1) if (rpmcnt == 1 && stringvalued) { rpmMessage(RPMMESS_DEBUG, _("removing \"%s\" from %s index.\n"), - (char *)key->data, tagName(dbi->dbi_rpmtag)); + (char *)key->data, rpmTagGetName(dbi->dbi_rpmtag)); } else { rpmMessage(RPMMESS_DEBUG, _("removing %d entries from %s index.\n"), - rpmcnt, tagName(dbi->dbi_rpmtag)); + rpmcnt, rpmTagGetName(dbi->dbi_rpmtag)); } printed++; } @@ -2633,7 +2633,7 @@ if (key->size == 0) key->size++; /* XXX "/" fixup. */ } else { /* error */ rpmError(RPMERR_DBGETINDEX, _("error(%d) setting \"%s\" records from %s index\n"), - rc, key->data, tagName(dbi->dbi_rpmtag)); + rc, key->data, rpmTagGetName(dbi->dbi_rpmtag)); ret += 1; continue; } @@ -2652,7 +2652,7 @@ if (key->size == 0) key->size++; /* XXX "/" fixup. */ if (rc) { rpmError(RPMERR_DBPUTINDEX, _("error(%d) storing record \"%s\" into %s\n"), - rc, key->data, tagName(dbi->dbi_rpmtag)); + rc, key->data, rpmTagGetName(dbi->dbi_rpmtag)); ret += 1; } data->data = _free(data->data); @@ -2662,7 +2662,7 @@ if (key->size == 0) key->size++; /* XXX "/" fixup. */ if (rc) { rpmError(RPMERR_DBPUTINDEX, _("error(%d) removing record \"%s\" from %s\n"), - rc, key->data, tagName(dbi->dbi_rpmtag)); + rc, key->data, rpmTagGetName(dbi->dbi_rpmtag)); ret += 1; } } @@ -3024,11 +3024,11 @@ data->size = 0; if (rpmcnt == 1 && stringvalued) { rpmMessage(RPMMESS_DEBUG, _("adding \"%s\" to %s index.\n"), - (char *)key->data, tagName(dbi->dbi_rpmtag)); + (char *)key->data, rpmTagGetName(dbi->dbi_rpmtag)); } else { rpmMessage(RPMMESS_DEBUG, _("adding %d entries to %s index.\n"), - rpmcnt, tagName(dbi->dbi_rpmtag)); + rpmcnt, rpmTagGetName(dbi->dbi_rpmtag)); } printed++; } @@ -3048,7 +3048,7 @@ if (key->size == 0) key->size++; /* XXX "/" fixup. */ } else if (rc != DB_NOTFOUND) { /* error */ rpmError(RPMERR_DBGETINDEX, _("error(%d) getting \"%s\" records from %s index\n"), - rc, key->data, tagName(dbi->dbi_rpmtag)); + rc, key->data, rpmTagGetName(dbi->dbi_rpmtag)); ret += 1; continue; } @@ -3064,7 +3064,7 @@ if (key->size == 0) key->size++; /* XXX "/" fixup. */ if (rc) { rpmError(RPMERR_DBPUTINDEX, _("error(%d) storing record %s into %s\n"), - rc, key->data, tagName(dbi->dbi_rpmtag)); + rc, key->data, rpmTagGetName(dbi->dbi_rpmtag)); ret += 1; } data->data = _free(data->data); @@ -3290,7 +3290,7 @@ static int rpmdbRemoveDatabase(const char * prefix, case 3: if (dbiTags != NULL) for (i = 0; i < dbiTagsMax; i++) { - const char * base = tagName(dbiTags[i]); + const char * base = rpmTagGetName(dbiTags[i]); sprintf(filename, "%s/%s/%s", prefix, dbpath, base); (void)rpmCleanPath(filename); if (!rpmioFileExists(filename)) @@ -3362,7 +3362,7 @@ static int rpmdbMoveDatabase(const char * prefix, if (isTemporaryDB((rpmtag = dbiTags[i]))) continue; - base = tagName(rpmtag); + base = rpmTagGetName(rpmtag); sprintf(ofilename, "%s/%s/%s", prefix, olddbpath, base); (void)rpmCleanPath(ofilename); if (!rpmioFileExists(ofilename)) diff --git a/rpmdb/sqlite.c b/rpmdb/sqlite.c index f34cea647..b57278a8a 100644 --- a/rpmdb/sqlite.c +++ b/rpmdb/sqlite.c @@ -460,7 +460,7 @@ if (dbiByteSwapped(dbi) == 1) rc = sqlite3_bind_int(scp->pStmt, pos, hnum); } break; default: - switch (tagType(dbi->dbi_rpmtag)) { + switch (rpmTagGetType(dbi->dbi_rpmtag)) { case RPM_NULL_TYPE: case RPM_BIN_TYPE: rc = sqlite3_bind_blob(scp->pStmt, pos, key->data, key->size, SQLITE_STATIC); @@ -632,7 +632,7 @@ static int sql_initDB(dbiIndex dbi) valtype = "blob"; break; default: - switch (tagType(dbi->dbi_rpmtag)) { + switch (rpmTagGetType(dbi->dbi_rpmtag)) { case RPM_NULL_TYPE: case RPM_BIN_TYPE: default: @@ -653,7 +653,7 @@ static int sql_initDB(dbiIndex dbi) } } if (_debug) -fprintf(stderr, "\t%s(%d) type(%d) keytype %s\n", tagName(dbi->dbi_rpmtag), dbi->dbi_rpmtag, tagType(dbi->dbi_rpmtag), keytype); +fprintf(stderr, "\t%s(%d) type(%d) keytype %s\n", rpmTagGetName(dbi->dbi_rpmtag), dbi->dbi_rpmtag, rpmTagGetType(dbi->dbi_rpmtag), keytype); sprintf(cmd, "CREATE TABLE '%s' (key %s, value %s)", dbi->dbi_subfile, keytype, valtype); rc = sqlite3_exec(sqldb->db, cmd, NULL, NULL, (char **)&scp->pzErrmsg); @@ -798,7 +798,7 @@ static int sql_open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip) dbi->dbi_root = root; dbi->dbi_home = home; - dbfile = tagName(dbi->dbi_rpmtag); + dbfile = rpmTagGetName(dbi->dbi_rpmtag); enterChroot(dbi); @@ -907,7 +907,7 @@ static int sql_copen (dbiIndex dbi, DB_TXN * txnid, int rc = 0; if (_debug) -fprintf(stderr, "==> %s(%s) tag %d type %d scp %p\n", __FUNCTION__, tagName(dbi->dbi_rpmtag), dbi->dbi_rpmtag, tagType(dbi->dbi_rpmtag), scp); +fprintf(stderr, "==> %s(%s) tag %d type %d scp %p\n", __FUNCTION__, rpmTagGetName(dbi->dbi_rpmtag), dbi->dbi_rpmtag, rpmTagGetType(dbi->dbi_rpmtag), scp); enterChroot(dbi); diff --git a/tools/rpminject.c b/tools/rpminject.c index d071af53d..b44c4871c 100644 --- a/tools/rpminject.c +++ b/tools/rpminject.c @@ -311,19 +311,19 @@ headerInject(Header *hdrp, cmd_t *cmds[], int ncmds) switch(c->injmode) { case INJ_ADD: if (!(rc && c->done > 0)) { - warnx(_("failed to add tag %s"), tagName(c->tagval)); + warnx(_("failed to add tag %s"), rpmTagGetName(c->tagval)); ec = 1; } break; case INJ_DELETE: if (!(!rc && c->done > 0)) { - warnx(_("failed to delete tag %s"), tagName(c->tagval)); + warnx(_("failed to delete tag %s"), rpmTagGetName(c->tagval)); ec = 1; } break; case INJ_MODIFY: if (!(rc && c->done > 0)) { - warnx(_("failed to modify tag %s"), tagName(c->tagval)); + warnx(_("failed to modify tag %s"), rpmTagGetName(c->tagval)); ec = 1; } break; @@ -499,7 +499,7 @@ main(int argc, char *argv[]) cmds[ncmds]->injmode = cmds[ncmds-1]->injmode; ncmds++; } - c->tagval = tagValue(optArg); + c->tagval = rpmTagGetValue(optArg); if (!((c->tagval >= RPMTAG_NAME && c->tagval < RPMTAG_FIRSTFREE_TAG) || c->tagval >= RPMTAG_EXTERNAL_TAG)) errx(EXIT_FAILURE, _("unknown rpm tag \"--tag %s\""), optArg); |