- bump popt to version to 1.10.
CVS patchset: 7519 CVS date: 2004/10/28 23:57:36
This commit is contained in:
parent
e609515b33
commit
37718380bf
1
CHANGES
1
CHANGES
|
@ -25,6 +25,7 @@
|
||||||
- port to internal file-4.10 libmagic rather than libfmagic.
|
- port to internal file-4.10 libmagic rather than libfmagic.
|
||||||
- fix: handle non-unique dirnames in rpmalAdd().
|
- fix: handle non-unique dirnames in rpmalAdd().
|
||||||
- integrate rpmgi "generic iterator" with query/verify.
|
- integrate rpmgi "generic iterator" with query/verify.
|
||||||
|
- bump popt to version to 1.10.
|
||||||
|
|
||||||
4.3.1 -> 4.3.2:
|
4.3.1 -> 4.3.2:
|
||||||
- use /etc/selinux/targeted/contexts/files/file_contexts for now.
|
- use /etc/selinux/targeted/contexts/files/file_contexts for now.
|
||||||
|
|
|
@ -1126,6 +1126,8 @@ static inline int addRelation(rpmts ts,
|
||||||
|
|
||||||
if (rpmteDepth(p) <= rpmteDepth(q)) /* Save max. depth in dependency tree */
|
if (rpmteDepth(p) <= rpmteDepth(q)) /* Save max. depth in dependency tree */
|
||||||
(void) rpmteSetDepth(p, (rpmteDepth(q) + 1));
|
(void) rpmteSetDepth(p, (rpmteDepth(q) + 1));
|
||||||
|
if (rpmteDepth(p) > ts->maxDepth)
|
||||||
|
ts->maxDepth = rpmteDepth(p);
|
||||||
|
|
||||||
tsi = xcalloc(1, sizeof(*tsi));
|
tsi = xcalloc(1, sizeof(*tsi));
|
||||||
tsi->tsi_suc = p;
|
tsi->tsi_suc = p;
|
||||||
|
@ -1225,6 +1227,8 @@ int rpmtsOrder(rpmts ts)
|
||||||
int newOrderCount = 0;
|
int newOrderCount = 0;
|
||||||
orderListIndex orderList;
|
orderListIndex orderList;
|
||||||
int numOrderList;
|
int numOrderList;
|
||||||
|
int npeer = 128; /* XXX more than deep enough for now. */
|
||||||
|
int * peer = memset(alloca(npeer*sizeof(*peer)), 0, (npeer*sizeof(*peer)));
|
||||||
int nrescans = 10;
|
int nrescans = 10;
|
||||||
int _printed = 0;
|
int _printed = 0;
|
||||||
char deptypechar;
|
char deptypechar;
|
||||||
|
@ -1232,6 +1236,7 @@ int rpmtsOrder(rpmts ts)
|
||||||
int oType = 0;
|
int oType = 0;
|
||||||
int treex;
|
int treex;
|
||||||
int depth;
|
int depth;
|
||||||
|
int breadth;
|
||||||
int qlen;
|
int qlen;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
|
@ -1340,6 +1345,7 @@ int rpmtsOrder(rpmts ts)
|
||||||
npreds = rpmteTSI(p)->tsi_count;
|
npreds = rpmteTSI(p)->tsi_count;
|
||||||
|
|
||||||
(void) rpmteSetNpreds(p, npreds);
|
(void) rpmteSetNpreds(p, npreds);
|
||||||
|
(void) rpmteSetDepth(p, 1);
|
||||||
|
|
||||||
if (npreds == 0)
|
if (npreds == 0)
|
||||||
(void) rpmteSetTree(p, treex++);
|
(void) rpmteSetTree(p, treex++);
|
||||||
|
@ -1351,9 +1357,10 @@ int rpmtsOrder(rpmts ts)
|
||||||
|
|
||||||
}
|
}
|
||||||
pi = rpmtsiFree(pi);
|
pi = rpmtsiFree(pi);
|
||||||
|
ts->ntrees = treex;
|
||||||
|
|
||||||
/* T4. Scan for zeroes. */
|
/* T4. Scan for zeroes. */
|
||||||
rpmMessage(RPMMESS_DEBUG, _("========== tsorting packages (order, #predecessors, #succesors, tree, depth)\n"));
|
rpmMessage(RPMMESS_DEBUG, _("========== tsorting packages (order, #predecessors, #succesors, tree, depth, breadth)\n"));
|
||||||
|
|
||||||
rescan:
|
rescan:
|
||||||
if (pi != NULL) pi = rpmtsiFree(pi);
|
if (pi != NULL) pi = rpmtsiFree(pi);
|
||||||
|
@ -1396,15 +1403,19 @@ rescan:
|
||||||
}
|
}
|
||||||
deptypechar = (rpmteType(q) == TR_REMOVED ? '-' : '+');
|
deptypechar = (rpmteType(q) == TR_REMOVED ? '-' : '+');
|
||||||
|
|
||||||
rpmMessage(RPMMESS_DEBUG, "%5d%5d%5d%5d%5d %*s%c%s\n",
|
treex = rpmteTree(q);
|
||||||
|
depth = rpmteDepth(q);
|
||||||
|
breadth = ((depth < npeer) ? peer[depth]++ : 0);
|
||||||
|
(void) rpmteSetBreadth(q, breadth);
|
||||||
|
|
||||||
|
rpmMessage(RPMMESS_DEBUG, "%5d%5d%5d%5d%5d%5d %*s%c%s\n",
|
||||||
orderingCount, rpmteNpreds(q),
|
orderingCount, rpmteNpreds(q),
|
||||||
rpmteTSI(q)->tsi_qcnt, rpmteTree(q), rpmteDepth(q),
|
rpmteTSI(q)->tsi_qcnt,
|
||||||
(2 * rpmteDepth(q)), "",
|
treex, depth, breadth,
|
||||||
|
(2 * depth), "",
|
||||||
deptypechar,
|
deptypechar,
|
||||||
(rpmteNEVRA(q) ? rpmteNEVRA(q) : "???"));
|
(rpmteNEVRA(q) ? rpmteNEVRA(q) : "???"));
|
||||||
|
|
||||||
treex = rpmteTree(q);
|
|
||||||
depth = rpmteDepth(q);
|
|
||||||
(void) rpmteSetDegree(q, 0);
|
(void) rpmteSetDegree(q, 0);
|
||||||
tsbytes += rpmtePkgFileSize(q);
|
tsbytes += rpmtePkgFileSize(q);
|
||||||
|
|
||||||
|
|
15
lib/rpmte.c
15
lib/rpmte.c
|
@ -339,6 +339,21 @@ int rpmteSetDepth(rpmte te, int ndepth)
|
||||||
return odepth;
|
return odepth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int rpmteBreadth(rpmte te)
|
||||||
|
{
|
||||||
|
return (te != NULL ? te->depth : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int rpmteSetBreadth(rpmte te, int nbreadth)
|
||||||
|
{
|
||||||
|
int obreadth = 0;
|
||||||
|
if (te != NULL) {
|
||||||
|
obreadth = te->breadth;
|
||||||
|
te->breadth = nbreadth;
|
||||||
|
}
|
||||||
|
return obreadth;
|
||||||
|
}
|
||||||
|
|
||||||
int rpmteNpreds(rpmte te)
|
int rpmteNpreds(rpmte te)
|
||||||
{
|
{
|
||||||
return (te != NULL ? te->npreds : 0);
|
return (te != NULL ? te->npreds : 0);
|
||||||
|
|
24
lib/rpmte.h
24
lib/rpmte.h
|
@ -83,9 +83,10 @@ struct rpmte_s {
|
||||||
|
|
||||||
rpmte parent; /*!< Parent transaction element. */
|
rpmte parent; /*!< Parent transaction element. */
|
||||||
int degree; /*!< No. of immediate children. */
|
int degree; /*!< No. of immediate children. */
|
||||||
int depth; /*!< Max. depth in dependency tree. */
|
|
||||||
int npreds; /*!< No. of predecessors. */
|
int npreds; /*!< No. of predecessors. */
|
||||||
int tree; /*!< Tree index. */
|
int tree; /*!< Tree index. */
|
||||||
|
int depth; /*!< Depth in dependency tree. */
|
||||||
|
int breadth; /*!< Breadth in dependency tree. */
|
||||||
unsigned int db_instance; /*!< Database Instance after add */
|
unsigned int db_instance; /*!< Database Instance after add */
|
||||||
/*@owned@*/
|
/*@owned@*/
|
||||||
tsortInfo tsi; /*!< Dependency ordering chains. */
|
tsortInfo tsi; /*!< Dependency ordering chains. */
|
||||||
|
@ -307,7 +308,7 @@ uint_32 rpmtePkgFileSize(rpmte te)
|
||||||
/*@*/;
|
/*@*/;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve tsort tree depth of transaction element.
|
* Retrieve dependency tree depth of transaction element.
|
||||||
* @param te transaction element
|
* @param te transaction element
|
||||||
* @return depth
|
* @return depth
|
||||||
*/
|
*/
|
||||||
|
@ -315,7 +316,7 @@ int rpmteDepth(rpmte te)
|
||||||
/*@*/;
|
/*@*/;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set tsort tree depth of transaction element.
|
* Set dependency tree depth of transaction element.
|
||||||
* @param te transaction element
|
* @param te transaction element
|
||||||
* @param ndepth new depth
|
* @param ndepth new depth
|
||||||
* @return previous depth
|
* @return previous depth
|
||||||
|
@ -323,6 +324,23 @@ int rpmteDepth(rpmte te)
|
||||||
int rpmteSetDepth(rpmte te, int ndepth)
|
int rpmteSetDepth(rpmte te, int ndepth)
|
||||||
/*@modifies te @*/;
|
/*@modifies te @*/;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve dependency tree breadth of transaction element.
|
||||||
|
* @param te transaction element
|
||||||
|
* @return breadth
|
||||||
|
*/
|
||||||
|
int rpmteBreadth(rpmte te)
|
||||||
|
/*@*/;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set dependency tree breadth of transaction element.
|
||||||
|
* @param te transaction element
|
||||||
|
* @param nbreadth new breadth
|
||||||
|
* @return previous breadth
|
||||||
|
*/
|
||||||
|
int rpmteSetBreadth(rpmte te, int nbreadth)
|
||||||
|
/*@modifies te @*/;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve tsort no. of predecessors of transaction element.
|
* Retrieve tsort no. of predecessors of transaction element.
|
||||||
* @param te transaction element
|
* @param te transaction element
|
||||||
|
|
|
@ -767,6 +767,8 @@ void rpmtsEmpty(rpmts ts)
|
||||||
pi = rpmtsiFree(pi);
|
pi = rpmtsiFree(pi);
|
||||||
|
|
||||||
ts->orderCount = 0;
|
ts->orderCount = 0;
|
||||||
|
ts->ntrees = 0;
|
||||||
|
ts->maxDepth = 0;
|
||||||
|
|
||||||
ts->numRemovedPackages = 0;
|
ts->numRemovedPackages = 0;
|
||||||
/*@-nullstate@*/ /* FIX: partial annotations */
|
/*@-nullstate@*/ /* FIX: partial annotations */
|
||||||
|
@ -1519,6 +1521,8 @@ rpmts rpmtsCreate(void)
|
||||||
ts->orderAlloced = 0;
|
ts->orderAlloced = 0;
|
||||||
ts->orderCount = 0;
|
ts->orderCount = 0;
|
||||||
ts->order = NULL;
|
ts->order = NULL;
|
||||||
|
ts->ntrees = 0;
|
||||||
|
ts->maxDepth = 0;
|
||||||
|
|
||||||
ts->probs = NULL;
|
ts->probs = NULL;
|
||||||
|
|
||||||
|
|
|
@ -294,6 +294,8 @@ struct rpmts_s {
|
||||||
int orderCount; /*!< No. of transaction elements. */
|
int orderCount; /*!< No. of transaction elements. */
|
||||||
int orderAlloced; /*!< No. of allocated transaction elements. */
|
int orderAlloced; /*!< No. of allocated transaction elements. */
|
||||||
int unorderedSuccessors; /*!< Index of 1st element of successors. */
|
int unorderedSuccessors; /*!< Index of 1st element of successors. */
|
||||||
|
int ntrees; /*!< No. of dependency trees. */
|
||||||
|
int maxDepth; /*!< Maximum depth of dependency tree(s). */
|
||||||
|
|
||||||
int selinuxEnabled; /*!< Is SE linux enabled? */
|
int selinuxEnabled; /*!< Is SE linux enabled? */
|
||||||
int chrootDone; /*!< Has chroot(2) been been done? */
|
int chrootDone; /*!< Has chroot(2) been been done? */
|
||||||
|
|
|
@ -2,7 +2,7 @@ AC_INIT(popt.h)
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
AC_PREREQ(2.12)
|
AC_PREREQ(2.12)
|
||||||
AC_CONFIG_HEADERS
|
AC_CONFIG_HEADERS
|
||||||
AM_INIT_AUTOMAKE(popt, 1.9)
|
AM_INIT_AUTOMAKE(popt, 1.10)
|
||||||
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
ALL_LINGUAS="cs da de es eu_ES fi fr gl hu id is it ja ko no pl pt pt_BR ro ru sk sl sr sv tr uk wa zh zh_CN.GB2312"
|
ALL_LINGUAS="cs da de es eu_ES fi fr gl hu id is it ja ko no pl pt pt_BR ro ru sk sl sr sv tr uk wa zh zh_CN.GB2312"
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
#
|
#
|
||||||
Summary: A C library for parsing command line parameters.
|
Summary: A C library for parsing command line parameters.
|
||||||
Name: popt
|
Name: popt
|
||||||
Version: 1.9
|
Version: 1.10
|
||||||
Release: 0.1
|
Release: 0.1
|
||||||
Copyright: X Consortium
|
License: X Consortium
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Source: ftp://ftp.redhat.com/pub/redhat/code/popt/popt-%{version}.tar.gz
|
Source: ftp://ftp.redhat.com/pub/redhat/code/popt/popt-%{version}.tar.gz
|
||||||
BuildRoot: /var/tmp/%{name}root
|
BuildRoot: /var/tmp/%{name}root
|
||||||
|
|
|
@ -7,7 +7,7 @@ LINT = splint
|
||||||
pylibdir = ${prefix}/lib@MARK64@/python@WITH_PYTHON_VERSION@
|
pylibdir = ${prefix}/lib@MARK64@/python@WITH_PYTHON_VERSION@
|
||||||
pyincdir = $(prefix)/include/python@WITH_PYTHON_VERSION@
|
pyincdir = $(prefix)/include/python@WITH_PYTHON_VERSION@
|
||||||
|
|
||||||
SUBDIRS = rpmdb rpm
|
SUBDIRS = rpmdb # rpm
|
||||||
|
|
||||||
EXTRA_DIST = system.h rpmdebug-py.c
|
EXTRA_DIST = system.h rpmdebug-py.c
|
||||||
|
|
||||||
|
@ -38,16 +38,16 @@ mylibs= \
|
||||||
LDADD =
|
LDADD =
|
||||||
|
|
||||||
pythondir = $(pylibdir)/site-packages
|
pythondir = $(pylibdir)/site-packages
|
||||||
python_LTLIBRARIES = poptmodule.la
|
python_LTLIBRARIES = rpmmodule.la poptmodule.la
|
||||||
|
|
||||||
rpmdir = $(pylibdir)/site-packages/rpm
|
#rpmdir = $(pylibdir)/site-packages/rpm
|
||||||
rpm_LTLIBRARIES = _rpmmodule.la
|
#rpm_LTLIBRARIES = rpmmodule.la
|
||||||
|
|
||||||
rpmdbdir = $(pylibdir)/site-packages/rpmdb
|
rpmdbdir = $(pylibdir)/site-packages/rpmdb
|
||||||
rpmdb_LTLIBRARIES = _rpmdb.la
|
rpmdb_LTLIBRARIES = _rpmdb.la
|
||||||
|
|
||||||
_rpmmodule_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
|
rpmmodule_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
|
||||||
_rpmmodule_la_LIBADD = @WITH_BEECRYPT_LIB@
|
rpmmodule_la_LIBADD = @WITH_BEECRYPT_LIB@
|
||||||
|
|
||||||
_rpmdb_la_SOURCES = _rpmdb.c
|
_rpmdb_la_SOURCES = _rpmdb.c
|
||||||
_rpmdb_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
|
_rpmdb_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
|
||||||
|
@ -55,7 +55,7 @@ _rpmdb_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
|
||||||
poptmodule_la_SOURCES = poptmodule.c
|
poptmodule_la_SOURCES = poptmodule.c
|
||||||
poptmodule_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
|
poptmodule_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
|
||||||
|
|
||||||
_rpmmodule_la_SOURCES = rpmmodule.c header-py.c \
|
rpmmodule_la_SOURCES = rpmmodule.c header-py.c \
|
||||||
rpmal-py.c rpmds-py.c rpmdb-py.c rpmfd-py.c rpmfts-py.c \
|
rpmal-py.c rpmds-py.c rpmdb-py.c rpmfd-py.c rpmfts-py.c \
|
||||||
rpmfi-py.c rpmmi-py.c rpmps-py.c rpmrc-py.c rpmte-py.c \
|
rpmfi-py.c rpmmi-py.c rpmps-py.c rpmrc-py.c rpmte-py.c \
|
||||||
rpmts-py.c spec-py.c
|
rpmts-py.c spec-py.c
|
||||||
|
|
|
@ -28,7 +28,7 @@ Conflicts: patch < 2.5
|
||||||
%ifos linux
|
%ifos linux
|
||||||
Prereq: fileutils shadow-utils
|
Prereq: fileutils shadow-utils
|
||||||
%endif
|
%endif
|
||||||
Requires: popt = 1.9
|
Requires: popt = 1.10
|
||||||
Obsoletes: rpm-perl < %{version}
|
Obsoletes: rpm-perl < %{version}
|
||||||
|
|
||||||
# XXX necessary only to drag in /usr/lib/libelf.a, otherwise internal elfutils.
|
# XXX necessary only to drag in /usr/lib/libelf.a, otherwise internal elfutils.
|
||||||
|
@ -110,7 +110,7 @@ programs that will manipulate RPM packages and databases.
|
||||||
%package -n popt
|
%package -n popt
|
||||||
Summary: A C library for parsing command line parameters.
|
Summary: A C library for parsing command line parameters.
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Version: 1.9
|
Version: 1.10
|
||||||
|
|
||||||
%description -n popt
|
%description -n popt
|
||||||
Popt is a C library for parsing command line parameters. Popt was
|
Popt is a C library for parsing command line parameters. Popt was
|
||||||
|
|
Loading…
Reference in New Issue