Skip to contentSkip to conversation

python-wifi: add recipe for version 0.5.0

PATCH In review Andreas Oberritter 8 participants 18 messages Jan 6, 2011 – Jan 12, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 python-wifi: add recipe for version 0.5.0

* package previously unpackaged files into -doc and -examples

---
 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
recipes/python/python-wifi_0.5.0.bb new file +25 -0
new file mode 100644
index 0000000..faa3b43
@@ -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}"
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH 2/4 python-wifi: remove version 0.3.1

---
 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
recipes/python/python-wifi_0.3.1.bb deleted +0 -21
deleted file mode 100644
index fefffe6..0000000
@@ -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"
Signature · 1 line
1.7.2.3
Acked-by on v1 2/4
#3 lore raw

Re: [PATCH 2/4] python-wifi: remove version 0.3.1

In reply to Andreas Oberritter

2011/1/6 Andreas Oberritter <[email protected]>:

Quoted 3 lines

---

Quoted 40 lines

 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

recipes/python/python-wifi_0.3.1.bb deleted +0 -22
deleted file mode 100644
index fefffe6..0000000
@@ -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
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#4 lore raw

Re: [PATCH 2/4] python-wifi: remove version 0.3.1

In reply to Andreas Oberritter
Quoted 2 lines · Andreas Oberritter
Quoted 36 lines

---
 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

recipes/python/python-wifi_0.3.1.bb deleted +0 -22
deleted file mode 100644
index fefffe6..0000000
@@ -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

#5 lore raw

PATCH 3/4 unpack.py: add SRC_URI parameter unpack=<bool> (default: true)

In reply to Andreas Oberritter

* 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.

---
 classes/base.bbclass                      |    3 +-
 docs/usermanual/reference/var_src_uri.xml |   13 ++++-
 lib/oe/unpack.py                          |   81 +++++++++++++++++------------
 3 files changed, 61 insertions(+), 36 deletions(-)
classes/base.bbclass +1 -2
index c76b77d..25d72d4 100644
@@ -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))
 
docs/usermanual/reference/var_src_uri.xml +12 -1
index 706452f..521c7d5 100644
@@ -91,7 +91,8 @@ SRC_URI[sha256sum] = &quot;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] = &quot;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>
lib/oe/unpack.py +48 -33

95 lines not on this page · raw message

Signature · 1 line
1.7.2.3
#6 lore raw

Re: [PATCH 3/4] unpack.py: add SRC_URI parameter unpack=<bool> (default: true)

Ping.

Quoted 161 lines · Andreas Oberritter

* 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.

---
 classes/base.bbclass                      |    3 +-
 docs/usermanual/reference/var_src_uri.xml |   13 ++++-
 lib/oe/unpack.py                          |   81 +++++++++++++++++------------
 3 files changed, 61 insertions(+), 36 deletions(-)
classes/base.bbclass +1 -2
index c76b77d..25d72d4 100644
@@ -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))
 
docs/usermanual/reference/var_src_uri.xml +12 -1
index 706452f..521c7d5 100644
@@ -91,7 +91,8 @@ SRC_URI[sha256sum] = &quot;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] = &quot;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>
lib/oe/unpack.py +48 -33
index e4fe5d8..8e8bf36 100644
@@ -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
#7 lore raw

Re: [PATCH 3/4] unpack.py: add SRC_URI parameter unpack=<bool> (default: true)

Quoted 45 lines · Andreas Oberritter

Ping.

Quoted 42 lines · Andreas Oberritter

* 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.

---
 classes/base.bbclass                      |    3 +-
 docs/usermanual/reference/var_src_uri.xml |   13 ++++-
 lib/oe/unpack.py                          |   81 +++++++++++++++++------------
 3 files changed, 61 insertions(+), 36 deletions(-)
classes/base.bbclass +1 -2
index c76b77d..25d72d4 100644
@@ -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))
 
docs/usermanual/reference/var_src_uri.xml +2 -1
index 706452f..521c7d5 100644
@@ -91,7 +91,8 @@ SRC_URI[sha256sum] = &quot;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>
 
Quoted 14 lines
Quoted 4 lines
docs/usermanual/reference/var_src_uri.xml +0 -0
   <variablelist>
     <varlistentry>
@@ -192,6 +193,16 @@ SRC_URI[sha256sum] = &quot;36bdb85c97b39ac604bc58cb7857ee08295242c78a12848ef8a31
           md5sum option provided.</para>

docs/usermanual/reference/var_src_uri.xml SRC_URI[sha256sum] = &quot;36bdb85c97b39ac604bc58cb7857ee08295242c78a12848ef8a31 · line 203

Quoted 10 lines
docs/usermanual/reference/var_src_uri.xml +8 -0
         </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.

