* [PATCH 0/4] Error message fixes / cleanup
@ 2012-01-13 17:42 Paul Eggleton
2012-01-13 17:42 ` [PATCH 1/4] classes/base: note variable name in COMPATIBLE_* skip messages Paul Eggleton
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Paul Eggleton @ 2012-01-13 17:42 UTC (permalink / raw)
To: openembedded-core
A trio of of minor improvements to error messages as well as the removal
of packagehistory.bbclass.
The following changes since commit bd047935305c872b565f30b46c94b7077e5fb3a2:
patch.bbclass: Ensure the DATE and SRCDATE variable exclusions apply to the correct function (2012-01-13 16:56:20 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/fixes10
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/fixes10
Paul Eggleton (4):
classes/base: note variable name in COMPATIBLE_* skip messages
conf/bitbake.conf: allow wget to output error messages
classes/package: remove out-of-date notice referring to the OE
bugtracker
classes/packagehistory: remove now obsolete class
meta/classes/base.bbclass | 4 +-
meta/classes/package.bbclass | 3 -
meta/classes/packagehistory.bbclass | 249 -----------------------------------
meta/conf/bitbake.conf | 6 +-
4 files changed, 5 insertions(+), 257 deletions(-)
delete mode 100644 meta/classes/packagehistory.bbclass
--
1.7.5.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] classes/base: note variable name in COMPATIBLE_* skip messages
2012-01-13 17:42 [PATCH 0/4] Error message fixes / cleanup Paul Eggleton
@ 2012-01-13 17:42 ` Paul Eggleton
2012-01-13 17:42 ` [PATCH 2/4] conf/bitbake.conf: allow wget to output error messages Paul Eggleton
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2012-01-13 17:42 UTC (permalink / raw)
To: openembedded-core
When raising SkipPackage for COMPATIBLE_MACHINE and COMPATIBLE_HOST
exceptions, include the name of the variable as a hint to the user.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/classes/base.bbclass | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index f0c358e..091e965 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -379,7 +379,7 @@ python () {
import re
this_host = d.getVar('HOST_SYS', 1)
if not re.match(need_host, this_host):
- raise bb.parse.SkipPackage("incompatible with host %s" % this_host)
+ raise bb.parse.SkipPackage("incompatible with host %s (not in COMPATIBLE_HOST)" % this_host)
need_machine = d.getVar('COMPATIBLE_MACHINE', 1)
if need_machine:
@@ -388,7 +388,7 @@ python () {
if this_machine and not re.match(need_machine, this_machine):
this_soc_family = d.getVar('SOC_FAMILY', 1)
if (this_soc_family and not re.match(need_machine, this_soc_family)) or not this_soc_family:
- raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
+ raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % this_machine)
dont_want_license = d.getVar('INCOMPATIBLE_LICENSE', 1)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] conf/bitbake.conf: allow wget to output error messages
2012-01-13 17:42 [PATCH 0/4] Error message fixes / cleanup Paul Eggleton
2012-01-13 17:42 ` [PATCH 1/4] classes/base: note variable name in COMPATIBLE_* skip messages Paul Eggleton
@ 2012-01-13 17:42 ` Paul Eggleton
2012-01-13 17:42 ` [PATCH 3/4] classes/package: remove out-of-date notice referring to the OE bugtracker Paul Eggleton
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2012-01-13 17:42 UTC (permalink / raw)
To: openembedded-core
Use the -nv instead of -q command line option for wget so that if
fetching from a URL that the wget fetcher handles (e.g. http) fails, we
get a possibly useful error message (but it still remains relatively
quiet when the fetch succeeds.)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/conf/bitbake.conf | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 43eedad..d047338 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -556,17 +556,17 @@ XORG_MIRROR = "http://xorg.freedesktop.org/releases"
FETCHCMD_svn = "/usr/bin/env svn"
FETCHCMD_cvs = "/usr/bin/env cvs"
-FETCHCMD_wget = "/usr/bin/env wget -t 5 -q --no-check-certificate"
+FETCHCMD_wget = "/usr/bin/env wget -t 5 -nv --no-check-certificate"
FETCHCMD_bzr = "/usr/bin/env bzr"
FETCHCMD_hg = "/usr/bin/env hg"
FETCHCOMMAND = "ERROR, this must be a BitBake bug"
-FETCHCOMMAND_wget = "/usr/bin/env wget -t 5 -q --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'"
+FETCHCOMMAND_wget = "/usr/bin/env wget -t 5 -nv --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'"
FETCHCOMMAND_cvs = "/usr/bin/env cvs '-d${CVSROOT}' co ${CVSCOOPTS} ${CVSMODULE}"
FETCHCOMMAND_svn = "/usr/bin/env svn co ${SVNCOOPTS} ${SVNROOT} ${SVNMODULE}"
CHECKCOMMAND_wget = "/usr/bin/env wget --spider -t 5 --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'"
RESUMECOMMAND = "ERROR, this must be a BitBake bug"
-RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 5 -q --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'"
+RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 5 -nv --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'"
UPDATECOMMAND = "ERROR, this must be a BitBake bug"
UPDATECOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT} update -d -P ${CVSCOOPTS}"
UPDATECOMMAND_svn = "/usr/bin/env svn update ${SVNCOOPTS}"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] classes/package: remove out-of-date notice referring to the OE bugtracker
2012-01-13 17:42 [PATCH 0/4] Error message fixes / cleanup Paul Eggleton
2012-01-13 17:42 ` [PATCH 1/4] classes/base: note variable name in COMPATIBLE_* skip messages Paul Eggleton
2012-01-13 17:42 ` [PATCH 2/4] conf/bitbake.conf: allow wget to output error messages Paul Eggleton
@ 2012-01-13 17:42 ` Paul Eggleton
2012-01-13 17:42 ` [PATCH 4/4] classes/packagehistory: remove now obsolete class Paul Eggleton
2012-01-17 20:12 ` [PATCH 0/4] Error message fixes / cleanup Saul Wold
4 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2012-01-13 17:42 UTC (permalink / raw)
To: openembedded-core
OpenEmbedded doesn't officially use a bug tracker anymore, and a message
asking the user to fix the metadata could be applied to almost any error
that occurs, so just remove the whole message.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/classes/package.bbclass | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index f8f0a12..f06bf92 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -887,10 +887,7 @@ python populate_packages () {
package_list = []
for pkg in packages.split():
if pkg in package_list:
- bb.error("-------------------")
bb.error("%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg)
- bb.error("Please fix the metadata/report this as bug to OE bugtracker.")
- bb.error("-------------------")
else:
package_list.append(pkg)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] classes/packagehistory: remove now obsolete class
2012-01-13 17:42 [PATCH 0/4] Error message fixes / cleanup Paul Eggleton
` (2 preceding siblings ...)
2012-01-13 17:42 ` [PATCH 3/4] classes/package: remove out-of-date notice referring to the OE bugtracker Paul Eggleton
@ 2012-01-13 17:42 ` Paul Eggleton
2012-01-17 20:12 ` [PATCH 0/4] Error message fixes / cleanup Saul Wold
4 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2012-01-13 17:42 UTC (permalink / raw)
To: openembedded-core
packagehistory.bbclass has been superseded by buildhistory.bbclass,
which gives more detailed output (including information on produced
images) as well as other enhanced functionality.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/classes/packagehistory.bbclass | 249 -----------------------------------
1 files changed, 0 insertions(+), 249 deletions(-)
delete mode 100644 meta/classes/packagehistory.bbclass
diff --git a/meta/classes/packagehistory.bbclass b/meta/classes/packagehistory.bbclass
deleted file mode 100644
index 5a1c846..0000000
--- a/meta/classes/packagehistory.bbclass
+++ /dev/null
@@ -1,249 +0,0 @@
-# Must inherit package first before changing PACKAGEFUNCS
-inherit package
-PACKAGEFUNCS += "emit_pkghistory"
-
-PKGHIST_DIR = "${TMPDIR}/pkghistory/${MULTIMACH_TARGET_SYS}/"
-
-#
-# Called during do_package to write out metadata about this package
-# for comparision when writing future packages
-#
-python emit_pkghistory() {
- import re
-
- pkghistdir = os.path.join(d.getVar('PKGHIST_DIR', True), d.getVar('PN', True))
-
- class RecipeInfo:
- def __init__(self, name):
- self.name = name
- self.pe = "0"
- self.pv = "0"
- self.pr = "r0"
- self.depends = ""
- self.packages = ""
-
- class PackageInfo:
- def __init__(self, name):
- self.name = name
- self.pe = "0"
- self.pv = "0"
- self.pr = "r0"
- self.size = 0
- self.depends = ""
- self.rdepends = ""
- self.rrecommends = ""
- self.files = ""
- self.filelist = ""
-
- # Should check PACKAGES here to see if anything removed
-
- def getpkgvar(pkg, var):
- val = d.getVar('%s_%s' % (var, pkg), True)
- if val:
- return val
- val = d.getVar(var, True)
-
- return val
-
- def readRecipeInfo(pn, histfile):
- rcpinfo = RecipeInfo(pn)
- f = open(histfile, "r")
- try:
- for line in f:
- lns = line.split('=')
- name = lns[0].strip()
- value = lns[1].strip(" \t\r\n").strip('"')
- if name == "PE":
- rcpinfo.pe = value
- elif name == "PV":
- rcpinfo.pv = value
- elif name == "PR":
- rcpinfo.pr = value
- elif name == "DEPENDS":
- rcpinfo.depends = value
- elif name == "PACKAGES":
- rcpinfo.packages = value
- finally:
- f.close()
- return rcpinfo
-
- def readPackageInfo(pkg, histfile):
- pkginfo = PackageInfo(pkg)
- f = open(histfile, "r")
- try:
- for line in f:
- lns = line.split('=')
- name = lns[0].strip()
- value = lns[1].strip(" \t\r\n").strip('"')
- if name == "PE":
- pkginfo.pe = value
- elif name == "PV":
- pkginfo.pv = value
- elif name == "PR":
- pkginfo.pr = value
- elif name == "RDEPENDS":
- pkginfo.rdepends = value
- elif name == "RRECOMMENDS":
- pkginfo.rrecommends = value
- elif name == "PKGSIZE":
- pkginfo.size = long(value)
- elif name == "FILES":
- pkginfo.files = value
- elif name == "FILELIST":
- pkginfo.filelist = value
- finally:
- f.close()
- return pkginfo
-
- def getlastrecipeversion(pn):
- try:
- histfile = os.path.join(pkghistdir, "latest")
- return readRecipeInfo(pn, histfile)
- except EnvironmentError:
- return None
-
- def getlastpkgversion(pkg):
- try:
- histfile = os.path.join(pkghistdir, pkg, "latest")
- return readPackageInfo(pkg, histfile)
- except EnvironmentError:
- return None
-
- def squashspaces(string):
- return re.sub("\s+", " ", string)
-
- pn = d.getVar('PN', True)
- pe = d.getVar('PE', True) or "0"
- pv = d.getVar('PV', True)
- pr = d.getVar('PR', True)
- packages = squashspaces(d.getVar('PACKAGES', True))
-
- rcpinfo = RecipeInfo(pn)
- rcpinfo.pe = pe
- rcpinfo.pv = pv
- rcpinfo.pr = pr
- rcpinfo.depends = squashspaces(d.getVar('DEPENDS', True) or "")
- rcpinfo.packages = packages
- write_recipehistory(rcpinfo, d)
- write_latestlink(None, pe, pv, pr, d)
-
- # Apparently the version can be different on a per-package basis (see Python)
- pkgdest = d.getVar('PKGDEST', True)
- for pkg in packages.split():
- pe = getpkgvar(pkg, 'PE') or "0"
- pv = getpkgvar(pkg, 'PV')
- pr = getpkgvar(pkg, 'PR')
- #
- # Find out what the last version was
- # Make sure the version did not decrease
- #
- lastversion = getlastpkgversion(pkg)
- if lastversion:
- last_pe = lastversion.pe
- last_pv = lastversion.pv
- last_pr = lastversion.pr
- r = bb.utils.vercmp((pe, pv, pr), (last_pe, last_pv, last_pr))
- if r < 0:
- bb.fatal("Package version for package %s went backwards which would break package feeds from (%s:%s-%s to %s:%s-%s)" % (pkg, last_pe, last_pv, last_pr, pe, pv, pr))
-
- pkginfo = PackageInfo(pkg)
- pkginfo.pe = pe
- pkginfo.pv = pv
- pkginfo.pr = pr
- pkginfo.rdepends = squashspaces(getpkgvar(pkg, 'RDEPENDS') or "")
- pkginfo.rrecommends = squashspaces(getpkgvar(pkg, 'RRECOMMENDS') or "")
- pkginfo.files = squashspaces(getpkgvar(pkg, 'FILES') or "")
-
- # Gather information about packaged files
- pkgdestpkg = os.path.join(pkgdest, pkg)
- filelist = []
- pkginfo.size = 0
- for root, dirs, files in os.walk(pkgdestpkg):
- relpth = os.path.relpath(root, pkgdestpkg)
- for f in files:
- fstat = os.lstat(os.path.join(root, f))
- pkginfo.size += fstat.st_size
- filelist.append(os.sep + os.path.join(relpth, f))
- pkginfo.filelist = " ".join(filelist)
-
- write_pkghistory(pkginfo, d)
-
- if lastversion:
- check_pkghistory(pkginfo, lastversion)
-
- write_latestlink(pkg, pe, pv, pr, d)
-}
-
-
-def check_pkghistory(pkginfo, lastversion):
-
- bb.debug(2, "Checking package history")
- # RDEPENDS removed?
- # PKG changed?
- # Each file list of each package for file removals?
-
-
-def write_recipehistory(rcpinfo, d):
- bb.debug(2, "Writing recipe history")
-
- pkghistdir = os.path.join(d.getVar('PKGHIST_DIR', True), d.getVar('PN', True))
-
- if not os.path.exists(pkghistdir):
- os.makedirs(pkghistdir)
-
- verfile = os.path.join(pkghistdir, "%s:%s-%s" % (rcpinfo.pe, rcpinfo.pv, rcpinfo.pr))
- f = open(verfile, "w")
- try:
- if rcpinfo.pe != "0":
- f.write("PE = %s\n" % rcpinfo.pe)
- f.write("PV = %s\n" % rcpinfo.pv)
- f.write("PR = %s\n" % rcpinfo.pr)
- f.write("DEPENDS = %s\n" % rcpinfo.depends)
- f.write("PACKAGES = %s\n" % rcpinfo.packages)
- finally:
- f.close()
-
-
-def write_pkghistory(pkginfo, d):
- bb.debug(2, "Writing package history")
-
- pkghistdir = os.path.join(d.getVar('PKGHIST_DIR', True), d.getVar('PN', True))
-
- verpath = os.path.join(pkghistdir, pkginfo.name)
- if not os.path.exists(verpath):
- os.makedirs(verpath)
-
- verfile = os.path.join(verpath, "%s:%s-%s" % (pkginfo.pe, pkginfo.pv, pkginfo.pr))
- f = open(verfile, "w")
- try:
- if pkginfo.pe != "0":
- f.write("PE = %s\n" % pkginfo.pe)
- f.write("PV = %s\n" % pkginfo.pv)
- f.write("PR = %s\n" % pkginfo.pr)
- f.write("RDEPENDS = %s\n" % pkginfo.rdepends)
- f.write("RRECOMMENDS = %s\n" % pkginfo.rrecommends)
- f.write("PKGSIZE = %d\n" % pkginfo.size)
- f.write("FILES = %s\n" % pkginfo.files)
- f.write("FILELIST = %s\n" % pkginfo.filelist)
- finally:
- f.close()
-
-
-def write_latestlink(pkg, pe, pv, pr, d):
- import shutil
-
- pkghistdir = os.path.join(d.getVar('PKGHIST_DIR', True), d.getVar('PN', True))
-
- def rm_link(path):
- try:
- os.unlink(path)
- except OSError:
- return
-
- if pkg:
- filedir = os.path.join(pkghistdir, pkg)
- else:
- filedir = pkghistdir
- rm_link(os.path.join(filedir, "latest"))
- shutil.copy(os.path.join(filedir, "%s:%s-%s" % (pe, pv, pr)), os.path.join(filedir, "latest"))
-
--
1.7.5.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/4] Error message fixes / cleanup
2012-01-13 17:42 [PATCH 0/4] Error message fixes / cleanup Paul Eggleton
` (3 preceding siblings ...)
2012-01-13 17:42 ` [PATCH 4/4] classes/packagehistory: remove now obsolete class Paul Eggleton
@ 2012-01-17 20:12 ` Saul Wold
4 siblings, 0 replies; 6+ messages in thread
From: Saul Wold @ 2012-01-17 20:12 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Paul Eggleton
On 01/13/2012 09:42 AM, Paul Eggleton wrote:
> A trio of of minor improvements to error messages as well as the removal
> of packagehistory.bbclass.
>
> The following changes since commit bd047935305c872b565f30b46c94b7077e5fb3a2:
>
> patch.bbclass: Ensure the DATE and SRCDATE variable exclusions apply to the correct function (2012-01-13 16:56:20 +0000)
>
> are available in the git repository at:
> git://git.openembedded.org/openembedded-core-contrib paule/fixes10
> http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/fixes10
>
> Paul Eggleton (4):
> classes/base: note variable name in COMPATIBLE_* skip messages
> conf/bitbake.conf: allow wget to output error messages
> classes/package: remove out-of-date notice referring to the OE
> bugtracker
> classes/packagehistory: remove now obsolete class
>
> meta/classes/base.bbclass | 4 +-
> meta/classes/package.bbclass | 3 -
> meta/classes/packagehistory.bbclass | 249 -----------------------------------
> meta/conf/bitbake.conf | 6 +-
> 4 files changed, 5 insertions(+), 257 deletions(-)
> delete mode 100644 meta/classes/packagehistory.bbclass
>
Merged into OE-Core
Thanks
Sau!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-01-17 20:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-13 17:42 [PATCH 0/4] Error message fixes / cleanup Paul Eggleton
2012-01-13 17:42 ` [PATCH 1/4] classes/base: note variable name in COMPATIBLE_* skip messages Paul Eggleton
2012-01-13 17:42 ` [PATCH 2/4] conf/bitbake.conf: allow wget to output error messages Paul Eggleton
2012-01-13 17:42 ` [PATCH 3/4] classes/package: remove out-of-date notice referring to the OE bugtracker Paul Eggleton
2012-01-13 17:42 ` [PATCH 4/4] classes/packagehistory: remove now obsolete class Paul Eggleton
2012-01-17 20:12 ` [PATCH 0/4] Error message fixes / cleanup Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox