summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/python/python-smartpm
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-07-08 00:23:48 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-08 13:13:17 +0100
commit5fc580fc444e45d00de0e50d32b6e6e0b2e6b7ea (patch)
tree484aff4471a7d3f81f73422c9c1a72131e9ec7a5 /meta/recipes-devtools/python/python-smartpm
parentcb8fc7521cdaaa7b8f82a0c6dfc6526778c99099 (diff)
downloadopenembedded-core-5fc580fc444e45d00de0e50d32b6e6e0b2e6b7ea.tar.gz
openembedded-core-5fc580fc444e45d00de0e50d32b6e6e0b2e6b7ea.tar.bz2
openembedded-core-5fc580fc444e45d00de0e50d32b6e6e0b2e6b7ea.zip
python-smartpm: 1.4.1 -> 1.5
* Remove the following patches since the are already in the source: smart-config-ignore-all-recommends.patch smart-conflict-provider.patch smart-dflags.patch smart-filename-NAME_MAX.patch smart-flag-exclude-packages.patch smart-flag-ignore-recommends.patch smart-metadata-match.patch smart-multilib-fixes.patch smart-rpm-extra-macros.patch smart-rpm-md-parse.patch smart-rpm-root.patch smart-tmpdir.patch smart-yaml-error.patch * Update the following patches, part of the code are already in the source: smart-attempt.patch smart-improve-error-reporting.patch smart-recommends.patch smartpm-rpm5-nodig.patch * Use github and git repo as the SRC_URI. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python-smartpm')
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-attempt.patch164
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-config-ignore-all-recommends.patch24
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-conflict-provider.patch196
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-dflags.patch45
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-filename-NAME_MAX.patch35
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-flag-exclude-packages.patch70
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-flag-ignore-recommends.patch60
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch168
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-metadata-match.patch28
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-multilib-fixes.patch22
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-recommends.patch1051
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-rpm-extra-macros.patch27
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-rpm-md-parse.patch26
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-rpm-root.patch80
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-tmpdir.patch30
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-yaml-error.patch86
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-nodig.patch47
17 files changed, 127 insertions, 2032 deletions
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch b/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
index 82d2e6cf31..ec98e03c0a 100644
--- a/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
+++ b/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
@@ -18,38 +18,68 @@ Upstream-Status: Pending
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
- smart.py | 5 +++-
- smart/commands/install.py | 5 ++++
- smart/transaction.py | 65 +++++++++++++++++++++++++++++++++++------------
- 3 files changed, 58 insertions(+), 17 deletions(-)
+ backends/rpm/pm.py | 35 ++++++++++++++++++++++++++++++++++-
+ transaction.py | 50 +++++++++++++++++++++++++++++++++++++-------------
+ 2 files changed, 71 insertions(+), 14 deletions(-)
-Index: smart-1.4.1/smart/commands/install.py
-===================================================================
---- smart-1.4.1.orig/smart/commands/install.py
-+++ smart-1.4.1/smart/commands/install.py
-@@ -50,6 +50,8 @@ def option_parser():
- parser = OptionParser(usage=USAGE,
- description=DESCRIPTION,
- examples=EXAMPLES)
-+ parser.add_option("--attempt", action="store_true",
-+ help=_("attempt to install packages, ignore failures"))
- parser.add_option("--stepped", action="store_true",
- help=_("split operation in steps"))
- parser.add_option("--urls", action="store_true",
-@@ -80,6 +82,9 @@ def main(ctrl, opts):
- if not opts.args:
- raise Error, _("no package(s) given")
-
-+ if opts.attempt:
-+ sysconf.set("attempt-install", True, soft=True)
+diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
+index 9bbd952..ba6405a 100644
+--- a/smart/backends/rpm/pm.py
++++ b/smart/backends/rpm/pm.py
+@@ -241,15 +241,48 @@ class RPMPackageManager(PackageManager):
+ cb = RPMCallback(prog, upgradednames)
+ cb.grabOutput(True)
+ probs = None
++ retry = 0
+ try:
+ probs = ts.run(cb, None)
+ finally:
+ del getTS.ts
+ cb.grabOutput(False)
++ if probs and sysconf.has("attempt-install", soft=True):
++ def remove_conflict(pkgNEVR):
++ for key in changeset.keys():
++ if pkgNEVR == str(key):
++ del changeset[key]
++ del pkgpaths[key]
++ iface.warning("Removing %s due to file %s conflicting with %s" % (pkgNEVR, fname, altNEVR))
++ break
++
++ retry = 1
++ for prob in probs:
++ if prob[1][0] == rpm.RPMPROB_NEW_FILE_CONFLICT:
++ msg = prob[0].split()
++ fname = msg[1]
++ pkgNEVR = msg[7]
++ altNEVR = msg[9]
++ pkgNEVR = pkgNEVR.rsplit('.', 1)[0] + '@' + pkgNEVR.rsplit('.', 1)[1]
++ altNEVR = altNEVR.rsplit('.', 1)[0] + '@' + altNEVR.rsplit('.', 1)[1]
++ remove_conflict(pkgNEVR)
++ elif prob[1][0] == rpm.RPMPROB_FILE_CONFLICT:
++ msg = prob[0].split()
++ fname = msg[1]
++ pkgNEVR = msg[5]
++ altNEVR = msg[11]
++ pkgNEVR = pkgNEVR.rsplit('.', 1)[0] + '@' + pkgNEVR.rsplit('.', 1)[1]
++ altNEVR = altNEVR.rsplit('.', 1)[0] + '@' + altNEVR.rsplit('.', 1)[1]
++ remove_conflict(pkgNEVR)
++ else:
++ retry = 0
+
- if opts.explain:
- sysconf.set("explain-changesets", True, soft=True)
+ prog.setDone()
+- if probs:
++ if probs and (not retry):
+ raise Error, "\n".join([x[0] for x in probs])
+ prog.stop()
++ if retry and len(changeset):
++ self.commit(changeset, pkgpaths)
-Index: smart-1.4.1/smart/transaction.py
-===================================================================
---- smart-1.4.1.orig/smart/transaction.py
-+++ smart-1.4.1/smart/transaction.py
+ class RPMCallback:
+ def __init__(self, prog, upgradednames):
+diff --git a/smart/transaction.py b/smart/transaction.py
+index 4b90cb7..3e043e9 100644
+--- a/smart/transaction.py
++++ b/smart/transaction.py
@@ -555,6 +555,8 @@ class Transaction(object):
changeset.set(pkg, INSTALL)
isinst = changeset.installed
@@ -145,79 +175,3 @@ Index: smart-1.4.1/smart/transaction.py
changeset.set(pkg, INSTALL)
locked[pkg] = (LOCKED_INSTALL, None)
elif op is REMOVE:
-@@ -1216,9 +1240,18 @@ class Transaction(object):
- else:
- op = REMOVE
- if op is INSTALL or op is REINSTALL:
-- self._install(pkg, changeset, locked, pending)
-- if pkg in changeset:
-- changeset.setRequested(pkg, True)
-+ try:
-+ self._install(pkg, changeset, locked, pending)
-+ if pkg in changeset:
-+ changeset.setRequested(pkg, True)
-+ except Failed, e:
-+ if attempt:
-+ iface.warning(_("Can't install %s: %s") % (pkg, e))
-+ if pkg in changeset:
-+ del changeset[pkg]
-+ continue
-+ else:
-+ raise Failed, e
- elif op is REMOVE:
- self._remove(pkg, changeset, locked, pending)
- elif op is UPGRADE:
-Index: smart-1.4.1/smart/backends/rpm/pm.py
-===================================================================
---- smart-1.4.1.orig/smart/backends/rpm/pm.py
-+++ smart-1.4.1/smart/backends/rpm/pm.py
-@@ -243,15 +253,48 @@ class RPMPackageManager(PackageManager):
- cb = RPMCallback(prog, upgradednames)
- cb.grabOutput(True)
- probs = None
-+ retry = 0
- try:
- probs = ts.run(cb, None)
- finally:
- del getTS.ts
- cb.grabOutput(False)
-+ if probs and sysconf.has("attempt-install", soft=True):
-+ def remove_conflict(pkgNEVR):
-+ for key in changeset.keys():
-+ if pkgNEVR == str(key):
-+ del changeset[key]
-+ del pkgpaths[key]
-+ iface.warning("Removing %s due to file %s conflicting with %s" % (pkgNEVR, fname, altNEVR))
-+ break
-+
-+ retry = 1
-+ for prob in probs:
-+ if prob[1][0] == rpm.RPMPROB_NEW_FILE_CONFLICT:
-+ msg = prob[0].split()
-+ fname = msg[1]
-+ pkgNEVR = msg[7]
-+ altNEVR = msg[9]
-+ pkgNEVR = pkgNEVR.rsplit('.', 1)[0] + '@' + pkgNEVR.rsplit('.', 1)[1]
-+ altNEVR = altNEVR.rsplit('.', 1)[0] + '@' + altNEVR.rsplit('.', 1)[1]
-+ remove_conflict(pkgNEVR)
-+ elif prob[1][0] == rpm.RPMPROB_FILE_CONFLICT:
-+ msg = prob[0].split()
-+ fname = msg[1]
-+ pkgNEVR = msg[5]
-+ altNEVR = msg[11]
-+ pkgNEVR = pkgNEVR.rsplit('.', 1)[0] + '@' + pkgNEVR.rsplit('.', 1)[1]
-+ altNEVR = altNEVR.rsplit('.', 1)[0] + '@' + altNEVR.rsplit('.', 1)[1]
-+ remove_conflict(pkgNEVR)
-+ else:
-+ retry = 0
-+
- prog.setDone()
-- if probs:
-+ if probs and (not retry):
- raise Error, "\n".join([x[0] for x in probs])
- prog.stop()
-+ if retry and len(changeset):
-+ self.commit(changeset, pkgpaths)
-
- class RPMCallback:
- def __init__(self, prog, upgradednames):
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-config-ignore-all-recommends.patch b/meta/recipes-devtools/python/python-smartpm/smart-config-ignore-all-recommends.patch
deleted file mode 100644
index df9d7799e8..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-config-ignore-all-recommends.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Add a simple method to disable the install of recommended packages
-
-Upstream-Status: Pending
-
-Usage:
- smart config --set ignore-all-recommends=1
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: smart-1.4.1/smart/transaction.py
-===================================================================
---- smart-1.4.1.orig/smart/transaction.py
-+++ smart-1.4.1/smart/transaction.py
-@@ -611,7 +611,9 @@ class Transaction(object):
- for prv in req.providedby:
- for prvpkg in prv.packages:
- if not reqrequired:
-- if pkgconf.testFlag("ignore-recommends", prvpkg):
-+ if sysconf.get("ignore-all-recommends", 0) == 1:
-+ continue
-+ elif pkgconf.testFlag("ignore-recommends", prvpkg):
- continue
- if isinst(prvpkg):
- found = True
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-conflict-provider.patch b/meta/recipes-devtools/python/python-smartpm/smart-conflict-provider.patch
deleted file mode 100644
index 10a7447cb4..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-conflict-provider.patch
+++ /dev/null
@@ -1,196 +0,0 @@
-Report a reason when a dependency could not be installed because it is locked
-
-If a requirement of a package is conflicted, depending on how the
-solution is reached, the transaction code may eliminate all providers
-of the requirement and then error out because nothing provides them. To
-work around this, store a reason in the locked dict and report that back
-if we need to, so for example instead of:
-
- error: Can't install packagegroup-core-ssh-dropbear-1.0-r1@all: no package provides dropbear
-
-we now get:
-
- error: Can't install packagegroup-core-ssh-dropbear-1.0-r1@all: unable to install provider for dropbear:
- error: dropbear-2013.58-r1.0@armv5te is conflicted by openssh-sshd-6.2p2-r0@armv5te
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
----
- smart/const.py | 7 +++++++
- smart/transaction.py | 58 +++++++++++++++++++++++++++++++++++++++++-----------
- 2 files changed, 53 insertions(+), 12 deletions(-)
-
-diff --git a/smart/const.py b/smart/const.py
-index 4d8e5cb..67c1ac5 100644
---- a/smart/const.py
-+++ b/smart/const.py
-@@ -70,4 +70,11 @@ DATADIR = "/var/lib/smart/"
- USERDATADIR = "~/.smart/"
- CONFFILE = "config"
-
-+LOCKED_INSTALL = Enum('LOCKED_INSTALL')
-+LOCKED_REMOVE = Enum('LOCKED_REMOVE')
-+LOCKED_CONFLICT = Enum('LOCKED_CONFLICT')
-+LOCKED_CONFLICT_BY = Enum('LOCKED_CONFLICT_BY')
-+LOCKED_NO_COEXIST = Enum('LOCKED_NO_COEXIST')
-+LOCKED_SYSCONF = Enum('LOCKED_SYSCONF')
-+
- # vim:ts=4:sw=4:et
-diff --git a/smart/transaction.py b/smart/transaction.py
-index 300b9cc..dd9aa38 100644
---- a/smart/transaction.py
-+++ b/smart/transaction.py
-@@ -19,10 +19,31 @@
- # along with Smart Package Manager; if not, write to the Free Software
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- #
--from smart.const import INSTALL, REMOVE, UPGRADE, FIX, REINSTALL, KEEP
-+from smart.const import INSTALL, REMOVE, UPGRADE, FIX, REINSTALL, KEEP, LOCKED_INSTALL, LOCKED_CONFLICT, LOCKED_CONFLICT_BY, LOCKED_NO_COEXIST, LOCKED_SYSCONF, LOCKED_REMOVE
- from smart.cache import PreRequires, Package
- from smart import *
-
-+def lock_reason(pkg, lockvalue):
-+ try:
-+ (reason, otherpkg) = lockvalue
-+ except TypeError:
-+ reason = None
-+ lockvalue = None
-+ if reason == LOCKED_INSTALL:
-+ return _("%s is to be installed") % pkg
-+ elif reason == LOCKED_CONFLICT:
-+ return _("%s conflicts with %s") % (pkg, otherpkg)
-+ elif reason == LOCKED_CONFLICT_BY:
-+ return _("%s is conflicted by %s") % (pkg, otherpkg)
-+ elif reason == LOCKED_NO_COEXIST:
-+ return _("%s cannot coexist with %s") % (pkg, otherpkg)
-+ elif reason == LOCKED_SYSCONF:
-+ return _("%s is locked in system configuration") % pkg
-+ elif reason == LOCKED_REMOVE:
-+ return _("%s is to be removed") % pkg
-+ else:
-+ return _("%s is locked (unknown reason)") % pkg
-+
- class ChangeSet(dict):
-
- def __init__(self, cache, state=None, requested=None):
-@@ -187,7 +208,7 @@ class Policy(object):
- for pkg in pkgconf.filterByFlag("lock", cache.getPackages()):
- if pkg not in self._locked:
- self._sysconflocked.append(pkg)
-- self._locked[pkg] = True
-+ self._locked[pkg] = (LOCKED_SYSCONF, None)
-
- def runFinished(self):
- self._priorities.clear()
-@@ -524,7 +545,7 @@ class Transaction(object):
- if ownpending:
- pending = []
-
-- locked[pkg] = True
-+ locked[pkg] = (LOCKED_INSTALL, None)
- changeset.set(pkg, INSTALL)
- isinst = changeset.installed
-
-@@ -535,7 +556,7 @@ class Transaction(object):
- if prvpkg is pkg:
- continue
- if not isinst(prvpkg):
-- locked[prvpkg] = True
-+ locked[prvpkg] = (LOCKED_CONFLICT_BY, pkg)
- continue
- if prvpkg in locked:
- raise Failed, _("Can't install %s: conflicted package "
-@@ -550,7 +571,7 @@ class Transaction(object):
- if cnfpkg is pkg:
- continue
- if not isinst(cnfpkg):
-- locked[cnfpkg] = True
-+ locked[cnfpkg] = (LOCKED_CONFLICT, pkg)
- continue
- if cnfpkg in locked:
- raise Failed, _("Can't install %s: it's conflicted by "
-@@ -565,7 +586,7 @@ class Transaction(object):
- for namepkg in namepkgs:
- if namepkg is not pkg and not pkg.coexists(namepkg):
- if not isinst(namepkg):
-- locked[namepkg] = True
-+ locked[namepkg] = (LOCKED_NO_COEXIST, pkg)
- continue
- if namepkg in locked:
- raise Failed, _("Can't install %s: it can't coexist "
-@@ -577,6 +598,7 @@ class Transaction(object):
-
- # Check if someone is already providing it.
- prvpkgs = {}
-+ lockedpkgs = {}
- found = False
- for prv in req.providedby:
- for prvpkg in prv.packages:
-@@ -585,6 +607,8 @@ class Transaction(object):
- break
- if prvpkg not in locked:
- prvpkgs[prvpkg] = True
-+ else:
-+ lockedpkgs[prvpkg] = locked[prvpkg]
- else:
- continue
- break
-@@ -597,7 +621,17 @@ class Transaction(object):
- if not prvpkgs:
- # No packages provide it at all. Give up.
- if req in pkg.requires:
-- raise Failed, _("Can't install %s: no package provides %s") % \
-+ reasons = []
-+ for prv in req.providedby:
-+ for prvpkg in prv.packages:
-+ lockedres = lockedpkgs.get(prvpkg, None)
-+ if lockedres:
-+ reasons.append(lock_reason(prvpkg, lockedres))
-+ if reasons:
-+ raise Failed, _("Can't install %s: unable to install provider for %s:\n %s") % \
-+ (pkg, req, '\n '.join(reasons))
-+ else:
-+ raise Failed, _("Can't install %s: no package provides %s") % \
- (pkg, req)
- else:
- # It's only a recommend, skip
-@@ -627,7 +661,7 @@ class Transaction(object):
- if ownpending:
- pending = []
-
-- locked[pkg] = True
-+ locked[pkg] = (LOCKED_REMOVE, None)
- changeset.set(pkg, REMOVE)
- isinst = changeset.installed
-
-@@ -1140,22 +1174,22 @@ class Transaction(object):
- if op is KEEP:
- if pkg in changeset:
- del changeset[pkg]
-- locked[pkg] = True
-+ locked[pkg] = (LOCKED_KEEP, None)
- elif op is INSTALL:
- if not isinst(pkg) and pkg in locked:
- raise Failed, _("Can't install %s: it's locked") % pkg
- changeset.set(pkg, INSTALL)
-- locked[pkg] = True
-+ locked[pkg] = (LOCKED_INSTALL, None)
- elif op is REMOVE:
- if isinst(pkg) and pkg in locked:
- raise Failed, _("Can't remove %s: it's locked") % pkg
- changeset.set(pkg, REMOVE)
-- locked[pkg] = True
-+ locked[pkg] = (LOCKED_REMOVE, None)
- elif op is REINSTALL:
- if pkg in locked:
- raise Failed, _("Can't reinstall %s: it's locked")%pkg
- changeset.set(pkg, INSTALL, force=True)
-- locked[pkg] = True
-+ locked[pkg] = (LOCKED_INSTALL, None)
- elif op is UPGRADE:
- pass
-
---
-1.8.1.2
-
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch b/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
deleted file mode 100644
index 531ea51cad..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-backends/rpm: add support for setting dependency flags
-
-This is useful for OpenEmbedded so that we can do the equivalent of
-the --nolinktos and --noparentdirs rpm command line options.
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
-[sgw - Added try/catch for rpm4 since it does not have setDFlags() API]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-
-Index: smart-1.4.1/smart/backends/rpm/pm.py
-===================================================================
---- smart-1.4.1.orig/smart/backends/rpm/pm.py
-+++ smart-1.4.1/smart/backends/rpm/pm.py
-@@ -106,6 +106,26 @@ class RPMPackageManager(PackageManager):
- flags |= rpm.RPMTRANS_FLAG_TEST
- ts.setFlags(flags)
-
-+ try:
-+ dflags = ts.setDFlags(0)
-+ if sysconf.get("rpm-noupgrade", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOUPGRADE
-+ if sysconf.get("rpm-norequires", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOREQUIRES
-+ if sysconf.get("rpm-noconflicts", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOCONFLICTS
-+ if sysconf.get("rpm-noobsoletes", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOOBSOLETES
-+ if sysconf.get("rpm-noparentdirs", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOPARENTDIRS
-+ if sysconf.get("rpm-nolinktos", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOLINKTOS
-+ if sysconf.get("rpm-nosuggest", False):
-+ dflags |= rpm.RPMDEPS_FLAG_NOSUGGEST
-+ ts.setDFlags(dflags)
-+ except AttributeError, ae:
-+ pass
-+
- # Set rpm verbosity level.
- levelname = sysconf.get('rpm-log-level')
- level = {
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-filename-NAME_MAX.patch b/meta/recipes-devtools/python/python-smartpm/smart-filename-NAME_MAX.patch
deleted file mode 100644
index 22794a7388..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-filename-NAME_MAX.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From a17998b6be3319ae476a64f366737bc267a53a8a Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 16 Sep 2013 05:54:13 -0400
-Subject: [PATCH] fetcher.py: truncate the filename to meet NAME_MAX
-
-The function getLocalPath() converts the filepath into the filename,
-there would be a "File name too long" error when len(filename) >
-NAME_MAX, truncate it to meet NAME_MAX will fix the problem.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- smart/fetcher.py | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/smart/fetcher.py b/smart/fetcher.py
---- a/smart/fetcher.py
-+++ b/smart/fetcher.py
-@@ -139,6 +139,14 @@ class Fetcher(object):
- filename = os.path.basename(path)
- if self._localpathprefix:
- filename = self._localpathprefix+filename
-+ # pathconf requires the path existed
-+ if not os.path.exists(self._localdir):
-+ os.makedirs(self._localdir)
-+ name_max = os.pathconf(self._localdir, 'PC_NAME_MAX')
-+ # The length of the filename should be less than NAME_MAX
-+ if len(filename) > name_max:
-+ iface.debug(_("Truncate %s to %s") % (filename, filename[-name_max:]))
-+ filename = filename[-name_max:]
- return os.path.join(self._localdir, filename)
-
- def setForceCopy(self, value):
---
-1.7.10.4
-
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-flag-exclude-packages.patch b/meta/recipes-devtools/python/python-smartpm/smart-flag-exclude-packages.patch
deleted file mode 100644
index 21a28746a1..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-flag-exclude-packages.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-Add exclude-packages flag support
-
-Allow configuring specific packages to be excluded. This will allow
-users to specify things NOT to install, and if they are attempted an
-error will be generated.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: smart-1.4.1/smart/const.py
-===================================================================
---- smart-1.4.1.orig/smart/const.py
-+++ smart-1.4.1/smart/const.py
-@@ -70,6 +70,7 @@ DATADIR = "/var/lib/smart/"
- USERDATADIR = "~/.smart/"
- CONFFILE = "config"
-
-+LOCKED_EXCLUDE = Enum('LOCKED_EXCLUDE')
- LOCKED_INSTALL = Enum('LOCKED_INSTALL')
- LOCKED_REMOVE = Enum('LOCKED_REMOVE')
- LOCKED_CONFLICT = Enum('LOCKED_CONFLICT')
-Index: smart-1.4.1/smart/transaction.py
-===================================================================
---- smart-1.4.1.orig/smart/transaction.py
-+++ smart-1.4.1/smart/transaction.py
-@@ -19,7 +19,7 @@
- # along with Smart Package Manager; if not, write to the Free Software
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- #
--from smart.const import INSTALL, REMOVE, UPGRADE, FIX, REINSTALL, KEEP, LOCKED_INSTALL, LOCKED_CONFLICT, LOCKED_CONFLICT_BY, LOCKED_NO_COEXIST, LOCKED_SYSCONF, LOCKED_REMOVE
-+from smart.const import INSTALL, REMOVE, UPGRADE, FIX, REINSTALL, KEEP, LOCKED_EXCLUDE, LOCKED_INSTALL, LOCKED_CONFLICT, LOCKED_CONFLICT_BY, LOCKED_NO_COEXIST, LOCKED_SYSCONF, LOCKED_REMOVE
- from smart.cache import PreRequires, Package
- from smart import *
-
-@@ -29,7 +29,9 @@ def lock_reason(pkg, lockvalue):
- except TypeError:
- reason = None
- lockvalue = None
-- if reason == LOCKED_INSTALL:
-+ if reason == LOCKED_EXCLUDE:
-+ return _("%s is to be excluded") % pkg
-+ elif reason == LOCKED_INSTALL:
- return _("%s is to be installed") % pkg
- elif reason == LOCKED_CONFLICT:
- return _("%s conflicts with %s") % (pkg, otherpkg)
-@@ -210,6 +212,10 @@ class Policy(object):
- self._sysconflocked.append(pkg)
- self._locked[pkg] = (LOCKED_SYSCONF, None)
-
-+ for pkg in pkgconf.filterByFlag("exclude-packages", cache.getPackages()):
-+ if pkg not in self._locked:
-+ self._locked[pkg] = (LOCKED_EXCLUDE, None)
-+
- def runFinished(self):
- self._priorities.clear()
- for pkg in self._sysconflocked:
-Index: smart-1.4.1/smart/commands/flag.py
-===================================================================
---- smart-1.4.1.orig/smart/commands/flag.py
-+++ smart-1.4.1/smart/commands/flag.py
-@@ -47,6 +47,8 @@ Currently known flags are:
- multi-version - Flagged packages may have more than one version
- installed in the system at the same time
- (backend dependent).
-+ exclude-packages - Flagged packages will be excluded, if they are
-+ required, an error will be generated.
- ignore-recommends - Flagged packages will not be installed, if
- they are only recommended by a package to be
- installed rather than required.
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-flag-ignore-recommends.patch b/meta/recipes-devtools/python/python-smartpm/smart-flag-ignore-recommends.patch
deleted file mode 100644
index 5d5c6f4346..0000000000
--- a/meta/recipes-devtools/python/python-smartpm/smart-flag-ignore-recommends.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-Add ignore-recommends flag support
-
-Allow configuring recommends on specific packages to be ignored.
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
----
- smart/commands/flag.py | 3 +++
- smart/transaction.py | 7 ++++++-
- 2 files changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/smart/commands/flag.py b/smart/commands/flag.py
-index 8b90496..191bb11 100644
---- a/smart/commands/flag.py
-+++ b/smart/commands/flag.py
-@@ -47,6 +47,9 @@ Currently known flags are:
- multi-version - Flagged packages may have more than one version
- installed in the system at the same time
- (backend dependent).
-+ ignore-recommends - Flagged packages will not be installed, if
-+ they are only recommended by a package to be
-+ installed rather than required.
-
- security - Flagged packages are updates for security errata.
- bugfix - Flagged packages are updates for bugfix errata.
-diff --git a/smart/transaction.py b/smart/transaction.py
-index dd9aa38..38eabae 100644
---- a/smart/transaction.py
-+++ b/smart/transaction.py
-@@ -596,12 +596,17 @@ class Transaction(object):
- # Install packages required by this one.
- for req in pkg.requires + pkg.recommends:
-
-+ reqrequired = req in pkg.requires
-+
- # Check if someone is already providing it.
- prvpkgs = {}
- lockedpkgs = {}
- found = False
- for prv in req.providedby:
- for prvpkg in prv.packages:
-+ if not reqrequired:
-+ if pkgconf.testFlag("ignore-recommends", prvpkg):
-+ continue
- if isinst(prvpkg):
- found = True
- break
-@@ -620,7 +625,7 @@ class Transaction(object):
-
- if not prvpkgs:
- # No packages provide it at all. Give up.
-- if req in pkg.requires:
-+ if reqrequired:
- reasons = []
- for prv in req.providedby:
- for prvpkg in prv.packages:
---
-1.8.1.2
-
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch b/meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch
index 2ca0f6d593..b82265b3ff 100644
--- a/meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch
+++ b/meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch
@@ -8,170 +8,8 @@ Upstream-Status: Pending
Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
-diff --git a/smart/commands/channel.py b/smart/commands/channel.py
-index aa76f91..63fbb35 100644
---- a/smart/commands/channel.py
-+++ b/smart/commands/channel.py
-@@ -157,7 +157,17 @@ def main(ctrl, opts):
- opts.show is None and opts.yaml is None):
- iface.warning(_("Can't edit channels information."))
- raise Error, _("Configuration is in readonly mode.")
--
-+
-+ # Argument check
-+ opts.check_args_of_option("set", -1)
-+ opts.check_args_of_option("remove", -1)
-+ opts.check_args_of_option("edit", 0)
-+ opts.check_args_of_option("enable", -1)
-+ opts.check_args_of_option("disable", -1)
-+ opts.ensure_action("channel", ["add", "set", "remove", "remove_all",
-+ "list", "show", "yaml", "enable", "disable"])
-+ opts.check_remaining_args()
-+
- if opts.add is not None:
- if not opts.add and opts.args == ["-"]:
- newchannels = []
-diff --git a/smart/commands/check.py b/smart/commands/check.py
-index b08608a..506e852 100644
---- a/smart/commands/check.py
-+++ b/smart/commands/check.py
-@@ -72,6 +72,9 @@ def parse_options(argv):
-
- def main(ctrl, opts, reloadchannels=True):
-
-+ # Argument check
-+ opts.check_args_of_option("channels", 1)
-+
- if sysconf.get("auto-update"):
- from smart.commands import update
- updateopts = update.parse_options([])
-diff --git a/smart/commands/config.py b/smart/commands/config.py
-index dd50dee..4fe4366 100644
---- a/smart/commands/config.py
-+++ b/smart/commands/config.py
-@@ -80,6 +80,12 @@ def main(ctrl, opts):
- globals["false"] = False
- globals["no"] = False
-
-+ #