Quoted 13 lines
Quoted 13 lines
docs/usermanual/reference/var_src_uri.xml +2 -0
+        </listitem>
+      </varlistentry>
     </variablelist>
 
     <para>Related variables:</para>
lib/oe/unpack.py +0 -0
index e4fe5d8..8e8bf36 100644
@@ -47,47 +47,62 @@ def subprocess_setup():
     # non-Python subprocesses expect.
     signal.signal(signal.SIGPIPE, signal.SIG_DFL)
 
Quoted 6 lines

lib/oe/unpack.py def subprocess_setup(): · line 54

Quoted 6 lines
lib/oe/unpack.py +3 -1
-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.

Quoted 1 line

lib/oe/unpack.py def subprocess_setup(): · line 55

Quoted 1 line
lib/oe/unpack.py +1 -0
+    except ValueError, exc:

I think the more modern for is to use 'as'

Quoted 2 lines

lib/oe/unpack.py def subprocess_setup(): · line 57

Quoted 2 lines
lib/oe/unpack.py +2 -0
+        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.

Quoted 6 lines

lib/oe/unpack.py def subprocess_setup(): · line 63

Quoted 6 lines
lib/oe/unpack.py +6 -0
+
+    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.

Quoted 66 lines
Quoted 66 lines
lib/oe/unpack.py +28 -32
+
     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
Quoted 8 lines

lib/oe/unpack.py def subprocess_setup(): · line 105

Quoted 8 lines
lib/oe/unpack.py +8 -0
+            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?

Quoted 3 lines

lib/oe/unpack.py def subprocess_setup(): · line 108

Quoted 3 lines
lib/oe/unpack.py +0 -0
     if not cmd:
         return

Thanks && cheers,

#8 lore raw

Re: [PATCH 3/4] unpack.py: add SRC_URI parameter unpack=<bool> (default: true)

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.

Quoted 46 lines · Bernhard Reutner-Fischer
Quoted 45 lines · Andreas Oberritter

Ping.

Quoted 42 lines · Andreas Oberritter

* 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.

---
 classes/base.bbclass                      |    3 +-
 docs/usermanual/reference/var_src_uri.xml |   13 ++++-
 lib/oe/unpack.py                          |   81 +++++++++++++++++------------
 3 files changed, 61 insertions(+), 36 deletions(-)
classes/base.bbclass +1 -2
index c76b77d..25d72d4 100644
@@ -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))
 
docs/usermanual/reference/var_src_uri.xml +2 -1
index 706452f..521c7d5 100644
@@ -91,7 +91,8 @@ SRC_URI[sha256sum] = &quot;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>
 
Quoted 16 lines
Quoted 6 lines
Quoted 6 lines
docs/usermanual/reference/var_src_uri.xml +0 -0
   <variablelist>
     <varlistentry>
@@ -192,6 +193,16 @@ SRC_URI[sha256sum] = &quot;36bdb85c97b39ac604bc58cb7857ee08295242c78a12848ef8a31
           md5sum option provided.</para>
         </listitem>
       </varlistentry>
Quoted 8 lines

docs/usermanual/reference/var_src_uri.xml SRC_URI[sha256sum] = &quot;36bdb85c97b39ac604bc58cb7857ee08295242c78a12848ef8a31 · line 203

Quoted 8 lines
docs/usermanual/reference/var_src_uri.xml +8 -0
+
+      <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.

Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
docs/usermanual/reference/var_src_uri.xml +2 -0
+        </listitem>
+      </varlistentry>
     </variablelist>
 
     <para>Related variables:</para>
lib/oe/unpack.py +1 -1
index e4fe5d8..8e8bf36 100644
@@ -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
 
Quoted 10 lines
Quoted 2 lines

lib/oe/unpack.py def subprocess_setup(): · line 54

Quoted 2 lines
lib/oe/unpack.py +2 -0
+    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.

Quoted 3 lines
Quoted 1 line

lib/oe/unpack.py def subprocess_setup(): · line 55

Quoted 1 line
lib/oe/unpack.py +1 -0
+    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().

Quoted 4 lines
Quoted 2 lines

lib/oe/unpack.py def subprocess_setup(): · line 57

Quoted 2 lines
lib/oe/unpack.py +2 -0
+        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.

Quoted 8 lines
Quoted 6 lines

lib/oe/unpack.py def subprocess_setup(): · line 63

Quoted 6 lines
lib/oe/unpack.py +6 -0
+
+    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.

Quoted 70 lines
Quoted 70 lines
Quoted 70 lines
lib/oe/unpack.py +32 -32
+
     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):
Quoted 8 lines
Quoted 4 lines

lib/oe/unpack.py def subprocess_setup(): · line 105

Quoted 4 lines
lib/oe/unpack.py +4 -0
+            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:

Quoted 33 lines
oe/unpack.py renamed from oe/unpack.py.orig +14 -1
@@ -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'):

