Re: [PATCH 1/5] rpm.eclass: rework app-arch/rpm support into pre-inherit variable

Sam James <[email protected]>
Newsgroups gmane.linux.gentoo.devel
Organization Gentoo
Message-ID <[email protected]>
Eli Schwartz <[email protected]> writes:

> On 4/22/26 12:18 PM, Sam James wrote:
>
>>> +	elif [[ "${#types[@]}" -gt 0 ]]; then
>>> +		for t in "${types[@]}"; do
>>> +			case ${t} in
>>> +				bzip2|zstd) rpmdep+="${t}," ;;
>>> +				lzma) rpmdep+="${t},"; rpm2tar="false" ;;
>>> +				xz) rpmdep+="lzma," ;;
>>> +				none) die "RPM_COMPRESS_TYPE=none must be used alone" ;;
>> 
>> What does alone mean here?
>> 
>> (Add a comment or improve the 'die' message.)
>
>
> die "RPM_COMPRESS_TYPE: 'none' cannot be combined with other values"
>
>
> ?

LGTM.

>
>>> -			# app-arch/rpm fallback
>>> +			payload=$(strings "${a}" | grep -o
>>> 'PayloadIs[a-zA-Z]*'; pipestatus || die "failed to grep rpm payload")
>> 
>> I think this should be $(tc-getSTRINGS), to be pedantic.
>
>
> Yes, oops.
>
>
>
>>> +		if [[ ${use_rpm} = true ]] && has_version -b "app-arch/rpm${usedep}"; then
>>> +			# prefer it if correct USE is in BDEPEND and installed
>>>  			local extracttool=(rpm2archive -n)
>>> +		elif [[ ${payload} = lzma ]]; then
>>> +			die "rpm_unpack called with legacy lzma compression that rpm2targz doesn't support"
>> 
>> It's supposed to, it just doesn't: https://bugs.gentoo.org/321439
>> 
>> (I'd perhaps Bug: tag that.)
>> 
>>> +		else
>>> +			local extracttool=(rpm2tar -O)
>>>  		fi
>>>  
>>>  		"${extracttool[@]}" "${a}" | tar xf -

I think feel free to commit this now. I don't love saying that when
there's an API involved but I don't think we should leave the packages
broken for longer, and nobody has suggested anything different
throughout the IRC discussions either, so I think it's OK.

thanks,
sam
signature.asc (application/pgp-signature, 418 B)
-----BEGIN PGP SIGNATURE-----

iQEBBAEWCgCpFiEEJaa7iN2bdkxrVUHCc4QJ9SDfkZAFAmnpYQwbFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25z
Lm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQyNUE2QkI4OEREOUI3NjRDNkI1NTQx
QzI3Mzg0MDlGNTIwREY5MTkwDxxzYW1AZ2VudG9vLm9yZwAKCRBzhAn1IN+RkKJt
AP0WtDqBYNvm74wk252JHTaQGgqZOI08SPBzQLhhVIKkVwD/Y4EUlzT6aVLFOmsV
8OyZvEm2ZquCHTkqdQT3e6+VSg4=
=PM7S
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.