diff options
author | jbj <devnull@localhost> | 2004-10-28 23:57:36 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2004-10-28 23:57:36 +0000 |
commit | 37718380bf1a5503555b3ac7575570ad68fe2fa1 (patch) | |
tree | cb91b80dcbbe610bb994c09b97c4eb312ae36d3a | |
parent | e609515b336384c95b59e7f87c3059119fa0b543 (diff) | |
download | librpm-tizen-37718380bf1a5503555b3ac7575570ad68fe2fa1.tar.gz librpm-tizen-37718380bf1a5503555b3ac7575570ad68fe2fa1.tar.bz2 librpm-tizen-37718380bf1a5503555b3ac7575570ad68fe2fa1.zip |
- bump popt to version to 1.10.
CVS patchset: 7519
CVS date: 2004/10/28 23:57:36
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | lib/depends.c | 23 | ||||
-rw-r--r-- | lib/rpmte.c | 15 | ||||
-rw-r--r-- | lib/rpmte.h | 24 | ||||
-rw-r--r-- | lib/rpmts.c | 4 | ||||
-rw-r--r-- | lib/rpmts.h | 2 | ||||
-rwxr-xr-x | popt/configure.ac | 2 | ||||
-rw-r--r-- | popt/popt.spec | 4 | ||||
-rw-r--r-- | python/Makefile.am | 14 | ||||
-rw-r--r-- | rpm.spec.in | 4 |
10 files changed, 72 insertions, 21 deletions
@@ -25,6 +25,7 @@ - port to internal file-4.10 libmagic rather than libfmagic. - fix: handle non-unique dirnames in rpmalAdd(). - integrate rpmgi "generic iterator" with query/verify. + - bump popt to version to 1.10. 4.3.1 -> 4.3.2: - use /etc/selinux/targeted/contexts/files/file_contexts for now. diff --git a/lib/depends.c b/lib/depends.c index 707032369..37ecef3cd 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -1126,6 +1126,8 @@ static inline int addRelation(rpmts ts, if (rpmteDepth(p) <= rpmteDepth(q)) /* Save max. depth in dependency tree */ (void) rpmteSetDepth(p, (rpmteDepth(q) + 1)); + if (rpmteDepth(p) > ts->maxDepth) + ts->maxDepth = rpmteDepth(p); tsi = xcalloc(1, sizeof(*tsi)); tsi->tsi_suc = p; @@ -1225,6 +1227,8 @@ int rpmtsOrder(rpmts ts) int newOrderCount = 0; orderListIndex orderList; 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 _printed = 0; char deptypechar; @@ -1232,6 +1236,7 @@ int rpmtsOrder(rpmts ts) int oType = 0; int treex; int depth; + int breadth; int qlen; int i, j; @@ -1340,6 +1345,7 @@ int rpmtsOrder(rpmts ts) npreds = rpmteTSI(p)->tsi_count; (void) rpmteSetNpreds(p, npreds); + (void) rpmteSetDepth(p, 1); if (npreds == 0) (void) rpmteSetTree(p, treex++); @@ -1351,9 +1357,10 @@ int rpmtsOrder(rpmts ts) } pi = rpmtsiFree(pi); + ts->ntrees = treex; /* 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: if (pi != NULL) pi = rpmtsiFree(pi); @@ -1396,15 +1403,19 @@ rescan: } 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), - rpmteTSI(q)->tsi_qcnt, rpmteTree(q), rpmteDepth(q), - (2 * rpmteDepth(q)), "", + rpmteTSI(q)->tsi_qcnt, + treex, depth, breadth, + (2 * depth), "", deptypechar, (rpmteNEVRA(q) ? rpmteNEVRA(q) : "???")); - treex = rpmteTree(q); - depth = rpmteDepth(q); (void) rpmteSetDegree(q, 0); tsbytes += rpmtePkgFileSize(q); diff --git a/lib/rpmte.c b/lib/rpmte.c index dab00a8cf..e4961dc53 100644 --- a/lib/rpmte.c +++ b/lib/rpmte.c @@ -339,6 +339,21 @@ int rpmteSetDepth(rpmte te, int ndepth) 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) { return (te != NULL ? te->npreds : 0); diff --git a/lib/rpmte.h b/lib/rpmte.h index 68410f1ce..724ab247d 100644 --- a/lib/rpmte.h +++ b/lib/rpmte.h @@ -83,9 +83,10 @@ struct rpmte_s { rpmte parent; /*!< Parent transaction element. */ int degree; /*!< No. of immediate children. */ - int depth; /*!< Max. depth in dependency tree. */ int npreds; /*!< No. of predecessors. */ int tree; /*!< Tree index. */ + int depth; /*!< Depth in dependency tree. */ + int breadth; /*!< Breadth in dependency tree. */ unsigned int db_instance; /*!< Database Instance after add */ /*@owned@*/ 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 * @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 ndepth new depth * @return previous depth @@ -324,6 +325,23 @@ int rpmteSetDepth(rpmte te, int ndepth) /*@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. * @param te transaction element * @return no. of predecessors diff --git a/lib/rpmts.c b/lib/rpmts.c index db526831a..54e16c7c3 100644 --- a/lib/rpmts.c +++ b/lib/rpmts.c @@ -767,6 +767,8 @@ void rpmtsEmpty(rpmts ts) pi = rpmtsiFree(pi); ts->orderCount = 0; + ts->ntrees = 0; + ts->maxDepth = 0; ts->numRemovedPackages = 0; /*@-nullstate@*/ /* FIX: partial annotations */ @@ -1519,6 +1521,8 @@ rpmts rpmtsCreate(void) ts->orderAlloced = 0; ts->orderCount = 0; ts->order = NULL; + ts->ntrees = 0; + ts->maxDepth = 0; ts->probs = NULL; diff --git a/lib/rpmts.h b/lib/rpmts.h index f209c7d39..64ec13641 100644 --- a/lib/rpmts.h +++ b/lib/rpmts.h @@ -294,6 +294,8 @@ struct rpmts_s { int orderCount; /*!< No. of transaction elements. */ int orderAlloced; /*!< No. of allocated transaction elements. */ 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 chrootDone; /*!< Has chroot(2) been been done? */ diff --git a/popt/configure.ac b/popt/configure.ac index ac8f7647a..5935014a2 100755 --- a/popt/configure.ac +++ b/popt/configure.ac @@ -2,7 +2,7 @@ AC_INIT(popt.h) AC_CANONICAL_SYSTEM AC_PREREQ(2.12) AC_CONFIG_HEADERS -AM_INIT_AUTOMAKE(popt, 1.9) +AM_INIT_AUTOMAKE(popt, 1.10) 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" diff --git a/popt/popt.spec b/popt/popt.spec index f84fabd7e..df33aaa7c 100644 --- a/popt/popt.spec +++ b/popt/popt.spec @@ -4,9 +4,9 @@ # Summary: A C library for parsing command line parameters. Name: popt -Version: 1.9 +Version: 1.10 Release: 0.1 -Copyright: X Consortium +License: X Consortium Group: System Environment/Libraries Source: ftp://ftp.redhat.com/pub/redhat/code/popt/popt-%{version}.tar.gz BuildRoot: /var/tmp/%{name}root diff --git a/python/Makefile.am b/python/Makefile.am index 3cb04ea25..4e7ea3865 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -7,7 +7,7 @@ LINT = splint pylibdir = ${prefix}/lib@MARK64@/python@WITH_PYTHON_VERSION@ pyincdir = $(prefix)/include/python@WITH_PYTHON_VERSION@ -SUBDIRS = rpmdb rpm +SUBDIRS = rpmdb # rpm EXTRA_DIST = system.h rpmdebug-py.c @@ -38,16 +38,16 @@ mylibs= \ LDADD = pythondir = $(pylibdir)/site-packages -python_LTLIBRARIES = poptmodule.la +python_LTLIBRARIES = rpmmodule.la poptmodule.la -rpmdir = $(pylibdir)/site-packages/rpm -rpm_LTLIBRARIES = _rpmmodule.la +#rpmdir = $(pylibdir)/site-packages/rpm +#rpm_LTLIBRARIES = rpmmodule.la rpmdbdir = $(pylibdir)/site-packages/rpmdb rpmdb_LTLIBRARIES = _rpmdb.la -_rpmmodule_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version -_rpmmodule_la_LIBADD = @WITH_BEECRYPT_LIB@ +rpmmodule_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version +rpmmodule_la_LIBADD = @WITH_BEECRYPT_LIB@ _rpmdb_la_SOURCES = _rpmdb.c _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_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 \ rpmfi-py.c rpmmi-py.c rpmps-py.c rpmrc-py.c rpmte-py.c \ rpmts-py.c spec-py.c diff --git a/rpm.spec.in b/rpm.spec.in index 9c782ca26..bbca6f435 100644 --- a/rpm.spec.in +++ b/rpm.spec.in @@ -28,7 +28,7 @@ Conflicts: patch < 2.5 %ifos linux Prereq: fileutils shadow-utils %endif -Requires: popt = 1.9 +Requires: popt = 1.10 Obsoletes: rpm-perl < %{version} # 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 Summary: A C library for parsing command line parameters. Group: Development/Libraries -Version: 1.9 +Version: 1.10 %description -n popt Popt is a C library for parsing command line parameters. Popt was |