Skip to contentSkip to conversation

Pending patches from O.S. Systems' tree

PATCH Applied Otavio Salvador 2 participants 6 messages Feb 29, 2012

lore
Share & tools
lore
#0 lore raw

cover Pending patches from O.S. Systems' tree

The following changes since commit 61216d2743502ef38955054aad6a4f2ed63e6d43:

licenses.conf: fix quotting of SRC_DISTRIBUTE_LICENSES (2012-02-28 17:51:42 +0000)

are available in the git repository at:
git://github.com/OSSystems/oe-core master
https://github.com/OSSystems/oe-core/tree/HEAD

Otavio Salvador (3):
image.bbclass: do not create image manifest link if IMAGE_LINK_NAME
is empty
image_types.bbclass: properly support IMAGE_LINK_NAME as empty image_types.bbclass: fix bzip2 and xz compression commands

 meta/classes/image.bbclass       |    6 ++++--
 meta/classes/image_types.bbclass |   18 +++++++++++-------
 2 files changed, 15 insertions(+), 9 deletions(-)
Signature · 1 line
1.7.2.5
#1 lore raw

PATCH 1/3 image.bbclass: do not create image manifest link if IMAGE_LINK_NAME is empty

---
 meta/classes/image.bbclass |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
meta/classes/image.bbclass +4 -2
index 4db55ff..ec75cc1 100644
@@ -322,8 +322,10 @@ make_zimage_symlink_relative () {
 write_image_manifest () {
 	rootfs_${IMAGE_PKGTYPE}_write_manifest
 
-	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.manifest
-        ln -s ${IMAGE_NAME}.rootfs.manifest ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.manifest
+	if [ -n "${IMAGE_LINK_NAME}" ]; then
+		rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.manifest
+		ln -s ${IMAGE_NAME}.rootfs.manifest ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.manifest
+	fi
 }
 
 # Make login manager(s) enable automatic login.
Signature · 1 line
1.7.2.5
#2 lore raw

PATCH 2/3 image_types.bbclass: properly support IMAGE_LINK_NAME as empty

In reply to Otavio Salvador
---
 meta/classes/image_types.bbclass |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
meta/classes/image_types.bbclass +9 -5
index 74071c1..f9ed49f 100644
@@ -25,7 +25,9 @@ def get_imagecmds(d):
             types.append("ext3")
         types.remove("live")
 
-    cmds += "	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*"
+    if len(d.getVar('IMAGE_LINK_NAME', True)) > 0:
+        cmds += "	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*"
+
     for type in types:
         ccmd = []
         subimages = []
@@ -55,10 +57,12 @@ runimagecmd () {
 	# Now create the needed compressed versions
 	cd ${DEPLOY_DIR_IMAGE}/
         ${ccmd}
-	# And create the symlinks
-        for type in ${subimages}; do
-		ln -s ${IMAGE_NAME}.rootfs.$type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type
-	done
+        # And create the symlinks
+        if [ -n "${IMAGE_LINK_NAME}" ]; then
+            for type in ${subimages}; do
+                ln -s ${IMAGE_NAME}.rootfs.$type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type
+            done
+        fi
 }
 
 def imagetypes_getdepends(d):
Signature · 1 line
1.7.2.5
#3 lore raw

Re: [PATCH 2/3] image_types.bbclass: properly support IMAGE_LINK_NAME as empty

Quoted 10 lines · Otavio Salvador
---
 meta/classes/image_types.bbclass |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
meta/classes/image_types.bbclass +0 -0
index 74071c1..f9ed49f 100644

meta/classes/image_types.bbclass def get_imagecmds(d): · line 30

Quoted 7 lines
meta/classes/image_types.bbclass +3 -1
@@ -25,7 +25,9 @@ def get_imagecmds(d):
             types.append("ext3")
         types.remove("live")
 
-    cmds += "	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*"
+    if len(d.getVar('IMAGE_LINK_NAME', True)) > 0:
+        cmds += "	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*"
+

I took this but I removed the unneeded len() above.

Cheers,

Richard

#4 lore raw

PATCH 3/3 image_types.bbclass: fix bzip2 and xz compression commands

In reply to Otavio Salvador

We need to use -f (force) or the command fails in the image file already exists.

---
 meta/classes/image_types.bbclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
meta/classes/image_types.bbclass +2 -2
index f9ed49f..0c25a92 100644
@@ -188,8 +188,8 @@ IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lz
 COMPRESSIONTYPES = "gz bz2 lzma xz"
 COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}"
 COMPRESS_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}.rootfs.${type} > ${IMAGE_NAME}.rootfs.${type}.gz"
-COMPRESS_CMD_bz2 = "bzip2 -k ${IMAGE_NAME}.rootfs.${type}"
-COMPRESS_CMD_xz = "xz -k -c ${XZ_COMPRESSION_LEVEL} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}.rootfs.${type}"
+COMPRESS_CMD_bz2 = "bzip2 -f -k ${IMAGE_NAME}.rootfs.${type}"
+COMPRESS_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}.rootfs.${type}"
 COMPRESS_DEPENDS_lzma = "xz-native"
 COMPRESS_DEPENDS_gz = ""
 COMPRESS_DEPENDS_bz2 = ""
Signature · 1 line
1.7.2.5
#5 lore raw
In reply to Otavio Salvador
Quoted 8 lines · Otavio Salvador

The following changes since commit 61216d2743502ef38955054aad6a4f2ed63e6d43:

licenses.conf: fix quotting of SRC_DISTRIBUTE_LICENSES (2012-02-28 17:51:42 +0000)

are available in the git repository at:
git://github.com/OSSystems/oe-core master
https://github.com/OSSystems/oe-core/tree/HEAD

Quoted 5 lines

Otavio Salvador (3):
image.bbclass: do not create image manifest link if IMAGE_LINK_NAME
is empty
image_types.bbclass: properly support IMAGE_LINK_NAME as empty image_types.bbclass: fix bzip2 and xz compression commands

Merged to master, thanks (with one tweak I've mentioned).

Cheers,

Richard