public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Felix Moessbauer <felix.moessbauer@siemens.com>
To: ubely@ilbers.de
Cc: isar-users@googlegroups.com,
	Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH(sbuild) 1/1] always create apt-cache dirs in deb_dl_dir_import
Date: Fri,  8 Apr 2022 11:23:50 +0200	[thread overview]
Message-ID: <20220408092350.2220280-2-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20220408092350.2220280-1-felix.moessbauer@siemens.com>

This patch ensures that the deb_dl_dir_import function
always creates the apt-cache directories under ${PP}/rootfs,
no matter if files are in the download cache or not.

By that, downstream tasks can safely assume that the apt-cache
is created and place files there.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/classes/deb-dl-dir.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass
index 484fda69..8cf1b4d6 100644
--- a/meta/classes/deb-dl-dir.bbclass
+++ b/meta/classes/deb-dl-dir.bbclass
@@ -78,8 +78,8 @@ debsrc_download() {
 deb_dl_dir_import() {
     export pc="${DEBDIR}/${2}"
     export rootfs="${1}"
-    [ ! -d "${pc}" ] && return 0
     sudo mkdir -p "${rootfs}"/var/cache/apt/archives/
+    [ ! -d "${pc}" ] && return 0
     flock -s "${pc}".lock -c '
         set -e
         printenv | grep -q BB_VERBOSE_LOGS && set -x
-- 
2.30.2


      reply	other threads:[~2022-04-08  9:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08  9:23 [PATCH(sbuild) 0/1] Fix issues on rebuild with empty DL_DIR Felix Moessbauer
2022-04-08  9:23 ` Felix Moessbauer [this message]

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=20220408092350.2220280-2-felix.moessbauer@siemens.com \
    --to=felix.moessbauer@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=ubely@ilbers.de \
    /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