oe/unpack.py line 104

Quoted 10 lines
oe/unpack.py renamed from oe/unpack.py.orig +3 -1
@@ -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

#9 lore raw

Re: [PATCH 3/4] unpack.py: add SRC_URI parameter unpack=<bool> (default: true)

Quoted 12 lines · Andreas Oberritter

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.

Quoted 3 lines

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.

Quoted 5 lines
Quoted 3 lines

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.

#10 lore raw

PATCH 4/4 gcc: replace unconditional SRC_URI_append with SRC_URI +=

In reply to Andreas Oberritter

* Fixes missing leading whitespace character at some locations

---
 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(-)
recipes/gcc/gcc-3.4.4.inc +1 -1
index 99e680f..8a3ce02 100644
@@ -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"
recipes/gcc/gcc-3.4.6.inc +1 -1
index 5296f26..3991cdc 100644
@@ -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"
recipes/gcc/gcc-4.0.2.inc +1 -1
index 63f9772..9d3c660 100644
@@ -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  \
recipes/gcc/gcc-canadian-sdk_4.2.4.bb +1 -1
index 7a1402f..08a4c95 100644
@@ -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 \
recipes/gcc/gcc_4.2.2.bb +1 -1
index 30713f8..4822da9 100644
@@ -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}"
recipes/gcc/gcc_4.2.3.bb +1 -1
index 6fe3028..a174e11 100644
@@ -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}"
 
recipes/gcc/gcc_4.2.4.bb +1 -1
index 6fe3028..a174e11 100644
@@ -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}"
 
recipes/gcc/gcc_4.3.1.bb +1 -1
index 442c273..38ae714 100644
@@ -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}"
 
recipes/gcc/gcc_4.3.2.bb +1 -1
index c73dfc1..998f58c 100644
@@ -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}"
recipes/gcc/gcc_4.3.3.bb +1 -1
index 274f474..263969a 100644
@@ -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}"
 
recipes/gcc/gcc_4.3.4.bb +1 -1
index ec20085..57ced16 100644
@@ -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}"
recipes/gcc/gcc_4.4.1.bb +1 -1
index 52b09cf..30ab402 100644
@@ -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}"
 
recipes/gcc/gcc_4.4.2.bb +1 -1
index d1d50ad..55f05b5 100644
@@ -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}"
 
recipes/gcc/gcc_4.4.4.bb +1 -1
index 271e9d1..6aeac2f 100644
@@ -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}"
recipes/gcc/gcc_4.5.bb +1 -1
index ad71ada..bc59b14 100644
@@ -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}"
recipes/gcc/gcc_svn.bb +1 -1
index 9b69a23..0332174 100644
@@ -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}"
Signature · 1 line
1.7.2.3
Acked-by on v1 4/4
#11 lore raw

Re: [PATCH 4/4] gcc: replace unconditional SRC_URI_append with SRC_URI +=

Quoted 4 lines · Andreas Oberritter

* Fixes missing leading whitespace character at some locations

for sanity can you make sure that these patches are being picked up? by doing bitbake -c patch

Quoted 225 lines

---

 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(-)
recipes/gcc/gcc-3.4.4.inc +0 -0
index 99e680f..8a3ce02 100644
@@ -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 \

          "

recipes/gcc/gcc-3.4.4.inc +1 -1
-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"

recipes/gcc/gcc-3.4.6.inc +0 -0
index 5296f26..3991cdc 100644
@@ -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"

recipes/gcc/gcc-3.4.6.inc +1 -1
-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"

recipes/gcc/gcc-4.0.2.inc +0 -0
index 63f9772..9d3c660 100644
@@ -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
recipes/gcc/gcc-4.0.2.inc +1 -1
-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  \

recipes/gcc/gcc-canadian-sdk_4.2.4.bb +0 -0
index 7a1402f..08a4c95 100644
@@ -14,7 +14,7 @@ DEPENDS = "gmp-canadian mpfr-canadian"

 require gcc-configure-canadian-sdk.inc
 require gcc-package-sdk.inc

recipes/gcc/gcc-canadian-sdk_4.2.4.bb +1 -1
-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 \

recipes/gcc/gcc_4.2.2.bb +0 -0
index 30713f8..4822da9 100644
@@ -4,6 +4,6 @@ require gcc-${PV}.inc

 require gcc-configure-target.inc
 require gcc-package-target.inc

recipes/gcc/gcc_4.2.2.bb +1 -1
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"

 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"

recipes/gcc/gcc_4.2.3.bb +0 -0
index 6fe3028..a174e11 100644
@@ -4,7 +4,7 @@ require gcc-${PV}.inc

 require gcc-configure-target.inc
 require gcc-package-target.inc

recipes/gcc/gcc_4.2.3.bb +1 -1
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"

 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"

