]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/commitdiff
pakfire: Sync to upstream version.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 22 Apr 2012 12:57:45 +0000 (14:57 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 22 Apr 2012 12:57:45 +0000 (14:57 +0200)
Includes fixes for removing packages and some more
minor fixes.

pakfire/pakfire.nm
pakfire/patches/0001-Fix-accessing-index-data-after-the-transaction-is-do.patch [moved from pakfire/patches/pakfire-internalize-index.patch with 70% similarity]
pakfire/patches/0002-find-provides-Accept-bogous-soname.patch [new file with mode: 0644]
pakfire/patches/0003-Fix-adding-right-package-format-to-all-actions-in-th.patch [new file with mode: 0644]
pakfire/patches/0004-client-daemon-Don-t-make-internal-server-errors-fata.patch [new file with mode: 0644]
pakfire/patches/0005-Allow-to-install-multiple-non-default-kernels.patch [new file with mode: 0644]
pakfire/patches/0006-Actually-remove-installed-packages-from-database.patch [new file with mode: 0644]
pakfire/patches/0007-Select-packages-from-the-database-by-their-UUIDs.patch [new file with mode: 0644]
pakfire/patches/0008-Fixes-for-removing-files-and-configfiles.patch [new file with mode: 0644]
pakfire/patches/pakfire-provides-soname.patch [deleted file]

index a1913b023f29c3a382230d8001130e4ea67919b1..eef125a4a355b016f2f8a89cd856060911db2032 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = pakfire
 version    = 0.9.22
-release    = 2
+release    = 3
 
 maintainer = Michael Tremer <michael.tremer@ipfire.org>
 groups     = System/Packaging
similarity index 70%
rename from pakfire/patches/pakfire-internalize-index.patch
rename to pakfire/patches/0001-Fix-accessing-index-data-after-the-transaction-is-do.patch
index 3e3e8b6f34b844cc226f90d009023b78d08797df..8559607f22050d2d2c81a45b22326664401a6032 100644 (file)
@@ -1,8 +1,12 @@
-commit b856696a0a8173eaacdd03833971272de06118ce
-Author: Michael Tremer <michael.tremer@ipfire.org>
-Date:   Sat Apr 14 21:16:30 2012 +0200
+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 1/8] Fix accessing index data after the transaction is done.
 
-    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(+), 0 deletions(-)
 
 diff --git a/python/pakfire/client/builder.py b/python/pakfire/client/builder.py
 index a039e65..2ade5dc 100644
@@ -30,3 +34,6 @@ index 642c4bd..5dcdd04 100644
        def add_package(self, pkg):
                # Add package to the database.
                self.db.add_package(pkg)
+-- 
+1.7.7.6
+
diff --git a/pakfire/patches/0002-find-provides-Accept-bogous-soname.patch b/pakfire/patches/0002-find-provides-Accept-bogous-soname.patch
new file mode 100644 (file)
index 0000000..49920bf
--- /dev/null
@@ -0,0 +1,28 @@
+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 2/8] 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 files changed, 0 insertions(+), 1 deletions(-)
+
+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.7.6
+
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
new file mode 100644 (file)
index 0000000..31b2fab
--- /dev/null
@@ -0,0 +1,75 @@
+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 3/8] Fix adding right package format to all actions in the
+ transaction.
+
+---
+ python/pakfire/transaction.py |   23 +++++++++++++++--------
+ 1 files 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.7.6
+
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
new file mode 100644 (file)
index 0000000..5112827
--- /dev/null
@@ -0,0 +1,500 @@
+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 4/8] 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.7.6
+
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
new file mode 100644 (file)
index 0000000..4d9d888
--- /dev/null
@@ -0,0 +1,32 @@
+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 5/8] Allow to install multiple non-default kernels.
+
+---
+ python/pakfire/constants.py |    9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+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.7.6
+
diff --git a/pakfire/patches/0006-Actually-remove-installed-packages-from-database.patch b/pakfire/patches/0006-Actually-remove-installed-packages-from-database.patch
new file mode 100644 (file)
index 0000000..3867cf1
--- /dev/null
@@ -0,0 +1,26 @@
+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 6/8] 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 files changed, 1 insertions(+), 0 deletions(-)
+
+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.7.6
+
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
new file mode 100644 (file)
index 0000000..29901e5
--- /dev/null
@@ -0,0 +1,29 @@
+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 7/8] Select packages from the database by their UUIDs.
+
+---
+ python/pakfire/repository/database.py |    6 +++---
+ 1 files 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.7.6
+
diff --git a/pakfire/patches/0008-Fixes-for-removing-files-and-configfiles.patch b/pakfire/patches/0008-Fixes-for-removing-files-and-configfiles.patch
new file mode 100644 (file)
index 0000000..53d8acd
--- /dev/null
@@ -0,0 +1,51 @@
+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 8/8] Fixes for removing files (and configfiles).
+
+There were some problems when the user removed those
+files earlier.
+---
+ python/pakfire/packages/base.py |   12 ++++++++++++
+ 1 files changed, 12 insertions(+), 0 deletions(-)
+
+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.7.6
+
diff --git a/pakfire/patches/pakfire-provides-soname.patch b/pakfire/patches/pakfire-provides-soname.patch
deleted file mode 100644 (file)
index 8cc8b61..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-commit cf4f218f42c2a43a520eac4f3a6251d557dcbe80
-Author: Michael Tremer <michael.tremer@ipfire.org>
-Date:   Tue Apr 17 17:36:52 2012 +0200
-
-    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.
-
-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