* [PATCH] deb-dl-dir: Avoid redownload src packages with epoch in version
@ 2022-07-27 3:54 Uladzimir Bely
2022-08-03 14:48 ` Anton Mikanovich
0 siblings, 1 reply; 2+ messages in thread
From: Uladzimir Bely @ 2022-07-27 3:54 UTC (permalink / raw)
To: isar-users
Some source packages include epoch number in their version string.
This makes check for already downloaded .dsc file wrong.
Example: `libxcrypt_4.4.18-4.dsc` package has version `1:4.4.18-4`.
The patch fixes check for existing .dsc file and reduces a bit build
time and network usage.
Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
meta/classes/deb-dl-dir.bbclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass
index 188cb832..3b1517dc 100644
--- a/meta/classes/deb-dl-dir.bbclass
+++ b/meta/classes/deb-dl-dir.bbclass
@@ -64,7 +64,8 @@ debsrc_download() {
# TODO: get back to the code below when debian bug #1004372 is fixed
# local src="$( dpkg-deb --show --showformat '${source:Package}' "${package}" )"
# local version="$( dpkg-deb --show --showformat '${source:Version}' "${package}" )"
- local dscfile=$(find "${DEBSRCDIR}"/"${rootfs_distro}" -name "${src}_${version}.dsc")
+ local dscname="$(echo ${src}_${version} | sed -e 's/_[0-9]\+:/_/')"
+ local dscfile=$(find "${DEBSRCDIR}"/"${rootfs_distro}" -name "${dscname}.dsc")
[ -n "$dscfile" ] && continue
sudo -E chroot --userspec=$( id -u ):$( id -g ) ${rootfs} \
--
2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] deb-dl-dir: Avoid redownload src packages with epoch in version
2022-07-27 3:54 [PATCH] deb-dl-dir: Avoid redownload src packages with epoch in version Uladzimir Bely
@ 2022-08-03 14:48 ` Anton Mikanovich
0 siblings, 0 replies; 2+ messages in thread
From: Anton Mikanovich @ 2022-08-03 14:48 UTC (permalink / raw)
To: Uladzimir Bely, isar-users
27.07.2022 06:54, Uladzimir Bely wrote:
> Some source packages include epoch number in their version string.
> This makes check for already downloaded .dsc file wrong.
>
> Example: `libxcrypt_4.4.18-4.dsc` package has version `1:4.4.18-4`.
>
> The patch fixes check for existing .dsc file and reduces a bit build
> time and network usage.
>
> Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
Applied to next, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-03 14:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27 3:54 [PATCH] deb-dl-dir: Avoid redownload src packages with epoch in version Uladzimir Bely
2022-08-03 14:48 ` Anton Mikanovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox