public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] deb-dl-dir: create directory before transfer .deb packages
@ 2023-02-13  1:02 roberto.foglietta
  0 siblings, 0 replies; only message in thread
From: roberto.foglietta @ 2023-02-13  1:02 UTC (permalink / raw)
  To: isar-users; +Cc: roberto.foglietta

From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>

deb-dl-dir, patch suggestion

Some times the folders that deb_dl_dir_ex/import deal with do not
exist and they should create to avoid a useless failure.

Bugfix for pending patch:

    * deb-dl-dir: Fallback to copying when import-export, v.2

Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
---
 meta/classes/deb-dl-dir.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass
index 4d5d4c9..ec35cdf 100644
--- a/meta/classes/deb-dl-dir.bbclass
+++ b/meta/classes/deb-dl-dir.bbclass
@@ -85,6 +85,7 @@ deb_dl_dir_import() {
         set -e
         printenv | grep -q BB_VERBOSE_LOGS && set -x
 
+        mkdir -p "${rootfs}var/cache/apt/archives/" "${pc}"
         find "${pc}" -type f -iname "*\.deb" |\
         while read p; do
             sudo ln -Pf -t "${rootfs}"/var/cache/apt/archives/ "$p" 2>/dev/null ||
@@ -101,6 +102,7 @@ deb_dl_dir_export() {
         set -e
         printenv | grep -q BB_VERBOSE_LOGS && set -x
 
+        mkdir -p "${pc}" "${rootfs}/var/cache/apt/archives/"
         find "${rootfs}"/var/cache/apt/archives/ \
             -maxdepth 1 -type f -iname '*\.deb' |\
         while read p; do
-- 
2.34.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-13  1:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-13  1:02 [PATCH] deb-dl-dir: create directory before transfer .deb packages roberto.foglietta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox