From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/ncurses-compat/
Date: Fri, 2 Jun 2023 18:39:33 +0000 (UTC) [thread overview]
Message-ID: <1685731146.c4f94037c93aba068d04b843784e59067a589f33.sam@gentoo> (raw)
commit: c4f94037c93aba068d04b843784e59067a589f33
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 2 18:35:35 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 2 18:39:06 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4f94037
sys-libs/ncurses-compat: optimise SRC_URI generation
Thanks to radhermit's new pkgcraft tooling.
Before:
```
sys-libs/ncurses-compat-6.4_p20230401::gentoo: 46.290096ms
```
After:
```
sys-libs/ncurses-compat-6.4_p20230401::gentoo: 9.308438ms
```
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../ncurses-compat-6.4_p20230401.ebuild | 52 ++++++++++------------
1 file changed, 24 insertions(+), 28 deletions(-)
diff --git a/sys-libs/ncurses-compat/ncurses-compat-6.4_p20230401.ebuild b/sys-libs/ncurses-compat/ncurses-compat-6.4_p20230401.ebuild
index 9732adbcdda4..b4d792b322ad 100644
--- a/sys-libs/ncurses-compat/ncurses-compat-6.4_p20230401.ebuild
+++ b/sys-libs/ncurses-compat/ncurses-compat-6.4_p20230401.ebuild
@@ -62,36 +62,32 @@ if [[ ${PV} == *_p* ]] ; then
)
if [[ -z ${PATCH_DATES[@]} ]] ; then
- SRC_URI+=" https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz"
- SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz.asc"
+ SRC_URI+=" https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz"
+ SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz.asc"
# If we have a rollup patch, use that instead of the individual ones.
- UPSTREAM_PATCHES+=( "${WORKDIR}"/${P/_p/-}-patch.sh )
+ UPSTREAM_PATCHES+=( patch.sh )
else
- patch_url=
- my_patch_index=
-
- # We keep a bunch of mirrors here as we've had reports of invisible*.net
- # being 403 forbidden for some users.
- urls=(
- "https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-%s"
- "https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${MY_P}-%s"
- "https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${MY_P}-%s"
- )
-
- for ((my_patch_index=0; my_patch_index < "${#PATCH_DATES[@]}"; my_patch_index++)); do
- for url in "${urls[@]}" ; do
- patch_url="$(printf ${urls} ${PATCH_DATES[${my_patch_index}]}.patch.gz)"
- SRC_URI+=" ${patch_url}"
- SRC_URI+=" verify-sig? ( ${patch_url}.asc )"
- done
-
- UPSTREAM_PATCHES+=( "${WORKDIR}"/${MY_P}-${PATCH_DATES[${my_patch_index}]}.patch )
- done
-
- unset patch_url
- unset my_patch_index
- unset urls
+ # We use a mirror as well because we've had reports of 403 forbidden for some users.
+ upstream_url_base="https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-"
+ upstream_m_url_base="https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${MY_P}-"
+
+ # Prefix each date with the upstream location (https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P})
+ mangled_patches=( "${PATCH_DATES[@]/#/${upstream_url_base}}" )
+ # Suffix each with .patch.gz
+ mangled_patches=( "${mangled_patches[@]/%/.patch.gz}" )
+ mangled_patches_sig=( "${mangled_patches[@]/%/.asc}" )
+ # Repeat for .patch.gz.asc for verify-sig
+ SRC_URI+=" ${mangled_patches[@]}"
+ SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]} )"
+
+ # For all of the URLs, chuck in invisible-island.net too:
+ SRC_URI+=" ${mangled_patches[@]/${upstream_url_base}/${upstream_m_url_base}}"
+ SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]/${upstream_url_base}/${upstream_m_url_base}} )"
+
+ UPSTREAM_PATCHES=( "${PATCH_DATES[@]/%/.patch}" )
+
+ unset upstream_url_base upstream_m_url_base mangled_patches mangled_patches_sig
fi
fi
@@ -115,7 +111,7 @@ BDEPEND="verify-sig? ( sec-keys/openpgp-keys-thomasdickey )"
S="${WORKDIR}/${MY_P}"
PATCHES=(
- "${UPSTREAM_PATCHES[@]}"
+ "${UPSTREAM_PATCHES[@]/#/${WORKDIR}/${MY_P}-}"
# When rebasing Gentoo's patchset, please use git from a clean
# src_prepare with upstream patches already applied. git am --reject
next reply other threads:[~2023-06-02 18:39 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 18:39 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-15 5:22 [gentoo-commits] repo/gentoo:master commit in: sys-libs/ncurses-compat/ Sam James
2024-10-09 0:06 Jakov Smolić
2024-10-05 21:47 Jakov Smolić
2024-10-05 14:30 Arthur Zamarin
2024-10-05 12:58 Arthur Zamarin
2024-10-05 11:48 Arthur Zamarin
2024-04-28 23:32 Sam James
2024-04-28 4:03 Sam James
2024-04-28 4:03 Sam James
2024-04-28 4:03 Sam James
2024-04-28 4:03 Sam James
2024-04-28 4:03 Sam James
2024-04-28 4:03 Sam James
2024-04-28 4:03 Sam James
2024-04-06 9:20 Sam James
2023-09-19 17:48 Arthur Zamarin
2023-06-17 21:03 Sam James
2023-06-17 16:52 Sam James
2023-06-17 8:42 Arthur Zamarin
2023-05-29 18:21 Sam James
2023-05-13 3:23 Sam James
2023-05-13 2:35 Sam James
2023-05-13 2:35 Sam James
2021-05-14 10:04 David Seifert
2021-05-14 9:35 Agostino Sarubbo
2021-05-13 21:17 Sam James
2021-05-13 18:58 Sam James
2021-05-13 18:56 Sam James
2021-05-13 16:58 Sam James
2021-05-13 16:24 Sam James
2021-04-04 18:31 Mike Gilbert
2020-11-19 12:25 Lars Wendler
2020-11-19 11:17 Agostino Sarubbo
2020-11-17 19:05 Agostino Sarubbo
2020-11-12 7:46 Sergei Trofimovich
2020-11-12 7:41 Sergei Trofimovich
2020-11-12 7:34 Sergei Trofimovich
2020-11-12 0:35 Thomas Deutschmann
2020-11-11 16:22 Sam James
2020-11-10 18:48 Sam James
2020-11-10 18:48 Sam James
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=1685731146.c4f94037c93aba068d04b843784e59067a589f33.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/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