diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2013-09-10 20:59:35 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-11 11:06:06 +0100 |
commit | bdf07b1698d228dc7ff555199a269b1ff8ceca19 (patch) | |
tree | 4e5563b9e7df8c646f92fb6d062cc9ff37918683 /meta/recipes-devtools | |
parent | 1c34b0e871e475a90e27d338469ba31f322d5300 (diff) | |
download | openembedded-core-bdf07b1698d228dc7ff555199a269b1ff8ceca19.tar.gz openembedded-core-bdf07b1698d228dc7ff555199a269b1ff8ceca19.tar.bz2 openembedded-core-bdf07b1698d228dc7ff555199a269b1ff8ceca19.zip |
python-smartpm: Add an attempt install mode
[ YOCTO #3723 ]
Add a mode to smart that will allow an installation to continue, instead of
failure in the case that one or more items is uninstallable.
Uninstallable packages are simply ignored, and no error is generated.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/python/python-smartpm/smart-attempt.patch | 59 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python-smartpm_1.4.1.bb | 1 |
2 files changed, 60 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch b/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch new file mode 100644 index 0000000000..0d603d3d1b --- /dev/null +++ b/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch @@ -0,0 +1,59 @@ +Add a mechanism to attempt the install operation, w/o failing. + +For complementary and 'attemptonly' packages, we need a way to instruct smart to +try to install, but ignore any failures. + +This option only works for the install operation. + +Upstream-Status: Pending + +Signed-off-by: Mark Hatle <mark.hatle@windriver.com> + +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) ++ + if opts.explain: + sysconf.set("explain-changesets", True, soft=True) + +Index: smart-1.4.1/smart/transaction.py +=================================================================== +--- smart-1.4.1.orig/smart/transaction.py ++++ smart-1.4.1/smart/transaction.py +@@ -1216,9 +1216,17 @@ 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 sysconf.has("attempt-install", soft=True): ++ 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: diff --git a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb index 5d673b9902..f406d692e3 100644 --- a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb +++ b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb @@ -30,6 +30,7 @@ SRC_URI = "\ file://smart-flag-ignore-recommends.patch \ file://smart-flag-exclude-packages.patch \ file://smart-config-ignore-all-recommends.patch \ + file://smart-attempt.patch \ " SRC_URI[md5sum] = "573ef32ba177a6b3c4bf7ef04873fcb6" |