Rename tagName/Value/Type() to rpmTagGet*()
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 20 Sep 2007 12:09:52 +0000 (15:09 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 20 Sep 2007 12:09:52 +0000 (15:09 +0300)
- namespacing
- avoid collisions with tagtype definitions

12 files changed:
build/parsePreamble.c
build/spec.c
lib/formats.c
lib/rpmgi.c
lib/rpmlib.h
lib/tgi.c
python/header-py.c
rpmdb/db3.c
rpmdb/dbconfig.c
rpmdb/rpmdb.c
rpmdb/sqlite.c
tools/rpminject.c

index 34098ef..5568f06 100644 (file)
@@ -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)))
index c3272b3..cb67097 100644 (file)
@@ -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];
 
index 4248cac..b969983 100644 (file)
@@ -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("()");
index 49ea93a..3c7bba5 100644 (file)
@@ -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);
index 7535ccb..4f8fc3f 100644 (file)
@@ -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));
 }
index 516497a..a963525 100644 (file)
--- a/lib/tgi.c
+++ b/lib/tgi.c
@@ -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);
index 4e2b830..feccf18 100644 (file)
@@ -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;
index e023186..92d23af 100644 (file)
@@ -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) {
index 63ec694..93ad1e8 100644 (file)
@@ -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);
index 8f5182c..7f2ded7 100644 (file)
@@ -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))
index f34cea6..b57278a 100644 (file)
@@ -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);
 
index d071af5..b44c487 100644 (file)
@@ -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);