RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 05-Sep-2014 21:31:47 Branch: rpm-5_4 Handle: 2014090519314600 Modified files: (Branch: rpm-5_4) rpm/python rpmmodule.c rpmts-py.c Log: - python: implicitly set --noparentdirs --nolinktos creating transactions. - python: initialize _invert_digits_alphas_comparison at module load. Summary: Revision Changes Path 1.180.2.11 +12 -0 rpm/python/rpmmodule.c 1.111.2.11 +8 -1 rpm/python/rpmts-py.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/python/rpmmodule.c ============================================================================ $ cvs diff -u -r1.180.2.10 -r1.180.2.11 rpmmodule.c --- rpm/python/rpmmodule.c 3 Sep 2014 20:00:29 -0000 1.180.2.10 +++ rpm/python/rpmmodule.c 5 Sep 2014 19:31:46 -0000 1.180.2.11 @@ -36,6 +36,12 @@ #include "debug.h" +/* XXX revert RPMVERCMP_DIGITS_BEAT_ALPHA at runtime */ +extern int _invert_digits_alphas_comparison; + +/* XXX add --noparentdirs --nolinktos to rpmtsCheck() */ +extern int global_depFlags; + /** \ingroup python * \name Module: rpm */ @@ -370,6 +376,12 @@ if (Py_AtExit(rpm_exithook) == -1) return 0; + /* XXX revert RPMVERCMP_DIGITS_BEAT_ALPHA at runtime */ + _invert_digits_alphas_comparison = -1; + + /* XXX add --noparentdirs --nolinktos to rpmtsCheck() */ + global_depFlags = (RPMDEPS_FLAG_NOPARENTDIRS | RPMDEPS_FLAG_NOLINKTOS); + /* failure to initialize rpm (crypto and all) is rather fatal too... */ if (rpmReadConfigFiles(NULL, NULL) == -1) return 0; @@ . patch -p0 <<'@@ .' Index: rpm/python/rpmts-py.c ============================================================================ $ cvs diff -u -r1.111.2.10 -r1.111.2.11 rpmts-py.c --- rpm/python/rpmts-py.c 3 Sep 2014 20:03:12 -0000 1.111.2.10 +++ rpm/python/rpmts-py.c 5 Sep 2014 19:31:46 -0000 1.111.2.11 @@ -38,6 +38,9 @@ extern int _rpmts_debug; #define SPEW(_list) if (_rpmts_debug) fprintf _list +/* XXX add --noparentdirs --nolinktos to rpmtsCheck() */ +extern int global_depFlags; + /** \ingroup python * \name Class: Rpmts * \class Rpmts @@ -944,6 +947,10 @@ if (s == NULL) return NULL; s->ts = rpmtsCreate(); + + /* XXX add --noparentdirs --nolinktos to rpmtsCheck()/rpmtsOrder() */ + (void) rpmtsSetDFlags(s->ts, rpmtsDFlags(s->ts) ^ global_depFlags); + s->scriptFd = NULL; s->tsi = NULL; s->keyList = PyList_New(0); @@ -1038,7 +1045,7 @@ static int rpmts_set_dflags(rpmtsObject *s, PyObject *value, void *closure) { - rpmtransFlags flags; + rpmdepFlags flags; if (!PyArg_Parse(value, "i", &flags)) return -1; /* TODO: validate the bits */ @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org