def create_solver(self):
return satsolver.Solver(self, self.pool)
- def create_request(self):
- return satsolver.Request(self.pool)
+ def create_request(self, builder=False):
+ request = satsolver.Request(self.pool)
+
+ # Add multiinstall information.
+ for solv in PAKFIRE_MULTIINSTALL:
+ request.noobsoletes(solv)
+
+ return request
def create_relation(self, s):
assert s
PKG_PAYLOAD_HASH1="%(payload_hash1)s"
"""
+
+# XXX make this configurable in pakfire.conf
+PAKFIRE_MULTIINSTALL = ["kernel",]
raise Exception, "Unknown type"
+ def noobsoletes(self, what):
+ if isinstance(what, Solvable):
+ self.noobsoletes_solvable(what)
+ return
+
+ elif isinstance(what, Relation):
+ self.noobsoletes_relation(what)
+ return
+
+ elif type(what) == type("string"):
+ self.noobsoletes_name(what)
+ return
+
+ raise Exception, "Unknown type"
+
class Solver(object):
def __init__(self, pakfire, pool):
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-07-31 19:16+0000\n"
+"POT-Creation-Date: 2011-07-31 19:32+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Downgrading"
msgstr ""
-#: ../pakfire/base.py:150 ../pakfire/base.py:192 ../pakfire/base.py:222
-#: ../pakfire/base.py:243
+#: ../pakfire/base.py:156 ../pakfire/base.py:198 ../pakfire/base.py:228
+#: ../pakfire/base.py:249
msgid "Nothing to do"
msgstr ""
-#: ../pakfire/base.py:178
+#: ../pakfire/base.py:184
msgid "There are no packages to install."
msgstr ""
-#: ../pakfire/base.py:439
+#: ../pakfire/base.py:445
msgid "Everything is fine."
msgstr ""
msgid "Loading installed packages"
msgstr ""
-#: ../pakfire/satsolver.py:114
+#: ../pakfire/satsolver.py:129
msgid "The solver returned one problem:"
msgstr ""
#. Ask the user if he or she want to modify the request. If not, just exit.
-#: ../pakfire/satsolver.py:130
+#: ../pakfire/satsolver.py:145
msgid "Do you want to manually alter the request?"
msgstr ""
-#: ../pakfire/satsolver.py:133
+#: ../pakfire/satsolver.py:148
msgid "You can now try to satisfy the solver by modifying your request."
msgstr ""
-#: ../pakfire/satsolver.py:138
+#: ../pakfire/satsolver.py:153
msgid "Which problem to you want to resolve?"
msgstr ""
-#: ../pakfire/satsolver.py:140
+#: ../pakfire/satsolver.py:155
msgid "Press enter to try to re-solve the request."
msgstr ""
-#: ../pakfire/satsolver.py:171
+#: ../pakfire/satsolver.py:186
#, python-format
msgid " Solution: %s"
msgstr ""
-#: ../pakfire/satsolver.py:180
+#: ../pakfire/satsolver.py:195
msgid " Solutions:"
msgstr ""
{"lock_solvable", (PyCFunction)Request_lock_solvable, METH_VARARGS, NULL},
{"lock_relation", (PyCFunction)Request_lock_relation, METH_VARARGS, NULL},
{"lock_name", (PyCFunction)Request_lock_name, METH_VARARGS, NULL},
+ {"noobsoletes_solvable", (PyCFunction)Request_noobsoletes_solvable, METH_VARARGS, NULL},
+ {"noobsoletes_relation", (PyCFunction)Request_noobsoletes_relation, METH_VARARGS, NULL},
+ {"noobsoletes_name", (PyCFunction)Request_noobsoletes_name, METH_VARARGS, NULL},
{ NULL, NULL, 0, NULL }
};
Py_RETURN_NONE;
}
+
+PyObject *Request_noobsoletes_solvable(RequestObject *self, PyObject *args) {
+ SolvableObject *solv;
+
+ if (!PyArg_ParseTuple(args, "O", &solv)) {
+ /* XXX raise exception */
+ }
+
+ _Request_solvable(self, SOLVER_NOOBSOLETES, solv->_id);
+
+ Py_RETURN_NONE;
+}
+
+PyObject *Request_noobsoletes_relation(RequestObject *self, PyObject *args) {
+ RelationObject *rel;
+
+ if (!PyArg_ParseTuple(args, "O", &rel)) {
+ /* XXX raise exception */
+ }
+
+ _Request_relation(self, SOLVER_NOOBSOLETES, rel->_id);
+
+ Py_RETURN_NONE;
+}
+
+PyObject *Request_noobsoletes_name(RequestObject *self, PyObject *args) {
+ const char *name;
+
+ if (!PyArg_ParseTuple(args, "s", &name)) {
+ /* XXX raise exception */
+ }
+
+ Id _name = pool_str2id(self->_pool, name, 1);
+ _Request_name(self, SOLVER_NOOBSOLETES, _name);
+
+ Py_RETURN_NONE;
+}
extern PyObject *Request_lock_relation(RequestObject *self, PyObject *args);
extern PyObject *Request_lock_name(RequestObject *self, PyObject *args);
+extern PyObject *Request_noobsoletes_solvable(RequestObject *self, PyObject *args);
+extern PyObject *Request_noobsoletes_relation(RequestObject *self, PyObject *args);
+extern PyObject *Request_noobsoletes_name(RequestObject *self, PyObject *args);
+
extern PyTypeObject RequestType;
#endif