From: Jan Kiszka <jan.kiszka@siemens.com>
To: "Klincov,
Wadim (SMO SDT TEC SPA TPQ)" <wadim.klincov@siemens.com>,
"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Cc: "Schmidt, Adriaan (T CED SES-DE)" <adriaan.schmidt@siemens.com>
Subject: Re: [PATCH] dpkg: Account for empty local apt cache after package build
Date: Thu, 19 Oct 2023 06:36:35 +0200 [thread overview]
Message-ID: <2e43adad-fef9-4f46-af19-517bc15973d9@siemens.com> (raw)
In-Reply-To: <c5da34ff4a84c7fc6743a5a77bdbb01309378835.camel@siemens.com>
On 18.10.23 22:33, Klincov, Wadim (SMO SDT TEC SPA TPQ) wrote:
> On Wed, 2023-10-18 at 15:08 +0200, 'Jan Kiszka' via isar-users wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> A build dependency-free package combined with sstate caching and
>> cleared
>> deb cache can trigger
>>
>>> cp -Ln --no-preserve=owner /var/cache/apt/archives/*.deb -t
>>> /home/builder/example-raw/rootfs/var/cache/apt/archives/
>>> -------------------------------------------------------------------
>>> -------------------------------------------------
>>>
>>> cp: cannot stat '/var/cache/apt/archives/*.deb': No such file or
>>> directory
>>>
>>> E: Command 'cp -Ln --no-preserve=owner
>>> /var/cache/apt/archives/*.deb -t /home/builder/example-
>>> raw/rootfs/var/cache/apt/archives/' failed to run.
>>
>> Account for that.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>> meta/classes/dpkg.bbclass | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
>> index d89b0fd9..7249f32b 100644
>> --- a/meta/classes/dpkg.bbclass
>> +++ b/meta/classes/dpkg.bbclass
>> @@ -109,7 +109,7 @@ dpkg_runbuild() {
>> --chroot-setup-commands="mkdir -p ${deb_dir}" \
>> --chroot-setup-commands="ln -sf ${ext_deb_dir}/*.deb -t
>> ${deb_dir}/" \
>> --finished-build-commands="rm -f ${deb_dir}/sbuild-build-
>> depends-main-dummy_*.deb" \
>> - --finished-build-commands="cp -Ln --no-preserve=owner
>> ${deb_dir}/*.deb -t ${ext_deb_dir}/" \
>> + --finished-build-commands="[ -n "$(find ${deb_dir} -maxdepth
>> 1 -name '*.deb' -print -quit)" ] && cp -Ln --no-preserve=owner
>> ${deb_dir}/*.deb -t ${ext_deb_dir}/" \
> Just tried it and it still fails due to the non-zero status of `-n` not
> getting caught. Maybe the previous `|| \:` or using find to copy
> directly might help?
Ah, indeed, missed that because my caches was non-empty again for the
test. v2 is on the way.
Thanks,
Jan
--
Siemens AG, Technology
Linux Expert Center
prev parent reply other threads:[~2023-10-19 4:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-18 13:08 Jan Kiszka
2023-10-18 20:33 ` Klincov, Wadim
2023-10-19 4:36 ` Jan Kiszka [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=2e43adad-fef9-4f46-af19-517bc15973d9@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=adriaan.schmidt@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=wadim.klincov@siemens.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