Skip to contentSkip to conversation

sourceipk: make extra files inclusion optional

PATCH In review Chase Maupin 2 participants 2 messages Sep 7, 2010 – Sep 10, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sourceipk: make extra files inclusion optional

* Make the inclusion of the README and recipe files optional for source ipks. For some packages the sources owner may not want these additional files added to their sources.

---
 classes/sourceipk.bbclass |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)
classes/sourceipk.bbclass +12 -3
index 4957e4a..182785b 100644
@@ -14,6 +14,9 @@
 #   - SRCIPK_PACKAGE_ARCH   = This variable allows specific recipies to
 #                             specify an architecture for the sourcetree
 #                             package is "all" is not appropriate
+#   - SRCIPK_INC_EXTRAFILES = When set to 1 this variable indicates that
+#                             the source ipk should contain extra files
+#                             such as the README file and recipe.
 #
 # The default installation directory for the sources is:
 #   /usr/src/${PN}-src
@@ -47,6 +50,9 @@ SRCIPK_INSTALL_DIR ?= "/usr/src/${PN}-src"
 # Default PACKAGE_ARCH for sources is "all"
 SRCIPK_PACKAGE_ARCH ?= "all"
 
+# Default SRCIPK_INCLUDE_EXTRAFILES is to include the extra files
+SRCIPK_INCLUDE_EXTRAFILES ?= "1"
+
 # Create a README file that describes the contents of the source ipk
 sourceipk_create_readme() {
     readme="$1/README.${PN}-src"
@@ -91,7 +97,6 @@ sourceipk_do_create_srcipk() {
             srcuri="OpenEmbedded"
         fi
         echo "Source: $srcuri" >> $control_file
-
         #Write the control tarball
         tar -C $tmp_dir/CONTROL --owner=0 --group=0 -czf $srcipk_dir/control.tar.gz .
 
@@ -101,8 +106,12 @@ sourceipk_do_create_srcipk() {
         # Copy sources for packaging
         mkdir -p $tmp_dir/${SRCIPK_INSTALL_DIR}
         cp -rLf ${S}/* $tmp_dir/${SRCIPK_INSTALL_DIR}/
-        sourceipk_create_readme $tmp_dir/${SRCIPK_INSTALL_DIR}/
-        cp ${FILE} $tmp_dir/${SRCIPK_INSTALL_DIR}/
+
+        if [ ${SRCIPK_INCLUDE_EXTRAFILES} != "0" ]
+        then
+            sourceipk_create_readme $tmp_dir/${SRCIPK_INSTALL_DIR}/
+            cp ${FILE} $tmp_dir/${SRCIPK_INSTALL_DIR}/
+        fi
 
         #Write the data tarball
         tar -C $tmp_dir --owner=0 --group=0 -czf $srcipk_dir/data.tar.gz .
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 5 lines · Chase Maupin

* Make the inclusion of the README and recipe files optional for source ipks. For some packages the sources owner may not want these additional files added to their sources.

FYI, I pushed this patch last night, as it's a faily separate class and nobody seems to use it as of yet.

Signature · 1 line
Denys
Quoted 59 lines
---
 classes/sourceipk.bbclass |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)
classes/sourceipk.bbclass +12 -3
index 4957e4a..182785b 100644
@@ -14,6 +14,9 @@
 #   - SRCIPK_PACKAGE_ARCH   = This variable allows specific recipies to
 #                             specify an architecture for the sourcetree
 #                             package is "all" is not appropriate
+#   - SRCIPK_INC_EXTRAFILES = When set to 1 this variable indicates that
+#                             the source ipk should contain extra files
+#                             such as the README file and recipe.
 #
 # The default installation directory for the sources is:
 #   /usr/src/${PN}-src
@@ -47,6 +50,9 @@ SRCIPK_INSTALL_DIR ?= "/usr/src/${PN}-src"
 # Default PACKAGE_ARCH for sources is "all"
 SRCIPK_PACKAGE_ARCH ?= "all"
 
+# Default SRCIPK_INCLUDE_EXTRAFILES is to include the extra files
+SRCIPK_INCLUDE_EXTRAFILES ?= "1"
+
 # Create a README file that describes the contents of the source ipk
 sourceipk_create_readme() {
     readme="$1/README.${PN}-src"
@@ -91,7 +97,6 @@ sourceipk_do_create_srcipk() {
             srcuri="OpenEmbedded"
         fi
         echo "Source: $srcuri" >> $control_file
-
         #Write the control tarball
         tar -C $tmp_dir/CONTROL --owner=0 --group=0 -czf $srcipk_dir/control.tar.gz .
 
@@ -101,8 +106,12 @@ sourceipk_do_create_srcipk() {
         # Copy sources for packaging
         mkdir -p $tmp_dir/${SRCIPK_INSTALL_DIR}
         cp -rLf ${S}/* $tmp_dir/${SRCIPK_INSTALL_DIR}/
-        sourceipk_create_readme $tmp_dir/${SRCIPK_INSTALL_DIR}/
-        cp ${FILE} $tmp_dir/${SRCIPK_INSTALL_DIR}/
+
+        if [ ${SRCIPK_INCLUDE_EXTRAFILES} != "0" ]
+        then
+            sourceipk_create_readme $tmp_dir/${SRCIPK_INSTALL_DIR}/
+            cp ${FILE} $tmp_dir/${SRCIPK_INSTALL_DIR}/
+        fi
 
         #Write the data tarball
         tar -C $tmp_dir --owner=0 --group=0 -czf $srcipk_dir/data.tar.gz .
Signature · 7 lines
1.7.0.4


_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel