Misc fixes
cover Misc fixes
A fix for the patch error backtrace as well as removing PRIORITY from the recently upgraded hdparm recipe.
The following changes since commit a0f5dd25a37fe3b8664c2133e80b6214559f93f6:
package_rpm.bbclass: Add support for filenames with spaces (2012-01-17 16:20:46 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/fixes11
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/fixes11
Paul Eggleton (2):
classes/patch: avoid backtrace when patch does not apply
hdparm: remove PRIORITY
meta/classes/patch.bbclass | 5 ++++- meta/lib/oe/patch.py | 10 +++++----- meta/recipes-extended/hdparm/hdparm_9.37.bb | 1 - 3 files changed, 9 insertions(+), 7 deletions(-)
Signature · 1 line
1.7.5.4
PATCH 1/2 classes/patch: avoid backtrace when patch does not apply
We don't need to see a Python stack backtrace when a patch does not apply, just the error output from patch, so trap these kinds of errors and ensure that we display the message and fail the task and nothing else.
Fixes [YOCTO #1143]
--- meta/classes/patch.bbclass | 5 ++++- meta/lib/oe/patch.py | 10 +++++----- 2 files changed, 9 insertions(+), 6 deletions(-)
meta/classes/patch.bbclass +4 -1
@@ -155,7 +155,10 @@ python patch_do_patch() { patchset.Import({"file":local, "strippath": parm['striplevel']}, True) except Exception as exc: bb.fatal(str(exc)) - resolver.Resolve() + try: + resolver.Resolve() + except bb.BBHandledException as e: + bb.fatal(str(e)) } patch_do_patch[vardepsexclude] = "PATCHRESOLVE"
meta/lib/oe/patch.py +5 -5
@@ -2,14 +2,14 @@ import oe.path import os import bb.utils, bb.msg, bb.data, bb.fetch2 -class NotFoundError(Exception): +class NotFoundError(bb.BBHandledException): def __init__(self, path): self.path = path def __str__(self): return "Error: %s not found." % self.path -class CmdError(Exception): +class CmdError(bb.BBHandledException): def __init__(self, exitstatus, output): self.status = exitstatus self.output = output
@@ -207,7 +207,7 @@ class QuiltTree(PatchSet): # read series -> self.patches seriespath = os.path.join(self.dir, 'patches', 'series') if not os.path.exists(self.dir): - raise Exception("Error: %s does not exist." % self.dir) + raise NotFoundError(self.dir) if os.path.exists(seriespath): series = file(seriespath, 'r') for line in series.readlines():
@@ -228,7 +228,7 @@ class QuiltTree(PatchSet): if sys.exc_value.output.strip() == "No patches applied": return else: - raise sys.exc_value + raise output = [val for val in output.split('\n') if not val.startswith('#')] for patch in self.patches: if os.path.basename(patch["quiltfile"]) == output[-1]:
@@ -336,7 +336,7 @@ class NOOPResolver(Resolver): except Exception: import sys os.chdir(olddir) - raise sys.exc_value + raise # Patch resolver which relies on the user doing all the work involved in the # resolution, with the exception of refreshing the remote copy of the patch
Signature · 1 line
1.7.5.4
PATCH 2/2 hdparm: remove PRIORITY
In reply to Paul EggletonPRIORITY is no longer set in recipes in OE-Core, so remove it. (Since "optional" is the default value from bitbake.conf, no PR bump is necessary.)
--- meta/recipes-extended/hdparm/hdparm_9.37.bb | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
meta/recipes-extended/hdparm/hdparm_9.37.bb +0 -1
@@ -1,7 +1,6 @@ DESCRIPTION = "hdparm is a Linux shell utility for viewing \ and manipulating various IDE drive and driver parameters." SECTION = "console/utils" -PRIORITY = "optional" LICENSE = "BSD" LICENSE_wiper = "GPLv2" LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=910a8a42c962d238619c75fdb78bdb24 \
Signature · 1 line
1.7.5.4
Richard Purdie
AppliedRe: [PATCH 1/2] classes/patch: avoid backtrace when patch does not apply
In reply to Paul EggletonQuoted 5 lines · Paul Eggleton
We don't need to see a Python stack backtrace when a patch does not apply, just the error output from patch, so trap these kinds of errors and ensure that we display the message and fail the task and nothing else.
Quoted 7 lines
Fixes [YOCTO #1143]
Signed-off-by Paul Eggleton <[email protected]>--- meta/classes/patch.bbclass | 5 ++++- meta/lib/oe/patch.py | 10 +++++----- 2 files changed, 9 insertions(+), 6 deletions(-)
Merged to master, thanks.
Richard
Richard Purdie
AppliedRe: [PATCH 2/2] hdparm: remove PRIORITY
In reply to Paul EggletonQuoted 8 lines · Paul Eggleton
PRIORITY is no longer set in recipes in OE-Core, so remove it. (Since "optional" is the default value from bitbake.conf, no PR bump is necessary.)
Signed-off-by Paul Eggleton <[email protected]>--- meta/recipes-extended/hdparm/hdparm_9.37.bb | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
Merged to master, thanks.
Richard