RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 09-Feb-2008 17:35:49
Branch: HEAD Handle: 2008020916354702
Modified files:
rpm CHANGES
rpm/build pack.c parsePreamble.c rpmspec.h spec.c
rpm/lib psm.c psm.h rpmds.h rpmfc.c rpmgi.c rpmgi.h
rpm/python header-py.c header-py.h rpmds-py.c
Log:
- rpm.org: Mass convert (back) to rpmTag as it's usable everywhere
now.
Summary:
Revision Changes Path
1.2165 +1 -0 rpm/CHANGES
2.284 +2 -2 rpm/build/pack.c
2.168 +1 -1 rpm/build/parsePreamble.c
2.71 +3 -3 rpm/build/rpmspec.h
2.178 +2 -2 rpm/build/spec.c
2.286 +4 -2 rpm/lib/psm.c
2.63 +2 -2 rpm/lib/psm.h
2.66 +2 -1 rpm/lib/rpmds.h
1.46 +6 -2 rpm/lib/rpmfc.c
2.52 +1 -1 rpm/lib/rpmgi.c
2.26 +1 -1 rpm/lib/rpmgi.h
1.91 +6 -6 rpm/python/header-py.c
1.16 +1 -1 rpm/python/header-py.h
1.38 +9 -9 rpm/python/rpmds-py.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.2164 -r1.2165 CHANGES
--- rpm/CHANGES 9 Feb 2008 15:41:52 -0000 1.2164
+++ rpm/CHANGES 9 Feb 2008 16:35:47 -0000 1.2165
@@ -1,4 +1,5 @@
5.0.0 -> 5.1a1:
+ - rpm.org: Mass convert (back) to rpmTag as it's usable everywhere now
- rpm.org: Use rpmSigTag enum for signature tags everywhere, more or less..
- jbj: import a modified copy of testHTML.c from libxml2.
- rpm.org: make gendiff sort the file list, so comparing the results is easier.
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/pack.c
============================================================================
$ cvs diff -u -r2.283 -r2.284 pack.c
--- rpm/build/pack.c 24 Jan 2008 19:52:27 -0000 2.283
+++ rpm/build/pack.c 9 Feb 2008 16:35:48 -0000 2.284
@@ -197,7 +197,7 @@
/**
*/
-static int addFileToArrayTag(Spec spec, const char *file, Header h, int tag)
+static int addFileToArrayTag(Spec spec, const char *file, Header h, rpmTag tag)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies h, rpmGlobalMacroContext, fileSystem, internalState @*/
{
@@ -985,7 +985,7 @@
}
/*@unchecked@*/
-static uint32_t copyTags[] = {
+static rpmTag copyTags[] = {
RPMTAG_CHANGELOGTIME,
RPMTAG_CHANGELOGNAME,
RPMTAG_CHANGELOGTEXT,
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/parsePreamble.c
============================================================================
$ cvs diff -u -r2.167 -r2.168 parsePreamble.c
--- rpm/build/parsePreamble.c 28 Dec 2007 09:57:58 -0000 2.167
+++ rpm/build/parsePreamble.c 9 Feb 2008 16:35:48 -0000 2.168
@@ -483,7 +483,7 @@
return rc;
}
-spectag stashSt(Spec spec, Header h, int tag, const char * lang)
+spectag stashSt(Spec spec, Header h, rpmTag tag, const char * lang)
{
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
spectag t = NULL;
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/rpmspec.h
============================================================================
$ cvs diff -u -r2.70 -r2.71 rpmspec.h
--- rpm/build/rpmspec.h 27 Dec 2007 14:16:11 -0000 2.70
+++ rpm/build/rpmspec.h 9 Feb 2008 16:35:48 -0000 2.71
@@ -278,7 +278,7 @@
* @param tag tag
* @param lang locale
*/
-spectag stashSt(Spec spec, Header h, int tag, const char * lang)
+spectag stashSt(Spec spec, Header h, rpmTag tag, const char * lang)
/*@modifies spec->st @*/;
/** \ingroup rpmbuild
@@ -287,7 +287,7 @@
* @param field field to parse
* @param tag tag
*/
-int addSource(Spec spec, Package pkg, const char * field, int tag)
+int addSource(Spec spec, Package pkg, const char * field, rpmTag tag)
/*@globals rpmGlobalMacroContext, h_errno @*/
/*@modifies spec->sources, spec->numSources,
spec->st, spec->macros,
@@ -298,7 +298,7 @@
* @param field field to parse
* @param tag tag
*/
-int parseNoSource(Spec spec, const char * field, int tag)
+int parseNoSource(Spec spec, const char * field, rpmTag tag)
/*@*/;
/** \ingroup rpmbuild
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/spec.c
============================================================================
$ cvs diff -u -r2.177 -r2.178 spec.c
--- rpm/build/spec.c 18 Jan 2008 23:04:05 -0000 2.177
+++ rpm/build/spec.c 9 Feb 2008 16:35:48 -0000 2.178
@@ -262,7 +262,7 @@
return source->flags;
}
-int parseNoSource(Spec spec, const char * field, int tag)
+int parseNoSource(Spec spec, const char * field, rpmTag tag)
{
const char *f, *fe;
const char *name;
@@ -306,7 +306,7 @@
return 0;
}
-int addSource(Spec spec, /*@unused@*/ Package pkg, const char *field, int tag)
+int addSource(Spec spec, /*@unused@*/ Package pkg, const char *field, rpmTag tag)
{
struct Source *p;
int flag = 0;
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/psm.c
============================================================================
$ cvs diff -u -r2.285 -r2.286 psm.c
--- rpm/lib/psm.c 1 Feb 2008 19:45:53 -0000 2.285
+++ rpm/lib/psm.c 9 Feb 2008 16:35:48 -0000 2.286
@@ -433,7 +433,7 @@
* @param tag scriptlet tag
* @return name of scriptlet
*/
-static /*@observer@*/ const char * tag2sln(int tag)
+static /*@observer@*/ const char * tag2sln(rpmTag tag)
/*@*/
{
switch (tag) {
@@ -449,6 +449,7 @@
case RPMTAG_TRIGGERPOSTUN: return "%triggerpostun";
case RPMTAG_VERIFYSCRIPT: return "%verify";
case RPMTAG_SANITYCHECK: return "%sanitycheck";
+ default: break;
}
return "%unknownscript";
}
@@ -458,7 +459,7 @@
* @param tag scriptlet tag
* @return id of scriptlet
*/
-static rpmScriptID tag2slx(int tag)
+static rpmScriptID tag2slx(rpmTag tag)
/*@*/
{
switch (tag) {
@@ -474,6 +475,7 @@
case RPMTAG_TRIGGERPOSTUN: return RPMSCRIPT_TRIGGERPOSTUN;
case RPMTAG_VERIFYSCRIPT: return RPMSCRIPT_VERIFY;
case RPMTAG_SANITYCHECK: return RPMSCRIPT_SANITYCHECK;
+ default: break;
}
return RPMSCRIPT_UNKNOWN;
}
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/psm.h
============================================================================
$ cvs diff -u -r2.62 -r2.63 psm.h
--- rpm/lib/psm.h 25 May 2007 17:36:02 -0000 2.62
+++ rpm/lib/psm.h 9 Feb 2008 16:35:48 -0000 2.63
@@ -91,8 +91,8 @@
const char * pkgfn; /*!< Repackage file name. */
/*@only@*/ /*@null@*/
int *sstates; /*!< Scriptlet states and return codes. */
- int scriptTag; /*!< Scriptlet data tag. */
- int progTag; /*!< Scriptlet interpreter tag. */
+ rpmTag scriptTag; /*!< Scriptlet data tag. */
+ rpmTag progTag; /*!< Scriptlet interpreter tag. */
int npkgs_installed; /*!< No. of installed instances. */
int scriptArg; /*!< Scriptlet package arg. */
int sense; /*!< One of RPMSENSE_TRIGGER{PREIN,IN,UN,POSTUN}. */
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmds.h
============================================================================
$ cvs diff -u -r2.65 -r2.66 rpmds.h
--- rpm/lib/rpmds.h 3 Dec 2007 19:18:05 -0000 2.65
+++ rpm/lib/rpmds.h 9 Feb 2008 16:35:48 -0000 2.66
@@ -691,7 +691,7 @@
const char * rpmdsTagName(/*@null@*/ const rpmds ds)
/*@*/
{
- int tagN = rpmdsTagN(ds);
+ rpmTag tagN = rpmdsTagN(ds);
switch (tagN) {
case RPMTAG_PROVIDENAME: return "Provides"; /*@notreached@*/ break;
@@ -700,6 +700,7 @@
case RPMTAG_OBSOLETENAME: return "Obsoletes"; /*@notreached@*/ break;
case RPMTAG_TRIGGERNAME: return "Triggers"; /*@notreached@*/ break;
case RPMTAG_DIRNAMES: return "Dirnames"; /*@notreached@*/ break;
+ default: break;
}
return tagName(tagN);
}
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmfc.c
============================================================================
$ cvs diff -u -r1.45 -r1.46 rpmfc.c
--- rpm/lib/rpmfc.c 8 Dec 2007 21:30:22 -0000 1.45
+++ rpm/lib/rpmfc.c 9 Feb 2008 16:35:48 -0000 1.46
@@ -286,11 +286,14 @@
/*@requires maxSet(buf) >= 0 @*/
/*@ensures maxRead(buf) == 0 @*/
{
- uint32_t tagN = rpmdsTagN(ds);
+ rpmTag tagN = rpmdsTagN(ds);
char deptype = 'X';
buf[0] = '\0';
switch (tagN) {
+ default:
+assert(0);
+ /*@notreached@*/ break;
case RPMTAG_PROVIDENAME:
deptype = 'P';
break;
@@ -1239,7 +1242,8 @@
appendLineStringBuf(sb_stdin, rpmfiFN(fi));
for (dm = DepMsgs; dm->msg != NULL; dm++) {
- int tag, tagflags;
+ rpmTag tag;
+ rpmsenseFlags tagflags;
char * s;
int xx;
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmgi.c
============================================================================
$ cvs diff -u -r2.51 -r2.52 rpmgi.c
--- rpm/lib/rpmgi.c 7 Feb 2008 19:29:33 -0000 2.51
+++ rpm/lib/rpmgi.c 9 Feb 2008 16:35:48 -0000 2.52
@@ -516,7 +516,7 @@
gi->ts = rpmtsLink(ts, "rpmgiNew");
gi->tsOrder = rpmtsOrder;
- gi->tag = tag;
+ gi->tag = (rpmTag) tag;
/*@-assignexpose@*/
gi->keyp = keyp;
/*@=assignexpose@*/
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmgi.h
============================================================================
$ cvs diff -u -r2.25 -r2.26 rpmgi.h
--- rpm/lib/rpmgi.h 2 Feb 2008 21:45:18 -0000 2.25
+++ rpm/lib/rpmgi.h 9 Feb 2008 16:35:48 -0000 2.26
@@ -43,7 +43,7 @@
/*@refcounted@*/
rpmts ts; /*!< Iterator transaction set. */
int (*tsOrder) (rpmts ts); /*!< Iterator transaction ordering. */
- int tag; /*!< Iterator type. */
+ rpmTag tag; /*!< Iterator type. */
/*@kept@*/ /*@relnull@*/
const void * keyp; /*!< Iterator key. */
size_t keylen; /*!< Iterator key length. */
@@ .
patch -p0 <<'@@ .'
Index: rpm/python/header-py.c
============================================================================
$ cvs diff -u -r1.90 -r1.91 header-py.c
--- rpm/python/header-py.c 24 Jan 2008 19:21:47 -0000 1.90
+++ rpm/python/header-py.c 9 Feb 2008 16:35:49 -0000 1.91
@@ -336,17 +336,17 @@
/** \ingroup py_c
*/
-long tagNumFromPyObject (PyObject *item)
+rpmTag tagNumFromPyObject (PyObject *item)
{
char * str;
if (PyInt_Check(item)) {
- return PyInt_AsLong(item);
+ return (rpmTag) PyInt_AsLong(item);
} else if (PyString_Check(item) || PyUnicode_Check(item)) {
str = PyString_AsString(item);
return tagValue(str);
}
- return -1;
+ return (rpmTag)0xffffffff;
}
/** \ingroup py_c
@@ -355,7 +355,7 @@
/*@*/
{
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
- uint32_t tag = 0xffffffff;
+ rpmTag tag = (rpmTag)0xffffffff;
int i;
PyObject * o, * metao;
int forceArray = 0;
@@ -367,7 +367,7 @@
else
tag = tagNumFromPyObject (item);
- if (tag == 0xffffffff && (PyString_Check(item) || PyUnicode_Check(item))) {
+ if (tag == (rpmTag)0xffffffff && (PyString_Check(item) || PyUnicode_Check(item))) {
const struct headerSprintfExtension_s * extensions = rpmHeaderFormats;
char * str;
/* if we still don't have the tag, go looking for the header
@@ -388,7 +388,7 @@
if (ext) {
ext->u.tagFunction(s->h, he);
} else {
- if (tag == 0xffffffff) {
+ if (tag == (rpmTag)0xffffffff) {
PyErr_SetString(PyExc_KeyError, "unknown header tag");
return NULL;
}
@@ .
patch -p0 <<'@@ .'
Index: rpm/python/header-py.h
============================================================================
$ cvs diff -u -r1.15 -r1.16 header-py.h
--- rpm/python/header-py.h 4 Dec 2007 22:53:54 -0000 1.15
+++ rpm/python/header-py.h 9 Feb 2008 16:35:49 -0000 1.16
@@ -37,7 +37,7 @@
/** \ingroup py_c
*/
-long tagNumFromPyObject (PyObject *item)
+rpmTag tagNumFromPyObject (PyObject *item)
/*@*/;
/** \ingroup py_c
@@ .
patch -p0 <<'@@ .'
Index: rpm/python/rpmds-py.c
============================================================================
$ cvs diff -u -r1.37 -r1.38 rpmds-py.c
--- rpm/python/rpmds-py.c 16 Dec 2007 18:47:14 -0000 1.37
+++ rpm/python/rpmds-py.c 9 Feb 2008 16:35:49 -0000 1.38
@@ -154,8 +154,8 @@
if (rpmdsNext(s->ds) >= 0) {
const char * N = rpmdsN(s->ds);
const char * EVR = rpmdsEVR(s->ds);
- int tagN = rpmdsTagN(s->ds);
- int Flags = rpmdsFlags(s->ds);
+ rpmTag tagN = rpmdsTagN(s->ds);
+ rpmsenseFlags Flags = rpmdsFlags(s->ds);
/*@-branchstate@*/
if (N != NULL) N = xstrdup(N);
@@ -661,8 +661,8 @@
{
hdrObject * ho = NULL;
PyObject * to = NULL;
- int tagN = RPMTAG_REQUIRENAME;
- int flags = 0;
+ rpmTag tagN = RPMTAG_REQUIRENAME;
+ rpmsenseFlags flags = 0;
char * kwlist[] = {"header", "tag", "flags", NULL};
if (_rpmds_debug < 0)
@@ -674,7 +674,7 @@
if (to != NULL) {
tagN = tagNumFromPyObject(to);
- if (tagN == -1) {
+ if (tagN == (rpmTag)0xffffffff) {
PyErr_SetString(PyExc_KeyError, "unknown header tag");
return -1;
}
@@ -810,10 +810,10 @@
rpmds_Single(/*@unused@*/ PyObject * s, PyObject * args, PyObject * kwds)
{
PyObject * to = NULL;
- int tagN = RPMTAG_PROVIDENAME;
+ rpmTag tagN = RPMTAG_PROVIDENAME;
const char * N;
const char * EVR = NULL;
- int Flags = 0;
+ rpmsenseFlags Flags = 0;
char * kwlist[] = {"to", "name", "evr", "flags", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "Os|si:Single", kwlist,
@@ -822,7 +822,7 @@
if (to != NULL) {
tagN = tagNumFromPyObject(to);
- if (tagN == -1) {
+ if (tagN == (rpmTag)0xffffffff) {
PyErr_SetString(PyExc_KeyError, "unknown header tag");
return NULL;
}
@@ -847,7 +847,7 @@
if (to != NULL) {
tagN = tagNumFromPyObject(to);
- if (tagN == -1) {
+ if (tagN == (rpmTag)0xffffffff) {
PyErr_SetString(PyExc_KeyError, "unknown header tag");
return NULL;
}
@@ .
Received on Sat Feb 9 17:35:49 2008