On 5/20/2014 9:17 AM, Ross Burton wrote:
Instead of manually unpacking, use the subdir parameter to put the tarball into
the right directory.

Signed-off-by: Ross Burton <[email protected]>
---
  .../canterbury-corpus/canterbury-corpus.bb             |   16 +++-------------
  1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/common/recipes-corpus/canterbury-corpus/canterbury-corpus.bb 
b/common/recipes-corpus/canterbury-corpus/canterbury-corpus.bb
index d15ad15..564dbdb 100644
--- a/common/recipes-corpus/canterbury-corpus/canterbury-corpus.bb
+++ b/common/recipes-corpus/canterbury-corpus/canterbury-corpus.bb
@@ -10,25 +10,15 @@ LIC_FILES_CHKSUM = 
"file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425
PR = "r0" -S = "${WORKDIR}/canterbury-corpus"
-
-SRC_URI = "http://corpus.canterbury.ac.nz/resources/cantrbry.tar.gz";
-
+SRC_URI = 
"http://corpus.canterbury.ac.nz/resources/cantrbry.tar.gz;subdir=${BP}";
A comment here why is this done this way, would help for future code readers.

  SRC_URI[md5sum] = "442e56cfffdf460d25b0b91650a55908"
  SRC_URI[sha256sum] = 
"f140e8a5b73d3f53198555a63bfb827889394a42f20825df33c810c3d5e3f8fb"
-do_unpack () {
-       mkdir -p ${S}
-       tar -xf ${DL_DIR}/cantrbry.tar.gz -C ${S}
-}
-
-do_unpack_append () {
-       rm -rf ${S}/patches
-}
-
  FILES_${PN} = "/lib/firmware/*"
do_install () {
+       rm -rf ${S}/patches
+
Same feedback as the last one here. All the special handling need some explaining comments, so that one can easily understand why it is done this way without knowing the full context.

Thanks,
Nitin

        install -d ${D}${base_libdir}/firmware
        install -m 644 ${S}/* ${D}${base_libdir}/firmware
  }

--
_______________________________________________
meta-intel mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-intel

Reply via email to