public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: roberto.foglietta@linuxteam.org
To: isar-users@googlegroups.com
Cc: roberto.foglietta@gmail.com
Subject: [PATCH] deb-dl-dir: create directory before transfer .deb packages
Date: Mon, 13 Feb 2023 02:02:13 +0100	[thread overview]
Message-ID: <20230213010213.1251270-1-roberto.foglietta@linuxteam.org> (raw)

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


                 reply	other threads:[~2023-02-13  1:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230213010213.1251270-1-roberto.foglietta@linuxteam.org \
    --to=roberto.foglietta@linuxteam.org \
    --cc=isar-users@googlegroups.com \
    --cc=roberto.foglietta@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox