Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 408801 - unpacker.eclass - unpack rpms
Summary: unpacker.eclass - unpack rpms
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-19 03:32 UTC by Christoph Junghans (RETIRED)
Modified: 2016-03-23 02:21 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
replace ar in unpack_deb (replace_ar.patch,692 bytes, patch)
2012-03-19 03:32 UTC, Christoph Junghans (RETIRED)
Details | Diff
unpack to PWD (unpack_to_pwd.patch,373 bytes, patch)
2012-03-23 01:44 UTC, Christoph Junghans (RETIRED)
Details | Diff
replace ar in unpack_deb (replace_ar.patch,822 bytes, patch)
2012-04-09 03:59 UTC, Christoph Junghans (RETIRED)
Details | Diff
replace ar in unpack_deb (replace_ar.patch,831 bytes, patch)
2012-04-10 03:07 UTC, Christoph Junghans (RETIRED)
Details | Diff
add support to unpack rpm (add_rpm_support.patch,1.38 KB, patch)
2012-04-14 02:23 UTC, Christoph Junghans (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Junghans (RETIRED) gentoo-dev 2012-03-19 03:32:04 UTC
Created attachment 305843 [details, diff]
replace ar in unpack_deb

1.) The attached patch will replace the call to ar in unpack_deb with bash and coreutils calls (bug #384147#c19). This will help unpacker.eclass on AIX - a version of the patch was tested by haubi before.

2.) The unpack_banner is sometimes misleading.
"unpacker path/to/file.gz" will unpack file.gz to path/to and not to PWD.
So either we fix the message or the target directory.
Comment 1 Mike Gilbert gentoo-dev 2012-03-19 04:00:20 UTC
I think your patch is reversed there.
Comment 2 Christoph Junghans (RETIRED) gentoo-dev 2012-03-19 19:27:16 UTC
(In reply to comment #1)
> I think your patch is reversed there.
Yes, it is reverted. But let's discuss point 2, first!
Comment 3 Mike Gilbert gentoo-dev 2012-03-19 19:57:37 UTC
(In reply to comment #2)
> Yes, it is reverted. But let's discuss point 2, first!

Not much to discuss. I think changing it to unpack in the current directory is the way to go and matches the behavior of unpack.
Comment 4 SpanKY gentoo-dev 2012-03-21 03:49:05 UTC
Comment on attachment 305843 [details, diff]
replace ar in unpack_deb

i find it hard to say the proposed replacement is better.  if you want to restrict the code to only run for certain targets, then that'd be fine.

as for your (2), `unpacker` is supposed to act like `unpack`, so it should extract to $PWD.
Comment 5 Christoph Junghans (RETIRED) gentoo-dev 2012-03-21 15:38:18 UTC
(In reply to comment #4)
> Comment on attachment 305843 [details, diff] [details, diff]
> replace ar in unpack_deb
> 
> i find it hard to say the proposed replacement is better.  if you want to
> restrict the code to only run for certain targets, then that'd be fine.
No problem, we can surround it by add [[ ${EPREFIX} ]].
@haubi: Would that be sufficient?

> 
> as for your (2), `unpacker` is supposed to act like `unpack`, so it should
> extract to $PWD.
Good, I will create a patch for that.
Comment 6 Christoph Junghans (RETIRED) gentoo-dev 2012-03-23 01:44:23 UTC
Created attachment 306377 [details, diff]
unpack to PWD
Comment 7 SpanKY gentoo-dev 2012-04-05 03:20:41 UTC
Comment on attachment 306377 [details, diff]
unpack to PWD

thanks, committed

http://sources.gentoo.org/eclass/unpacker.eclass?r1=1.5&r2=1.6
Comment 8 Christoph Junghans (RETIRED) gentoo-dev 2012-04-09 03:59:21 UTC
Created attachment 308253 [details, diff]
replace ar in unpack_deb

Put usage of ar replacement inside EPREFIX conditional.
Comment 9 SpanKY gentoo-dev 2012-04-09 23:42:48 UTC
Comment on attachment 308253 [details, diff]
replace ar in unpack_deb

there should be a space after the comment markers ("#")

use ${f} and ${size}

why change from `unpack` to `unpacker` ?
Comment 10 Christoph Junghans (RETIRED) gentoo-dev 2012-04-10 03:07:35 UTC
Created attachment 308359 [details, diff]
replace ar in unpack_deb

(In reply to comment #9)
> there should be a space after the comment markers ("#")
Fixed.
> 
> use ${f} and ${size}
Fixed & fixed.
> 
> why change from `unpack` to `unpacker` ?
Why not? It makes it more self-contained and unpacker fails back to unpack anyway.
Comment 11 SpanKY gentoo-dev 2012-04-14 00:29:14 UTC
(In reply to comment #10)

because unpacker handles things like .xz files in any EAPI which `unpack` does not.  if you have no technical reason for using `unpack`, then don't.  in fact, this was one of the entire reasons for unpacker.eclass in the first place.
Comment 12 Christoph Junghans (RETIRED) gentoo-dev 2012-04-14 01:51:21 UTC
(In reply to comment #11)
> (In reply to comment #10)
> 
> because unpacker handles things like .xz files in any EAPI which `unpack`
> does not.  if you have no technical reason for using `unpack`, then don't. 
> in fact, this was one of the entire reasons for unpacker.eclass in the first
> place.
I don't understand your comment. I changed from unpack to unpacker in unpack_deb.
Comment 13 Christoph Junghans (RETIRED) gentoo-dev 2012-04-14 02:23:53 UTC
Created attachment 308845 [details, diff]
add support to unpack rpm
Comment 14 SpanKY gentoo-dev 2012-04-21 05:45:59 UTC
(In reply to comment #12)

true, i confused myself.  committed now.
http://sources.gentoo.org/eclass/unpacker.eclass?r1=1.6&r2=1.7

(In reply to comment #13)

i don't want this bug to turn into a dumping ground for random improvements.  one issue per bug after this please.
Comment 15 Christoph Junghans (RETIRED) gentoo-dev 2012-04-25 04:00:03 UTC
(In reply to comment #14)
> (In reply to comment #12)
> 
> true, i confused myself.  committed now.
> http://sources.gentoo.org/eclass/unpacker.eclass?r1=1.6&r2=1.7
> 
> (In reply to comment #13)
> 
> i don't want this bug to turn into a dumping ground for random improvements.
> one issue per bug after this please.
Ok, I promise this will be the last one ;-)

1.) I don't like the part of the rpm patch where everything is unpacked from a src rpm as newer rpm may contain other format than *.tar.{gz,bz2} *.t{gz,bz2} *.zip *.ZIP. 

2.) And rpm_spec_epatch from rpm.eclass is also used in two ebuilds (gdb and pax).
Comment 16 Christoph Junghans (RETIRED) gentoo-dev 2012-04-30 21:33:32 UTC
(In reply to comment #15)
> (In reply to comment #14)
> > (In reply to comment #12)
> 2.) And rpm_spec_epatch from rpm.eclass is also used in two ebuilds (gdb and
> pax).
That should go into epatch.eclass.
Comment 17 SpanKY gentoo-dev 2012-08-20 20:06:39 UTC
(In reply to comment #15)

the trouble is that an rpm can include pretty much anything, so it's hard to say what should/shouldn't be unpacked
Comment 18 Christoph Junghans (RETIRED) gentoo-dev 2012-08-21 15:59:39 UTC
(In reply to comment #17)
> (In reply to comment #15)
> 
> the trouble is that an rpm can include pretty much anything, so it's hard to
> say what should/shouldn't be unpacked
Agreed, so I guess we should just unpack the rpm and leave the rest to the ebuild writer, that is also more clean and predictable.

(In reply to comment #15)
> 2.) And rpm_spec_epatch from rpm.eclass is also used in two ebuilds (gdb and
> pax).
Newer version of gdb don't use rpm_spec_epatch anymore and pax could be pulled from debian instead.
Comment 19 Christoph Junghans (RETIRED) gentoo-dev 2016-03-23 02:21:53 UTC
Let's not merge this and leave rpm.eclass alone.