Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 431614 - [science overlay] intel-sdp.eclass: please extract all RPMs in one call to tar
Summary: [science overlay] intel-sdp.eclass: please extract all RPMs in one call to tar
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-16 09:46 UTC by Michał Górny
Modified: 2012-11-22 21:59 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-08-16 09:46:30 UTC
Right now, intel-sdp_src_unpack() does a 'for' loop over all requested RPMs and extracts them one by one from the huge tarball.

I believe it would take much less time if all the possible paths were just passed to 'tar -xf' and thus were extracted in a single run, and then the necessary logic was applied.
Comment 1 Sébastien Fabbro (RETIRED) gentoo-dev 2012-11-22 15:28:42 UTC
may be.
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2012-11-22 15:50:53 UTC
I will look into it.
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2012-11-22 19:01:10 UTC
is it worth saving 25% of time and using 650% of disk space?
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-11-22 19:14:10 UTC
(In reply to comment #3)
> is it worth saving 25% of time and using 650% of disk space?

Are those actual numbers? Could you elaborate?
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2012-11-22 19:24:29 UTC
Wrong testing. Doing it again. Will be much more.
Comment 6 Justin Lecher (RETIRED) gentoo-dev 2012-11-22 19:49:31 UTC
okay I found a solution. 

Full extract    30 s    2100 MB
Old solution    62 s      81 MB
New solution    37 s      81 MB

This should be fine.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-11-22 19:54:55 UTC
(In reply to comment #6)
> okay I found a solution. 
> 
> Full extract    30 s    2100 MB
> Old solution    62 s      81 MB
> New solution    37 s      81 MB
> 
> This should be fine.

Yes, it seems that you found the right way. Care to attach a diff or the new version?
Comment 8 Justin Lecher (RETIRED) gentoo-dev 2012-11-22 21:19:29 UTC
I will send it off to the ml soon. The idea is simple, get a list with "t" and use that list to identify the location of the rpm inside the tarball. Then decompress alls at once.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-11-22 21:41:37 UTC
(In reply to comment #8)
> I will send it off to the ml soon. The idea is simple, get a list with "t"
> and use that list to identify the location of the rpm inside the tarball.
> Then decompress alls at once.

Hmm, not sure about that but couldn't we just create a 'max' list of possible rpm locations and pass them all to tar? This would cause an error exit but we could probably just ignore it and verify the RPMs instead.
Comment 10 Justin Lecher (RETIRED) gentoo-dev 2012-11-22 21:59:58 UTC
Maybe an evan faster solution.