* [PATCH 1/4] python-wifi: add recipe for version 0.5.0
@ 2011-01-06 12:48 Andreas Oberritter
2011-01-06 12:48 ` [PATCH 2/4] python-wifi: remove version 0.3.1 Andreas Oberritter
` (5 more replies)
0 siblings, 6 replies; 18+ messages in thread
From: Andreas Oberritter @ 2011-01-06 12:48 UTC (permalink / raw)
To: openembedded-devel
* package previously unpackaged files into -doc and -examples
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
CC: Martin Jansa <Martin.Jansa@gmail.com>
---
recipes/python/python-wifi_0.5.0.bb | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
create mode 100644 recipes/python/python-wifi_0.5.0.bb
diff --git a/recipes/python/python-wifi_0.5.0.bb b/recipes/python/python-wifi_0.5.0.bb
new file mode 100644
index 0000000..faa3b43
--- /dev/null
+++ b/recipes/python/python-wifi_0.5.0.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "Provides access to Linux Wireless Extensions"
+HOMEPAGE = "http://pythonwifi.wikispot.org/"
+SECTION = "devel/python"
+LICENSE = "LGPLv2+"
+LICENSE_${PN}-examples = "GPLv2+"
+RDEPENDS_${PN} = "python-ctypes python-datetime"
+
+SRC_URI = "http://download.berlios.de/pythonwifi/${P}.tar.bz2"
+SRC_URI[md5sum] = "8fe7fd0a4edce1f9bedaff4acb7fd500"
+SRC_URI[sha256sum] = "3e3f645d37ab20450f60c785cec5f21b330f28a6c46c7c1b0898305dd7a34b26"
+
+inherit setuptools
+
+do_install_append() {
+ install -d ${D}${docdir}/${PN}
+ mv ${D}${datadir}/README ${D}${docdir}/${PN}
+ mv ${D}${datadir}/INSTALL ${D}${docdir}/${PN}
+ mv ${D}${datadir}/docs/* ${D}${docdir}/${PN}
+ install -d ${D}${sbindir}
+ mv ${D}${datadir}/examples/* ${D}${sbindir}
+}
+
+PACKAGES =+ "${PN}-examples"
+
+FILES_${PN}-examples = "${sbindir}"
--
1.7.2.3
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/4] python-wifi: remove version 0.3.1
2011-01-06 12:48 [PATCH 1/4] python-wifi: add recipe for version 0.5.0 Andreas Oberritter
@ 2011-01-06 12:48 ` Andreas Oberritter
2011-01-06 13:07 ` Dr. Michael Lauer
` (2 more replies)
2011-01-06 12:48 ` [PATCH 3/4] unpack.py: add SRC_URI parameter unpack=<bool> (default: true) Andreas Oberritter
` (4 subsequent siblings)
5 siblings, 3 replies; 18+ messages in thread
From: Andreas Oberritter @ 2011-01-06 12:48 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
CC: Martin Jansa <Martin.Jansa@gmail.com>
---
recipes/python/python-wifi_0.3.1.bb | 21 ---------------------
1 files changed, 0 insertions(+), 21 deletions(-)
delete mode 100644 recipes/python/python-wifi_0.3.1.bb
diff --git a/recipes/python/python-wifi_0.3.1.bb b/recipes/python/python-wifi_0.3.1.bb
deleted file mode 100644
index fefffe6..0000000
--- a/recipes/python/python-wifi_0.3.1.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-DESCRIPTION = "Fusil is a Python library used to write fuzzing programs."
-HOMEPAGE = "http://fusil.hachoir.org/"
-SECTION = "devel/python"
-LICENSE = "GPLv2"
-SRCNAME = "python-wifi"
-
-SRC_URI = "http://pypi.python.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "\
- python-ctypes \
- python-datetime \
-"
-
-
-
-
-SRC_URI[md5sum] = "0458e32f82900e03c9fd155442242638"
-SRC_URI[sha256sum] = "a7087ac16ce2d1f146dd76cbfc442ae5b91774f4b8c8eba913c09d0c325eb12f"
--
1.7.2.3
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 3/4] unpack.py: add SRC_URI parameter unpack=<bool> (default: true)
2011-01-06 12:48 [PATCH 1/4] python-wifi: add recipe for version 0.5.0 Andreas Oberritter
2011-01-06 12:48 ` [PATCH 2/4] python-wifi: remove version 0.3.1 Andreas Oberritter
@ 2011-01-06 12:48 ` Andreas Oberritter
2011-01-11 20:31 ` Andreas Oberritter
2011-01-06 12:48 ` [PATCH 4/4] gcc: replace unconditional SRC_URI_append with SRC_URI += Andreas Oberritter
` (3 subsequent siblings)
5 siblings, 1 reply; 18+ messages in thread
From: Andreas Oberritter @ 2011-01-06 12:48 UTC (permalink / raw)
To: openembedded-devel; +Cc: Chris Larson
* This allows to download compressed files without extracting them
* Use case: gcj requires ecj.jar, which must be downloaded separately
and put into the gcc source directory before configure gets executed.
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
CC: Chris Larson <chris_larson@mentor.com>
---
classes/base.bbclass | 3 +-
docs/usermanual/reference/var_src_uri.xml | 13 ++++-
lib/oe/unpack.py | 81 +++++++++++++++++------------
3 files changed, 61 insertions(+), 36 deletions(-)
diff --git a/classes/base.bbclass b/classes/base.bbclass
index c76b77d..25d72d4 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -190,12 +190,11 @@ def oe_unpack(d, local, urldata):
bb.mkdirhier(destdir)
else:
destdir = workdir
- dos = urldata.parm.get("dos")
bb.note("Unpacking %s to %s/" % (base_path_out(local, d),
base_path_out(destdir, d)))
try:
- unpack_file(local, destdir, env={"PATH": d.getVar("PATH", True)}, dos=dos)
+ unpack_file(local, destdir, urldata.parm, env={"PATH": d.getVar("PATH", True)})
except UnpackError, exc:
bb.fatal(str(exc))
diff --git a/docs/usermanual/reference/var_src_uri.xml b/docs/usermanual/reference/var_src_uri.xml
index 706452f..521c7d5 100644
--- a/docs/usermanual/reference/var_src_uri.xml
+++ b/docs/usermanual/reference/var_src_uri.xml
@@ -91,7 +91,8 @@ SRC_URI[sha256sum] = "36bdb85c97b39ac604bc58cb7857ee08295242c78a12848ef8a31
it is unpacked into the work directory, <command>${WORKDIR}</command>. The
unpacker recognises several archive and compression types and for these it
will decompress any compressed files and extract all of the files from
- archives into the work directory. The supported types are:</para>
+ archives into the work directory, unless the option <command>unpack=no</command>
+ is set for the given file. The supported types are:</para>
<variablelist>
<varlistentry>
@@ -192,6 +193,16 @@ SRC_URI[sha256sum] = "36bdb85c97b39ac604bc58cb7857ee08295242c78a12848ef8a31
md5sum option provided.</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term>unpack={yes|no}</term>
+
+ <listitem>
+ <para>If set to 'yes' (default) and the source file is an archive,
+ then the archive will be decompressed and unpacked into the ${WORKDIR}.
+ Otherwise, the archive will be copied into the ${WORKDIR}.</para>
+ </listitem>
+ </varlistentry>
</variablelist>
<para>Related variables:</para>
diff --git a/lib/oe/unpack.py b/lib/oe/unpack.py
index e4fe5d8..8e8bf36 100644
--- a/lib/oe/unpack.py
+++ b/lib/oe/unpack.py
@@ -47,47 +47,62 @@ def subprocess_setup():
# non-Python subprocesses expect.
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
-def unpack_file(file, destdir, dos=False, env=None):
+def unpack_file(file, destdir, parameters, env=None):
import subprocess, shutil
+ try:
+ dos = to_boolean(parameters.get("dos"), False)
+ except ValueError, exc:
+ bb.fatal("Invalid value for 'dos' parameter for %s: %s" %
+ (filename, parameters.get("dos")))
+
+ try:
+ unpack = to_boolean(parameters.get("unpack"), True)
+ except ValueError, exc:
+ bb.fatal("Invalid value for 'unpack' parameter for %s: %s" %
+ (filename, parameters.get("unpack")))
+
dest = os.path.join(destdir, os.path.basename(file))
if os.path.exists(dest):
if os.path.samefile(file, dest):
return True
cmd = None
- if file.endswith('.tar'):
- cmd = 'tar x --no-same-owner -f %s' % file
- elif file.endswith('.tgz') or file.endswith('.tar.gz') or file.endswith('.tar.Z'):
- cmd = 'tar xz --no-same-owner -f %s' % file
- elif file.endswith('.tbz') or file.endswith('.tbz2') or file.endswith('.tar.bz2'):
- cmd = 'bzip2 -dc %s | tar x --no-same-owner -f -' % file
- elif file.endswith('.gz') or file.endswith('.Z') or file.endswith('.z'):
- root, ext = os.path.splitext(file)
- cmd = 'gzip -dc %s > %s' % (file, os.path.basename(root))
- elif file.endswith('.bz2'):
- root, ext = os.path.splitext(file)
- cmd = 'bzip2 -dc %s > %s' % (file, os.path.basename(root))
- elif file.endswith('.tar.xz'):
- cmd = 'xz -dc %s | tar x --no-same-owner -f -' % file
- elif file.endswith('.xz'):
- root, ext = os.path.splitext(file)
- cmd = 'xz -dc %s > %s' % (file, os.path.basename(root))
- elif file.endswith('.tar.lz'):
- cmd = 'lzip -dc %s | tar x --no-same-owner -f -' % file
- elif file.endswith('.lz'):
- root, ext = os.path.splitext(file)
- cmd = 'lzip -dc %s > %s' % (file, os.path.basename(root))
- elif file.endswith('.zip') or file.endswith('.jar'):
- cmd = 'unzip -q -o'
- if dos:
- cmd = '%s -a' % cmd
- cmd = "%s '%s'" % (cmd, file)
- elif os.path.isdir(file):
- shutil.rmtree(dest, True)
- shutil.copytree(file, dest, True)
- else:
- shutil.copy2(file, dest)
+ if unpack:
+ if file.endswith('.tar'):
+ cmd = 'tar x --no-same-owner -f %s' % file
+ elif file.endswith('.tgz') or file.endswith('.tar.gz') or file.endswith('.tar.Z'):
+ cmd = 'tar xz --no-same-owner -f %s' % file
+ elif file.endswith('.tbz') or file.endswith('.tbz2') or file.endswith('.tar.bz2'):
+ cmd = 'bzip2 -dc %s | tar x --no-same-owner -f -' % file
+ elif file.endswith('.gz') or file.endswith('.Z') or file.endswith('.z'):
+ root, ext = os.path.splitext(file)
+ cmd = 'gzip -dc %s > %s' % (file, os.path.basename(root))
+ elif file.endswith('.bz2'):
+ root, ext = os.path.splitext(file)
+ cmd = 'bzip2 -dc %s > %s' % (file, os.path.basename(root))
+ elif file.endswith('.tar.xz'):
+ cmd = 'xz -dc %s | tar x --no-same-owner -f -' % file
+ elif file.endswith('.xz'):
+ root, ext = os.path.splitext(file)
+ cmd = 'xz -dc %s > %s' % (file, os.path.basename(root))
+ elif file.endswith('.tar.lz'):
+ cmd = 'lzip -dc %s | tar x --no-same-owner -f -' % file
+ elif file.endswith('.lz'):
+ root, ext = os.path.splitext(file)
+ cmd = 'lzip -dc %s > %s' % (file, os.path.basename(root))
+ elif file.endswith('.zip') or file.endswith('.jar'):
+ cmd = 'unzip -q -o'
+ if dos:
+ cmd = '%s -a' % cmd
+ cmd = "%s '%s'" % (cmd, file)
+
+ if not unpack or not cmd:
+ if os.path.isdir(file):
+ shutil.rmtree(dest, True)
+ shutil.copytree(file, dest, True)
+ else:
+ shutil.copy2(file, dest)
if not cmd:
return
--
1.7.2.3
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 4/4] gcc: replace unconditional SRC_URI_append with SRC_URI +=
2011-01-06 12:48 [PATCH 1/4] python-wifi: add recipe for version 0.5.0 Andreas Oberritter
2011-01-06 12:48 ` [PATCH 2/4] python-wifi: remove version 0.3.1 Andreas Oberritter
2011-01-06 12:48 ` [PATCH 3/4] unpack.py: add SRC_URI parameter unpack=<bool> (default: true) Andreas Oberritter
@ 2011-01-06 12:48 ` Andreas Oberritter
2011-01-06 22:40 ` Khem Raj
2011-01-07 9:52 ` Paul Menzel
2011-01-06 13:06 ` [PATCH 1/4] python-wifi: add recipe for version 0.5.0 Dr. Michael Lauer
` (2 subsequent siblings)
5 siblings, 2 replies; 18+ messages in thread
From: Andreas Oberritter @ 2011-01-06 12:48 UTC (permalink / raw)
To: openembedded-devel
* Fixes missing leading whitespace character at some locations
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
CC: Khem Raj <raj.khem@gmail.com>
---
recipes/gcc/gcc-3.4.4.inc | 2 +-
recipes/gcc/gcc-3.4.6.inc | 2 +-
recipes/gcc/gcc-4.0.2.inc | 2 +-
recipes/gcc/gcc-canadian-sdk_4.2.4.bb | 2 +-
recipes/gcc/gcc_4.2.2.bb | 2 +-
recipes/gcc/gcc_4.2.3.bb | 2 +-
recipes/gcc/gcc_4.2.4.bb | 2 +-
recipes/gcc/gcc_4.3.1.bb | 2 +-
recipes/gcc/gcc_4.3.2.bb | 2 +-
recipes/gcc/gcc_4.3.3.bb | 2 +-
recipes/gcc/gcc_4.3.4.bb | 2 +-
recipes/gcc/gcc_4.4.1.bb | 2 +-
recipes/gcc/gcc_4.4.2.bb | 2 +-
recipes/gcc/gcc_4.4.4.bb | 2 +-
recipes/gcc/gcc_4.5.bb | 2 +-
recipes/gcc/gcc_svn.bb | 2 +-
16 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/recipes/gcc/gcc-3.4.4.inc b/recipes/gcc/gcc-3.4.4.inc
index 99e680f..8a3ce02 100644
--- a/recipes/gcc/gcc-3.4.4.inc
+++ b/recipes/gcc/gcc-3.4.4.inc
@@ -26,7 +26,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \
file://gcc-cross-fixincl.patch \
file://gcc-posix-open-fix.patch \
"
-SRC_URI_append = " file://zecke-no-host-includes.patch "
+SRC_URI += "file://zecke-no-host-includes.patch"
SRC_URI[archive.md5sum] = "b594ff4ea4fbef4ba9220887de713dfe"
SRC_URI[archive.sha256sum] = "3444179840638cb8664e8e53604900c4521d29d57785a5091202ee4937d8d0fd"
diff --git a/recipes/gcc/gcc-3.4.6.inc b/recipes/gcc/gcc-3.4.6.inc
index 5296f26..3991cdc 100644
--- a/recipes/gcc/gcc-3.4.6.inc
+++ b/recipes/gcc/gcc-3.4.6.inc
@@ -23,7 +23,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \
SRC_URI += "file://gcc34-configure.in.patch"
SRC_URI += "file://gcc34-thumb-support.patch"
-SRC_URI_append = " file://zecke-no-host-includes.patch "
+SRC_URI += "file://zecke-no-host-includes.patch"
SRC_URI[archive.md5sum] = "4a21ac777d4b5617283ce488b808da7b"
SRC_URI[archive.sha256sum] = "7791a601878b765669022b8b3409fba33cc72f9e39340fec8af6d0e6f72dec39"
diff --git a/recipes/gcc/gcc-4.0.2.inc b/recipes/gcc/gcc-4.0.2.inc
index 63f9772..9d3c660 100644
--- a/recipes/gcc/gcc-4.0.2.inc
+++ b/recipes/gcc/gcc-4.0.2.inc
@@ -13,7 +13,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \
file://zecke-xgcc-cpp.patch "
# uclibc patches below
-SRC_URI_append = " file://100-uclibc-conf.patch \
+SRC_URI += "file://100-uclibc-conf.patch \
file://200-uclibc-locale.patch \
file://301-missing-execinfo_h.patch \
file://302-c99-snprintf.patch \
diff --git a/recipes/gcc/gcc-canadian-sdk_4.2.4.bb b/recipes/gcc/gcc-canadian-sdk_4.2.4.bb
index 7a1402f..08a4c95 100644
--- a/recipes/gcc/gcc-canadian-sdk_4.2.4.bb
+++ b/recipes/gcc/gcc-canadian-sdk_4.2.4.bb
@@ -14,7 +14,7 @@ DEPENDS = "gmp-canadian mpfr-canadian"
require gcc-configure-canadian-sdk.inc
require gcc-package-sdk.inc
-SRC_URI_append = "file://fortran-cross-compile-hack.patch \
+SRC_URI += "file://fortran-cross-compile-hack.patch \
file://pr22133-mingw-path-fixup.patch \
file://pr33281-mingw-host-fragment.patch \
file://pr35916-mingw-__USE_MINGW_ACCESS-everywhere.patch \
diff --git a/recipes/gcc/gcc_4.2.2.bb b/recipes/gcc/gcc_4.2.2.bb
index 30713f8..4822da9 100644
--- a/recipes/gcc/gcc_4.2.2.bb
+++ b/recipes/gcc/gcc_4.2.2.bb
@@ -4,6 +4,6 @@ require gcc-${PV}.inc
require gcc-configure-target.inc
require gcc-package-target.inc
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
diff --git a/recipes/gcc/gcc_4.2.3.bb b/recipes/gcc/gcc_4.2.3.bb
index 6fe3028..a174e11 100644
--- a/recipes/gcc/gcc_4.2.3.bb
+++ b/recipes/gcc/gcc_4.2.3.bb
@@ -4,7 +4,7 @@ require gcc-${PV}.inc
require gcc-configure-target.inc
require gcc-package-target.inc
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
diff --git a/recipes/gcc/gcc_4.2.4.bb b/recipes/gcc/gcc_4.2.4.bb
index 6fe3028..a174e11 100644
--- a/recipes/gcc/gcc_4.2.4.bb
+++ b/recipes/gcc/gcc_4.2.4.bb
@@ -4,7 +4,7 @@ require gcc-${PV}.inc
require gcc-configure-target.inc
require gcc-package-target.inc
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
diff --git a/recipes/gcc/gcc_4.3.1.bb b/recipes/gcc/gcc_4.3.1.bb
index 442c273..38ae714 100644
--- a/recipes/gcc/gcc_4.3.1.bb
+++ b/recipes/gcc/gcc_4.3.1.bb
@@ -4,7 +4,7 @@ require gcc-${PV}.inc
require gcc-configure-target.inc
require gcc-package-target.inc
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
diff --git a/recipes/gcc/gcc_4.3.2.bb b/recipes/gcc/gcc_4.3.2.bb
index c73dfc1..998f58c 100644
--- a/recipes/gcc/gcc_4.3.2.bb
+++ b/recipes/gcc/gcc_4.3.2.bb
@@ -8,6 +8,6 @@ FILES_${PN} += "\
${gcclibdir}/${TARGET_SYS}/*/*.o \
"
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
diff --git a/recipes/gcc/gcc_4.3.3.bb b/recipes/gcc/gcc_4.3.3.bb
index 274f474..263969a 100644
--- a/recipes/gcc/gcc_4.3.3.bb
+++ b/recipes/gcc/gcc_4.3.3.bb
@@ -8,7 +8,7 @@ FILES_${PN} += "\
${gcclibdir}/${TARGET_SYS}/*/*.o \
"
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
diff --git a/recipes/gcc/gcc_4.3.4.bb b/recipes/gcc/gcc_4.3.4.bb
index ec20085..57ced16 100644
--- a/recipes/gcc/gcc_4.3.4.bb
+++ b/recipes/gcc/gcc_4.3.4.bb
@@ -8,6 +8,6 @@ FILES_${PN} += "\
${gcclibdir}/${TARGET_SYS}/*/*.o \
"
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
diff --git a/recipes/gcc/gcc_4.4.1.bb b/recipes/gcc/gcc_4.4.1.bb
index 52b09cf..30ab402 100644
--- a/recipes/gcc/gcc_4.4.1.bb
+++ b/recipes/gcc/gcc_4.4.1.bb
@@ -8,7 +8,7 @@ FILES_${PN} += "\
${gcclibdir}/${TARGET_SYS}/*/*.o \
"
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
diff --git a/recipes/gcc/gcc_4.4.2.bb b/recipes/gcc/gcc_4.4.2.bb
index d1d50ad..55f05b5 100644
--- a/recipes/gcc/gcc_4.4.2.bb
+++ b/recipes/gcc/gcc_4.4.2.bb
@@ -8,7 +8,7 @@ FILES_${PN} += "\
${gcclibdir}/${TARGET_SYS}/*/*.o \
"
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
diff --git a/recipes/gcc/gcc_4.4.4.bb b/recipes/gcc/gcc_4.4.4.bb
index 271e9d1..6aeac2f 100644
--- a/recipes/gcc/gcc_4.4.4.bb
+++ b/recipes/gcc/gcc_4.4.4.bb
@@ -8,6 +8,6 @@ FILES_${PN} += "\
${gcclibdir}/${TARGET_SYS}/*/*.o \
"
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
diff --git a/recipes/gcc/gcc_4.5.bb b/recipes/gcc/gcc_4.5.bb
index ad71ada..bc59b14 100644
--- a/recipes/gcc/gcc_4.5.bb
+++ b/recipes/gcc/gcc_4.5.bb
@@ -10,6 +10,6 @@ FILES_${PN} += "\
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lto-wrapper \
"
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
diff --git a/recipes/gcc/gcc_svn.bb b/recipes/gcc/gcc_svn.bb
index 9b69a23..0332174 100644
--- a/recipes/gcc/gcc_svn.bb
+++ b/recipes/gcc/gcc_svn.bb
@@ -8,6 +8,6 @@ FILES_${PN} += "\
${gcclibdir}/${TARGET_SYS}/*/*.o \
"
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
--
1.7.2.3
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 1/4] python-wifi: add recipe for version 0.5.0
2011-01-06 12:48 [PATCH 1/4] python-wifi: add recipe for version 0.5.0 Andreas Oberritter
` (2 preceding siblings ...)
2011-01-06 12:48 ` [PATCH 4/4] gcc: replace unconditional SRC_URI_append with SRC_URI += Andreas Oberritter
@ 2011-01-06 13:06 ` Dr. Michael Lauer
2011-01-06 14:19 ` Frans Meulenbroeks
2011-01-06 14:30 ` Martin Jansa
5 siblings, 0 replies; 18+ messages in thread
From: Dr. Michael Lauer @ 2011-01-06 13:06 UTC (permalink / raw)
To: openembedded-devel
Acked-by: Michael 'Mickey' Lauer <mlauer@vanille-media.de>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/4] python-wifi: remove version 0.3.1
2011-01-06 12:48 ` [PATCH 2/4] python-wifi: remove version 0.3.1 Andreas Oberritter
@ 2011-01-06 13:07 ` Dr. Michael Lauer
2011-01-06 14:18 ` Frans Meulenbroeks
2011-01-06 14:30 ` Martin Jansa
2 siblings, 0 replies; 18+ messages in thread
From: Dr. Michael Lauer @ 2011-01-06 13:07 UTC (permalink / raw)
To: openembedded-devel
Acked-by: Michael 'Mickey' Lauer <mlauer@vanille-media.de>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/4] python-wifi: remove version 0.3.1
2011-01-06 12:48 ` [PATCH 2/4] python-wifi: remove version 0.3.1 Andreas Oberritter
2011-01-06 13:07 ` Dr. Michael Lauer
@ 2011-01-06 14:18 ` Frans Meulenbroeks
2011-01-06 14:30 ` Martin Jansa
2 siblings, 0 replies; 18+ messages in thread
From: Frans Meulenbroeks @ 2011-01-06 14:18 UTC (permalink / raw)
To: openembedded-devel
2011/1/6 Andreas Oberritter <obi@opendreambox.org>:
> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> CC: Martin Jansa <Martin.Jansa@gmail.com>
> ---
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
> recipes/python/python-wifi_0.3.1.bb | 21 ---------------------
> 1 files changed, 0 insertions(+), 21 deletions(-)
> delete mode 100644 recipes/python/python-wifi_0.3.1.bb
>
> diff --git a/recipes/python/python-wifi_0.3.1.bb b/recipes/python/python-wifi_0.3.1.bb
> deleted file mode 100644
> index fefffe6..0000000
> --- a/recipes/python/python-wifi_0.3.1.bb
> +++ /dev/null
> @@ -1,21 +0,0 @@
> -DESCRIPTION = "Fusil is a Python library used to write fuzzing programs."
> -HOMEPAGE = "http://fusil.hachoir.org/"
> -SECTION = "devel/python"
> -LICENSE = "GPLv2"
> -SRCNAME = "python-wifi"
> -
> -SRC_URI = "http://pypi.python.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
> -S = "${WORKDIR}/${SRCNAME}-${PV}"
> -
> -inherit setuptools
> -
> -RDEPENDS_${PN} = "\
> - python-ctypes \
> - python-datetime \
> -"
> -
> -
> -
> -
> -SRC_URI[md5sum] = "0458e32f82900e03c9fd155442242638"
> -SRC_URI[sha256sum] = "a7087ac16ce2d1f146dd76cbfc442ae5b91774f4b8c8eba913c09d0c325eb12f"
> --
> 1.7.2.3
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/4] python-wifi: add recipe for version 0.5.0
2011-01-06 12:48 [PATCH 1/4] python-wifi: add recipe for version 0.5.0 Andreas Oberritter
` (3 preceding siblings ...)
2011-01-06 13:06 ` [PATCH 1/4] python-wifi: add recipe for version 0.5.0 Dr. Michael Lauer
@ 2011-01-06 14:19 ` Frans Meulenbroeks
2011-01-06 14:30 ` Martin Jansa
5 siblings, 0 replies; 18+ messages in thread
From: Frans Meulenbroeks @ 2011-01-06 14:19 UTC (permalink / raw)
To: openembedded-devel
2011/1/6 Andreas Oberritter <obi@opendreambox.org>:
> * package previously unpackaged files into -doc and -examples
>
> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> CC: Martin Jansa <Martin.Jansa@gmail.com>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
> ---
> recipes/python/python-wifi_0.5.0.bb | 25 +++++++++++++++++++++++++
> 1 files changed, 25 insertions(+), 0 deletions(-)
> create mode 100644 recipes/python/python-wifi_0.5.0.bb
>
> diff --git a/recipes/python/python-wifi_0.5.0.bb b/recipes/python/python-wifi_0.5.0.bb
> new file mode 100644
> index 0000000..faa3b43
> --- /dev/null
> +++ b/recipes/python/python-wifi_0.5.0.bb
> @@ -0,0 +1,25 @@
> +DESCRIPTION = "Provides access to Linux Wireless Extensions"
> +HOMEPAGE = "http://pythonwifi.wikispot.org/"
> +SECTION = "devel/python"
> +LICENSE = "LGPLv2+"
> +LICENSE_${PN}-examples = "GPLv2+"
> +RDEPENDS_${PN} = "python-ctypes python-datetime"
> +
> +SRC_URI = "http://download.berlios.de/pythonwifi/${P}.tar.bz2"
> +SRC_URI[md5sum] = "8fe7fd0a4edce1f9bedaff4acb7fd500"
> +SRC_URI[sha256sum] = "3e3f645d37ab20450f60c785cec5f21b330f28a6c46c7c1b0898305dd7a34b26"
> +
> +inherit setuptools
> +
> +do_install_append() {
> + install -d ${D}${docdir}/${PN}
> + mv ${D}${datadir}/README ${D}${docdir}/${PN}
> + mv ${D}${datadir}/INSTALL ${D}${docdir}/${PN}
> + mv ${D}${datadir}/docs/* ${D}${docdir}/${PN}
> + install -d ${D}${sbindir}
> + mv ${D}${datadir}/examples/* ${D}${sbindir}
> +}
> +
> +PACKAGES =+ "${PN}-examples"
> +
> +FILES_${PN}-examples = "${sbindir}"
> --
> 1.7.2.3
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/4] python-wifi: remove version 0.3.1
2011-01-06 12:48 ` [PATCH 2/4] python-wifi: remove version 0.3.1 Andreas Oberritter
2011-01-06 13:07 ` Dr. Michael Lauer
2011-01-06 14:18 ` Frans Meulenbroeks
@ 2011-01-06 14:30 ` Martin Jansa
2 siblings, 0 replies; 18+ messages in thread
From: Martin Jansa @ 2011-01-06 14:30 UTC (permalink / raw)
To: Andreas Oberritter; +Cc: openembedded-devel
On Thu, Jan 6, 2011 at 1:48 PM, Andreas Oberritter <obi@opendreambox.org> wrote:
> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> CC: Martin Jansa <Martin.Jansa@gmail.com>
Ackey-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
> recipes/python/python-wifi_0.3.1.bb | 21 ---------------------
> 1 files changed, 0 insertions(+), 21 deletions(-)
> delete mode 100644 recipes/python/python-wifi_0.3.1.bb
>
> diff --git a/recipes/python/python-wifi_0.3.1.bb b/recipes/python/python-wifi_0.3.1.bb
> deleted file mode 100644
> index fefffe6..0000000
> --- a/recipes/python/python-wifi_0.3.1.bb
> +++ /dev/null
> @@ -1,21 +0,0 @@
> -DESCRIPTION = "Fusil is a Python library used to write fuzzing programs."
> -HOMEPAGE = "http://fusil.hachoir.org/"
> -SECTION = "devel/python"
> -LICENSE = "GPLv2"
> -SRCNAME = "python-wifi"
> -
> -SRC_URI = "http://pypi.python.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
> -S = "${WORKDIR}/${SRCNAME}-${PV}"
> -
> -inherit setuptools
> -
> -RDEPENDS_${PN} = "\
> - python-ctypes \
> - python-datetime \
> -"
> -
> -
> -
> -
> -SRC_URI[md5sum] = "0458e32f82900e03c9fd155442242638"
> -SRC_URI[sha256sum] = "a7087ac16ce2d1f146dd76cbfc442ae5b91774f4b8c8eba913c09d0c325eb12f"
> --
> 1.7.2.3
>
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/4] python-wifi: add recipe for version 0.5.0
2011-01-06 12:48 [PATCH 1/4] python-wifi: add recipe for version 0.5.0 Andreas Oberritter
` (4 preceding siblings ...)
2011-01-06 14:19 ` Frans Meulenbroeks
@ 2011-01-06 14:30 ` Martin Jansa
5 siblings, 0 replies; 18+ messages in thread
From: Martin Jansa @ 2011-01-06 14:30 UTC (permalink / raw)
To: Andreas Oberritter; +Cc: openembedded-devel
On Thu, Jan 6, 2011 at 1:48 PM, Andreas Oberritter <obi@opendreambox.org> wrote:
> * package previously unpackaged files into -doc and -examples
>
> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> CC: Martin Jansa <Martin.Jansa@gmail.com>
Ackey-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
> recipes/python/python-wifi_0.5.0.bb | 25 +++++++++++++++++++++++++
> 1 files changed, 25 insertions(+), 0 deletions(-)
> create mode 100644 recipes/python/python-wifi_0.5.0.bb
>
> diff --git a/recipes/python/python-wifi_0.5.0.bb b/recipes/python/python-wifi_0.5.0.bb
> new file mode 100644
> index 0000000..faa3b43
> --- /dev/null
> +++ b/recipes/python/python-wifi_0.5.0.bb
> @@ -0,0 +1,25 @@
> +DESCRIPTION = "Provides access to Linux Wireless Extensions"
> +HOMEPAGE = "http://pythonwifi.wikispot.org/"
> +SECTION = "devel/python"
> +LICENSE = "LGPLv2+"
> +LICENSE_${PN}-examples = "GPLv2+"
> +RDEPENDS_${PN} = "python-ctypes python-datetime"
> +
> +SRC_URI = "http://download.berlios.de/pythonwifi/${P}.tar.bz2"
> +SRC_URI[md5sum] = "8fe7fd0a4edce1f9bedaff4acb7fd500"
> +SRC_URI[sha256sum] = "3e3f645d37ab20450f60c785cec5f21b330f28a6c46c7c1b0898305dd7a34b26"
> +
> +inherit setuptools
> +
> +do_install_append() {
> + install -d ${D}${docdir}/${PN}
> + mv ${D}${datadir}/README ${D}${docdir}/${PN}
> + mv ${D}${datadir}/INSTALL ${D}${docdir}/${PN}
> + mv ${D}${datadir}/docs/* ${D}${docdir}/${PN}
> + install -d ${D}${sbindir}
> + mv ${D}${datadir}/examples/* ${D}${sbindir}
> +}
> +
> +PACKAGES =+ "${PN}-examples"
> +
> +FILES_${PN}-examples = "${sbindir}"
> --
> 1.7.2.3
>
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/4] gcc: replace unconditional SRC_URI_append with SRC_URI +=
2011-01-06 12:48 ` [PATCH 4/4] gcc: replace unconditional SRC_URI_append with SRC_URI += Andreas Oberritter
@ 2011-01-06 22:40 ` Khem Raj
2011-01-07 9:52 ` Paul Menzel
1 sibling, 0 replies; 18+ messages in thread
From: Khem Raj @ 2011-01-06 22:40 UTC (permalink / raw)
To: Andreas Oberritter; +Cc: openembedded-devel
On Thu, Jan 6, 2011 at 4:48 AM, Andreas Oberritter <obi@opendreambox.org> wrote:
> * Fixes missing leading whitespace character at some locations
>
> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> CC: Khem Raj <raj.khem@gmail.com>
for sanity can you make sure that these patches are being picked up?
by doing bitbake -c patch
Acked-by: Khem Raj <raj.khem@gmail.com>
> ---
> recipes/gcc/gcc-3.4.4.inc | 2 +-
> recipes/gcc/gcc-3.4.6.inc | 2 +-
> recipes/gcc/gcc-4.0.2.inc | 2 +-
> recipes/gcc/gcc-canadian-sdk_4.2.4.bb | 2 +-
> recipes/gcc/gcc_4.2.2.bb | 2 +-
> recipes/gcc/gcc_4.2.3.bb | 2 +-
> recipes/gcc/gcc_4.2.4.bb | 2 +-
> recipes/gcc/gcc_4.3.1.bb | 2 +-
> recipes/gcc/gcc_4.3.2.bb | 2 +-
> recipes/gcc/gcc_4.3.3.bb | 2 +-
> recipes/gcc/gcc_4.3.4.bb | 2 +-
> recipes/gcc/gcc_4.4.1.bb | 2 +-
> recipes/gcc/gcc_4.4.2.bb | 2 +-
> recipes/gcc/gcc_4.4.4.bb | 2 +-
> recipes/gcc/gcc_4.5.bb | 2 +-
> recipes/gcc/gcc_svn.bb | 2 +-
> 16 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/recipes/gcc/gcc-3.4.4.inc b/recipes/gcc/gcc-3.4.4.inc
> index 99e680f..8a3ce02 100644
> --- a/recipes/gcc/gcc-3.4.4.inc
> +++ b/recipes/gcc/gcc-3.4.4.inc
> @@ -26,7 +26,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \
> file://gcc-cross-fixincl.patch \
> file://gcc-posix-open-fix.patch \
> "
> -SRC_URI_append = " file://zecke-no-host-includes.patch "
> +SRC_URI += "file://zecke-no-host-includes.patch"
>
> SRC_URI[archive.md5sum] = "b594ff4ea4fbef4ba9220887de713dfe"
> SRC_URI[archive.sha256sum] = "3444179840638cb8664e8e53604900c4521d29d57785a5091202ee4937d8d0fd"
> diff --git a/recipes/gcc/gcc-3.4.6.inc b/recipes/gcc/gcc-3.4.6.inc
> index 5296f26..3991cdc 100644
> --- a/recipes/gcc/gcc-3.4.6.inc
> +++ b/recipes/gcc/gcc-3.4.6.inc
> @@ -23,7 +23,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \
>
> SRC_URI += "file://gcc34-configure.in.patch"
> SRC_URI += "file://gcc34-thumb-support.patch"
> -SRC_URI_append = " file://zecke-no-host-includes.patch "
> +SRC_URI += "file://zecke-no-host-includes.patch"
>
> SRC_URI[archive.md5sum] = "4a21ac777d4b5617283ce488b808da7b"
> SRC_URI[archive.sha256sum] = "7791a601878b765669022b8b3409fba33cc72f9e39340fec8af6d0e6f72dec39"
> diff --git a/recipes/gcc/gcc-4.0.2.inc b/recipes/gcc/gcc-4.0.2.inc
> index 63f9772..9d3c660 100644
> --- a/recipes/gcc/gcc-4.0.2.inc
> +++ b/recipes/gcc/gcc-4.0.2.inc
> @@ -13,7 +13,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \
> file://zecke-xgcc-cpp.patch "
>
> # uclibc patches below
> -SRC_URI_append = " file://100-uclibc-conf.patch \
> +SRC_URI += "file://100-uclibc-conf.patch \
> file://200-uclibc-locale.patch \
> file://301-missing-execinfo_h.patch \
> file://302-c99-snprintf.patch \
> diff --git a/recipes/gcc/gcc-canadian-sdk_4.2.4.bb b/recipes/gcc/gcc-canadian-sdk_4.2.4.bb
> index 7a1402f..08a4c95 100644
> --- a/recipes/gcc/gcc-canadian-sdk_4.2.4.bb
> +++ b/recipes/gcc/gcc-canadian-sdk_4.2.4.bb
> @@ -14,7 +14,7 @@ DEPENDS = "gmp-canadian mpfr-canadian"
> require gcc-configure-canadian-sdk.inc
> require gcc-package-sdk.inc
>
> -SRC_URI_append = "file://fortran-cross-compile-hack.patch \
> +SRC_URI += "file://fortran-cross-compile-hack.patch \
> file://pr22133-mingw-path-fixup.patch \
> file://pr33281-mingw-host-fragment.patch \
> file://pr35916-mingw-__USE_MINGW_ACCESS-everywhere.patch \
> diff --git a/recipes/gcc/gcc_4.2.2.bb b/recipes/gcc/gcc_4.2.2.bb
> index 30713f8..4822da9 100644
> --- a/recipes/gcc/gcc_4.2.2.bb
> +++ b/recipes/gcc/gcc_4.2.2.bb
> @@ -4,6 +4,6 @@ require gcc-${PV}.inc
> require gcc-configure-target.inc
> require gcc-package-target.inc
>
> -SRC_URI_append = "file://fortran-cross-compile-hack.patch"
> +SRC_URI += "file://fortran-cross-compile-hack.patch"
>
> ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
> diff --git a/recipes/gcc/gcc_4.2.3.bb b/recipes/gcc/gcc_4.2.3.bb
> index 6fe3028..a174e11 100644
> --- a/recipes/gcc/gcc_4.2.3.bb
> +++ b/recipes/gcc/gcc_4.2.3.bb
> @@ -4,7 +4,7 @@ require gcc-${PV}.inc
> require gcc-configure-target.inc
> require gcc-package-target.inc
>
> -SRC_URI_append = "file://fortran-cross-compile-hack.patch"
> +SRC_URI += "file://fortran-cross-compile-hack.patch"
>
> ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
>
> diff --git a/recipes/gcc/gcc_4.2.4.bb b/recipes/gcc/gcc_4.2.4.bb
> index 6fe3028..a174e11 100644
> --- a/recipes/gcc/gcc_4.2.4.bb
> +++ b/recipes/gcc/gcc_4.2.4.bb
> @@ -4,7 +4,7 @@ require gcc-${PV}.inc
> require gcc-configure-target.inc
> require gcc-package-target.inc
>
> -SRC_URI_append = "file://fortran-cross-compile-hack.patch"
> +SRC_URI += "file://fortran-cross-compile-hack.patch"
>
> ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
>
> diff --git a/recipes/gcc/gcc_4.3.1.bb b/recipes/gcc/gcc_4.3.1.bb
> index 442c273..38ae714 100644
> --- a/recipes/gcc/gcc_4.3.1.bb
> +++ b/recipes/gcc/gcc_4.3.1.bb
> @@ -4,7 +4,7 @@ require gcc-${PV}.inc
> require gcc-configure-target.inc
> require gcc-package-target.inc
>
> -SRC_URI_append = "file://fortran-cross-compile-hack.patch"
> +SRC_URI += "file://fortran-cross-compile-hack.patch"
>
> ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
>
> diff --git a/recipes/gcc/gcc_4.3.2.bb b/recipes/gcc/gcc_4.3.2.bb
> index c73dfc1..998f58c 100644
> --- a/recipes/gcc/gcc_4.3.2.bb
> +++ b/recipes/gcc/gcc_4.3.2.bb
> @@ -8,6 +8,6 @@ FILES_${PN} += "\
> ${gcclibdir}/${TARGET_SYS}/*/*.o \
> "
>
> -SRC_URI_append = "file://fortran-cross-compile-hack.patch"
> +SRC_URI += "file://fortran-cross-compile-hack.patch"
>
> ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
> diff --git a/recipes/gcc/gcc_4.3.3.bb b/recipes/gcc/gcc_4.3.3.bb
> index 274f474..263969a 100644
> --- a/recipes/gcc/gcc_4.3.3.bb
> +++ b/recipes/gcc/gcc_4.3.3.bb
> @@ -8,7 +8,7 @@ FILES_${PN} += "\
> ${gcclibdir}/${TARGET_SYS}/*/*.o \
> "
>
> -SRC_URI_append = "file://fortran-cross-compile-hack.patch"
> +SRC_URI += "file://fortran-cross-compile-hack.patch"
>
> ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
>
> diff --git a/recipes/gcc/gcc_4.3.4.bb b/recipes/gcc/gcc_4.3.4.bb
> index ec20085..57ced16 100644
> --- a/recipes/gcc/gcc_4.3.4.bb
> +++ b/recipes/gcc/gcc_4.3.4.bb
> @@ -8,6 +8,6 @@ FILES_${PN} += "\
> ${gcclibdir}/${TARGET_SYS}/*/*.o \
> "
>
> -SRC_URI_append = "file://fortran-cross-compile-hack.patch"
> +SRC_URI += "file://fortran-cross-compile-hack.patch"
>
> ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
> diff --git a/recipes/gcc/gcc_4.4.1.bb b/recipes/gcc/gcc_4.4.1.bb
> index 52b09cf..30ab402 100644
> --- a/recipes/gcc/gcc_4.4.1.bb
> +++ b/recipes/gcc/gcc_4.4.1.bb
> @@ -8,7 +8,7 @@ FILES_${PN} += "\
> ${gcclibdir}/${TARGET_SYS}/*/*.o \
> "
>
> -SRC_URI_append = "file://fortran-cross-compile-hack.patch"
> +SRC_URI += "file://fortran-cross-compile-hack.patch"
>
> ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
>
> diff --git a/recipes/gcc/gcc_4.4.2.bb b/recipes/gcc/gcc_4.4.2.bb
> index d1d50ad..55f05b5 100644
> --- a/recipes/gcc/gcc_4.4.2.bb
> +++ b/recipes/gcc/gcc_4.4.2.bb
> @@ -8,7 +8,7 @@ FILES_${PN} += "\
> ${gcclibdir}/${TARGET_SYS}/*/*.o \
> "
>
> -SRC_URI_append = "file://fortran-cross-compile-hack.patch"
> +SRC_URI += "file://fortran-cross-compile-hack.patch"
>
> ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
>
> diff --git a/recipes/gcc/gcc_4.4.4.bb b/recipes/gcc/gcc_4.4.4.bb
> index 271e9d1..6aeac2f 100644
> --- a/recipes/gcc/gcc_4.4.4.bb
> +++ b/recipes/gcc/gcc_4.4.4.bb
> @@ -8,6 +8,6 @@ FILES_${PN} += "\
> ${gcclibdir}/${TARGET_SYS}/*/*.o \
> "
>
> -SRC_URI_append = "file://fortran-cross-compile-hack.patch"
> +SRC_URI += "file://fortran-cross-compile-hack.patch"
>
> ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
> diff --git a/recipes/gcc/gcc_4.5.bb b/recipes/gcc/gcc_4.5.bb
> index ad71ada..bc59b14 100644
> --- a/recipes/gcc/gcc_4.5.bb
> +++ b/recipes/gcc/gcc_4.5.bb
> @@ -10,6 +10,6 @@ FILES_${PN} += "\
> ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lto-wrapper \
> "
>
> -SRC_URI_append = "file://fortran-cross-compile-hack.patch"
> +SRC_URI += "file://fortran-cross-compile-hack.patch"
>
> ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
> diff --git a/recipes/gcc/gcc_svn.bb b/recipes/gcc/gcc_svn.bb
> index 9b69a23..0332174 100644
> --- a/recipes/gcc/gcc_svn.bb
> +++ b/recipes/gcc/gcc_svn.bb
> @@ -8,6 +8,6 @@ FILES_${PN} += "\
> ${gcclibdir}/${TARGET_SYS}/*/*.o \
> "
>
> -SRC_URI_append = "file://fortran-cross-compile-hack.patch"
> +SRC_URI += "file://fortran-cross-compile-hack.patch"
>
> ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
> --
> 1.7.2.3
>
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/4] gcc: replace unconditional SRC_URI_append with SRC_URI +=
2011-01-06 12:48 ` [PATCH 4/4] gcc: replace unconditional SRC_URI_append with SRC_URI += Andreas Oberritter
2011-01-06 22:40 ` Khem Raj
@ 2011-01-07 9:52 ` Paul Menzel
2011-01-07 12:02 ` Koen Kooi
2011-01-07 12:39 ` Andreas Oberritter
1 sibling, 2 replies; 18+ messages in thread
From: Paul Menzel @ 2011-01-07 9:52 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 644 bytes --]
Am Donnerstag, den 06.01.2011, 12:48 +0000 schrieb Andreas Oberritter:
What do you mean by »unconditional SRC_URI_append«? I searched through
the documentation and could not find the word. I always thought
`SRC_URI_append =` and `SRC_URI +=` is the same and if I am not mistaken
the manual says the same [1].
Do I understand your patch correctly, that when `_append` was used in
the recipe in some places, the space was missing and that you chose to
replace it by `+=` for consistency?
[…]
Thanks and sorry for the stupid question.
Paul
[1] http://docs.openembedded.org/usermanual/usermanual.html#recipes_syntax
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/4] gcc: replace unconditional SRC_URI_append with SRC_URI +=
2011-01-07 9:52 ` Paul Menzel
@ 2011-01-07 12:02 ` Koen Kooi
2011-01-07 12:39 ` Andreas Oberritter
1 sibling, 0 replies; 18+ messages in thread
From: Koen Kooi @ 2011-01-07 12:02 UTC (permalink / raw)
To: openembedded-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07-01-11 10:52, Paul Menzel wrote:
> Am Donnerstag, den 06.01.2011, 12:48 +0000 schrieb Andreas Oberritter:
>
> What do you mean by »unconditional SRC_URI_append«? I searched through
> the documentation and could not find the word. I always thought
> `SRC_URI_append =` and `SRC_URI +=` is the same and if I am not mistaken
> the manual says the same [1].
SRC_URI_append = " foo" and SRC_URI += "foo" are the same, but
SRC_URI_append = "foo" and SRC_URI += "foo" are not the same. += (and
=+) add a space, append and prepend don't.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFNJwDkMkyGM64RGpERAoTVAJ9zBNMKA8T/IkGZ6hjKh6ZkdqdeKQCglerY
o4hwnqyAwDWlTkekiNmagM4=
=PtUI
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/4] gcc: replace unconditional SRC_URI_append with SRC_URI +=
2011-01-07 9:52 ` Paul Menzel
2011-01-07 12:02 ` Koen Kooi
@ 2011-01-07 12:39 ` Andreas Oberritter
1 sibling, 0 replies; 18+ messages in thread
From: Andreas Oberritter @ 2011-01-07 12:39 UTC (permalink / raw)
To: openembedded-devel
On 01/07/2011 10:52 AM, Paul Menzel wrote:
> Am Donnerstag, den 06.01.2011, 12:48 +0000 schrieb Andreas Oberritter:
>
> What do you mean by »unconditional SRC_URI_append«? I searched through
> the documentation and could not find the word.
Unconditional, because it doesn't contain an override like e.g.
SRC_URI_append_beagleboard does.
> I always thought
> `SRC_URI_append =` and `SRC_URI +=` is the same and if I am not mistaken
> the manual says the same [1].
>
> Do I understand your patch correctly, that when `_append` was used in
> the recipe in some places, the space was missing and that you chose to
> replace it by `+=` for consistency?
Yes. I think that += is easier to use and less error-prone.
- As Koen already pointed out, it adds whitespace automatically, so in
whitespace separated lists like SRC_URI you don't have to care.
- You can use multiple statements in a recipe.
SRC_URI += "foo"
SRC_URI += "bar"
vs.
SRC_URI_append = " foo"
SRC_URI_append = " bar"
The latter wouldn't work.
In the case of gcc, I modified SRC_URI in some inc file resulting in
"... file://my.patchfile://fortran-cross-compile-hack.patch ...".
> [1] http://docs.openembedded.org/usermanual/usermanual.html#recipes_syntax
SRC_URI_append = "file://fixup.patch" is probably a bad example.
Regards,
Andreas
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/4] unpack.py: add SRC_URI parameter unpack=<bool> (default: true)
2011-01-06 12:48 ` [PATCH 3/4] unpack.py: add SRC_URI parameter unpack=<bool> (default: true) Andreas Oberritter
@ 2011-01-11 20:31 ` Andreas Oberritter
2011-01-11 21:48 ` Bernhard Reutner-Fischer
0 siblings, 1 reply; 18+ messages in thread
From: Andreas Oberritter @ 2011-01-11 20:31 UTC (permalink / raw)
To: openembedded-devel; +Cc: Chris Larson
Ping.
On 01/06/2011 01:48 PM, Andreas Oberritter wrote:
> * This allows to download compressed files without extracting them
> * Use case: gcj requires ecj.jar, which must be downloaded separately
> and put into the gcc source directory before configure gets executed.
>
> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> CC: Chris Larson <chris_larson@mentor.com>
> ---
> classes/base.bbclass | 3 +-
> docs/usermanual/reference/var_src_uri.xml | 13 ++++-
> lib/oe/unpack.py | 81 +++++++++++++++++------------
> 3 files changed, 61 insertions(+), 36 deletions(-)
>
> diff --git a/classes/base.bbclass b/classes/base.bbclass
> index c76b77d..25d72d4 100644
> --- a/classes/base.bbclass
> +++ b/classes/base.bbclass
> @@ -190,12 +190,11 @@ def oe_unpack(d, local, urldata):
> bb.mkdirhier(destdir)
> else:
> destdir = workdir
> - dos = urldata.parm.get("dos")
>
> bb.note("Unpacking %s to %s/" % (base_path_out(local, d),
> base_path_out(destdir, d)))
> try:
> - unpack_file(local, destdir, env={"PATH": d.getVar("PATH", True)}, dos=dos)
> + unpack_file(local, destdir, urldata.parm, env={"PATH": d.getVar("PATH", True)})
> except UnpackError, exc:
> bb.fatal(str(exc))
>
> diff --git a/docs/usermanual/reference/var_src_uri.xml b/docs/usermanual/reference/var_src_uri.xml
> index 706452f..521c7d5 100644
> --- a/docs/usermanual/reference/var_src_uri.xml
> +++ b/docs/usermanual/reference/var_src_uri.xml
> @@ -91,7 +91,8 @@ SRC_URI[sha256sum] = "36bdb85c97b39ac604bc58cb7857ee08295242c78a12848ef8a31
> it is unpacked into the work directory, <command>${WORKDIR}</command>. The
> unpacker recognises several archive and compression types and for these it
> will decompress any compressed files and extract all of the files from
> - archives into the work directory. The supported types are:</para>
> + archives into the work directory, unless the option <command>unpack=no</command>
> + is set for the given file. The supported types are:</para>
>
> <variablelist>
> <varlistentry>
> @@ -192,6 +193,16 @@ SRC_URI[sha256sum] = "36bdb85c97b39ac604bc58cb7857ee08295242c78a12848ef8a31
> md5sum option provided.</para>
> </listitem>
> </varlistentry>
> +
> + <varlistentry>
> + <term>unpack={yes|no}</term>
> +
> + <listitem>
> + <para>If set to 'yes' (default) and the source file is an archive,
> + then the archive will be decompressed and unpacked into the ${WORKDIR}.
> + Otherwise, the archive will be copied into the ${WORKDIR}.</para>
> + </listitem>
> + </varlistentry>
> </variablelist>
>
> <para>Related variables:</para>
> diff --git a/lib/oe/unpack.py b/lib/oe/unpack.py
> index e4fe5d8..8e8bf36 100644
> --- a/lib/oe/unpack.py
> +++ b/lib/oe/unpack.py
> @@ -47,47 +47,62 @@ def subprocess_setup():
> # non-Python subprocesses expect.
> signal.signal(signal.SIGPIPE, signal.SIG_DFL)
>
> -def unpack_file(file, destdir, dos=False, env=None):
> +def unpack_file(file, destdir, parameters, env=None):
> import subprocess, shutil
>
> + try:
> + dos = to_boolean(parameters.get("dos"), False)
> + except ValueError, exc:
> + bb.fatal("Invalid value for 'dos' parameter for %s: %s" %
> + (filename, parameters.get("dos")))
> +
> + try:
> + unpack = to_boolean(parameters.get("unpack"), True)
> + except ValueError, exc:
> + bb.fatal("Invalid value for 'unpack' parameter for %s: %s" %
> + (filename, parameters.get("unpack")))
> +
> dest = os.path.join(destdir, os.path.basename(file))
> if os.path.exists(dest):
> if os.path.samefile(file, dest):
> return True
>
> cmd = None
> - if file.endswith('.tar'):
> - cmd = 'tar x --no-same-owner -f %s' % file
> - elif file.endswith('.tgz') or file.endswith('.tar.gz') or file.endswith('.tar.Z'):
> - cmd = 'tar xz --no-same-owner -f %s' % file
> - elif file.endswith('.tbz') or file.endswith('.tbz2') or file.endswith('.tar.bz2'):
> - cmd = 'bzip2 -dc %s | tar x --no-same-owner -f -' % file
> - elif file.endswith('.gz') or file.endswith('.Z') or file.endswith('.z'):
> - root, ext = os.path.splitext(file)
> - cmd = 'gzip -dc %s > %s' % (file, os.path.basename(root))
> - elif file.endswith('.bz2'):
> - root, ext = os.path.splitext(file)
> - cmd = 'bzip2 -dc %s > %s' % (file, os.path.basename(root))
> - elif file.endswith('.tar.xz'):
> - cmd = 'xz -dc %s | tar x --no-same-owner -f -' % file
> - elif file.endswith('.xz'):
> - root, ext = os.path.splitext(file)
> - cmd = 'xz -dc %s > %s' % (file, os.path.basename(root))
> - elif file.endswith('.tar.lz'):
> - cmd = 'lzip -dc %s | tar x --no-same-owner -f -' % file
> - elif file.endswith('.lz'):
> - root, ext = os.path.splitext(file)
> - cmd = 'lzip -dc %s > %s' % (file, os.path.basename(root))
> - elif file.endswith('.zip') or file.endswith('.jar'):
> - cmd = 'unzip -q -o'
> - if dos:
> - cmd = '%s -a' % cmd
> - cmd = "%s '%s'" % (cmd, file)
> - elif os.path.isdir(file):
> - shutil.rmtree(dest, True)
> - shutil.copytree(file, dest, True)
> - else:
> - shutil.copy2(file, dest)
> + if unpack:
> + if file.endswith('.tar'):
> + cmd = 'tar x --no-same-owner -f %s' % file
> + elif file.endswith('.tgz') or file.endswith('.tar.gz') or file.endswith('.tar.Z'):
> + cmd = 'tar xz --no-same-owner -f %s' % file
> + elif file.endswith('.tbz') or file.endswith('.tbz2') or file.endswith('.tar.bz2'):
> + cmd = 'bzip2 -dc %s | tar x --no-same-owner -f -' % file
> + elif file.endswith('.gz') or file.endswith('.Z') or file.endswith('.z'):
> + root, ext = os.path.splitext(file)
> + cmd = 'gzip -dc %s > %s' % (file, os.path.basename(root))
> + elif file.endswith('.bz2'):
> + root, ext = os.path.splitext(file)
> + cmd = 'bzip2 -dc %s > %s' % (file, os.path.basename(root))
> + elif file.endswith('.tar.xz'):
> + cmd = 'xz -dc %s | tar x --no-same-owner -f -' % file
> + elif file.endswith('.xz'):
> + root, ext = os.path.splitext(file)
> + cmd = 'xz -dc %s > %s' % (file, os.path.basename(root))
> + elif file.endswith('.tar.lz'):
> + cmd = 'lzip -dc %s | tar x --no-same-owner -f -' % file
> + elif file.endswith('.lz'):
> + root, ext = os.path.splitext(file)
> + cmd = 'lzip -dc %s > %s' % (file, os.path.basename(root))
> + elif file.endswith('.zip') or file.endswith('.jar'):
> + cmd = 'unzip -q -o'
> + if dos:
> + cmd = '%s -a' % cmd
> + cmd = "%s '%s'" % (cmd, file)
> +
> + if not unpack or not cmd:
> + if os.path.isdir(file):
> + shutil.rmtree(dest, True)
> + shutil.copytree(file, dest, True)
> + else:
> + shutil.copy2(file, dest)
>
> if not cmd:
> return
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/4] unpack.py: add SRC_URI parameter unpack=<bool> (default: true)
2011-01-11 20:31 ` Andreas Oberritter
@ 2011-01-11 21:48 ` Bernhard Reutner-Fischer
2011-01-11 22:19 ` Andreas Oberritter
0 siblings, 1 reply; 18+ messages in thread
From: Bernhard Reutner-Fischer @ 2011-01-11 21:48 UTC (permalink / raw)
To: openembedded-devel; +Cc: Chris Larson
On Tue, Jan 11, 2011 at 09:31:25PM +0100, Andreas Oberritter wrote:
>Ping.
>
>On 01/06/2011 01:48 PM, Andreas Oberritter wrote:
>> * This allows to download compressed files without extracting them
>> * Use case: gcj requires ecj.jar, which must be downloaded separately
>> and put into the gcc source directory before configure gets executed.
>>
>> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
>> CC: Chris Larson <chris_larson@mentor.com>
>> ---
>> classes/base.bbclass | 3 +-
>> docs/usermanual/reference/var_src_uri.xml | 13 ++++-
>> lib/oe/unpack.py | 81 +++++++++++++++++------------
>> 3 files changed, 61 insertions(+), 36 deletions(-)
>>
>> diff --git a/classes/base.bbclass b/classes/base.bbclass
>> index c76b77d..25d72d4 100644
>> --- a/classes/base.bbclass
>> +++ b/classes/base.bbclass
>> @@ -190,12 +190,11 @@ def oe_unpack(d, local, urldata):
>> bb.mkdirhier(destdir)
>> else:
>> destdir = workdir
>> - dos = urldata.parm.get("dos")
>>
>> bb.note("Unpacking %s to %s/" % (base_path_out(local, d),
>> base_path_out(destdir, d)))
>> try:
>> - unpack_file(local, destdir, env={"PATH": d.getVar("PATH", True)}, dos=dos)
>> + unpack_file(local, destdir, urldata.parm, env={"PATH": d.getVar("PATH", True)})
>> except UnpackError, exc:
>> bb.fatal(str(exc))
>>
>> diff --git a/docs/usermanual/reference/var_src_uri.xml b/docs/usermanual/reference/var_src_uri.xml
>> index 706452f..521c7d5 100644
>> --- a/docs/usermanual/reference/var_src_uri.xml
>> +++ b/docs/usermanual/reference/var_src_uri.xml
>> @@ -91,7 +91,8 @@ SRC_URI[sha256sum] = "36bdb85c97b39ac604bc58cb7857ee08295242c78a12848ef8a31
>> it is unpacked into the work directory, <command>${WORKDIR}</command>. The
>> unpacker recognises several archive and compression types and for these it
>> will decompress any compressed files and extract all of the files from
>> - archives into the work directory. The supported types are:</para>
>> + archives into the work directory, unless the option <command>unpack=no</command>
>> + is set for the given file. The supported types are:</para>
>>
>> <variablelist>
>> <varlistentry>
>> @@ -192,6 +193,16 @@ SRC_URI[sha256sum] = "36bdb85c97b39ac604bc58cb7857ee08295242c78a12848ef8a31
>> md5sum option provided.</para>
>> </listitem>
>> </varlistentry>
>> +
>> + <varlistentry>
>> + <term>unpack={yes|no}</term>
>> +
>> + <listitem>
>> + <para>If set to 'yes' (default) and the source file is an archive,
>> + then the archive will be decompressed and unpacked into the ${WORKDIR}.
>> + Otherwise, the archive will be copied into the ${WORKDIR}.</para>
mixed tab and spaces for indentation.
>> + </listitem>
>> + </varlistentry>
>> </variablelist>
>>
>> <para>Related variables:</para>
>> diff --git a/lib/oe/unpack.py b/lib/oe/unpack.py
>> index e4fe5d8..8e8bf36 100644
>> --- a/lib/oe/unpack.py
>> +++ b/lib/oe/unpack.py
>> @@ -47,47 +47,62 @@ def subprocess_setup():
>> # non-Python subprocesses expect.
>> signal.signal(signal.SIGPIPE, signal.SIG_DFL)
>>
>> -def unpack_file(file, destdir, dos=False, env=None):
>> +def unpack_file(file, destdir, parameters, env=None):
>> import subprocess, shutil
>>
>> + try:
>> + dos = to_boolean(parameters.get("dos"), False)
dict().get defaults to None. (None,'',u'',False) is False, so passing in
a default of False to to_boolean -- which will return False "if not
string" (and should
if not string or not isinstance(string, basestring):
return False
, as a sidenote)
is superfluous.
>> + except ValueError, exc:
I think the more modern for is to use 'as'
>> + bb.fatal("Invalid value for 'dos' parameter for %s: %s" %
>> + (filename, parameters.get("dos")))
I would have let to_boolean raise this through, but as you prefer.
>> +
>> + try:
>> + unpack = to_boolean(parameters.get("unpack"), True)
>> + except ValueError, exc:
>> + bb.fatal("Invalid value for 'unpack' parameter for %s: %s" %
>> + (filename, parameters.get("unpack")))
ditto.
>> +
>> dest = os.path.join(destdir, os.path.basename(file))
>> if os.path.exists(dest):
>> if os.path.samefile(file, dest):
>> return True
>>
>> cmd = None
>> - if file.endswith('.tar'):
>> - cmd = 'tar x --no-same-owner -f %s' % file
>> - elif file.endswith('.tgz') or file.endswith('.tar.gz') or file.endswith('.tar.Z'):
>> - cmd = 'tar xz --no-same-owner -f %s' % file
>> - elif file.endswith('.tbz') or file.endswith('.tbz2') or file.endswith('.tar.bz2'):
>> - cmd = 'bzip2 -dc %s | tar x --no-same-owner -f -' % file
>> - elif file.endswith('.gz') or file.endswith('.Z') or file.endswith('.z'):
>> - root, ext = os.path.splitext(file)
>> - cmd = 'gzip -dc %s > %s' % (file, os.path.basename(root))
>> - elif file.endswith('.bz2'):
>> - root, ext = os.path.splitext(file)
>> - cmd = 'bzip2 -dc %s > %s' % (file, os.path.basename(root))
>> - elif file.endswith('.tar.xz'):
>> - cmd = 'xz -dc %s | tar x --no-same-owner -f -' % file
>> - elif file.endswith('.xz'):
>> - root, ext = os.path.splitext(file)
>> - cmd = 'xz -dc %s > %s' % (file, os.path.basename(root))
>> - elif file.endswith('.tar.lz'):
>> - cmd = 'lzip -dc %s | tar x --no-same-owner -f -' % file
>> - elif file.endswith('.lz'):
>> - root, ext = os.path.splitext(file)
>> - cmd = 'lzip -dc %s > %s' % (file, os.path.basename(root))
>> - elif file.endswith('.zip') or file.endswith('.jar'):
>> - cmd = 'unzip -q -o'
>> - if dos:
>> - cmd = '%s -a' % cmd
>> - cmd = "%s '%s'" % (cmd, file)
>> - elif os.path.isdir(file):
>> - shutil.rmtree(dest, True)
>> - shutil.copytree(file, dest, True)
>> - else:
>> - shutil.copy2(file, dest)
>> + if unpack:
>> + if file.endswith('.tar'):
>> + cmd = 'tar x --no-same-owner -f %s' % file
>> + elif file.endswith('.tgz') or file.endswith('.tar.gz') or file.endswith('.tar.Z'):
>> + cmd = 'tar xz --no-same-owner -f %s' % file
>> + elif file.endswith('.tbz') or file.endswith('.tbz2') or file.endswith('.tar.bz2'):
>> + cmd = 'bzip2 -dc %s | tar x --no-same-owner -f -' % file
>> + elif file.endswith('.gz') or file.endswith('.Z') or file.endswith('.z'):
>> + root, ext = os.path.splitext(file)
>> + cmd = 'gzip -dc %s > %s' % (file, os.path.basename(root))
>> + elif file.endswith('.bz2'):
>> + root, ext = os.path.splitext(file)
>> + cmd = 'bzip2 -dc %s > %s' % (file, os.path.basename(root))
>> + elif file.endswith('.tar.xz'):
>> + cmd = 'xz -dc %s | tar x --no-same-owner -f -' % file
>> + elif file.endswith('.xz'):
>> + root, ext = os.path.splitext(file)
>> + cmd = 'xz -dc %s > %s' % (file, os.path.basename(root))
>> + elif file.endswith('.tar.lz'):
>> + cmd = 'lzip -dc %s | tar x --no-same-owner -f -' % file
>> + elif file.endswith('.lz'):
>> + root, ext = os.path.splitext(file)
>> + cmd = 'lzip -dc %s > %s' % (file, os.path.basename(root))
>> + elif file.endswith('.zip') or file.endswith('.jar'):
>> + cmd = 'unzip -q -o'
>> + if dos:
>> + cmd = '%s -a' % cmd
>> + cmd = "%s '%s'" % (cmd, file)
>> +
>> + if not unpack or not cmd:
>> + if os.path.isdir(file):
>> + shutil.rmtree(dest, True)
>> + shutil.copytree(file, dest, True)
>> + else:
>> + shutil.copy2(file, dest)
Don't know offhand but
- bb.utils.remove(dest, True)
or equivalent facility (or wrapper) in lib/oe?
>>
>> if not cmd:
>> return
Thanks && cheers,
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/4] unpack.py: add SRC_URI parameter unpack=<bool> (default: true)
2011-01-11 21:48 ` Bernhard Reutner-Fischer
@ 2011-01-11 22:19 ` Andreas Oberritter
2011-01-12 8:23 ` Bernhard Reutner-Fischer
0 siblings, 1 reply; 18+ messages in thread
From: Andreas Oberritter @ 2011-01-11 22:19 UTC (permalink / raw)
To: openembedded-devel
Hello Bernhard,
thanks for your review. When creating the patch I tried to use the least
invasive way, i.e. to change as few lines of code as possible, in order
not to break anything. Most of your remarks apply to already existing
code which was either copied or indented. I think, that your suggestions
should be incorporated in a later patch by someone more experienced in
python than me.
Please see my comments below.
On 01/11/2011 10:48 PM, Bernhard Reutner-Fischer wrote:
> On Tue, Jan 11, 2011 at 09:31:25PM +0100, Andreas Oberritter wrote:
>> Ping.
>>
>> On 01/06/2011 01:48 PM, Andreas Oberritter wrote:
>>> * This allows to download compressed files without extracting them
>>> * Use case: gcj requires ecj.jar, which must be downloaded separately
>>> and put into the gcc source directory before configure gets executed.
>>>
>>> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
>>> CC: Chris Larson <chris_larson@mentor.com>
>>> ---
>>> classes/base.bbclass | 3 +-
>>> docs/usermanual/reference/var_src_uri.xml | 13 ++++-
>>> lib/oe/unpack.py | 81 +++++++++++++++++------------
>>> 3 files changed, 61 insertions(+), 36 deletions(-)
>>>
>>> diff --git a/classes/base.bbclass b/classes/base.bbclass
>>> index c76b77d..25d72d4 100644
>>> --- a/classes/base.bbclass
>>> +++ b/classes/base.bbclass
>>> @@ -190,12 +190,11 @@ def oe_unpack(d, local, urldata):
>>> bb.mkdirhier(destdir)
>>> else:
>>> destdir = workdir
>>> - dos = urldata.parm.get("dos")
>>> I don't know whether this would
>>> bb.note("Unpacking %s to %s/" % (base_path_out(local, d),
>>> base_path_out(destdir, d)))
>>> try:
>>> - unpack_file(local, destdir, env={"PATH": d.getVar("PATH", True)}, dos=dos)
>>> + unpack_file(local, destdir, urldata.parm, env={"PATH": d.getVar("PATH", True)})
>>> except UnpackError, exc:
>>> bb.fatal(str(exc))
>>>
>>> diff --git a/docs/usermanual/reference/var_src_uri.xml b/docs/usermanual/reference/var_src_uri.xml
>>> index 706452f..521c7d5 100644
>>> --- a/docs/usermanual/reference/var_src_uri.xml
>>> +++ b/docs/usermanual/reference/var_src_uri.xml
>>> @@ -91,7 +91,8 @@ SRC_URI[sha256sum] = "36bdb85c97b39ac604bc58cb7857ee08295242c78a12848ef8a31
>>> it is unpacked into the work directory, <command>${WORKDIR}</command>. The
>>> unpacker recognises several archive and compression types and for these it
>>> will decompress any compressed files and extract all of the files from
>>> - archives into the work directory. The supported types are:</para>
>>> + archives into the work directory, unless the option <command>unpack=no</command>
>>> + is set for the given file. The supported types are:</para>
>>>
>>> <variablelist>
>>> <varlistentry>
>>> @@ -192,6 +193,16 @@ SRC_URI[sha256sum] = "36bdb85c97b39ac604bc58cb7857ee08295242c78a12848ef8a31
>>> md5sum option provided.</para>
>>> </listitem>
>>> </varlistentry>
>>> +
>>> + <varlistentry>
>>> + <term>unpack={yes|no}</term>
>>> +
>>> + <listitem>
>>> + <para>If set to 'yes' (default) and the source file is an archive,
>>> + then the archive will be decompressed and unpacked into the ${WORKDIR}.
>>> + Otherwise, the archive will be copied into the ${WORKDIR}.</para>
>
> mixed tab and spaces for indentation.
OK, will fix that if this patch is going to be acked.
>>> + </listitem>
>>> + </varlistentry>
>>> </variablelist>
>>>
>>> <para>Related variables:</para>
>>> diff --git a/lib/oe/unpack.py b/lib/oe/unpack.py
>>> index e4fe5d8..8e8bf36 100644
>>> --- a/lib/oe/unpack.py
>>> +++ b/lib/oe/unpack.py
>>> @@ -47,47 +47,62 @@ def subprocess_setup():
>>> # non-Python subprocesses expect.
>>> signal.signal(signal.SIGPIPE, signal.SIG_DFL)
>>>
>>> -def unpack_file(file, destdir, dos=False, env=None):
>>> +def unpack_file(file, destdir, parameters, env=None):
>>> import subprocess, shutil
>>>
>>> + try:
>>> + dos = to_boolean(parameters.get("dos"), False)
>
> dict().get defaults to None. (None,'',u'',False) is False, so passing in
> a default of False to to_boolean -- which will return False "if not
> string" (and should
> if not string or not isinstance(string, basestring):
> return False
> , as a sidenote)
> is superfluous.
I know, but I preferred the more readable way. I can change it if you like.
>>> + except ValueError, exc:
>
> I think the more modern for is to use 'as'
That was copy'n'paste from the already existing user of to_boolean().
>>> + bb.fatal("Invalid value for 'dos' parameter for %s: %s" %
>>> + (filename, parameters.get("dos")))
>
> I would have let to_boolean raise this through, but as you prefer.
Same as above.
>>> +
>>> + try:
>>> + unpack = to_boolean(parameters.get("unpack"), True)
>>> + except ValueError, exc:
>>> + bb.fatal("Invalid value for 'unpack' parameter for %s: %s" %
>>> + (filename, parameters.get("unpack")))
>
> ditto.
Same as above.
>>> +
>>> dest = os.path.join(destdir, os.path.basename(file))
>>> if os.path.exists(dest):
>>> if os.path.samefile(file, dest):
>>> return True
>>>
>>> cmd = None
>>> - if file.endswith('.tar'):
>>> - cmd = 'tar x --no-same-owner -f %s' % file
>>> - elif file.endswith('.tgz') or file.endswith('.tar.gz') or file.endswith('.tar.Z'):
>>> - cmd = 'tar xz --no-same-owner -f %s' % file
>>> - elif file.endswith('.tbz') or file.endswith('.tbz2') or file.endswith('.tar.bz2'):
>>> - cmd = 'bzip2 -dc %s | tar x --no-same-owner -f -' % file
>>> - elif file.endswith('.gz') or file.endswith('.Z') or file.endswith('.z'):
>>> - root, ext = os.path.splitext(file)
>>> - cmd = 'gzip -dc %s > %s' % (file, os.path.basename(root))
>>> - elif file.endswith('.bz2'):
>>> - root, ext = os.path.splitext(file)
>>> - cmd = 'bzip2 -dc %s > %s' % (file, os.path.basename(root))
>>> - elif file.endswith('.tar.xz'):
>>> - cmd = 'xz -dc %s | tar x --no-same-owner -f -' % file
>>> - elif file.endswith('.xz'):
>>> - root, ext = os.path.splitext(file)
>>> - cmd = 'xz -dc %s > %s' % (file, os.path.basename(root))
>>> - elif file.endswith('.tar.lz'):
>>> - cmd = 'lzip -dc %s | tar x --no-same-owner -f -' % file
>>> - elif file.endswith('.lz'):
>>> - root, ext = os.path.splitext(file)
>>> - cmd = 'lzip -dc %s > %s' % (file, os.path.basename(root))
>>> - elif file.endswith('.zip') or file.endswith('.jar'):
>>> - cmd = 'unzip -q -o'
>>> - if dos:
>>> - cmd = '%s -a' % cmd
>>> - cmd = "%s '%s'" % (cmd, file)
>>> - elif os.path.isdir(file):
>>> - shutil.rmtree(dest, True)
>>> - shutil.copytree(file, dest, True)
>>> - else:
>>> - shutil.copy2(file, dest)
>>> + if unpack:
>>> + if file.endswith('.tar'):
>>> + cmd = 'tar x --no-same-owner -f %s' % file
>>> + elif file.endswith('.tgz') or file.endswith('.tar.gz') or file.endswith('.tar.Z'):
>>> + cmd = 'tar xz --no-same-owner -f %s' % file
>>> + elif file.endswith('.tbz') or file.endswith('.tbz2') or file.endswith('.tar.bz2'):
>>> + cmd = 'bzip2 -dc %s | tar x --no-same-owner -f -' % file
>>> + elif file.endswith('.gz') or file.endswith('.Z') or file.endswith('.z'):
>>> + root, ext = os.path.splitext(file)
>>> + cmd = 'gzip -dc %s > %s' % (file, os.path.basename(root))
>>> + elif file.endswith('.bz2'):
>>> + root, ext = os.path.splitext(file)
>>> + cmd = 'bzip2 -dc %s > %s' % (file, os.path.basename(root))
>>> + elif file.endswith('.tar.xz'):
>>> + cmd = 'xz -dc %s | tar x --no-same-owner -f -' % file
>>> + elif file.endswith('.xz'):
>>> + root, ext = os.path.splitext(file)
>>> + cmd = 'xz -dc %s > %s' % (file, os.path.basename(root))
>>> + elif file.endswith('.tar.lz'):
>>> + cmd = 'lzip -dc %s | tar x --no-same-owner -f -' % file
>>> + elif file.endswith('.lz'):
>>> + root, ext = os.path.splitext(file)
>>> + cmd = 'lzip -dc %s > %s' % (file, os.path.basename(root))
>>> + elif file.endswith('.zip') or file.endswith('.jar'):
>>> + cmd = 'unzip -q -o'
>>> + if dos:
>>> + cmd = '%s -a' % cmd
>>> + cmd = "%s '%s'" % (cmd, file)
>>> +
>>> + if not unpack or not cmd:
>>> + if os.path.isdir(file):
>>> + shutil.rmtree(dest, True)
>>> + shutil.copytree(file, dest, True)
>>> + else:
>>> + shutil.copy2(file, dest)
>
> Don't know offhand but
> - bb.utils.remove(dest, True)
> or equivalent facility (or wrapper) in lib/oe?
That's just changed indentation of already existing code.
For your reference, here's the patch for unpack.py without changes to
whitespace:
> --- lib/oe/unpack.py.orig 2011-01-11 22:11:51.000000000 +0000
> +++ lib/oe/unpack.py 2011-01-11 22:12:23.000000000 +0000
> @@ -47,15 +47,28 @@
> # non-Python subprocesses expect.
> signal.signal(signal.SIGPIPE, signal.SIG_DFL)
>
> -def unpack_file(file, destdir, dos=False, env=None):
> +def unpack_file(file, destdir, parameters, env=None):
> import subprocess, shutil
>
> + try:
> + dos = to_boolean(parameters.get("dos"), False)
> + except ValueError, exc:
> + bb.fatal("Invalid value for 'dos' parameter for %s: %s" %
> + (filename, parameters.get("dos")))
> +
> + try:
> + unpack = to_boolean(parameters.get("unpack"), True)
> + except ValueError, exc:
> + bb.fatal("Invalid value for 'unpack' parameter for %s: %s" %
> + (filename, parameters.get("unpack")))
> +
> dest = os.path.join(destdir, os.path.basename(file))
> if os.path.exists(dest):
> if os.path.samefile(file, dest):
> return True
>
> cmd = None
> + if unpack:
> if file.endswith('.tar'):
> cmd = 'tar x --no-same-owner -f %s' % file
> elif file.endswith('.tgz') or file.endswith('.tar.gz') or file.endswith('.tar.Z'):
> @@ -83,7 +96,9 @@
> if dos:
> cmd = '%s -a' % cmd
> cmd = "%s '%s'" % (cmd, file)
> - elif os.path.isdir(file):
> +
> + if not unpack or not cmd:
> + if os.path.isdir(file):
> shutil.rmtree(dest, True)
> shutil.copytree(file, dest, True)
> else:
Regards,
Andreas
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/4] unpack.py: add SRC_URI parameter unpack=<bool> (default: true)
2011-01-11 22:19 ` Andreas Oberritter
@ 2011-01-12 8:23 ` Bernhard Reutner-Fischer
0 siblings, 0 replies; 18+ messages in thread
From: Bernhard Reutner-Fischer @ 2011-01-12 8:23 UTC (permalink / raw)
To: openembedded-devel
On Tue, Jan 11, 2011 at 11:19:42PM +0100, Andreas Oberritter wrote:
>Hello Bernhard,
>
>thanks for your review. When creating the patch I tried to use the least
>invasive way, i.e. to change as few lines of code as possible, in order
>not to break anything. Most of your remarks apply to already existing
>code which was either copied or indented. I think, that your suggestions
>should be incorporated in a later patch by someone more experienced in
>python than me.
>> a default of False to to_boolean -- which will return False "if not
>> string" (and should
>> if not string or not isinstance(string, basestring):
the isinstance remark is of course nonsense, please disregard it.
>> return False
>> , as a sidenote)
>> is superfluous.
>That's just changed indentation of already existing code.
So let's leave the potential cleanup for a future patch.
Reviewed-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2011-01-12 8:24 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-06 12:48 [PATCH 1/4] python-wifi: add recipe for version 0.5.0 Andreas Oberritter
2011-01-06 12:48 ` [PATCH 2/4] python-wifi: remove version 0.3.1 Andreas Oberritter
2011-01-06 13:07 ` Dr. Michael Lauer
2011-01-06 14:18 ` Frans Meulenbroeks
2011-01-06 14:30 ` Martin Jansa
2011-01-06 12:48 ` [PATCH 3/4] unpack.py: add SRC_URI parameter unpack=<bool> (default: true) Andreas Oberritter
2011-01-11 20:31 ` Andreas Oberritter
2011-01-11 21:48 ` Bernhard Reutner-Fischer
2011-01-11 22:19 ` Andreas Oberritter
2011-01-12 8:23 ` Bernhard Reutner-Fischer
2011-01-06 12:48 ` [PATCH 4/4] gcc: replace unconditional SRC_URI_append with SRC_URI += Andreas Oberritter
2011-01-06 22:40 ` Khem Raj
2011-01-07 9:52 ` Paul Menzel
2011-01-07 12:02 ` Koen Kooi
2011-01-07 12:39 ` Andreas Oberritter
2011-01-06 13:06 ` [PATCH 1/4] python-wifi: add recipe for version 0.5.0 Dr. Michael Lauer
2011-01-06 14:19 ` Frans Meulenbroeks
2011-01-06 14:30 ` Martin Jansa
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.