From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH v2 2/3] Use hardlinks in deb-dl-dir functions
Date: Fri, 6 Jan 2023 07:48:08 +0100 [thread overview]
Message-ID: <20230106064809.10412-3-ubely@ilbers.de> (raw)
In-Reply-To: <20230106064809.10412-1-ubely@ilbers.de>
This saves disk space and reduces IO
Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
meta/classes/deb-dl-dir.bbclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass
index 3b1517dc..7db25251 100644
--- a/meta/classes/deb-dl-dir.bbclass
+++ b/meta/classes/deb-dl-dir.bbclass
@@ -86,7 +86,7 @@ deb_dl_dir_import() {
printenv | grep -q BB_VERBOSE_LOGS && set -x
sudo find "${pc}" -type f -iname "*\.deb" -exec \
- cp -n --no-preserve=owner -t "${rootfs}"/var/cache/apt/archives/ {} +
+ ln -Pf -t "${rootfs}"/var/cache/apt/archives/ {} +
'
}
@@ -109,7 +109,7 @@ deb_dl_dir_export() {
if [ -n "$package" ]; then
cmp --silent "$package" "$p" && continue
fi
- sudo cp -n "${p}" "${pc}"
+ sudo ln -Pf "${p}" "${pc}"
done
sudo chown -R $(id -u):$(id -g) "${pc}"
'
--
2.20.1
next prev parent reply other threads:[~2023-01-06 6:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 6:48 [PATCH v2 0/3] Improving apt cache Uladzimir Bely
2023-01-06 6:48 ` [PATCH v2 1/3] Clean apt cache from debootstrapped rootfs dirs Uladzimir Bely
2023-01-06 6:48 ` Uladzimir Bely [this message]
2023-01-06 6:48 ` [PATCH v2 3/3] Changes for a faster build using less disk space Uladzimir Bely
2023-01-06 15:58 ` Henning Schild
2023-01-06 17:38 ` Uladzimir Bely
2023-01-06 17:52 ` Roberto A. Foglietta
2023-01-06 18:11 ` Henning Schild
2023-01-09 6:32 ` [PATCH v2 0/3] Improving apt cache Moessbauer, Felix
2023-01-09 7:39 ` Uladzimir Bely
2023-01-19 7:36 ` Uladzimir Bely
2023-01-19 14:52 ` Roberto A. Foglietta
2023-01-19 16:30 ` Roberto A. Foglietta
2023-01-20 4:44 ` Uladzimir Bely
2023-01-20 5:08 ` Moessbauer, Felix
2023-01-20 7:01 ` Uladzimir Bely
2023-01-20 7:12 ` Roberto A. Foglietta
2023-01-20 7:23 ` Uladzimir Bely
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=20230106064809.10412-3-ubely@ilbers.de \
--to=ubely@ilbers.de \
--cc=isar-users@googlegroups.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