recipes/gcc/gcc_4.2.4.bb +0 -0
index 6fe3028..a174e11 100644
@@ -4,7 +4,7 @@ require gcc-${PV}.inc

 require gcc-configure-target.inc
 require gcc-package-target.inc

recipes/gcc/gcc_4.2.4.bb +1 -1
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"

 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"

recipes/gcc/gcc_4.3.1.bb +0 -0
index 442c273..38ae714 100644
@@ -4,7 +4,7 @@ require gcc-${PV}.inc

 require gcc-configure-target.inc
 require gcc-package-target.inc

recipes/gcc/gcc_4.3.1.bb +1 -1
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"

 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"

recipes/gcc/gcc_4.3.2.bb +0 -0
index c73dfc1..998f58c 100644
@@ -8,6 +8,6 @@ FILES_${PN} += "\
         ${gcclibdir}/${TARGET_SYS}/*/*.o \

 "

recipes/gcc/gcc_4.3.2.bb +1 -1
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"

 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"

recipes/gcc/gcc_4.3.3.bb +0 -0
index 274f474..263969a 100644
@@ -8,7 +8,7 @@ FILES_${PN} += "\
         ${gcclibdir}/${TARGET_SYS}/*/*.o \

 "

recipes/gcc/gcc_4.3.3.bb +1 -1
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"

 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"

recipes/gcc/gcc_4.3.4.bb +0 -0
index ec20085..57ced16 100644
@@ -8,6 +8,6 @@ FILES_${PN} += "\
         ${gcclibdir}/${TARGET_SYS}/*/*.o \

 "

recipes/gcc/gcc_4.3.4.bb +1 -1
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"

 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"

recipes/gcc/gcc_4.4.1.bb +0 -0
index 52b09cf..30ab402 100644
@@ -8,7 +8,7 @@ FILES_${PN} += "\
         ${gcclibdir}/${TARGET_SYS}/*/*.o \

 "

recipes/gcc/gcc_4.4.1.bb +1 -1
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"

 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"

recipes/gcc/gcc_4.4.2.bb +0 -0
index d1d50ad..55f05b5 100644
@@ -8,7 +8,7 @@ FILES_${PN} += "\
         ${gcclibdir}/${TARGET_SYS}/*/*.o \

 "

recipes/gcc/gcc_4.4.2.bb +1 -1
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"

 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"

recipes/gcc/gcc_4.4.4.bb +0 -0
index 271e9d1..6aeac2f 100644
@@ -8,6 +8,6 @@ FILES_${PN} += "\
         ${gcclibdir}/${TARGET_SYS}/*/*.o \

 "

recipes/gcc/gcc_4.4.4.bb +1 -1
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"

 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"

recipes/gcc/gcc_4.5.bb +0 -0
index ad71ada..bc59b14 100644
@@ -10,6 +10,6 @@ FILES_${PN} += "\
        ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lto-wrapper \

 "

recipes/gcc/gcc_4.5.bb +1 -1
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
+SRC_URI += "file://fortran-cross-compile-hack.patch"

 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"

recipes/gcc/gcc_svn.bb +0 -0
index 9b69a23..0332174 100644
@@ -8,6 +8,6 @@ FILES_${PN} += "\
         ${gcclibdir}/${TARGET_SYS}/*/*.o \

 "

recipes/gcc/gcc_svn.bb +1 -1
-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

#12 lore raw

Re: [PATCH 4/4] gcc: replace unconditional SRC_URI_append with SRC_URI +=

In reply to Andreas Oberritter

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

#13 lore raw

Re: [PATCH 4/4] gcc: replace unconditional SRC_URI_append with SRC_URI +=

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 6 lines · Paul Menzel

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-----

#14 lore raw

Re: [PATCH 4/4] gcc: replace unconditional SRC_URI_append with SRC_URI +=

In reply to Paul Menzel
Quoted 4 lines · Paul Menzel

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.

Quoted 7 lines

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 ...".

Quoted 1 line

[1] http://docs.openembedded.org/usermanual/usermanual.html#recipes_syntax

SRC_URI_append = "file://fixup.patch" is probably a bad example.

Regards,
Andreas

Acked-by on v1 1/4
#16 lore raw
In reply to Andreas Oberritter

2011/1/6 Andreas Oberritter <[email protected]>:

Quoted 4 lines

* package previously unpackaged files into -doc and -examples

Quoted 45 lines

---
 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

recipes/python/python-wifi_0.5.0.bb new file +25 -1
new file mode 100644
index 0000000..faa3b43
@@ -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
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#17 lore raw
In reply to Andreas Oberritter
Quoted 4 lines · Andreas Oberritter

* package previously unpackaged files into -doc and -examples

Quoted 40 lines

---
 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

recipes/python/python-wifi_0.5.0.bb new file +25 -1
new file mode 100644
index 0000000..faa3b43
@@ -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