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

Eli Schwartz <[email protected]>
Newsgroups gmane.linux.gentoo.devel
Message-ID <[email protected]>
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"


?

>> -			# 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 -


-- 
Eli Schwartz
OpenPGP_signature.asc (application/pgp-signature, 236 B)
-----BEGIN PGP SIGNATURE-----

wnsEABYIACMWIQTnFNnmK0TPZHnXm3qEp9ErcA0vVwUCaelJNwUDAAAAAAAKCRCEp9ErcA0vV+LI
AQDAG+WGZJ2seyoSaH24d1GBfYuLgkxRjte/8vCLn9rjtwD/fYabXVMPp2w4QqfoQsudON2/7vvc
ysiUvgNvUw2V8ww=
=rOdQ
-----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.