This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 3.x development tree".
The branch, master has been updated via cb570e99064e25ae4f39b6299fa911db9d267fa1 (commit) from 3a64a15f1eb94f4e82d7bb6fe413d4cee05f3456 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit cb570e99064e25ae4f39b6299fa911db9d267fa1 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Jul 26 18:05:28 2012 +0200
pakfire: Update to 0.9.23.
Introduces a new version of the package format.
-----------------------------------------------------------------------
Summary of changes: pakfire/pakfire.nm | 4 +- ...ng-index-data-after-the-transaction-is-do.patch | 40 - .../0002-find-provides-Accept-bogous-soname.patch | 28 - ...right-package-format-to-all-actions-in-th.patch | 75 - ...on-Don-t-make-internal-server-errors-fata.patch | 500 ------ ...w-to-install-multiple-non-default-kernels.patch | 32 - ...y-remove-installed-packages-from-database.patch | 26 - ...packages-from-the-database-by-their-UUIDs.patch | 29 - ...-Fixes-for-removing-files-and-configfiles.patch | 51 - pakfire/patches/0009-Fix-two-coding-errors.patch | 39 - ...ingbay-repository-from-example-configurat.patch | 80 - ...Move-C-module-to-newer-version-of-libsolv.patch | 1787 -------------------- ...s-by-their-version-number-not-in-alphabet.patch | 26 - .../patches/0013-Fix-linking-to-libsolvext.patch | 28 - pakfire/patches/0014-Fix-the-download-sizes.patch | 30 - .../0015-Add-option-to-export-secret-keys.patch | 71 - .../0016-template-Fix-packaging-cmake-files.patch | 25 - 17 files changed, 2 insertions(+), 2869 deletions(-) delete mode 100644 pakfire/patches/0001-Fix-accessing-index-data-after-the-transaction-is-do.patch delete mode 100644 pakfire/patches/0002-find-provides-Accept-bogous-soname.patch delete mode 100644 pakfire/patches/0003-Fix-adding-right-package-format-to-all-actions-in-th.patch delete mode 100644 pakfire/patches/0004-client-daemon-Don-t-make-internal-server-errors-fata.patch delete mode 100644 pakfire/patches/0005-Allow-to-install-multiple-non-default-kernels.patch delete mode 100644 pakfire/patches/0006-Actually-remove-installed-packages-from-database.patch delete mode 100644 pakfire/patches/0007-Select-packages-from-the-database-by-their-UUIDs.patch delete mode 100644 pakfire/patches/0008-Fixes-for-removing-files-and-configfiles.patch delete mode 100644 pakfire/patches/0009-Fix-two-coding-errors.patch delete mode 100644 pakfire/patches/0010-Remove-testingbay-repository-from-example-configurat.patch delete mode 100644 pakfire/patches/0011-Move-C-module-to-newer-version-of-libsolv.patch delete mode 100644 pakfire/patches/0012-Sort-patches-by-their-version-number-not-in-alphabet.patch delete mode 100644 pakfire/patches/0013-Fix-linking-to-libsolvext.patch delete mode 100644 pakfire/patches/0014-Fix-the-download-sizes.patch delete mode 100644 pakfire/patches/0015-Add-option-to-export-secret-keys.patch delete mode 100644 pakfire/patches/0016-template-Fix-packaging-cmake-files.patch
Difference in files: diff --git a/pakfire/pakfire.nm b/pakfire/pakfire.nm index c81b3dc..c071243 100644 --- a/pakfire/pakfire.nm +++ b/pakfire/pakfire.nm @@ -4,8 +4,8 @@ ###############################################################################
name = pakfire -version = 0.9.22 -release = 5 +version = 0.9.23 +release = 1
maintainer = Michael Tremer michael.tremer@ipfire.org groups = System/Packaging diff --git a/pakfire/patches/0001-Fix-accessing-index-data-after-the-transaction-is-do.patch b/pakfire/patches/0001-Fix-accessing-index-data-after-the-transaction-is-do.patch deleted file mode 100644 index 4324d8a..0000000 --- a/pakfire/patches/0001-Fix-accessing-index-data-after-the-transaction-is-do.patch +++ /dev/null @@ -1,40 +0,0 @@ -From b856696a0a8173eaacdd03833971272de06118ce Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Sat, 14 Apr 2012 21:16:30 +0200 -Subject: [PATCH 01/16] Fix accessing index data after the transaction is - done. - ---- - python/pakfire/client/builder.py | 1 + - python/pakfire/repository/system.py | 3 +++ - 2 files changed, 4 insertions(+) - -diff --git a/python/pakfire/client/builder.py b/python/pakfire/client/builder.py -index a039e65..2ade5dc 100644 ---- a/python/pakfire/client/builder.py -+++ b/python/pakfire/client/builder.py -@@ -334,6 +334,7 @@ class ClientBuilder(object): - pkgs = [] - - for pkg in installed_packages: -+ assert pkg.uuid, "%s has got no UUID" - pkgs.append((pkg.friendly_name, pkg.uuid)) - - return self.conn.build_upload_buildroot(self.build_id, pkgs) -diff --git a/python/pakfire/repository/system.py b/python/pakfire/repository/system.py -index 642c4bd..5dcdd04 100644 ---- a/python/pakfire/repository/system.py -+++ b/python/pakfire/repository/system.py -@@ -52,6 +52,9 @@ class RepositorySystem(base.RepositoryFactory): - # Commit the database to disk. - self.db.commit() - -+ # Make sure that all data in the index is accessable. -+ self.index.optimize() -+ - def add_package(self, pkg): - # Add package to the database. - self.db.add_package(pkg) --- -1.7.10.4 - diff --git a/pakfire/patches/0002-find-provides-Accept-bogous-soname.patch b/pakfire/patches/0002-find-provides-Accept-bogous-soname.patch deleted file mode 100644 index d42cd8d..0000000 --- a/pakfire/patches/0002-find-provides-Accept-bogous-soname.patch +++ /dev/null @@ -1,28 +0,0 @@ -From cf4f218f42c2a43a520eac4f3a6251d557dcbe80 Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Tue, 17 Apr 2012 17:36:52 +0200 -Subject: [PATCH 02/16] find-provides: Accept bogous soname. - -This is a kind of weird bug. Some libs are "versioned" by -using their SONAME for symbol maps. This caused trouble -because the SONAME was not added to the list of provides -which is now changed by this commit. ---- - tools/find-provides | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/tools/find-provides b/tools/find-provides -index 2e138ba..06b3c47 100755 ---- a/tools/find-provides -+++ b/tools/find-provides -@@ -69,7 +69,6 @@ for file in ${binary_files}; do - /Version definitions:/ { START=1; } - /^[0-9]/ && (START==1) { print $4; } - /^$/ { START=0; }' | \ -- grep -v ${soname} | \ - while read symbol ; do - echo "${soname}(${symbol})$(${is_64} && echo ${mark64} | sed 's/()//')" - done --- -1.7.10.4 - diff --git a/pakfire/patches/0003-Fix-adding-right-package-format-to-all-actions-in-th.patch b/pakfire/patches/0003-Fix-adding-right-package-format-to-all-actions-in-th.patch deleted file mode 100644 index 987808b..0000000 --- a/pakfire/patches/0003-Fix-adding-right-package-format-to-all-actions-in-th.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 39097e291ae050dbefe2dfa265e55dd330328acd Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Thu, 19 Apr 2012 16:56:03 +0200 -Subject: [PATCH 03/16] Fix adding right package format to all actions in the - transaction. - ---- - python/pakfire/transaction.py | 23 +++++++++++++++-------- - 1 file changed, 15 insertions(+), 8 deletions(-) - -diff --git a/python/pakfire/transaction.py b/python/pakfire/transaction.py -index 0b417d2..58b52c6 100644 ---- a/python/pakfire/transaction.py -+++ b/python/pakfire/transaction.py -@@ -301,7 +301,7 @@ class Transaction(object): - - @property - def downloads(self): -- return sorted([a for a in self.actions if a.needs_download]) -+ return sorted([a.pkg_solv for a in self.actions if a.needs_download]) - - def download(self, logger=None): - if logger is None: -@@ -309,16 +309,13 @@ class Transaction(object): - - # Get all download actions as a list. - downloads = [d for d in self.downloads] -- downloads.sort() - - # If there are no downloads, we can just stop here. - if not downloads: - return - - # Calculate downloadsize. -- download_size = 0 -- for action in downloads: -- download_size += action.pkg.size -+ download_size = sum([d.size for d in downloads]) - - # Get free space of the download location. - path = os.path.realpath(REPO_CACHE_DIR) -@@ -334,9 +331,19 @@ class Transaction(object): - time_start = time.time() - - i = 0 -- for action in downloads: -+ for pkg in downloads: - i += 1 -- action.download(text="(%d/%d): " % (i, len(downloads)), logger=logger) -+ -+ # Download the package file. -+ bin_pkg = pkg.download(text="(%d/%d): " % (i, len(downloads)), logger=logger) -+ -+ # Search in every action if we need to replace the package. -+ for action in self.actions: -+ if not action.pkg_solv.uuid == bin_pkg.uuid: -+ continue -+ -+ # Replace the package. -+ action.pkg = bin_pkg - - # Write an empty line to the console when there have been any downloads. - width, height = util.terminal_size() -@@ -420,7 +427,7 @@ class Transaction(object): - - # Calculate the size of all files that need to be downloaded this this - # transaction. -- download_size = sum([a.pkg.size for a in self.downloads]) -+ download_size = sum([d.size for d in self.downloads]) - if download_size: - s.append(_("Total download size: %s") % util.format_size(download_size)) - --- -1.7.10.4 - diff --git a/pakfire/patches/0004-client-daemon-Don-t-make-internal-server-errors-fata.patch b/pakfire/patches/0004-client-daemon-Don-t-make-internal-server-errors-fata.patch deleted file mode 100644 index f9b0387..0000000 --- a/pakfire/patches/0004-client-daemon-Don-t-make-internal-server-errors-fata.patch +++ /dev/null @@ -1,500 +0,0 @@ -From e3eb933336605515fe8cc9968a83a37b7df6b257 Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Thu, 19 Apr 2012 17:02:09 +0200 -Subject: [PATCH 04/16] client/daemon: Don't make internal server errors fatal - for keepalives/updates. - -Because sometime, the hub could have some hiccups, this is no -reason to kill the daemon. It should retry sending the request in a short -time. - -However, we should now about the error and so the last try would -raise an exception. ---- - po/pakfire.pot | 137 ++++++++++++++++++++---------------- - python/pakfire/client/base.py | 43 +++++++---- - python/pakfire/client/transport.py | 8 +++ - python/pakfire/errors.py | 4 ++ - 4 files changed, 117 insertions(+), 75 deletions(-) - -diff --git a/po/pakfire.pot b/po/pakfire.pot -index 10f4e2a..4fd12e7 100644 ---- a/po/pakfire.pot -+++ b/po/pakfire.pot -@@ -8,7 +8,7 @@ msgid "" - msgstr "" - "Project-Id-Version: PACKAGE VERSION\n" - "Report-Msgid-Bugs-To: \n" --"POT-Creation-Date: 2012-04-14 14:32+0200\n" -+"POT-Creation-Date: 2012-04-19 16:57+0200\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" -@@ -116,7 +116,7 @@ msgstr "" - - #: ../python/pakfire/base.py:382 ../python/pakfire/base.py:450 - #: ../python/pakfire/base.py:487 ../python/pakfire/base.py:546 --#: ../python/pakfire/base.py:567 ../python/pakfire/transaction.py:389 -+#: ../python/pakfire/base.py:567 ../python/pakfire/transaction.py:396 - msgid "Nothing to do" - msgstr "" - -@@ -416,7 +416,7 @@ msgstr "" - msgid "Give name of at least one package to check." - msgstr "" - --#: ../python/pakfire/cli.py:348 ../python/pakfire/transaction.py:398 -+#: ../python/pakfire/cli.py:348 ../python/pakfire/transaction.py:405 - msgid "Repository" - msgstr "" - -@@ -740,7 +740,7 @@ msgid "Job: %(name)s" - msgstr "" - - #: ../python/pakfire/cli.py:1078 ../python/pakfire/packages/base.py:107 --#: ../python/pakfire/transaction.py:397 -+#: ../python/pakfire/transaction.py:404 - msgid "Arch" - msgstr "" - -@@ -777,140 +777,151 @@ msgstr "" - msgid "Pakfire daemon command line interface." - msgstr "" - --#: ../python/pakfire/cli.py:1161 -+#: ../python/pakfire/cli.py:1156 - msgid "Pakfire key command line interface." - msgstr "" - --#: ../python/pakfire/cli.py:1205 ../python/pakfire/cli.py:1215 -+#: ../python/pakfire/cli.py:1200 ../python/pakfire/cli.py:1210 - msgid "Import a key from file." - msgstr "" - --#: ../python/pakfire/cli.py:1207 -+#: ../python/pakfire/cli.py:1202 - msgid "The real name of the owner of this key." - msgstr "" - --#: ../python/pakfire/cli.py:1209 -+#: ../python/pakfire/cli.py:1204 - msgid "The email address of the owner of this key." - msgstr "" - --#: ../python/pakfire/cli.py:1217 -+#: ../python/pakfire/cli.py:1212 - msgid "Filename of that key to import." - msgstr "" - --#: ../python/pakfire/cli.py:1223 -+#: ../python/pakfire/cli.py:1218 - msgid "Export a key to a file." - msgstr "" - --#: ../python/pakfire/cli.py:1225 -+#: ../python/pakfire/cli.py:1220 - msgid "The ID of the key to export." - msgstr "" - --#: ../python/pakfire/cli.py:1227 -+#: ../python/pakfire/cli.py:1222 - msgid "Write the key to this file." - msgstr "" - --#: ../python/pakfire/cli.py:1233 -+#: ../python/pakfire/cli.py:1228 - msgid "Delete a key from the local keyring." - msgstr "" - --#: ../python/pakfire/cli.py:1235 -+#: ../python/pakfire/cli.py:1230 - msgid "The ID of the key to delete." - msgstr "" - --#: ../python/pakfire/cli.py:1241 -+#: ../python/pakfire/cli.py:1236 - msgid "List all imported keys." - msgstr "" - --#: ../python/pakfire/cli.py:1247 -+#: ../python/pakfire/cli.py:1242 - msgid "Sign one or more packages." - msgstr "" - --#: ../python/pakfire/cli.py:1249 -+#: ../python/pakfire/cli.py:1244 - msgid "Key that is used sign the package(s)." - msgstr "" - --#: ../python/pakfire/cli.py:1251 -+#: ../python/pakfire/cli.py:1246 - msgid "Package(s) to sign." - msgstr "" - --#: ../python/pakfire/cli.py:1257 -+#: ../python/pakfire/cli.py:1252 - msgid "Verify one or more packages." - msgstr "" - --#: ../python/pakfire/cli.py:1261 -+#: ../python/pakfire/cli.py:1256 - msgid "Package(s) to verify." - msgstr "" - --#: ../python/pakfire/cli.py:1268 -+#: ../python/pakfire/cli.py:1263 - msgid "Generating the key may take a moment..." - msgstr "" - --#: ../python/pakfire/cli.py:1316 -+#: ../python/pakfire/cli.py:1311 - #, python-format - msgid "Signing %s..." - msgstr "" - --#: ../python/pakfire/cli.py:1333 -+#: ../python/pakfire/cli.py:1328 - #, python-format - msgid "Verifying %s..." - msgstr "" - --#: ../python/pakfire/cli.py:1343 -+#: ../python/pakfire/cli.py:1338 - msgid "This signature is valid." - msgstr "" - --#: ../python/pakfire/cli.py:1346 -+#: ../python/pakfire/cli.py:1341 - msgid "Unknown key" - msgstr "" - --#: ../python/pakfire/cli.py:1347 -+#: ../python/pakfire/cli.py:1342 - msgid "Could not check if this signature is valid." - msgstr "" - --#: ../python/pakfire/cli.py:1350 ../python/pakfire/keyring.py:96 -+#: ../python/pakfire/cli.py:1345 ../python/pakfire/keyring.py:96 - #, python-format - msgid "Created: %s" - msgstr "" - --#: ../python/pakfire/cli.py:1354 ../python/pakfire/keyring.py:99 -+#: ../python/pakfire/cli.py:1349 ../python/pakfire/keyring.py:99 - #, python-format - msgid "Expires: %s" - msgstr "" - --#: ../python/pakfire/client/builder.py:173 -+#. If the keepalive message could not successfully be sent, we don't -+#. bother, because the client will soon retry. -+#: ../python/pakfire/client/base.py:213 -+msgid "Could not send a keepalive message to the hub." -+msgstr "" -+ -+#. Don't give a shit either. -+#: ../python/pakfire/client/base.py:247 -+msgid "Could not update the host information." -+msgstr "" -+ -+#: ../python/pakfire/client/builder.py:179 - msgid "Less than 2GB of free space. Cannot request a new job." - msgstr "" - - #. Log all XMLRPC protocol errors. --#: ../python/pakfire/client/transport.py:78 -+#: ../python/pakfire/client/transport.py:90 - msgid "XMLRPC protocol error:" - msgstr "" - --#: ../python/pakfire/client/transport.py:79 -+#: ../python/pakfire/client/transport.py:91 - #, python-format - msgid "URL: %s" - msgstr "" - --#: ../python/pakfire/client/transport.py:80 -+#: ../python/pakfire/client/transport.py:92 - msgid " HTTP headers:" - msgstr "" - --#: ../python/pakfire/client/transport.py:83 -+#: ../python/pakfire/client/transport.py:95 - #, python-format - msgid "Error code: %s" - msgstr "" - --#: ../python/pakfire/client/transport.py:84 -+#: ../python/pakfire/client/transport.py:96 - #, python-format - msgid "Error message: %s" - msgstr "" - --#: ../python/pakfire/client/transport.py:104 -+#: ../python/pakfire/client/transport.py:116 - #, python-format - msgid "Trying again in %(timeout)s second(s). %(tries)s tries left." - msgstr "" - --#: ../python/pakfire/client/transport.py:109 -+#: ../python/pakfire/client/transport.py:121 - msgid "Maximum number of tries was reached. Giving up." - msgstr "" - -@@ -981,7 +992,7 @@ msgstr "" - msgid "Running pakfire-build in a pakfire container?" - msgstr "" - --#: ../python/pakfire/errors.py:94 ../python/pakfire/transaction.py:468 -+#: ../python/pakfire/errors.py:94 ../python/pakfire/transaction.py:475 - msgid "Transaction test was not successful" - msgstr "" - -@@ -996,10 +1007,14 @@ msgid "" - msgstr "" - - #: ../python/pakfire/errors.py:106 --msgid "Could not find the requested URL." -+msgid "A request could not be fulfilled by the server." - msgstr "" - - #: ../python/pakfire/errors.py:110 -+msgid "Could not find the requested URL." -+msgstr "" -+ -+#: ../python/pakfire/errors.py:114 - msgid "An unforseable problem on the XML-RPC transport connection occured." - msgstr "" - -@@ -1070,7 +1085,7 @@ msgstr "" - msgid "Name" - msgstr "" - --#: ../python/pakfire/packages/base.py:110 ../python/pakfire/transaction.py:397 -+#: ../python/pakfire/packages/base.py:110 ../python/pakfire/transaction.py:404 - msgid "Version" - msgstr "" - -@@ -1078,7 +1093,7 @@ msgstr "" - msgid "Release" - msgstr "" - --#: ../python/pakfire/packages/base.py:115 ../python/pakfire/transaction.py:398 -+#: ../python/pakfire/packages/base.py:115 ../python/pakfire/transaction.py:405 - msgid "Size" - msgstr "" - -@@ -1356,93 +1371,93 @@ msgid "" - "perform transaction." - msgstr "" - --#: ../python/pakfire/transaction.py:330 -+#: ../python/pakfire/transaction.py:327 - #, python-format - msgid "Not enough space to download %s of packages." - msgstr "" - --#: ../python/pakfire/transaction.py:333 -+#: ../python/pakfire/transaction.py:330 - msgid "Downloading packages:" - msgstr "" - --#: ../python/pakfire/transaction.py:397 -+#: ../python/pakfire/transaction.py:404 - msgid "Package" - msgstr "" - --#: ../python/pakfire/transaction.py:402 -+#: ../python/pakfire/transaction.py:409 - msgid "Installing:" - msgstr "" - --#: ../python/pakfire/transaction.py:403 -+#: ../python/pakfire/transaction.py:410 - msgid "Reinstalling:" - msgstr "" - --#: ../python/pakfire/transaction.py:404 -+#: ../python/pakfire/transaction.py:411 - msgid "Updating:" - msgstr "" - --#: ../python/pakfire/transaction.py:405 -+#: ../python/pakfire/transaction.py:412 - msgid "Downgrading:" - msgstr "" - --#: ../python/pakfire/transaction.py:406 -+#: ../python/pakfire/transaction.py:413 - msgid "Removing:" - msgstr "" - --#: ../python/pakfire/transaction.py:412 -+#: ../python/pakfire/transaction.py:419 - msgid "Transaction Summary" - msgstr "" - --#: ../python/pakfire/transaction.py:419 -+#: ../python/pakfire/transaction.py:426 - msgid "package" - msgstr "" - --#: ../python/pakfire/transaction.py:425 -+#: ../python/pakfire/transaction.py:432 - #, python-format - msgid "Total download size: %s" - msgstr "" - --#: ../python/pakfire/transaction.py:429 -+#: ../python/pakfire/transaction.py:436 - #, python-format - msgid "Installed size: %s" - msgstr "" - --#: ../python/pakfire/transaction.py:432 -+#: ../python/pakfire/transaction.py:439 - #, python-format - msgid "Freed size: %s" - msgstr "" - --#: ../python/pakfire/transaction.py:443 -+#: ../python/pakfire/transaction.py:450 - msgid "Is this okay?" - msgstr "" - --#: ../python/pakfire/transaction.py:449 -+#: ../python/pakfire/transaction.py:456 - msgid "Running Transaction Test" - msgstr "" - --#: ../python/pakfire/transaction.py:461 -+#: ../python/pakfire/transaction.py:468 - msgid "Transaction Test Succeeded" - msgstr "" - - #. Make a nice progressbar. --#: ../python/pakfire/transaction.py:494 -+#: ../python/pakfire/transaction.py:501 - msgid "Verifying signatures..." - msgstr "" - --#: ../python/pakfire/transaction.py:526 -+#: ../python/pakfire/transaction.py:533 - #, python-format - msgid "Found %s signature error(s)!" - msgstr "" - --#: ../python/pakfire/transaction.py:531 -+#: ../python/pakfire/transaction.py:538 - msgid "Going on because we are running in permissive mode." - msgstr "" - --#: ../python/pakfire/transaction.py:532 -+#: ../python/pakfire/transaction.py:539 - msgid "This is dangerous!" - msgstr "" - --#: ../python/pakfire/transaction.py:553 -+#: ../python/pakfire/transaction.py:560 - msgid "Running transaction" - msgstr "" - -diff --git a/python/pakfire/client/base.py b/python/pakfire/client/base.py -index 632ec8b..cd661ca 100644 ---- a/python/pakfire/client/base.py -+++ b/python/pakfire/client/base.py -@@ -204,7 +204,15 @@ class PakfireBuilderClient(BuildMixin, PakfireClient): - # Collect the current loadavg and send it to the hub. - loadavg = ", ".join(("%.2f" % round(l, 2) for l in os.getloadavg())) - -- needs_update = self.conn.send_keepalive(loadavg, overload, free_space) -+ try: -+ needs_update = self.conn.send_keepalive(loadavg, overload, free_space) -+ -+ except XMLRPCInternalServerError: -+ # If the keepalive message could not successfully be sent, we don't -+ # bother, because the client will soon retry. -+ log.warning(_("Could not send a keepalive message to the hub.")) -+ -+ return - - if force or needs_update: - log.debug("The hub is requesting an update.") -@@ -215,20 +223,27 @@ class PakfireBuilderClient(BuildMixin, PakfireClient): - - config = pakfire.config.ConfigDaemon() - -- self.conn.send_update( -- # Supported architectures. -- system.supported_arches, -+ try: -+ self.conn.send_update( -+ # Supported architectures. -+ system.supported_arches, -+ -+ # CPU information. -+ system.cpu_model, -+ system.cpu_count, -+ -+ # Amount of memory in bytes. -+ system.memory / 1024, - -- # CPU information. -- system.cpu_model, -- system.cpu_count, -+ # Send the currently running version of Pakfire. -+ PAKFIRE_VERSION, - -- # Amount of memory in bytes. -- system.memory / 1024, -+ # Send the host key. -+ config.get("signatures", "host_key", None), -+ ) - -- # Send the currently running version of Pakfire. -- PAKFIRE_VERSION, -+ except XMLRPCInternalServerError: -+ # Don't give a shit either. -+ log.warning(_("Could not update the host information.")) - -- # Send the host key. -- config.get("signatures", "host_key", None), -- ) -+ return -diff --git a/python/pakfire/client/transport.py b/python/pakfire/client/transport.py -index 4fb8a8f..ac7de8d 100644 ---- a/python/pakfire/client/transport.py -+++ b/python/pakfire/client/transport.py -@@ -72,6 +72,14 @@ class XMLRPCMixin: - # Cannot go on. - raise XMLRPCNotFoundError(e) - -+ elif e.errcode == 500: -+ # This could have various reasons, so we can not -+ # be sure to kill connections here. -+ # But to visualize the issue, we will raise an -+ # exception on the last try. -+ if tries == 1: -+ raise XMLRPCInternalServerError(e) -+ - elif e.errcode == 503: - # Possibly the hub is not running but the SSL proxy - # is. Just try again in a short time. -diff --git a/python/pakfire/errors.py b/python/pakfire/errors.py -index c0f711f..3af257d 100644 ---- a/python/pakfire/errors.py -+++ b/python/pakfire/errors.py -@@ -102,6 +102,10 @@ class XMLRPCForbiddenError(XMLRPCError): - message = _("You are forbidden to perform this action. Maybe you need to check your credentials.") - - -+class XMLRPCInternalServerError(XMLRPCError): -+ message = _("A request could not be fulfilled by the server.") -+ -+ - class XMLRPCNotFoundError(XMLRPCError): - message = _("Could not find the requested URL.") - --- -1.7.10.4 - diff --git a/pakfire/patches/0005-Allow-to-install-multiple-non-default-kernels.patch b/pakfire/patches/0005-Allow-to-install-multiple-non-default-kernels.patch deleted file mode 100644 index 677e179..0000000 --- a/pakfire/patches/0005-Allow-to-install-multiple-non-default-kernels.patch +++ /dev/null @@ -1,32 +0,0 @@ -From acf9ff3a740f37550287b4e263e6d7e76cef3e36 Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Sun, 22 Apr 2012 14:42:37 +0200 -Subject: [PATCH 05/16] Allow to install multiple non-default kernels. - ---- - python/pakfire/constants.py | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/python/pakfire/constants.py b/python/pakfire/constants.py -index 0899dd0..44d1d02 100644 ---- a/python/pakfire/constants.py -+++ b/python/pakfire/constants.py -@@ -184,7 +184,14 @@ end - PACKAGE_INFO_DESCRIPTION_LINE = PACKAGE_INFO_DEPENDENCY_LINE = "\t\t%s" - - # XXX make this configurable in pakfire.conf --PAKFIRE_MULTIINSTALL = ["kernel", "kernel-PAE",] -+PAKFIRE_MULTIINSTALL = [ -+ "kernel", -+ "kernel-kirkwood", -+ "kernel-legacy", -+ "kernel-omap", -+ "kernel-versatile", -+ "kernel-devel", -+] - - SCRIPTLET_INTERPRETER = "/bin/sh" - SCRIPTLET_TIMEOUT = 60 * 15 --- -1.7.10.4 - diff --git a/pakfire/patches/0006-Actually-remove-installed-packages-from-database.patch b/pakfire/patches/0006-Actually-remove-installed-packages-from-database.patch deleted file mode 100644 index d43af1a..0000000 --- a/pakfire/patches/0006-Actually-remove-installed-packages-from-database.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e13f4e02e11afa45d8bcb6ceb46bd50c3b6c9aae Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Sun, 22 Apr 2012 14:44:51 +0200 -Subject: [PATCH 06/16] Actually remove installed packages from database. - -When removing packages, the metadata was not removed from -the local package database. ---- - python/pakfire/repository/system.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/python/pakfire/repository/system.py b/python/pakfire/repository/system.py -index 5dcdd04..ce3e979 100644 ---- a/python/pakfire/repository/system.py -+++ b/python/pakfire/repository/system.py -@@ -62,6 +62,7 @@ class RepositorySystem(base.RepositoryFactory): - - def rem_package(self, pkg): - # Remove package from the database. -+ self.db.rem_package(pkg) - self.index.rem_package(pkg) - - @property --- -1.7.10.4 - diff --git a/pakfire/patches/0007-Select-packages-from-the-database-by-their-UUIDs.patch b/pakfire/patches/0007-Select-packages-from-the-database-by-their-UUIDs.patch deleted file mode 100644 index 0ef6a9f..0000000 --- a/pakfire/patches/0007-Select-packages-from-the-database-by-their-UUIDs.patch +++ /dev/null @@ -1,29 +0,0 @@ -From b8f51d988734a75e8e41496a5d272057d18ecfda Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Sun, 22 Apr 2012 14:47:43 +0200 -Subject: [PATCH 07/16] Select packages from the database by their UUIDs. - ---- - python/pakfire/repository/database.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/python/pakfire/repository/database.py b/python/pakfire/repository/database.py -index 11321ae..6f8f397 100644 ---- a/python/pakfire/repository/database.py -+++ b/python/pakfire/repository/database.py -@@ -334,9 +334,9 @@ class DatabaseLocal(Database): - - # Get the ID of the package in the database. - c = self.cursor() -- #c.execute("SELECT id FROM packages WHERE uuid = ? LIMIT 1", (pkg.uuid,)) -- c.execute("SELECT id FROM packages WHERE name = ? AND epoch = ? AND version = ?" -- " AND release = ? LIMIT 1", (pkg.name, pkg.epoch, pkg.version, pkg.release,)) -+ c.execute("SELECT id FROM packages WHERE uuid = ? LIMIT 1", (pkg.uuid,)) -+ #c.execute("SELECT id FROM packages WHERE name = ? AND epoch = ? AND version = ?" -+ # " AND release = ? LIMIT 1", (pkg.name, pkg.epoch, pkg.version, pkg.release,)) - - id = None - for row in c: --- -1.7.10.4 - diff --git a/pakfire/patches/0008-Fixes-for-removing-files-and-configfiles.patch b/pakfire/patches/0008-Fixes-for-removing-files-and-configfiles.patch deleted file mode 100644 index 15332d9..0000000 --- a/pakfire/patches/0008-Fixes-for-removing-files-and-configfiles.patch +++ /dev/null @@ -1,51 +0,0 @@ -From d38612fe50395a35d6fdc0774d56c7c2ddc58cf7 Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Sun, 22 Apr 2012 14:48:10 +0200 -Subject: [PATCH 08/16] Fixes for removing files (and configfiles). - -There were some problems when the user removed those -files earlier. ---- - python/pakfire/packages/base.py | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/python/pakfire/packages/base.py b/python/pakfire/packages/base.py -index e27c3f7..9162536 100644 ---- a/python/pakfire/packages/base.py -+++ b/python/pakfire/packages/base.py -@@ -516,6 +516,12 @@ class Package(object): - - # Rename configuration files. - if _file.is_config(): -+ # Skip already removed config files. -+ try: -+ os.lstat(file) -+ except OSError: -+ continue -+ - file_save = "%s%s" % (file, CONFIG_FILE_SUFFIX_SAVE) - - try: -@@ -530,6 +536,7 @@ class Package(object): - - # Handle regular files and symlinks. - if os.path.isfile(file) or os.path.islink(file): -+ log.debug("Removing %s..." % _file) - try: - os.remove(file) - except OSError: -@@ -545,6 +552,11 @@ class Package(object): - except OSError: - pass - -+ # Handle files that have already been removed -+ # by somebody else. -+ elif not os.path.exists(file): -+ pass -+ - # Log all unhandled types. - else: - log.warning("Cannot remove file: %s. Filetype is unhandled." % file) --- -1.7.10.4 - diff --git a/pakfire/patches/0009-Fix-two-coding-errors.patch b/pakfire/patches/0009-Fix-two-coding-errors.patch deleted file mode 100644 index ff292c0..0000000 --- a/pakfire/patches/0009-Fix-two-coding-errors.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 949ba4bfa1055343b39d988c7b26c1f73ce28ac2 Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Mon, 30 Apr 2012 23:41:22 +0200 -Subject: [PATCH 09/16] Fix two coding errors. - ---- - python/pakfire/chroot.py | 2 ++ - python/pakfire/repository/remote.py | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/python/pakfire/chroot.py b/python/pakfire/chroot.py -index 521759b..9862dc7 100644 ---- a/python/pakfire/chroot.py -+++ b/python/pakfire/chroot.py -@@ -92,6 +92,8 @@ def do(command, shell=False, chrootPath=None, cwd=None, timeout=0, raiseExc=True - if logger: - logger.debug("Executing command: %s in %s" % (command, chrootPath or "/")) - -+ child = None -+ - try: - # Create new child process - child = subprocess.Popen( -diff --git a/python/pakfire/repository/remote.py b/python/pakfire/repository/remote.py -index dade232..6d2cdc7 100644 ---- a/python/pakfire/repository/remote.py -+++ b/python/pakfire/repository/remote.py -@@ -112,7 +112,7 @@ class RepositoryRemote(base.RepositoryFactory): - ) - - def clean(self): -- RepositoryFactory.clean(self) -+ base.RepositoryFactory.clean(self) - - # Remove all files in the files cache. - self.cache.destroy() --- -1.7.10.4 - diff --git a/pakfire/patches/0010-Remove-testingbay-repository-from-example-configurat.patch b/pakfire/patches/0010-Remove-testingbay-repository-from-example-configurat.patch deleted file mode 100644 index 2ddb05c..0000000 --- a/pakfire/patches/0010-Remove-testingbay-repository-from-example-configurat.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 2b40137a3bfb1b8a31d5acbba32bd5e285599ba3 Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Tue, 1 May 2012 14:30:30 +0200 -Subject: [PATCH 10/16] Remove testingbay repository from example - configuration. - ---- - Makefile | 4 ++-- - examples/distros/ipfire3.conf | 8 +------- - examples/repos/ipfire.repo | 22 ---------------------- - 3 files changed, 3 insertions(+), 31 deletions(-) - delete mode 100644 examples/repos/ipfire.repo - -diff --git a/Makefile b/Makefile -index 492d068..0361af6 100644 ---- a/Makefile -+++ b/Makefile -@@ -32,8 +32,8 @@ install: build - cp -vf macros/*.macro $(DESTDIR)$(PREFIX)/lib/pakfire/macros - - # Install example configuration. -- -mkdir -pv $(DESTDIR)/etc/pakfire -- for file in general.conf builder.conf client.conf daemon.conf distros repos; do \ -+ -mkdir -pv $(DESTDIR)/etc/pakfire/repos -+ for file in general.conf builder.conf client.conf daemon.conf distros; do \ - [ -e "$(DESTDIR)/etc/pakfire/$${file}" ] && continue; \ - cp -rvf examples/$${file} $(DESTDIR)/etc/pakfire/; \ - done -diff --git a/examples/distros/ipfire3.conf b/examples/distros/ipfire3.conf -index aed95ce..9d15bf0 100644 ---- a/examples/distros/ipfire3.conf -+++ b/examples/distros/ipfire3.conf -@@ -1,5 +1,5 @@ - --# Configuration of IPFire 3- -+# Configuration of IPFire 3. - - [distro] - name = IPFire -@@ -28,9 +28,3 @@ description = IPFire 3 - This is a repository for testing stuff. - enabled = 0 - baseurl = http://pakfire.ipfire.org/repositories/ipfire3/testing/%%7Barch%7D - mirrors = https://pakfire.ipfire.org/distro/ipfire3/repo/testing/mirrorlist?arch=%%7Ba... -- --[repo:testingbay] --description = IPFire 3 - Temporary bootstrap repository. --enabled = 1 --baseurl = http://people.ipfire.org/~ms/testingbay-%%7Barch%7D --mirrors = http://people.ipfire.org/~ms/testingbay-%%7Barch%7D/mirrors -diff --git a/examples/repos/ipfire.repo b/examples/repos/ipfire.repo -deleted file mode 100644 -index 8c9f50a..0000000 ---- a/examples/repos/ipfire.repo -+++ /dev/null -@@ -1,22 +0,0 @@ --;[repo:ipfire] --;description = IPFire Main Repository --; --;url = http://mirror0.ipfire.org/pakfire3/$name/$arch --; --;gpgkey = /not/yet/existant -- --;[repo:ipfire-development] --;description = IPFire Development Repository -- --#url = http://mirror0.ipfire.org/pakfire3/$name/$arch --#url = file:///ipfire-3.x/build/packages/i686 --;url = file:///tmp/pakfire3 -- --;gpgkey = /not/yet/existant -- --[repo:testingbay] --description = IPFire Testing Repository for %{arch} --enabled = 1 -- --mirrors = http://people.ipfire.org/~ms/testingbay-%%7Barch%7D/mirrors --baseurl = http://people.ipfire.org/~ms/testingbay-%%7Barch%7D --- -1.7.10.4 - diff --git a/pakfire/patches/0011-Move-C-module-to-newer-version-of-libsolv.patch b/pakfire/patches/0011-Move-C-module-to-newer-version-of-libsolv.patch deleted file mode 100644 index f7dcdd2..0000000 --- a/pakfire/patches/0011-Move-C-module-to-newer-version-of-libsolv.patch +++ /dev/null @@ -1,1787 +0,0 @@ -From 9b68f47c96625fdafc9b3810de08563abe8e78be Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Wed, 16 May 2012 12:43:25 +0000 -Subject: [PATCH 11/16] Move C module to newer version of libsolv. - -Many more improvements which should make the -transaction check much faster. ---- - po/pakfire.pot | 155 +++++++++++++++++---------------- - python/pakfire/actions.py | 10 +-- - python/pakfire/base.py | 36 +++++--- - python/pakfire/builder.py | 3 +- - python/pakfire/filelist.py | 13 +-- - python/pakfire/packages/installed.py | 18 ++-- - python/pakfire/repository/database.py | 46 +++++----- - python/pakfire/repository/index.py | 9 +- - python/pakfire/repository/system.py | 50 +++++++++-- - python/pakfire/satsolver.py | 65 ++++---------- - python/pakfire/transaction.py | 49 +++++------ - python/src/_pakfiremodule.c | 18 +++- - python/src/repo.c | 31 ++++--- - python/src/repo.h | 1 + - python/src/request.c | 64 +++++++------- - python/src/request.h | 4 + - python/src/solution.c | 8 +- - python/src/solver.c | 88 +++++++++++-------- - python/src/solver.h | 5 +- - 19 files changed, 368 insertions(+), 305 deletions(-) - -diff --git a/po/pakfire.pot b/po/pakfire.pot -index 4fd12e7..db3a88f 100644 ---- a/po/pakfire.pot -+++ b/po/pakfire.pot -@@ -8,7 +8,7 @@ msgid "" - msgstr "" - "Project-Id-Version: PACKAGE VERSION\n" - "Report-Msgid-Bugs-To: \n" --"POT-Creation-Date: 2012-04-19 16:57+0200\n" -+"POT-Creation-Date: 2012-05-16 12:33+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" -@@ -73,13 +73,13 @@ msgid "Exception occured: %s" - msgstr "" - - #: ../python/pakfire/actions.py:364 ../python/pakfire/actions.py:402 --#: ../python/pakfire/actions.py:425 ../python/pakfire/actions.py:448 --#: ../python/pakfire/actions.py:465 ../python/pakfire/actions.py:484 -+#: ../python/pakfire/actions.py:424 ../python/pakfire/actions.py:446 -+#: ../python/pakfire/actions.py:463 ../python/pakfire/actions.py:482 - #, python-format - msgid "Running transaction test for %s" - msgstr "" - --#: ../python/pakfire/actions.py:373 ../python/pakfire/actions.py:477 -+#: ../python/pakfire/actions.py:373 - msgid "Installing" - msgstr "" - -@@ -87,63 +87,67 @@ msgstr "" - msgid "Updating" - msgstr "" - --#: ../python/pakfire/actions.py:431 -+#: ../python/pakfire/actions.py:430 - msgid "Removing" - msgstr "" - - #. Cleaning up leftover files and stuff. --#: ../python/pakfire/actions.py:455 -+#: ../python/pakfire/actions.py:453 - msgid "Cleanup" - msgstr "" - --#: ../python/pakfire/actions.py:493 -+#: ../python/pakfire/actions.py:475 -+msgid "Reinstalling" -+msgstr "" -+ -+#: ../python/pakfire/actions.py:491 - msgid "Downgrading" - msgstr "" - --#: ../python/pakfire/base.py:315 -+#: ../python/pakfire/base.py:320 - msgid "Local install repository" - msgstr "" - --#: ../python/pakfire/base.py:372 -+#: ../python/pakfire/base.py:377 - #, python-format - msgid "Could not find any installed package providing "%s"." - msgstr "" - --#: ../python/pakfire/base.py:378 -+#: ../python/pakfire/base.py:383 - #, python-format - msgid "Multiple reinstall candidates for "%(pattern)s": %(pkgs)s" - msgstr "" - --#: ../python/pakfire/base.py:382 ../python/pakfire/base.py:450 --#: ../python/pakfire/base.py:487 ../python/pakfire/base.py:546 --#: ../python/pakfire/base.py:567 ../python/pakfire/transaction.py:396 -+#: ../python/pakfire/base.py:387 ../python/pakfire/base.py:455 -+#: ../python/pakfire/base.py:491 ../python/pakfire/base.py:553 -+#: ../python/pakfire/base.py:574 ../python/pakfire/transaction.py:390 - msgid "Nothing to do" - msgstr "" - --#: ../python/pakfire/base.py:407 -+#: ../python/pakfire/base.py:412 - #, python-format - msgid "Could not find package %s in a remote repository." - msgstr "" - --#: ../python/pakfire/base.py:479 -+#: ../python/pakfire/base.py:483 - #, python-format - msgid "Excluding %s." - msgstr "" - --#: ../python/pakfire/base.py:531 -+#: ../python/pakfire/base.py:535 - #, python-format - msgid ""%s" package does not seem to be installed." - msgstr "" - --#: ../python/pakfire/base.py:681 -+#: ../python/pakfire/base.py:688 - msgid "Build command has failed." - msgstr "" - --#: ../python/pakfire/base.py:716 -+#: ../python/pakfire/base.py:723 - msgid "New repository" - msgstr "" - --#: ../python/pakfire/base.py:752 -+#: ../python/pakfire/base.py:764 - msgid "Everything is fine." - msgstr "" - -@@ -199,72 +203,72 @@ msgstr "" - msgid "Running installation test..." - msgstr "" - --#: ../python/pakfire/builder.py:766 -+#: ../python/pakfire/builder.py:767 - msgid "Installation test succeeded." - msgstr "" - - #. Create a progressbar. --#: ../python/pakfire/builder.py:803 -+#: ../python/pakfire/builder.py:804 - msgid "Signing packages..." - msgstr "" - --#: ../python/pakfire/builder.py:837 -+#: ../python/pakfire/builder.py:838 - msgid "Dumping package information:" - msgstr "" - - #. Walk through the whole tree and collect all files - #. that are on the same disk (not crossing mountpoints). --#: ../python/pakfire/builder.py:867 -+#: ../python/pakfire/builder.py:868 - msgid "Creating filelist..." - msgstr "" - - #. Create a nice progressbar. --#: ../python/pakfire/builder.py:886 -+#: ../python/pakfire/builder.py:887 - msgid "Compressing files..." - msgstr "" - --#: ../python/pakfire/builder.py:905 -+#: ../python/pakfire/builder.py:906 - #, python-format - msgid "Cache file was successfully created at %s." - msgstr "" - --#: ../python/pakfire/builder.py:906 -+#: ../python/pakfire/builder.py:907 - #, python-format - msgid " Containing %(files)s files, it has a size of %(size)s." - msgstr "" - - #. Make a nice progress bar as always. --#: ../python/pakfire/builder.py:917 -+#: ../python/pakfire/builder.py:918 - msgid "Extracting files..." - msgstr "" - - #. Update all packages. --#: ../python/pakfire/builder.py:937 -+#: ../python/pakfire/builder.py:938 - msgid "Updating packages from cache..." - msgstr "" - - #. Package the result. - #. Make all these little package from the build environment. --#: ../python/pakfire/builder.py:1075 -+#: ../python/pakfire/builder.py:1076 - msgid "Creating packages:" - msgstr "" - - #. Execute the buildscript of this stage. --#: ../python/pakfire/builder.py:1089 -+#: ../python/pakfire/builder.py:1090 - #, python-format - msgid "Running stage %s:" - msgstr "" - --#: ../python/pakfire/builder.py:1107 -+#: ../python/pakfire/builder.py:1108 - #, python-format - msgid "Could not remove static libraries: %s" - msgstr "" - --#: ../python/pakfire/builder.py:1113 -+#: ../python/pakfire/builder.py:1114 - msgid "Compressing man pages did not complete successfully." - msgstr "" - --#: ../python/pakfire/builder.py:1133 -+#: ../python/pakfire/builder.py:1134 - msgid "Extracting debuginfo did not complete with success. Aborting build." - msgstr "" - -@@ -416,7 +420,7 @@ msgstr "" - msgid "Give name of at least one package to check." - msgstr "" - --#: ../python/pakfire/cli.py:348 ../python/pakfire/transaction.py:405 -+#: ../python/pakfire/cli.py:348 ../python/pakfire/transaction.py:399 - msgid "Repository" - msgstr "" - -@@ -740,7 +744,7 @@ msgid "Job: %(name)s" - msgstr "" - - #: ../python/pakfire/cli.py:1078 ../python/pakfire/packages/base.py:107 --#: ../python/pakfire/transaction.py:404 -+#: ../python/pakfire/transaction.py:398 - msgid "Arch" - msgstr "" - -@@ -992,7 +996,7 @@ msgstr "" - msgid "Running pakfire-build in a pakfire container?" - msgstr "" - --#: ../python/pakfire/errors.py:94 ../python/pakfire/transaction.py:475 -+#: ../python/pakfire/errors.py:94 ../python/pakfire/transaction.py:469 - msgid "Transaction test was not successful" - msgstr "" - -@@ -1085,7 +1089,7 @@ msgstr "" - msgid "Name" - msgstr "" - --#: ../python/pakfire/packages/base.py:110 ../python/pakfire/transaction.py:404 -+#: ../python/pakfire/packages/base.py:110 ../python/pakfire/transaction.py:398 - msgid "Version" - msgstr "" - -@@ -1093,7 +1097,7 @@ msgstr "" - msgid "Release" - msgstr "" - --#: ../python/pakfire/packages/base.py:115 ../python/pakfire/transaction.py:405 -+#: ../python/pakfire/packages/base.py:115 ../python/pakfire/transaction.py:399 - msgid "Size" - msgstr "" - -@@ -1173,7 +1177,7 @@ msgstr "" - msgid "Not set" - msgstr "" - --#: ../python/pakfire/packages/base.py:528 -+#: ../python/pakfire/packages/base.py:534 - #, python-format - msgid "Config file saved as %s." - msgstr "" -@@ -1243,16 +1247,16 @@ msgstr "" - msgid "Building source package %s:" - msgstr "" - --#: ../python/pakfire/repository/database.py:116 -+#: ../python/pakfire/repository/database.py:123 - msgid "The format of the database is not supported by this version of pakfire." - msgstr "" - --#: ../python/pakfire/repository/database.py:224 -+#: ../python/pakfire/repository/database.py:231 - #, python-format - msgid "Cannot use database with version greater than %s." - msgstr "" - --#: ../python/pakfire/repository/database.py:226 -+#: ../python/pakfire/repository/database.py:233 - #, python-format - msgid "Migrating database from format %(old)s to %(new)s." - msgstr "" -@@ -1320,33 +1324,38 @@ msgstr "" - msgid "Trying an other mirror." - msgstr "" - --#: ../python/pakfire/satsolver.py:230 ../python/pakfire/satsolver.py:256 -+#. Create a progressbar. -+#: ../python/pakfire/repository/system.py:66 -+msgid "Loading installed packages" -+msgstr "" -+ -+#: ../python/pakfire/satsolver.py:199 ../python/pakfire/satsolver.py:225 - msgid "The solver returned one problem:" - msgstr "" - - #. Ask the user if he or she want to modify the request. If not, just exit. --#: ../python/pakfire/satsolver.py:272 -+#: ../python/pakfire/satsolver.py:241 - msgid "Do you want to manually alter the request?" - msgstr "" - --#: ../python/pakfire/satsolver.py:275 -+#: ../python/pakfire/satsolver.py:244 - msgid "You can now try to satisfy the solver by modifying your request." - msgstr "" - --#: ../python/pakfire/satsolver.py:280 -+#: ../python/pakfire/satsolver.py:249 - msgid "Which problem to you want to resolve?" - msgstr "" - --#: ../python/pakfire/satsolver.py:282 -+#: ../python/pakfire/satsolver.py:251 - msgid "Press enter to try to re-solve the request." - msgstr "" - --#: ../python/pakfire/satsolver.py:313 -+#: ../python/pakfire/satsolver.py:282 - #, python-format - msgid " Solution: %s" - msgstr "" - --#: ../python/pakfire/satsolver.py:322 -+#: ../python/pakfire/satsolver.py:291 - msgid " Solutions:" - msgstr "" - -@@ -1354,110 +1363,110 @@ msgstr "" - msgid "Could not be determined" - msgstr "" - --#: ../python/pakfire/transaction.py:95 -+#: ../python/pakfire/transaction.py:94 - #, python-format - msgid "file %(name)s from %(pkg1)s conflicts with file from package %(pkg2)s" - msgstr "" - --#: ../python/pakfire/transaction.py:101 -+#: ../python/pakfire/transaction.py:100 - #, python-format - msgid "file %(name)s from %(pkg)s conflicts with files from %(pkgs)s" - msgstr "" - --#: ../python/pakfire/transaction.py:109 -+#: ../python/pakfire/transaction.py:108 - #, python-format - msgid "" - "There is not enough space left on %(name)s. Need at least %(size)s to " - "perform transaction." - msgstr "" - --#: ../python/pakfire/transaction.py:327 -+#: ../python/pakfire/transaction.py:321 - #, python-format - msgid "Not enough space to download %s of packages." - msgstr "" - --#: ../python/pakfire/transaction.py:330 -+#: ../python/pakfire/transaction.py:324 - msgid "Downloading packages:" - msgstr "" - --#: ../python/pakfire/transaction.py:404 -+#: ../python/pakfire/transaction.py:398 - msgid "Package" - msgstr "" - --#: ../python/pakfire/transaction.py:409 -+#: ../python/pakfire/transaction.py:403 - msgid "Installing:" - msgstr "" - --#: ../python/pakfire/transaction.py:410 -+#: ../python/pakfire/transaction.py:404 - msgid "Reinstalling:" - msgstr "" - --#: ../python/pakfire/transaction.py:411 -+#: ../python/pakfire/transaction.py:405 - msgid "Updating:" - msgstr "" - --#: ../python/pakfire/transaction.py:412 -+#: ../python/pakfire/transaction.py:406 - msgid "Downgrading:" - msgstr "" - --#: ../python/pakfire/transaction.py:413 -+#: ../python/pakfire/transaction.py:407 - msgid "Removing:" - msgstr "" - --#: ../python/pakfire/transaction.py:419 -+#: ../python/pakfire/transaction.py:413 - msgid "Transaction Summary" - msgstr "" - --#: ../python/pakfire/transaction.py:426 -+#: ../python/pakfire/transaction.py:420 - msgid "package" - msgstr "" - --#: ../python/pakfire/transaction.py:432 -+#: ../python/pakfire/transaction.py:426 - #, python-format - msgid "Total download size: %s" - msgstr "" - --#: ../python/pakfire/transaction.py:436 -+#: ../python/pakfire/transaction.py:430 - #, python-format - msgid "Installed size: %s" - msgstr "" - --#: ../python/pakfire/transaction.py:439 -+#: ../python/pakfire/transaction.py:433 - #, python-format - msgid "Freed size: %s" - msgstr "" - --#: ../python/pakfire/transaction.py:450 -+#: ../python/pakfire/transaction.py:444 - msgid "Is this okay?" - msgstr "" - --#: ../python/pakfire/transaction.py:456 -+#: ../python/pakfire/transaction.py:450 - msgid "Running Transaction Test" - msgstr "" - --#: ../python/pakfire/transaction.py:468 -+#: ../python/pakfire/transaction.py:462 - msgid "Transaction Test Succeeded" - msgstr "" - - #. Make a nice progressbar. --#: ../python/pakfire/transaction.py:501 -+#: ../python/pakfire/transaction.py:495 - msgid "Verifying signatures..." - msgstr "" - --#: ../python/pakfire/transaction.py:533 -+#: ../python/pakfire/transaction.py:527 - #, python-format - msgid "Found %s signature error(s)!" - msgstr "" - --#: ../python/pakfire/transaction.py:538 -+#: ../python/pakfire/transaction.py:532 - msgid "Going on because we are running in permissive mode." - msgstr "" - --#: ../python/pakfire/transaction.py:539 -+#: ../python/pakfire/transaction.py:533 - msgid "This is dangerous!" - msgstr "" - --#: ../python/pakfire/transaction.py:560 -+#: ../python/pakfire/transaction.py:554 - msgid "Running transaction" - msgstr "" - -diff --git a/python/pakfire/actions.py b/python/pakfire/actions.py -index cdc2778..9fda261 100644 ---- a/python/pakfire/actions.py -+++ b/python/pakfire/actions.py -@@ -417,7 +417,6 @@ class ActionRemove(Action): - def __init__(self, *args, **kwargs): - Action.__init__(self, *args, **kwargs) - -- # XXX This is ugly, but works for the moment. - self.pkg = self.local.db.get_package_from_solv(self.pkg_solv) - assert self.pkg - -@@ -431,7 +430,7 @@ class ActionRemove(Action): - self.pkg.cleanup(_("Removing"), prefix=self.pakfire.path) - - # Remove package from the database. -- self.local.rem_package(self.pkg) -+ self.local.rem_package(self.pkg_solv) - - - class ActionCleanup(Action): -@@ -440,7 +439,6 @@ class ActionCleanup(Action): - def __init__(self, *args, **kwargs): - Action.__init__(self, *args, **kwargs) - -- # XXX This is ugly, but works for the moment. - self.pkg = self.local.db.get_package_from_solv(self.pkg_solv) - assert self.pkg - -@@ -455,7 +453,7 @@ class ActionCleanup(Action): - self.pkg.cleanup(_("Cleanup"), prefix=self.pakfire.path) - - # Remove package from the database. -- self.local.rem_package(self.pkg) -+ self.local.rem_package(self.pkg_solv) - - - class ActionReinstall(Action): -@@ -471,10 +469,10 @@ class ActionReinstall(Action): - def run(self): - # Remove package from the database and add it afterwards. - # Sounds weird, but fixes broken entries in the database. -- self.local.rem_package(self.pkg) -+ self.local.rem_package(self.pkg_solv) - self.local.add_package(self.pkg) - -- self.pkg.extract(_("Installing"), prefix=self.pakfire.path) -+ self.pkg.extract(_("Reinstalling"), prefix=self.pakfire.path) - - - class ActionDowngrade(Action): -diff --git a/python/pakfire/base.py b/python/pakfire/base.py -index 6e2e52e..54485a5 100644 ---- a/python/pakfire/base.py -+++ b/python/pakfire/base.py -@@ -132,7 +132,7 @@ class Pakfire(object): - - return ret - -- def create_request(self, builder=False, install=None, remove=None, update=None): -+ def create_request(self, builder=False, install=None, remove=None, update=None, updateall=False): - request = satsolver.Request(self.pool) - - # Add multiinstall information. -@@ -151,6 +151,11 @@ class Pakfire(object): - for req in self.expand_requires(update): - request.update(req) - -+ # Configure the request to update all packages -+ # if requested. -+ if updateall: -+ request.updateall() -+ - # Return the request. - return request - -@@ -467,12 +472,11 @@ class Pakfire(object): - - # If there are given any packets on the command line, we will - # only update them. Otherwise, we update the whole system. -+ updateall = True - if pkgs: -- update = False -- else: -- update = True -+ updateall = False - -- request = self.create_request(update=pkgs) -+ request = self.create_request(update=pkgs, updateall=updateall) - - # Exclude packages that should not be updated. - for exclude in excludes or []: -@@ -481,7 +485,7 @@ class Pakfire(object): - exclude = self.create_relation(exclude) - request.lock(exclude) - -- solver = self.solv(request, logger=logger, update=update, **kwargs) -+ solver = self.solv(request, logger=logger, **kwargs) - - if not solver.status: - logger.info(_("Nothing to do")) -@@ -534,8 +538,11 @@ class Pakfire(object): - request.install(rel) - - # Solve the request. -- solver = self.solv(request, allow_downgrade=True, allow_vendorchange=allow_vendorchange, -- allow_archchange=allow_archchange) -+ solver = self.solv(request, -+ allow_downgrade=True, -+ allow_vendorchange=allow_vendorchange, -+ allow_archchange=allow_archchange, -+ ) - assert solver.status is True - - # Create the transaction. -@@ -556,7 +563,7 @@ class Pakfire(object): - request = self.create_request(remove=pkgs) - - # Solve the request. -- solver = self.solv(request, uninstall=True) -+ solver = self.solv(request, allow_uninstall=True) - assert solver.status is True - - # Create the transaction. -@@ -737,7 +744,7 @@ class Pakfire(object): - # Clean up repository caches. - self.repos.clean() - -- def check(self, downgrade=True, uninstall=True): -+ def check(self, allow_downgrade=True, allow_uninstall=True): - """ - Try to fix any errors in the system. - """ -@@ -745,8 +752,13 @@ class Pakfire(object): - # For that we create an empty request and solver and try to solve - # something. - request = self.create_request() -- solver = self.solv(request, fix_system=True, allow_downgrade=downgrade, -- uninstall=uninstall) -+ request.verify() -+ -+ solver = self.solv( -+ request, -+ allow_downgrade=allow_downgrade, -+ allow_uninstall=allow_uninstall, -+ ) - - if solver.status is False: - log.info(_("Everything is fine.")) -diff --git a/python/pakfire/builder.py b/python/pakfire/builder.py -index 494049e..863ade3 100644 ---- a/python/pakfire/builder.py -+++ b/python/pakfire/builder.py -@@ -761,7 +761,8 @@ class BuildEnviron(object): - - # Install all packages that were built. - self.install(self.find_result_packages(), -- uninstall=True, signatures_mode="disabled") -+ allow_vendorchange=True, allow_archchange=True, -+ allow_uninstall=True, signatures_mode="disabled") - - self.log.info(_("Installation test succeeded.")) - self.log.info("") -diff --git a/python/pakfire/filelist.py b/python/pakfire/filelist.py -index ef7ee35..4bac6ef 100644 ---- a/python/pakfire/filelist.py -+++ b/python/pakfire/filelist.py -@@ -74,13 +74,12 @@ class File(_File): - - - class FileDatabase(_File): -- def __init__(self, pakfire, db, row_id): -+ def __init__(self, pakfire, db, row_id, row=None): - _File.__init__(self, pakfire) - - self.db = db - self.row_id = row_id -- -- self.__row = None -+ self.__row = row - - @property - def row(self): -@@ -91,13 +90,7 @@ class FileDatabase(_File): - c = self.db.cursor() - c.execute("SELECT * FROM files WHERE id = ? LIMIT 1", (self.row_id,)) - -- # Check if we got the same row. -- #assert c.lastrowid == self.row_id -- -- for row in c: -- self.__row = row -- break -- -+ self.__row = c.fetchone() - c.close() - - return self.__row -diff --git a/python/pakfire/packages/installed.py b/python/pakfire/packages/installed.py -index 5a7763b..33c241d 100644 ---- a/python/pakfire/packages/installed.py -+++ b/python/pakfire/packages/installed.py -@@ -39,6 +39,7 @@ class DatabasePackage(Package): - self.db = db - - self._data = {} -+ self._filelist = None - - for key in data.keys(): - self._data[key] = data[key] -@@ -169,20 +170,21 @@ class DatabasePackage(Package): - - @property - def filename(self): -- return self.metadata.get("filename") # XXX basename? -+ return self.metadata.get("filename") - - @property - def filelist(self): -- filelist = [] -+ if self._filelist is None: -+ self._filelist = [] - -- c = self.db.cursor() -- c.execute("SELECT id FROM files WHERE pkg = ?", (self.id,)) -+ c = self.db.cursor() -+ c.execute("SELECT * FROM files WHERE pkg = ?", (self.id,)) - -- for id in c: -- file = pakfire.filelist.FileDatabase(self.pakfire, self.db, id[0]) -- filelist.append(file) -+ for row in c.fetchall(): -+ file = pakfire.filelist.FileDatabase(self.pakfire, self.db, row["id"], row) -+ self._filelist.append(file) - -- return filelist -+ return self._filelist - - @property - def configfiles(self): -diff --git a/python/pakfire/repository/database.py b/python/pakfire/repository/database.py -index 6f8f397..a5e5b85 100644 ---- a/python/pakfire/repository/database.py -+++ b/python/pakfire/repository/database.py -@@ -53,6 +53,13 @@ class Database(object): - self._db.close() - self._db = None - -+ @property -+ def db(self): -+ if self._db is None: -+ self.open() -+ -+ return self._db -+ - def create(self): - pass - -@@ -338,11 +345,11 @@ class DatabaseLocal(Database): - #c.execute("SELECT id FROM packages WHERE name = ? AND epoch = ? AND version = ?" - # " AND release = ? LIMIT 1", (pkg.name, pkg.epoch, pkg.version, pkg.release,)) - -- id = None -- for row in c: -- id = row["id"] -- break -- assert id -+ row = c.fetchone() -+ if not row: -+ return -+ -+ id = row["id"] - - # First, delete all files from the database and then delete the pkg itself. - c.execute("DELETE FROM files WHERE pkg = ?", (id,)) -@@ -364,34 +371,29 @@ class DatabaseLocal(Database): - - @property - def packages(self): -- c = self.cursor() -+ c = self.db.execute("SELECT * FROM packages ORDER BY name") - -- c.execute("SELECT * FROM packages ORDER BY name") -- -- for row in c: -+ for row in c.fetchall(): - yield packages.DatabasePackage(self.pakfire, self.repo, self, row) - - c.close() - - def get_filelist(self): -- c = self.cursor() -- c.execute("SELECT DISTINCT name FROM files") -- -- ret = [] -- for row in c: -- ret.append(row["name"]) -- -- c.close() -+ c = self.db.execute("SELECT name FROM files") - -- return ret -+ return [r["name"] for r in c.fetchall()] - - def get_package_from_solv(self, solv_pkg): -- c = self.cursor() -- c.execute("SELECT * FROM packages WHERE uuid = ? LIMIT 1", (solv_pkg.uuid,)) -+ assert solv_pkg.uuid -+ -+ c = self.db.execute("SELECT * FROM packages WHERE uuid = ? LIMIT 1", (solv_pkg.uuid,)) - - try: -- for row in c: -- return packages.DatabasePackage(self.pakfire, self.repo, self, row) -+ row = c.fetchone() -+ if row is None: -+ return -+ -+ return packages.DatabasePackage(self.pakfire, self.repo, self, row) - - finally: - c.close() -diff --git a/python/pakfire/repository/index.py b/python/pakfire/repository/index.py -index fac1c2f..7620b38 100644 ---- a/python/pakfire/repository/index.py -+++ b/python/pakfire/repository/index.py -@@ -24,6 +24,7 @@ import os - import logging - log = logging.getLogger("pakfire") - -+import pakfire.packages as packages - import pakfire.satsolver as satsolver - - class Index(object): -@@ -147,8 +148,12 @@ class Index(object): - solvable.add_provides(rel) - - def rem_package(self, pkg): -- # XXX delete the solvable from the index. -- pass # TODO -+ """ -+ Delete the solvable from the index. -+ """ -+ assert isinstance(pkg, packages.SolvPackage) -+ -+ self.solver_repo.rem_solv(pkg) - - def clear(self): - """ -diff --git a/python/pakfire/repository/system.py b/python/pakfire/repository/system.py -index ce3e979..386f252 100644 ---- a/python/pakfire/repository/system.py -+++ b/python/pakfire/repository/system.py -@@ -19,9 +19,17 @@ - # # - ############################################################################### - -+import os -+ - import base - import database - -+import pakfire.packages as packages -+import pakfire.util as util -+ -+from pakfire.constants import * -+from pakfire.i18n import _ -+ - class RepositorySystem(base.RepositoryFactory): - def __init__(self, pakfire): - base.RepositoryFactory.__init__(self, pakfire, "@system", "Local repository") -@@ -33,6 +41,10 @@ class RepositorySystem(base.RepositoryFactory): - self.pool.set_installed(self.solver_repo) - - @property -+ def cache_file(self): -+ return os.path.join(self.pakfire.path, PACKAGES_SOLV) -+ -+ @property - def priority(self): - """ - The local repository has always a high priority. -@@ -40,14 +52,35 @@ class RepositorySystem(base.RepositoryFactory): - return 10 - - def update(self, force=False, offline=False): -- if not force: -- force = len(self) == 0 -+ # XXX using the cache is currently disabled -+ #if not force: -+ # if os.path.exists(self.cache_file): -+ # self.index.read(self.cache_file) -+ # -+ # force = len(self) == 0 -+ -+ force = True - - if force: -+ # Create a progressbar. -+ pb = util.make_progress(_("Loading installed packages"), len(self.db)) -+ -+ # Remove all data from the current index. - self.index.clear() -+ -+ i = 0 - for pkg in self.db.packages: -+ if pb: -+ i += 1 -+ pb.update(i) -+ - self.index.add_package(pkg) - -+ self.index.optimize() -+ -+ if pb: -+ pb.finish() -+ - def commit(self): - # Commit the database to disk. - self.db.commit() -@@ -55,20 +88,23 @@ class RepositorySystem(base.RepositoryFactory): - # Make sure that all data in the index is accessable. - self.index.optimize() - -+ # Write the content of the index to a file -+ # for fast parsing. -+ # XXX this is currently disabled -+ #self.index.write(self.cache_file) -+ - def add_package(self, pkg): - # Add package to the database. - self.db.add_package(pkg) - self.index.add_package(pkg) - - def rem_package(self, pkg): -+ assert isinstance(pkg, packages.SolvPackage), pkg -+ - # Remove package from the database. - self.db.rem_package(pkg) - self.index.rem_package(pkg) - - @property - def filelist(self): -- # XXX ugly? -- -- for pkg in self.db.packages: -- for file in pkg.filelist: -- yield file -+ return self.db.get_filelist() -diff --git a/python/pakfire/satsolver.py b/python/pakfire/satsolver.py -index c3629ce..48c6d0d 100644 ---- a/python/pakfire/satsolver.py -+++ b/python/pakfire/satsolver.py -@@ -111,6 +111,13 @@ class Request(_pakfire.Request): - - - class Solver(object): -+ option2flag = { -+ "allow_archchange" : SOLVER_FLAG_ALLOW_ARCHCHANGE, -+ "allow_downgrade" : SOLVER_FLAG_ALLOW_DOWNGRADE, -+ "allow_uninstall" : SOLVER_FLAG_ALLOW_UNINSTALL, -+ "allow_vendorchange" : SOLVER_FLAG_ALLOW_VENDORCHANGE, -+ } -+ - def __init__(self, pakfire, request, logger=None): - if logger is None: - logger = logging.getLogger("pakfire") -@@ -119,27 +126,6 @@ class Solver(object): - self.pakfire = pakfire - self.pool = self.pakfire.pool - -- # Default settings. -- self.settings = { -- # Update all installed packages? -- "update" : False, -- -- # Allow to uninstall any packages? -- "uninstall" : False, -- -- # Allow to downgrade any packages? -- "allow_downgrade" : False, -- -- # Allow packages to change their vendors? -- "allow_vendorchange" : False, -- -- # Allow packages to change their arch? -- "allow_archchange" : False, -- -- # Fix system? -- "fix_system" : False, -- } -- - self.request = request - assert self.request, "Empty request?" - -@@ -159,40 +145,23 @@ class Solver(object): - self.__problems = None - self.__transaction = None - -- def set(self, key, value): -- assert self.settings.has_key(key), "Unknown configuration setting: %s" % key -- assert value in (True, False), "Invalid value: %s" % value -- -+ def set(self, option, value): - try: -- self.settings[key] = value -+ flag = self.option2flag[option] - except KeyError: -- pass -+ raise Exception, "Unknown configuration setting: %s" % option -+ self.solver.set_flag(flag, value) - -- def get(self, key): -- assert self.settings.has_key(key), "Unknown configuration setting: %s" % key -- -- return self.settings.get(key) -+ def get(self, option): -+ try: -+ flag = self.option2flag[option] -+ except KeyError: -+ raise Exception, "Unknown configuration setting: %s" % option -+ return self.solver.get_flag(flag) - - def solve(self): - assert self.status is None, "Solver did already solve something." - -- # Apply solver configuration. -- self.solver.set_fix_system(self.get("fix_system")) -- self.solver.set_allow_uninstall(self.get("uninstall")) -- self.solver.set_allow_downgrade(self.get("allow_downgrade")) -- -- # Optionally allow packages to change their vendors. -- # This is not recommended because it may have weird effects. -- self.solver.set_allow_vendorchange(self.get("allow_vendorchange")) -- -- # Optionally allow packages ot change their architecture. -- self.solver.set_allow_archchange(self.get("allow_archchange")) -- -- # Configure the solver for an update. -- if self.get("update"): -- self.solver.set_updatesystem(True) -- self.solver.set_do_split_provides(True) -- - # Actually solve the request. - start_time = time.time() - self.status = self.solver.solve(self.request) -diff --git a/python/pakfire/transaction.py b/python/pakfire/transaction.py -index 58b52c6..10a1277 100644 ---- a/python/pakfire/transaction.py -+++ b/python/pakfire/transaction.py -@@ -59,15 +59,16 @@ class TransactionCheck(object): - - @property - def error_files(self): -- ret = {} -+ ret = [] - -- for name, files in self.filelist.items(): -- if len(files) <= 1: -- continue -+ for name, count in self.filelist.items(): -+ if count > 1: -+ ret.append(name) - -- ret[name] = files -+ return sorted(ret) - -- return ret -+ def provides_file(self, name): -+ return [] # XXX TODO - - @property - def successful(self): -@@ -85,18 +86,16 @@ class TransactionCheck(object): - if logger is None: - logger = logging.getLogger("pakfire") - -- for name, files in sorted(self.error_files.items()): -- assert len(files) >= 2 -- -- pkgs = [f.pkg.friendly_name for f in files] -+ for file in self.error_files: -+ pkgs = self.provides_file(file) - -- if len(files) == 2: -+ if len(pkgs) == 2: - logger.critical( - _("file %(name)s from %(pkg1)s conflicts with file from package %(pkg2)s") % \ - { "name" : name, "pkg1" : pkgs[0], "pkg2" : pkgs[1] } - ) - -- elif len(files) >= 3: -+ elif len(pkgs) >= 3: - logger.critical( - _("file %(name)s from %(pkg)s conflicts with files from %(pkgs)s") % \ - { "name" : name, "pkg" : pkgs[0], "pkgs" : i18n.list(pkgs[1:])} -@@ -113,7 +112,7 @@ class TransactionCheck(object): - filelist = {} - - for file in self.pakfire.repos.local.filelist: -- filelist[file.name] = [file,] -+ filelist[file] = 1 - - return filelist - -@@ -122,11 +121,10 @@ class TransactionCheck(object): - if file.is_dir(): - continue - -- if self.filelist.has_key(file.name): -- self.filelist[file.name].append(file) -- -- else: -- self.filelist[file.name] = [file,] -+ try: -+ self.filelist[file.name] += 1 -+ except KeyError: -+ self.filelist[file.name] = 1 - - # Add all filesize data to mountpoints. - self.mountpoints.add_pkg(pkg) -@@ -136,14 +134,10 @@ class TransactionCheck(object): - if file.is_dir(): - continue - -- if not self.filelist.has_key(file.name): -- continue -- -- for f in self.filelist[file.name]: -- if not f.pkg == pkg: -- continue -- -- self.filelist[file.name].remove(f) -+ try: -+ self.filelist[file.name] -= 1 -+ except KeyError: -+ pass - - # Remove all filesize data from mountpoints. - self.mountpoints.rem_pkg(pkg) -@@ -562,8 +556,11 @@ class Transaction(object): - for action in self.actions: - try: - action.run() -+ - except ActionError, e: - logger.error("Action finished with an error: %s - %s" % (action, e)) -+ #except Exception, e: -+ # logger.error(_("An unforeseen error occoured: %s") % e) - - logger.info("") - -diff --git a/python/src/_pakfiremodule.c b/python/src/_pakfiremodule.c -index d4ea688..8e80468 100644 ---- a/python/src/_pakfiremodule.c -+++ b/python/src/_pakfiremodule.c -@@ -80,6 +80,9 @@ static PyMethodDef Request_methods[] = { - {"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}, -+ {"updateall", (PyCFunction)Request_updateall, METH_NOARGS, NULL}, -+ {"distupgrade", (PyCFunction)Request_distupgrade, METH_NOARGS, NULL}, -+ {"verify", (PyCFunction)Request_verify, METH_NOARGS, NULL}, - { NULL, NULL, 0, NULL } - }; - -@@ -99,6 +102,7 @@ static PyMethodDef Repo_methods[] = { - {"internalize", (PyCFunction)Repo_internalize, METH_NOARGS, NULL}, - {"clear", (PyCFunction)Repo_clear, METH_NOARGS, NULL}, - {"get_all", (PyCFunction)Repo_get_all, METH_NOARGS, NULL}, -+ {"rem_solv", (PyCFunction)Repo_rem_solv, METH_VARARGS, NULL}, - { NULL, NULL, 0, NULL } - }; - -@@ -152,10 +156,8 @@ static PyMethodDef Solution_methods[] = { - - static PyMethodDef Solver_methods[] = { - {"solve", (PyCFunction)Solver_solve, METH_VARARGS, NULL}, -- {"get_fix_system", (PyCFunction)Solver_get_fix_system, METH_NOARGS, NULL}, -- {"set_fix_system", (PyCFunction)Solver_set_fix_system, METH_VARARGS, NULL}, -- {"get_allow_downgrade", (PyCFunction)Solver_get_allow_downgrade, METH_NOARGS, NULL}, -- {"set_allow_downgrade", (PyCFunction)Solver_set_allow_downgrade, METH_VARARGS, NULL}, -+ {"get_flag", (PyCFunction)Solver_get_flag, METH_VARARGS, NULL}, -+ {"set_flag", (PyCFunction)Solver_set_flag, METH_VARARGS, NULL}, - {"get_allow_archchange", (PyCFunction)Solver_get_allow_archchange, METH_NOARGS, NULL}, - {"set_allow_archchange", (PyCFunction)Solver_set_allow_archchange, METH_VARARGS, NULL}, - {"get_allow_vendorchange", (PyCFunction)Solver_get_allow_vendorchange, METH_NOARGS, NULL}, -@@ -307,4 +309,12 @@ void init_pakfire(void) { - PyDict_SetItemString(d, "SOLVER_RULE_FEATURE", Py_BuildValue("i", SOLVER_RULE_FEATURE)); - PyDict_SetItemString(d, "SOLVER_RULE_LEARNT", Py_BuildValue("i", SOLVER_RULE_LEARNT)); - PyDict_SetItemString(d, "SOLVER_RULE_CHOICE", Py_BuildValue("i", SOLVER_RULE_CHOICE)); -+ -+ /* Solver flags */ -+ PyDict_SetItemString(d, "SOLVER_FLAG_ALLOW_DOWNGRADE", Py_BuildValue("i", SOLVER_FLAG_ALLOW_DOWNGRADE)); -+ PyDict_SetItemString(d, "SOLVER_FLAG_ALLOW_ARCHCHANGE", Py_BuildValue("i", SOLVER_FLAG_ALLOW_ARCHCHANGE)); -+ PyDict_SetItemString(d, "SOLVER_FLAG_ALLOW_VENDORCHANGE", Py_BuildValue("i", SOLVER_FLAG_ALLOW_VENDORCHANGE)); -+ PyDict_SetItemString(d, "SOLVER_FLAG_ALLOW_UNINSTALL", Py_BuildValue("i", SOLVER_FLAG_ALLOW_UNINSTALL)); -+ PyDict_SetItemString(d, "SOLVER_FLAG_NO_UPDATEPROVIDE", Py_BuildValue("i", SOLVER_FLAG_NO_UPDATEPROVIDE)); -+ PyDict_SetItemString(d, "SOLVER_FLAG_SPLITPROVIDES", Py_BuildValue("i", SOLVER_FLAG_SPLITPROVIDES)); - } -diff --git a/python/src/repo.c b/python/src/repo.c -index 6621c3b..4bc112a 100644 ---- a/python/src/repo.c -+++ b/python/src/repo.c -@@ -47,7 +47,6 @@ PyObject* Repo_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - const char *name; - - if (!PyArg_ParseTuple(args, "Os", &pool, &name)) { -- /* XXX raise exception */ - return NULL; - } - -@@ -67,7 +66,6 @@ PyObject* Repo_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - } - - PyObject *Repo_dealloc(RepoObject *self) { -- // repo_free(self->_repo, 0); - self->ob_type->tp_free((PyObject *)self); - - Py_RETURN_NONE; -@@ -97,7 +95,6 @@ PyObject *Repo_set_enabled(RepoObject *self, PyObject *args) { - bool enabled; - - if (!PyArg_ParseTuple(args, "b", &enabled)) { -- /* XXX raise exception */ - return NULL; - } - -@@ -132,13 +129,12 @@ PyObject *Repo_write(RepoObject *self, PyObject *args) { - char exception[STRING_SIZE]; - - if (!PyArg_ParseTuple(args, "s", &filename)) { -- /* XXX raise exception */ -+ return NULL; - } - - // Prepare the pool and internalize all attributes. -- _Pool_prepare(self->_repo->pool); -+ //_Pool_prepare(self->_repo->pool); - -- // XXX catch if file cannot be opened - FILE *fp = NULL; - if ((fp = fopen(filename, "wb")) == NULL) { - snprintf(exception, STRING_SIZE - 1, "Could not open file for writing: %s (%s).", -@@ -147,8 +143,7 @@ PyObject *Repo_write(RepoObject *self, PyObject *args) { - return NULL; - } - -- repo_write(self->_repo, fp, NULL, NULL, 0); -- -+ repo_write(self->_repo, fp); - fclose(fp); - - Py_RETURN_NONE; -@@ -158,14 +153,12 @@ PyObject *Repo_read(RepoObject *self, PyObject *args) { - const char *filename; - - if (!PyArg_ParseTuple(args, "s", &filename)) { -- /* XXX raise exception */ -+ return NULL; - } - - // XXX catch if file cannot be opened - FILE *fp = fopen(filename, "rb"); -- -- repo_add_solv(self->_repo, fp); -- -+ repo_add_solv(self->_repo, fp, 0); - fclose(fp); - - Py_RETURN_NONE; -@@ -209,3 +202,17 @@ PyObject *Repo_get_all(RepoObject *self) { - - return list; - } -+ -+PyObject *Repo_rem_solv(RepoObject *self, PyObject *args) { -+ Repo *repo = self->_repo; -+ SolvableObject *solv; -+ -+ if (!PyArg_ParseTuple(args, "O", &solv)) { -+ return NULL; -+ } -+ -+ Solvable *s = pool_id2solvable(repo->pool, solv->_id); -+ repo_free_solvable(repo, s - repo->pool->solvables, 1); -+ -+ Py_RETURN_NONE; -+} -diff --git a/python/src/repo.h b/python/src/repo.h -index 9de636f..3ef96df 100644 ---- a/python/src/repo.h -+++ b/python/src/repo.h -@@ -44,6 +44,7 @@ extern PyObject *Repo_read(RepoObject *self, PyObject *args); - extern PyObject *Repo_internalize(RepoObject *self); - extern PyObject *Repo_clear(RepoObject *self); - extern PyObject *Repo_get_all(RepoObject *self); -+extern PyObject *Repo_rem_solv(RepoObject *self, PyObject *args); - - extern PyTypeObject RepoType; - -diff --git a/python/src/request.c b/python/src/request.c -index 168b455..7d7c5b2 100644 ---- a/python/src/request.c -+++ b/python/src/request.c -@@ -64,29 +64,25 @@ PyObject *Request_dealloc(RequestObject *self) { - } - - void _Request_solvable(RequestObject *self, Id what, Id solvable) { -- queue_push(&self->_queue, what|SOLVER_SOLVABLE); -- queue_push(&self->_queue, solvable); -+ queue_push2(&self->_queue, what|SOLVER_SOLVABLE, solvable); - } - - void _Request_relation(RequestObject *self, Id what, Id relation) { -- queue_push(&self->_queue, what|SOLVER_SOLVABLE_PROVIDES); -- queue_push(&self->_queue, relation); -+ queue_push2(&self->_queue, what|SOLVER_SOLVABLE_PROVIDES, relation); - } - - void _Request_name(RequestObject *self, Id what, Id provides) { -- queue_push(&self->_queue, what|SOLVER_SOLVABLE_NAME); -- queue_push(&self->_queue, provides); -+ queue_push2(&self->_queue, what|SOLVER_SOLVABLE_NAME, provides); - } - - PyObject *Request_install_solvable(RequestObject *self, PyObject *args) { - SolvableObject *solv; - - if (!PyArg_ParseTuple(args, "O", &solv)) { -- /* XXX raise exception */ -+ return NULL; - } - - _Request_solvable(self, SOLVER_INSTALL, solv->_id); -- - Py_RETURN_NONE; - } - -@@ -94,11 +90,10 @@ PyObject *Request_install_relation(RequestObject *self, PyObject *args) { - RelationObject *rel; - - if (!PyArg_ParseTuple(args, "O", &rel)) { -- /* XXX raise exception */ -+ return NULL; - } - - _Request_relation(self, SOLVER_INSTALL, rel->_id); -- - Py_RETURN_NONE; - } - -@@ -106,7 +101,7 @@ PyObject *Request_install_name(RequestObject *self, PyObject *args) { - const char *name; - - if (!PyArg_ParseTuple(args, "s", &name)) { -- /* XXX raise exception */ -+ return NULL; - } - - Id _name = pool_str2id(self->_pool, name, 1); -@@ -119,11 +114,10 @@ PyObject *Request_remove_solvable(RequestObject *self, PyObject *args) { - SolvableObject *solv; - - if (!PyArg_ParseTuple(args, "O", &solv)) { -- /* XXX raise exception */ -+ return NULL; - } - - _Request_solvable(self, SOLVER_ERASE, solv->_id); -- - Py_RETURN_NONE; - } - -@@ -131,11 +125,10 @@ PyObject *Request_remove_relation(RequestObject *self, PyObject *args) { - RelationObject *rel; - - if (!PyArg_ParseTuple(args, "O", &rel)) { -- /* XXX raise exception */ -+ return NULL; - } - - _Request_relation(self, SOLVER_ERASE, rel->_id); -- - Py_RETURN_NONE; - } - -@@ -143,7 +136,7 @@ PyObject *Request_remove_name(RequestObject *self, PyObject *args) { - const char *name; - - if (!PyArg_ParseTuple(args, "s", &name)) { -- /* XXX raise exception */ -+ return NULL; - } - - Id _name = pool_str2id(self->_pool, name, 1); -@@ -156,11 +149,10 @@ PyObject *Request_update_solvable(RequestObject *self, PyObject *args) { - SolvableObject *solv; - - if (!PyArg_ParseTuple(args, "O", &solv)) { -- /* XXX raise exception */ -+ return NULL; - } - - _Request_solvable(self, SOLVER_UPDATE, solv->_id); -- - Py_RETURN_NONE; - } - -@@ -168,11 +160,10 @@ PyObject *Request_update_relation(RequestObject *self, PyObject *args) { - RelationObject *rel; - - if (!PyArg_ParseTuple(args, "O", &rel)) { -- /* XXX raise exception */ -+ return NULL; - } - - _Request_relation(self, SOLVER_UPDATE, rel->_id); -- - Py_RETURN_NONE; - } - -@@ -180,7 +171,7 @@ PyObject *Request_update_name(RequestObject *self, PyObject *args) { - const char *name; - - if (!PyArg_ParseTuple(args, "s", &name)) { -- /* XXX raise exception */ -+ return NULL; - } - - Id _name = pool_str2id(self->_pool, name, 1); -@@ -193,11 +184,10 @@ PyObject *Request_lock_solvable(RequestObject *self, PyObject *args) { - SolvableObject *solv; - - if (!PyArg_ParseTuple(args, "O", &solv)) { -- /* XXX raise exception */ -+ return NULL; - } - - _Request_solvable(self, SOLVER_LOCK, solv->_id); -- - Py_RETURN_NONE; - } - -@@ -205,11 +195,10 @@ PyObject *Request_lock_relation(RequestObject *self, PyObject *args) { - RelationObject *rel; - - if (!PyArg_ParseTuple(args, "O", &rel)) { -- /* XXX raise exception */ -+ return NULL; - } - - _Request_relation(self, SOLVER_LOCK, rel->_id); -- - Py_RETURN_NONE; - } - -@@ -217,7 +206,7 @@ PyObject *Request_lock_name(RequestObject *self, PyObject *args) { - const char *name; - - if (!PyArg_ParseTuple(args, "s", &name)) { -- /* XXX raise exception */ -+ return NULL; - } - - Id _name = pool_str2id(self->_pool, name, 1); -@@ -230,11 +219,10 @@ PyObject *Request_noobsoletes_solvable(RequestObject *self, PyObject *args) { - SolvableObject *solv; - - if (!PyArg_ParseTuple(args, "O", &solv)) { -- /* XXX raise exception */ -+ return NULL; - } - - _Request_solvable(self, SOLVER_NOOBSOLETES, solv->_id); -- - Py_RETURN_NONE; - } - -@@ -242,11 +230,10 @@ PyObject *Request_noobsoletes_relation(RequestObject *self, PyObject *args) { - RelationObject *rel; - - if (!PyArg_ParseTuple(args, "O", &rel)) { -- /* XXX raise exception */ -+ return NULL; - } - - _Request_relation(self, SOLVER_NOOBSOLETES, rel->_id); -- - Py_RETURN_NONE; - } - -@@ -254,7 +241,7 @@ PyObject *Request_noobsoletes_name(RequestObject *self, PyObject *args) { - const char *name; - - if (!PyArg_ParseTuple(args, "s", &name)) { -- /* XXX raise exception */ -+ return NULL; - } - - Id _name = pool_str2id(self->_pool, name, 1); -@@ -262,3 +249,18 @@ PyObject *Request_noobsoletes_name(RequestObject *self, PyObject *args) { - - Py_RETURN_NONE; - } -+ -+PyObject *Request_updateall(RequestObject *self, PyObject *args) { -+ queue_push2(&self->_queue, SOLVER_UPDATE|SOLVER_SOLVABLE_ALL, 0); -+ Py_RETURN_NONE; -+} -+ -+PyObject *Request_distupgrade(RequestObject *self, PyObject *args) { -+ queue_push2(&self->_queue, SOLVER_DISTUPGRADE|SOLVER_SOLVABLE_ALL, 0); -+ Py_RETURN_NONE; -+} -+ -+PyObject *Request_verify(RequestObject *self, PyObject *args) { -+ queue_push2(&self->_queue, SOLVER_VERIFY|SOLVER_SOLVABLE_ALL, 0); -+ Py_RETURN_NONE; -+} -diff --git a/python/src/request.h b/python/src/request.h -index b936801..aa79274 100644 ---- a/python/src/request.h -+++ b/python/src/request.h -@@ -59,6 +59,10 @@ extern PyObject *Request_noobsoletes_solvable(RequestObject *self, PyObject *arg - extern PyObject *Request_noobsoletes_relation(RequestObject *self, PyObject *args); - extern PyObject *Request_noobsoletes_name(RequestObject *self, PyObject *args); - -+extern PyObject *Request_updateall(RequestObject *self, PyObject *args); -+extern PyObject *Request_distupgrade(RequestObject *self, PyObject *args); -+extern PyObject *Request_verify(RequestObject *self, PyObject *args); -+ - extern PyTypeObject RequestType; - - #endif -diff --git a/python/src/solution.c b/python/src/solution.c -index b52a1b5..7360a37 100644 ---- a/python/src/solution.c -+++ b/python/src/solution.c -@@ -82,7 +82,7 @@ PyObject *Solution_string(SolutionObject *self) { - - switch (how & SOLVER_JOBMASK) { - case SOLVER_INSTALL: -- if (select == SOLVER_SOLVABLE && solver->installed && pool->solvables[what].repo == solver->installed) -+ if (select == SOLVER_SOLVABLE && pool->installed && pool->solvables[what].repo == pool->installed) - snprintf(str, STRING_SIZE - 1, _("do not keep %s installed"), - pool_solvid2str(pool, what)); - else if (select == SOLVER_SOLVABLE_PROVIDES) -@@ -94,7 +94,7 @@ PyObject *Solution_string(SolutionObject *self) { - break; - - case SOLVER_ERASE: -- if (select == SOLVER_SOLVABLE && !(solver->installed && pool->solvables[what].repo == solver->installed)) -+ if (select == SOLVER_SOLVABLE && !(pool->installed && pool->solvables[what].repo == pool->installed)) - snprintf(str, STRING_SIZE - 1, _("do not forbid installation of %s"), - pool_solvid2str(pool, what)); - else if (select == SOLVER_SOLVABLE_PROVIDES) -@@ -122,7 +122,7 @@ PyObject *Solution_string(SolutionObject *self) { - - } else if (p == SOLVER_SOLUTION_INFARCH) { - s = pool->solvables + rp; -- if (solver->installed && s->repo == solver->installed) -+ if (pool->installed && s->repo == pool->installed) - snprintf(str, STRING_SIZE - 1, _("keep %s despite the inferior architecture"), - pool_solvable2str(pool, s)); - else -@@ -131,7 +131,7 @@ PyObject *Solution_string(SolutionObject *self) { - - } else if (p == SOLVER_SOLUTION_DISTUPGRADE) { - s = pool->solvables + rp; -- if (solver->installed && s->repo == solver->installed) -+ if (pool->installed && s->repo == pool->installed) - snprintf(str, STRING_SIZE - 1, _("keep obsolete %s"), - pool_solvable2str(pool, s)); - else -diff --git a/python/src/solver.c b/python/src/solver.c -index 5079510..54e1294 100644 ---- a/python/src/solver.c -+++ b/python/src/solver.c -@@ -53,6 +53,9 @@ PyObject* Solver_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - } - } - -+ /* enable splitprovides by default */ -+ solver_set_flag(self->_solver, SOLVER_FLAG_SPLITPROVIDES, 1); -+ - return (PyObject *)self; - } - -@@ -63,138 +66,150 @@ PyObject *Solver_dealloc(SolverObject *self) { - Py_RETURN_NONE; - } - --PyObject *Solver_get_fix_system(SolverObject *self, PyObject *args) { -- return Py_BuildValue("i", self->_solver->fixsystem); -+PyObject *Solver_get_flag(SolverObject *self, PyObject *args) { -+ int flag = 0; -+ -+ if (!PyArg_ParseTuple(args, "i", &flag)) { -+ return NULL; -+ } -+ -+ int val = solver_get_flag(self->_solver, flag); -+ return Py_BuildValue("i", val); - } - --PyObject *Solver_set_fix_system(SolverObject *self, PyObject *args) { -- int val; -+PyObject *Solver_set_flag(SolverObject *self, PyObject *args) { -+ int flag = 0, val = 0; - -- if (!PyArg_ParseTuple(args, "i", &val)) { -- /* XXX raise exception */ -+ if (!PyArg_ParseTuple(args, "ii", &flag, &val)) { -+ return NULL; - } - -- self->_solver->fixsystem = val; -- -+ solver_set_flag(self->_solver, flag, val); - Py_RETURN_NONE; - } - - PyObject *Solver_get_allow_downgrade(SolverObject *self, PyObject *args) { -- return Py_BuildValue("i", self->_solver->allowdowngrade); -+ int val = solver_get_flag(self->_solver, SOLVER_FLAG_ALLOW_DOWNGRADE); -+ -+ return Py_BuildValue("i", val); - } - - PyObject *Solver_set_allow_downgrade(SolverObject *self, PyObject *args) { - int val; - - if (!PyArg_ParseTuple(args, "i", &val)) { -- /* XXX raise exception */ -+ return NULL; - } - -- self->_solver->allowdowngrade = val; -- -+ solver_set_flag(self->_solver, SOLVER_FLAG_ALLOW_DOWNGRADE, val); - Py_RETURN_NONE; - } - - PyObject *Solver_get_allow_archchange(SolverObject *self, PyObject *args) { -- return Py_BuildValue("i", self->_solver->allowarchchange); -+ int val = solver_get_flag(self->_solver, SOLVER_FLAG_ALLOW_ARCHCHANGE); -+ -+ return Py_BuildValue("i", val); - } - - PyObject *Solver_set_allow_archchange(SolverObject *self, PyObject *args) { - int val; - - if (!PyArg_ParseTuple(args, "i", &val)) { -- /* XXX raise exception */ -+ return NULL; - } - -- self->_solver->allowarchchange = val; -- -+ solver_set_flag(self->_solver, SOLVER_FLAG_ALLOW_ARCHCHANGE, val); - Py_RETURN_NONE; - } - - PyObject *Solver_get_allow_vendorchange(SolverObject *self, PyObject *args) { -- return Py_BuildValue("i", self->_solver->allowvendorchange); -+ int val = solver_get_flag(self->_solver, SOLVER_FLAG_ALLOW_VENDORCHANGE); -+ -+ return Py_BuildValue("i", val); - } - - PyObject *Solver_set_allow_vendorchange(SolverObject *self, PyObject *args) { - int val; - - if (!PyArg_ParseTuple(args, "i", &val)) { -- /* XXX raise exception */ -+ return NULL; - } - -- self->_solver->allowvendorchange = val; -- -+ solver_set_flag(self->_solver, SOLVER_FLAG_ALLOW_VENDORCHANGE, val); - Py_RETURN_NONE; - } - - PyObject *Solver_get_allow_uninstall(SolverObject *self, PyObject *args) { -- return Py_BuildValue("i", self->_solver->allowuninstall); -+ int val = solver_get_flag(self->_solver, SOLVER_FLAG_ALLOW_UNINSTALL); -+ -+ return Py_BuildValue("i", val); - } - - PyObject *Solver_set_allow_uninstall(SolverObject *self, PyObject *args) { - int val; - - if (!PyArg_ParseTuple(args, "i", &val)) { -- /* XXX raise exception */ -+ return NULL; - } - -- self->_solver->allowuninstall = val; -- -+ solver_set_flag(self->_solver, SOLVER_FLAG_ALLOW_UNINSTALL, val); - Py_RETURN_NONE; - } - - PyObject *Solver_get_updatesystem(SolverObject *self, PyObject *args) { -- return Py_BuildValue("i", self->_solver->updatesystem); -+ //return Py_BuildValue("i", self->_solver->updatesystem); -+ Py_RETURN_NONE; - } - - PyObject *Solver_set_updatesystem(SolverObject *self, PyObject *args) { -- int val; -+ /*int val; - - if (!PyArg_ParseTuple(args, "i", &val)) { -- /* XXX raise exception */ -+ return NULL; - } - -- self->_solver->updatesystem = val; -+ self->_solver->updatesystem = val; */ - - Py_RETURN_NONE; - } - - PyObject *Solver_get_do_split_provides(SolverObject *self, PyObject *args) { -- return Py_BuildValue("i", self->_solver->dosplitprovides); -+ int val = solver_get_flag(self->_solver, SOLVER_FLAG_SPLITPROVIDES); -+ -+ return Py_BuildValue("i", val); - } - - PyObject *Solver_set_do_split_provides(SolverObject *self, PyObject *args) { - int val; - - if (!PyArg_ParseTuple(args, "i", &val)) { -- /* XXX raise exception */ -+ return NULL; - } - -- self->_solver->dosplitprovides = val; -- -+ solver_set_flag(self->_solver, SOLVER_FLAG_SPLITPROVIDES, val); - Py_RETURN_NONE; - } - - PyObject *Solver_solve(SolverObject *self, PyObject *args) { - RequestObject *request; -+ int res = 0; - - if (!PyArg_ParseTuple(args, "O", &request)) { -- /* XXX raise exception */ -+ return NULL; - } - - // Make sure, the pool is prepared. - _Pool_prepare(self->_solver->pool); - -- solver_solve(self->_solver, &request->_queue); -+ res = solver_solve(self->_solver, &request->_queue); - - #ifdef DEBUG - solver_printallsolutions(self->_solver); - #endif - -- if (self->_solver->problems.count == 0) { -+ if (res == 0) { - Py_RETURN_TRUE; - } -- - Py_RETURN_FALSE; - } - -@@ -202,7 +217,6 @@ PyObject *Solver_get_problems(SolverObject *self, PyObject *args) { - RequestObject *request; - - if (!PyArg_ParseTuple(args, "O", &request)) { -- /* XXX raise exception */ - return NULL; - } - -diff --git a/python/src/solver.h b/python/src/solver.h -index 604cb83..8a4478b 100644 ---- a/python/src/solver.h -+++ b/python/src/solver.h -@@ -34,8 +34,9 @@ typedef struct { - extern PyObject* Solver_new(PyTypeObject *type, PyObject *args, PyObject *kwds); - extern PyObject *Solver_dealloc(SolverObject *self); - --extern PyObject *Solver_get_fix_system(SolverObject *self, PyObject *args); --extern PyObject *Solver_set_fix_system(SolverObject *self, PyObject *args); -+extern PyObject *Solver_get_flag(SolverObject *self, PyObject *args); -+extern PyObject *Solver_set_flag(SolverObject *self, PyObject *args); -+ - extern PyObject *Solver_get_allow_downgrade(SolverObject *self, PyObject *args); - extern PyObject *Solver_set_allow_downgrade(SolverObject *self, PyObject *args); - extern PyObject *Solver_get_allow_archchange(SolverObject *self, PyObject *args); --- -1.7.10.4 - diff --git a/pakfire/patches/0012-Sort-patches-by-their-version-number-not-in-alphabet.patch b/pakfire/patches/0012-Sort-patches-by-their-version-number-not-in-alphabet.patch deleted file mode 100644 index edb24ea..0000000 --- a/pakfire/patches/0012-Sort-patches-by-their-version-number-not-in-alphabet.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 2d1d622ac9859c90363076aa2f44edf1efe53597 Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Tue, 26 Jun 2012 19:32:11 +0200 -Subject: [PATCH 12/16] Sort patches by their version number (not in - alphabetical order). - ---- - macros/constants.macro | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/macros/constants.macro b/macros/constants.macro -index 07459a3..74484ea 100644 ---- a/macros/constants.macro -+++ b/macros/constants.macro -@@ -11,7 +11,7 @@ DIR_SOURCE = %{BASEDIR} - - # By default, take all patches from the patches directory - # in alphabetical order. --patches = $(find %{DIR_PATCHES} -not -type d 2>/dev/null | sort) -+patches = $(find %{DIR_PATCHES} -not -type d 2>/dev/null | sort --version-sort) - sources = %{thisapp}.tar.gz - - # Macro definitions --- -1.7.10.4 - diff --git a/pakfire/patches/0013-Fix-linking-to-libsolvext.patch b/pakfire/patches/0013-Fix-linking-to-libsolvext.patch deleted file mode 100644 index b02eab7..0000000 --- a/pakfire/patches/0013-Fix-linking-to-libsolvext.patch +++ /dev/null @@ -1,28 +0,0 @@ -From bc17ee1a8d7ea87e7e3bb137c86519209eb24c00 Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Sat, 30 Jun 2012 12:18:52 +0200 -Subject: [PATCH 13/16] Fix linking to libsolvext. - -This is pulled in by libsolv itself. Although this is not good -style, it works more reliable without patching libsolvext which -is missing symbols from libexpat, libz and more. ---- - python/src/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/python/src/Makefile b/python/src/Makefile -index 583cc16..2741fa2 100644 ---- a/python/src/Makefile -+++ b/python/src/Makefile -@@ -7,7 +7,7 @@ MODULE_LZMA = _lzma.so - MODULES = $(MODULE_PAKFIRE) $(MODULE_LZMA) - - # Libs that are to be linked into the module. --MODULE_PAKFIRE_LIBS = -lcap -lpython$(PYTHON_VERSION) -lsolv -lsolvext -+MODULE_PAKFIRE_LIBS = -lcap -lpython$(PYTHON_VERSION) -lsolv - MODULE_LZMA_LIBS = -llzma - - SOURCES_LZMA = _lzmamodule.c --- -1.7.10.4 - diff --git a/pakfire/patches/0014-Fix-the-download-sizes.patch b/pakfire/patches/0014-Fix-the-download-sizes.patch deleted file mode 100644 index 06ec0ca..0000000 --- a/pakfire/patches/0014-Fix-the-download-sizes.patch +++ /dev/null @@ -1,30 +0,0 @@ -From f1cfbffe3df6ed137c522072adb7ef872592cba4 Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Sat, 30 Jun 2012 12:19:52 +0200 -Subject: [PATCH 14/16] Fix the download sizes. - -Newer versions of libsolv require an unsigned long here. ---- - python/src/solvable.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/python/src/solvable.c b/python/src/solvable.c -index 21ad758..1198df3 100644 ---- a/python/src/solvable.c -+++ b/python/src/solvable.c -@@ -492,10 +492,10 @@ PyObject *Solvable_set_downloadsize(SolvableObject *self, PyObject *args) { - PyObject *Solvable_get_downloadsize(SolvableObject *self) { - Solvable *solv = pool_id2solvable(self->_pool, self->_id); - -- unsigned int downloadsize = repo_lookup_num(solv->repo, self->_id, -+ unsigned long long downloadsize = repo_lookup_num(solv->repo, self->_id, - SOLVABLE_DOWNLOADSIZE, 0); - -- return Py_BuildValue("i", downloadsize); -+ return Py_BuildValue("K", downloadsize / 1024); - } - - PyObject *Solvable_set_installsize(SolvableObject *self, PyObject *args) { --- -1.7.10.4 - diff --git a/pakfire/patches/0015-Add-option-to-export-secret-keys.patch b/pakfire/patches/0015-Add-option-to-export-secret-keys.patch deleted file mode 100644 index 0934ab1..0000000 --- a/pakfire/patches/0015-Add-option-to-export-secret-keys.patch +++ /dev/null @@ -1,71 +0,0 @@ -From a78770d3e74e29522a0a29f04ba2757fc8f8704d Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Sat, 30 Jun 2012 12:20:41 +0200 -Subject: [PATCH 15/16] Add option to export secret keys. - ---- - python/pakfire/api.py | 4 ++-- - python/pakfire/cli.py | 5 ++++- - python/pakfire/keyring.py | 4 ++-- - 3 files changed, 8 insertions(+), 5 deletions(-) - -diff --git a/python/pakfire/api.py b/python/pakfire/api.py -index 5203c5f..372e4d5 100644 ---- a/python/pakfire/api.py -+++ b/python/pakfire/api.py -@@ -145,10 +145,10 @@ def key_import(keyfile, **pakfire_args): - - return pakfire.keyring.import_key(keyfile) - --def key_export(keyid, keyfile, **pakfire_args): -+def key_export(keyid, keyfile, secret=False, **pakfire_args): - pakfire = Pakfire(**pakfire_args) - -- return pakfire.keyring.export_key(keyid, keyfile) -+ return pakfire.keyring.export_key(keyid, keyfile, secret=secret) - - def key_delete(keyid, **pakfire_args): - pakfire = Pakfire(**pakfire_args) -diff --git a/python/pakfire/cli.py b/python/pakfire/cli.py -index 05a8c6e..a808975 100644 ---- a/python/pakfire/cli.py -+++ b/python/pakfire/cli.py -@@ -1220,6 +1220,8 @@ class CliKey(Cli): - help=_("The ID of the key to export.")) - sub_export.add_argument("filename", nargs=1, - help=_("Write the key to this file.")) -+ sub_export.add_argument("--secret", action="store_true", -+ help=_("Export the secret key, too.")) - sub_export.add_argument("action", action="store_const", const="export") - - def parse_command_delete(self): -@@ -1275,8 +1277,9 @@ class CliKey(Cli): - def handle_export(self): - keyid = self.args.keyid[0] - filename = self.args.filename[0] -+ secret = self.args.secret - -- pakfire.key_export(keyid, filename, **self.pakfire_args) -+ pakfire.key_export(keyid, filename, secret=secret, **self.pakfire_args) - - def handle_delete(self): - keyid = self.args.keyid[0] -diff --git a/python/pakfire/keyring.py b/python/pakfire/keyring.py -index 8fe052e..d1f4626 100644 ---- a/python/pakfire/keyring.py -+++ b/python/pakfire/keyring.py -@@ -168,9 +168,9 @@ class Keyring(object): - - log.info(_("Successfully imported %s.") % keyfile) - -- def export_key(self, keyid, keyfile): -+ def export_key(self, keyid, keyfile, secret=False): - keydata = io.BytesIO() -- self.ctx.export(keyid, keydata) -+ self.ctx.export(keyid, keydata, secret) - - f = open(keyfile, "wb") - f.write(keydata.getvalue()) --- -1.7.10.4 - diff --git a/pakfire/patches/0016-template-Fix-packaging-cmake-files.patch b/pakfire/patches/0016-template-Fix-packaging-cmake-files.patch deleted file mode 100644 index 5c25532..0000000 --- a/pakfire/patches/0016-template-Fix-packaging-cmake-files.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 42d6af74306ecb1627eb3c5b6a0163fc6308b46d Mon Sep 17 00:00:00 2001 -From: Michael Tremer michael.tremer@ipfire.org -Date: Sat, 30 Jun 2012 13:32:23 +0200 -Subject: [PATCH 16/16] template: Fix packaging cmake files. - ---- - macros/templates.macro | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/macros/templates.macro b/macros/templates.macro -index 76dcf69..794619b 100644 ---- a/macros/templates.macro -+++ b/macros/templates.macro -@@ -52,7 +52,7 @@ packages - %{libdir}/pkgconfig - %{datadir}/aclocal - %{libdir}/*.so -- %{datadir}/*/cmake -+ %{datadir}/cmake - %{mandir}/man2 - %{mandir}/man3 - %{datadir}/pkgconfig --- -1.7.10.4 -
hooks/post-receive -- IPFire 3.x development tree