From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
To: Uladzimir Bely <ubely@ilbers.de>
Cc: isar-users@googlegroups.com, roberto.foglietta@linuxteam.org
Subject: Re: [PATCH v3] deb-dl-dir class rework to use faster ln -P or fallback to cp
Date: Fri, 10 Feb 2023 11:50:40 +0100 [thread overview]
Message-ID: <CAJGKYO6US-UUV-xLU8OiCk_=op5YFCzJn34U76hdd9xZZdN5ew@mail.gmail.com> (raw)
In-Reply-To: <15525925.Emhk5qWAgF@home>
On Fri, 10 Feb 2023 at 11:07, Uladzimir Bely <ubely@ilbers.de> wrote:
> >
> > deb_dl_dir_import() {
> > export pc="${DEBDIR}/${2}"
> > - export rootfs="${1}"
> > - sudo mkdir -p "${rootfs}"/var/cache/apt/archives/
> > + export sc="${1}/var/cache/apt/archives/"
> > + sudo mkdir -p "${sc}"
> > [ ! -d "${pc}" ] && return 0
> > - flock -s "${pc}".lock -c '
> > + export tf=$(ls -1 "${pc}"/*.deb | head -n1)
> > + [ ! -e "${tf}" ] && return 0
> > + flock -Fs "${pc}".lock sudo -Es << 'EOFSUDO'
> > set -e
> > printenv | grep -q BB_VERBOSE_LOGS && set -x
> >
> > - sudo find "${pc}" -type f -iname "*\.deb" -exec \
> > - ln -Pf -t "${rootfs}"/var/cache/apt/archives/ {} +
> > - '
> > + rm -f "${sc}/"$(basename "${tf}")
> > + ln -Pf -t "${sc}" "${tf}" 2>/dev/null ||:
> > + if [ -r "${tf}" ]; then
Because we need to check the destination, not the source.
if exists $sc/$(basename $tf) then
>
> I was almost ready to merge it since it passes CI (positive case), but
> patchset appeared don't work (negative case) on different filesystems - I find
> downloads/deb/*/ empty after build. At least, exports don't work.
Both do not work correctly. I am going to fix it. Sorry, R-
prev parent reply other threads:[~2023-02-10 10:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 7:52 roberto.foglietta
2023-02-10 10:07 ` Uladzimir Bely
2023-02-10 10:50 ` Roberto A. Foglietta [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='CAJGKYO6US-UUV-xLU8OiCk_=op5YFCzJn34U76hdd9xZZdN5ew@mail.gmail.com' \
--to=roberto.foglietta@gmail.com \
--cc=isar-users@googlegroups.com \
--cc=roberto.foglietta@linuxteam.org \
--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