Re: [gentoo-dev] [PATCH 1/1] linux-info.eclass: Chk for .config/config.gz when CONFIG_* req
On 1/15/23 18:22, Mike Pagano wrote: In the instance where CONFIG_* settings are required and not optional, make sure there is either a .config or a config.gz to check Signed-off-by: Mike Pagano --- eclass/linux-info.eclass | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index 16ef69ebc..a65d0c441 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.eclass @@ -805,8 +805,14 @@ check_extra_config() { export LINUX_CONFIG_EXISTS_DONE="${old_LINUX_CONFIG_EXISTS_DONE}" return 0 fi - else - require_configured_kernel + elif ! linux_config_exists; then + qeerror "Could not find a neither a usable .config in the kernel source directory" + qeerror "nor a /proc/config.gz file," + qeerror "Please ensure that ${KERNEL_DIR} points to a configured set of Linux sources." + qeerror "If you are using KBUILD_OUTPUT, please set the environment var so that" + qeerror "it points to the necessary object directory so that it might find .config" + qeerror "or have a properly configured kernel to produce a config.gz file. (CONFIG_IKCONFIG)." + die "Kernel not configured; no .config found in ${KV_OUT_DIR} or /proc/config.gz found" fi ebegin "Checking for suitable kernel configuration options" Committed -- Mike Pagano Gentoo Developer - Kernel Project Gentoo Sources - Lead E-Mail : mpag...@gentoo.org GnuPG FP : 52CC A0B0 F631 0B17 0142 F83F 92A6 DBEC 81F2 B137 Public Key : http://http://pgp.mit.edu/pks/lookup?search=0x92A6DBEC81F2B137&op=index
[gentoo-dev] [PATCH 2/2] sys-apps/ed: use unpacker_src_uri_depends again
Now that unpacker_src_uri_depends is fixed to not emit duplicates, start using it again. (Note that unlike when we dropped it, no revbump needed to restore it, because the result should be the same now the eclass is fixed, rather than before where we were correcting the bad large deps.) Bug: https://bugs.gentoo.org/891133 Signed-off-by: Sam James --- sys-apps/ed/ed-1.19-r1.ebuild | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys-apps/ed/ed-1.19-r1.ebuild b/sys-apps/ed/ed-1.19-r1.ebuild index 8f805d415665a..e2d63d30eb660 100644 --- a/sys-apps/ed/ed-1.19-r1.ebuild +++ b/sys-apps/ed/ed-1.19-r1.ebuild @@ -33,12 +33,7 @@ fi # and takes ages to resolve (bug #891137). It should merge them together. BDEPEND=" sys-apps/texinfo - || ( - >=app-arch/xz-utils-5.4.0 - app-arch/plzip - app-arch/pdlzip - app-arch/lzip - ) + $(unpacker_src_uri_depends) verify-sig? ( sec-keys/openpgp-keys-antoniodiazdiaz ) " -- 2.39.0
[gentoo-dev] [PATCH 1/2] unpacker.eclass: flatten unpacker_src_uri_depends dependencies
Populate an associative array as we iterate over SRC_URI to collect needed dependencies to avoid recording the same dependencies twice. This still doesn't handle USE flags, but it's significantly better than before, as we won't repeatedly emit the same dependency if there's more than one distfile in SRC_URI with the same suffix. Closes: https://bugs.gentoo.org/891133 Thanks-to: Ionen Wolkens Signed-off-by: Sam James --- eclass/unpacker.eclass | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass index 326b2fa675249..44ff2af5acf39 100644 --- a/eclass/unpacker.eclass +++ b/eclass/unpacker.eclass @@ -596,7 +596,8 @@ unpacker_src_unpack() { # # Note: USE flags are not yet handled. unpacker_src_uri_depends() { - local uri deps d + local uri + local -A deps if [[ $# -eq 0 ]] ; then # Disable path expansion for USE conditionals. #654960 @@ -606,20 +607,19 @@ unpacker_src_uri_depends() { fi for uri in "$@" ; do - local m=${uri,,} - case ${m} in + case ${uri,,} in *.cpio.*|*.cpio) - d="app-arch/cpio" ;; + deps[cpio]="app-arch/cpio" ;; *.rar) - d="app-arch/unrar" ;; + deps[rar]="app-arch/unrar" ;; *.7z) - d="app-arch/p7zip" ;; + deps[7z]="app-arch/p7zip" ;; *.xz) - d="app-arch/xz-utils" ;; + deps[xz]="app-arch/xz-utils" ;; *.zip) - d="app-arch/unzip" ;; + deps[zip]="app-arch/unzip" ;; *.lz) - d=" + deps[lz]=" || ( >=app-arch/xz-utils-5.4.0 app-arch/plzip @@ -629,18 +629,17 @@ unpacker_src_uri_depends() { " ;; *.zst) - d="app-arch/zstd" ;; + deps[zst]="app-arch/zstd" ;; *.lha|*.lzh) - d="app-arch/lha" ;; + deps[lhah]="app-arch/lha" ;; *.lz4) - d="app-arch/lz4" ;; + deps[lz4]="app-arch/lz4" ;; *.lzo) - d="app-arch/lzop" ;; + deps[lzo]="app-arch/lzop" ;; esac - deps+=" ${d}" done - echo "${deps}" + echo "${deps[*]}" } EXPORT_FUNCTIONS src_unpack -- 2.39.0
[gentoo-dev] [PATCH 0/2] unpacker.eclass: avoid duplicate unpacker_src_uri_depends deps
I've diffed metadata before/after and everything looks as expected. The only notable cases really were games-arcade/rocksndiamonds, games-arcade/rocksndiamonds, sys-apps/ed, sys-fs/bcachefs-tools and only sys-apps/ed had a problematic || ( ...) dep, apparently, because of its SRC_URI (verify-sig + mirror listed). Sam James (2): unpacker.eclass: flatten unpacker_src_uri_depends dependencies sys-apps/ed: use unpacker_src_uri_depends again eclass/unpacker.eclass| 29 ++--- sys-apps/ed/ed-1.19-r1.ebuild | 7 +-- 2 files changed, 15 insertions(+), 21 deletions(-) -- 2.39.0