Re: [PATCH 1/2] rpm.eclass: switch order of rpm and rpm2targz

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

> Since app-arch/rpm is the official implementation prefer using that
> if it is installed. We keep app-arch/rpm2targz as the default in the
> dependencies since it is more lightweight.

I think it looks like a bug for the two to be inconsistent and someone
will end up correcting it in future. It should have a comment or better
yet, just make the two match, at least for now (so put rpm first in the
dep too).

>
> This also allows ebuilds which have some issue with
> app-arch/rpm2targz to BDEPEND on app-arch/rpm to ensure the working
> implementation is pulled in and used. Such an incompatibility is
> currently only observed in app-backup/tsm-8.2.1.0 which appears to
> contain an encrypted(?) payload.

We have https://bugs.gentoo.org/971578 too, I think?

I've not verified it's related but I'm fairly sure it is.

>
> See-also: 26b30e180a4b2583452508d79ebb35d0e97fc696
> Bug: https://bugs.gentoo.org/971600
> Signed-off-by: Nowa Ammerlaan <[email protected]>
> ---
>  eclass/rpm.eclass | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/eclass/rpm.eclass b/eclass/rpm.eclass
> index 3b7f9e64355b..97106741fe7d 100644
> --- a/eclass/rpm.eclass
> +++ b/eclass/rpm.eclass
> @@ -43,11 +43,11 @@ rpm_unpack() {
>  			a="${DISTDIR}/${a}"
>  		fi
>  
> -		if command -v rpm2tar >/dev/null; then
> -			local extracttool=(rpm2tar -O)
> -		else
> -			# app-arch/rpm fallback
> +		if command -v rpm2archive >/dev/null; then
>  			local extracttool=(rpm2archive -n)
> +		else
> +			# app-arch/rpm2targz fallback
> +			local extracttool=(rpm2tar -O)
>  		fi
>  
>  		"${extracttool[@]}" "${a}" | tar xf -
signature.asc (application/pgp-signature, 418 B)
-----BEGIN PGP SIGNATURE-----

iQEBBAEWCgCpFiEEJaa7iN2bdkxrVUHCc4QJ9SDfkZAFAmnKzewbFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25z
Lm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQyNUE2QkI4OEREOUI3NjRDNkI1NTQx
QzI3Mzg0MDlGNTIwREY5MTkwDxxzYW1AZ2VudG9vLm9yZwAKCRBzhAn1IN+RkGva
AP9TZ/TmLTFd9tt5ZVA/dL1wNIAuEX4FOm9DHjfllG/RDAEA3gkxN7p8iIGA+Mm5
1FE+ffquwdxwVdSFdHzUeAp4/QA=
=ygFS
-----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.