summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-10-31 11:57:04 +0200
committerPanu Matilainen <pmatilai@redhat.com>2007-10-31 11:57:04 +0200
commita3bbfc98eefa6cf272ed8f391c8efc6af995bd53 (patch)
tree23c5e5b290278b46766f036713587853da43848a /python
parentc13ab3401614249d8321b9e920a479602dc8291d (diff)
downloadlibrpm-tizen-a3bbfc98eefa6cf272ed8f391c8efc6af995bd53.tar.gz
librpm-tizen-a3bbfc98eefa6cf272ed8f391c8efc6af995bd53.tar.bz2
librpm-tizen-a3bbfc98eefa6cf272ed8f391c8efc6af995bd53.zip
Disable python available package mechanism for now at least.
- need saner available mechanism to resurrect, OTOH nothing appears to use it anymore - last remaining RPMTS_INTERNAL offender...
Diffstat (limited to 'python')
-rw-r--r--python/rpmts-py.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/python/rpmts-py.c b/python/rpmts-py.c
index a9e887cc9..73ae89a27 100644
--- a/python/rpmts-py.c
+++ b/python/rpmts-py.c
@@ -17,7 +17,6 @@
#include "rpmte-py.h"
#include "spec-py.h"
-#define _RPMTS_INTERNAL /* XXX for ts->availablePackage */
#include "rpmts-py.h"
#include "debug.h"
@@ -171,6 +170,7 @@ fprintf(stderr, "*** rpmts_Debug(%p) ts %p\n", s, s->ts);
return Py_None;
}
+#if 0
/** \ingroup py_c
* Add package to universe of possible packages to install in transaction set.
* @param ts transaction set
@@ -194,6 +194,7 @@ if (_rpmts_debug < 0)
fprintf(stderr, "\tAddAvailable(%p) list %p\n", ts, ts->availablePackages);
}
+#endif
/** \ingroup py_c
*/
@@ -227,9 +228,19 @@ fprintf(stderr, "*** rpmts_AddInstall(%p,%p,%p,%s) ts %p\n", s, h, key, how, s->
} else if (how && !strcmp(how, "u"))
isUpgrade = 1;
- if (how && !strcmp(how, "a"))
- rpmtsAddAvailableElement(s->ts, hdrGetHeader(h), key);
- else
+ /*
+ * XXX resurrect when better available mechanism is, well, available.
+ * OTOH nothing appears to use it these days...
+ * Raise exception to catch out any callers while broken.
+ */
+ if (how && !strcmp(how, "a")) {
+#ifdef DYING
+ rpmtsAddAvailableElement(s->ts, hdrGetHeader(h), key);
+#else
+ PyErr_SetString(pyrpmError, "available package mechanism currently broken");
+ return NULL;
+#endif
+ } else
rc = rpmtsAddInstallElement(s->ts, hdrGetHeader(h), key, isUpgrade, NULL);
if (rc) {
PyErr_SetString(pyrpmError, "adding package to transaction failed");
@@ -374,8 +385,10 @@ fprintf(stderr, "*** rpmts_Check(%p) ts %p cb %p\n", s, s->ts, cbInfo.cb);
cbInfo.pythonError = 0;
cbInfo._save = PyEval_SaveThread();
+#ifdef DYING
/* XXX resurrect availablePackages one more time ... */
rpmalMakeIndex(s->ts->availablePackages);
+#endif
xx = rpmtsCheck(s->ts);
ps = rpmtsProblems(s->ts);