]> git.ipfire.org Git - people/ms/ipfire-3.x.git/commitdiff
pakfire: Add patches from upstream.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Feb 2012 13:04:56 +0000 (14:04 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Feb 2012 13:04:56 +0000 (14:04 +0100)
pakfire/pakfire.nm
pakfire/patches/pakfire-0.9.20-change-default-hub-to-pakfirehub.ipfire.org.patch [new file with mode: 0644]
pakfire/patches/pakfire-0.9.20-update-repositories-only-when-are-actually-enabled.patch [new file with mode: 0644]

index 187390762258242bd002555af002c8bec5de45b0..8490682718db6cab98385b53a010f4874c1e01c6 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = pakfire
 version    = 0.9.20
-release    = 1
+release    = 2
 
 maintainer = Michael Tremer <michael.tremer@ipfire.org>
 groups     = System/Packaging
diff --git a/pakfire/patches/pakfire-0.9.20-change-default-hub-to-pakfirehub.ipfire.org.patch b/pakfire/patches/pakfire-0.9.20-change-default-hub-to-pakfirehub.ipfire.org.patch
new file mode 100644 (file)
index 0000000..dce9bfd
--- /dev/null
@@ -0,0 +1,91 @@
+From 0f8823593c2c815b3dc2c7c9cb74b4d7a6b218de Mon Sep 17 00:00:00 2001
+From: Michael Tremer <michael.tremer@ipfire.org>
+Date: Wed, 29 Feb 2012 12:29:07 +0100
+Subject: [PATCH] Change default hub to pakfirehub.ipfire.org.
+
+---
+ examples/client.conf          |    2 +-
+ examples/daemon.conf          |    2 +-
+ python/pakfire/client/base.py |    2 +-
+ python/pakfire/config.py      |    4 ++--
+ python/pakfire/constants.py   |    3 +++
+ 5 files changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/examples/client.conf b/examples/client.conf
+index da57d03..6c59de9 100644
+--- a/examples/client.conf
++++ b/examples/client.conf
+@@ -3,7 +3,7 @@
+ [client]
+ # The URL of the server to connect to.
+-# server = https://pakfire.ipfire.org/
++# server = https://pakfirehub.ipfire.org/
+ # Your credentials to log in on the hub.
+ # username = ipfire
+diff --git a/examples/daemon.conf b/examples/daemon.conf
+index 525cc1f..143a7f6 100644
+--- a/examples/daemon.conf
++++ b/examples/daemon.conf
+@@ -3,7 +3,7 @@
+ [daemon]
+ # The URL of the server to connect to.
+-# server = https://pakfire.ipfire.org/
++# server = https://pakfirehub.ipfire.org/
+ # The hostname of this machine.
+ # hostname = <automatically detected>
+diff --git a/python/pakfire/client/base.py b/python/pakfire/client/base.py
+index 1886e2b..3ac4bef 100644
+--- a/python/pakfire/client/base.py
++++ b/python/pakfire/client/base.py
+@@ -51,7 +51,7 @@ class PakfireClient(object):
+                       ret += "%s:%s@" % (username, password)
+               # Add host and path components.
+-              ret += "%s/pakfirehub/%s" % (url.netloc, self.type)
++              ret += "/".join((url.netloc, self.type))
+               return ret
+diff --git a/python/pakfire/config.py b/python/pakfire/config.py
+index c7ab143..0d32784 100644
+--- a/python/pakfire/config.py
++++ b/python/pakfire/config.py
+@@ -237,7 +237,7 @@ class ConfigClient(_Config):
+               "client" : {
+                       # The default server is the official Pakfire
+                       # server.
+-                      "server"   : "https://pakfire.ipfire.org",
++                      "server"   : PAKFIRE_HUB,
+               },
+       }
+@@ -249,7 +249,7 @@ class ConfigDaemon(_Config):
+               "daemon" : {
+                       # The default server is the official Pakfire
+                       # server.
+-                      "server"   : "https://pakfire.ipfire.org",
++                      "server"   : PAKFIRE_HUB,
+                       # The default hostname is the host name of this
+                       # machine.
+diff --git a/python/pakfire/constants.py b/python/pakfire/constants.py
+index 2998ab7..2c091e4 100644
+--- a/python/pakfire/constants.py
++++ b/python/pakfire/constants.py
+@@ -27,6 +27,9 @@ from __version__ import PAKFIRE_VERSION
+ PAKFIRE_LEAST_COMPATIBLE_VERSION = PAKFIRE_VERSION
++# The default hub to connect to.
++PAKFIRE_HUB = "https://pakfirehub.ipfire.org/"
++
+ SYSCONFDIR = "/etc"
+ SCRIPT_DIR = "/usr/lib/pakfire"
+-- 
+1.7.3.4
+
diff --git a/pakfire/patches/pakfire-0.9.20-update-repositories-only-when-are-actually-enabled.patch b/pakfire/patches/pakfire-0.9.20-update-repositories-only-when-are-actually-enabled.patch
new file mode 100644 (file)
index 0000000..e8f4132
--- /dev/null
@@ -0,0 +1,63 @@
+From 8fe602a7c5b3de4c4531d05c0dc1cf4d6bb9fb06 Mon Sep 17 00:00:00 2001
+From: Michael Tremer <michael.tremer@ipfire.org>
+Date: Wed, 29 Feb 2012 11:10:33 +0100
+Subject: [PATCH] Update repositories only when they are actually enabled.
+
+---
+ python/pakfire/cli.py                 |    8 +++++++-
+ python/pakfire/repository/__init__.py |    4 ++++
+ python/pakfire/repository/base.py     |    3 ++-
+ 3 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/python/pakfire/cli.py b/python/pakfire/cli.py
+index 8bab886..7a94900 100644
+--- a/python/pakfire/cli.py
++++ b/python/pakfire/cli.py
+@@ -768,8 +768,14 @@ class CliBuilderIntern(Cli):
+               conf = config.ConfigBuilder()
++              if self.args.nodeps:
++                      disable_repos = ["*"]
++              else:
++                      disable_repos = None
++
+               pakfire._build(pkg, builder_mode=self.args.mode, config=conf,
+-                      arch=self.args.arch, resultdir=self.args.resultdir)
++                      disable_repos=disable_repos, arch=self.args.arch,
++                      resultdir=self.args.resultdir)
+ class CliClient(Cli):
+diff --git a/python/pakfire/repository/__init__.py b/python/pakfire/repository/__init__.py
+index f6b2f6e..39872da 100644
+--- a/python/pakfire/repository/__init__.py
++++ b/python/pakfire/repository/__init__.py
+@@ -68,6 +68,10 @@ class Repositories(object):
+               # Disable all repositories here as demanded on commandline
+               if disable_repos:
++                      # * is magic to disable all repositories.
++                      if "*" in disable_repos:
++                              disable_repos = [r.name for r in self]
++
+                       for repo in disable_repos:
+                               self.disable_repo(repo)
+diff --git a/python/pakfire/repository/base.py b/python/pakfire/repository/base.py
+index 7fb8362..59d8615 100644
+--- a/python/pakfire/repository/base.py
++++ b/python/pakfire/repository/base.py
+@@ -115,7 +115,8 @@ class RepositoryFactory(object):
+               """
+               assert self.index
+-              self.index.update(force, offline=offline)
++              if force or self.enabled:
++                      self.index.update(force, offline=offline)
+       def clean(self):
+               """
+-- 
+1.7.3.4
+