All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-arago][master/kirkstone][PATCH 1/2] tisdk-sw-manifest: Add code to not fail on tar error
@ 2023-10-31 14:04 Ryan Eatmon
  2023-10-31 14:04 ` [meta-arago][master/kirkstone][PATCH 2/2] tisdk-core-bundle: Add the tiny image into the core bundle Ryan Eatmon
  2023-10-31 15:44 ` [meta-arago][master/kirkstone][PATCH 1/2] tisdk-sw-manifest: Add code to not fail on tar error Denys Dmytriyenko
  0 siblings, 2 replies; 14+ messages in thread
From: Ryan Eatmon @ 2023-10-31 14:04 UTC (permalink / raw)
  To: Praneeth Bajjuri, Denys Dmytriyenko, meta-arago

We want to add an image into the core bundle, but that image does not
have any opkg .control files.  tar apparently errors out if you ask it
to extract out files but the files are not in the archive, and the
recipes are setup that if any of the commands in the shell error out,
then the entire recipe fails.

Simple fix, add an || (or) condition to the tar command to print a
message that there were not any control files instead of erroring out.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
---
 meta-arago-distro/classes/tisdk-sw-manifest.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta-arago-distro/classes/tisdk-sw-manifest.bbclass b/meta-arago-distro/classes/tisdk-sw-manifest.bbclass
index 14d14f08..b9c63610 100644
--- a/meta-arago-distro/classes/tisdk-sw-manifest.bbclass
+++ b/meta-arago-distro/classes/tisdk-sw-manifest.bbclass
@@ -405,10 +405,10 @@ sw_manifest_target() {
         # Only extract tar.gz or tar.bz2 types
         if [ -e ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.xz ]
         then
-            tar xJf ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.xz -C ${IMAGE_ROOTFS}/filesystem --wildcards *.control
+            tar xJf ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.xz -C ${IMAGE_ROOTFS}/filesystem --wildcards *.control || echo "No control files found in ${image}"
         elif [ -e ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.gz ]
         then
-            tar xzf ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.gz -C ${IMAGE_ROOTFS}/filesystem --wildcards *.control
+            tar xzf ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.gz -C ${IMAGE_ROOTFS}/filesystem --wildcards *.control || echo "No control files found in ${image}"
         fi
     done
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-11-08 14:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-31 14:04 [meta-arago][master/kirkstone][PATCH 1/2] tisdk-sw-manifest: Add code to not fail on tar error Ryan Eatmon
2023-10-31 14:04 ` [meta-arago][master/kirkstone][PATCH 2/2] tisdk-core-bundle: Add the tiny image into the core bundle Ryan Eatmon
2023-10-31 15:44 ` [meta-arago][master/kirkstone][PATCH 1/2] tisdk-sw-manifest: Add code to not fail on tar error Denys Dmytriyenko
2023-10-31 15:59   ` Ryan Eatmon
2023-10-31 19:03     ` Denys Dmytriyenko
2023-11-02 11:48     ` [EXTERNAL] " Chirag Shilwant
2023-11-02 20:37       ` Bin Liu
2023-11-03 13:54         ` Bin Liu
2023-11-03 14:25         ` [EXTERNAL] " Bin Liu
2023-11-03 16:18         ` Ryan Eatmon
2023-11-03 21:17           ` Denys Dmytriyenko
2023-11-07 22:19             ` Bin Liu
2023-11-08 14:12               ` Ryan Eatmon
2023-11-08 14:21                 ` Bin Liu

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.