Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 124638 - prepstrip use non-portable `cp --parents` when using installsources FEATURE
Summary: prepstrip use non-portable `cp --parents` when using installsources FEATURE
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Portage team
URL: http://bugs.gentoo.org/show_bug.cgi?i...
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 115839
  Show dependency tree
 
Reported: 2006-03-02 06:33 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2006-05-27 04:20 UTC (History)
2 users (show)

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


Attachments
patch to use mkdir -p instead of cp --parents (cp_parents.patch,802 bytes, patch)
2006-03-04 02:24 UTC, Zac Medico
Details | Diff
patch to use cpio in copy-pass mode instead of cp --parents (cpio_copy_pass.patch,645 bytes, patch)
2006-03-04 13:54 UTC, Zac Medico
Details | Diff
patch to use rsync instead of cpio (rsync.patch,555 bytes, patch)
2006-05-26 17:12 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2006-03-02 06:33:31 UTC
The code in prepstrip to copy sources when installsources FEATURE is enabled uses a non-portable GNUism in cp, the --parents option.

There's no alternative portable version of --parents, but there is a replacement function in portability eclass (treecopy).

This is with portage 2.1_pre5-r2.

Thanks,
Diego
Comment 1 solar (RETIRED) gentoo-dev 2006-03-04 01:01:09 UTC
Olivier,
Mind working with flameeyes to find a solution?
Clearly the prepstrip can't inherit eclasses directly.
Comment 2 Zac Medico gentoo-dev 2006-03-04 02:24:49 UTC
Created attachment 81275 [details, diff]
patch to use mkdir -p instead of cp --parents

Please test this patch.
Comment 3 Olivier Crete (RETIRED) gentoo-dev 2006-03-04 08:39:15 UTC
That is so ugly. Why not apply that patch only on freebsd, or even better, install GNU cp on Fbsd. or patch the freebsd cp to have --parents
Comment 4 Zac Medico gentoo-dev 2006-03-04 09:43:43 UTC
(In reply to comment #3)
> patch the freebsd cp to have --parents

That would be nice.  The performance of my patch from comment #2 is quite bad in comparison to that of the cp --parents version.
Comment 5 Zac Medico gentoo-dev 2006-03-04 13:54:10 UTC
Created attachment 81351 [details, diff]
patch to use cpio in copy-pass mode instead of cp --parents

Using cpio in copy-pass mode gives practically identical performance to cp --parents.  Luckily, cpio is included in the base profile.  Please test this new patch.
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-05-26 13:45:17 UTC
Zac what's going on with this? Use cpio, rsync, whatever you want but please don't use cp --parents...
Comment 7 Olivier Crete (RETIRED) gentoo-dev 2006-05-26 14:19:59 UTC
the cpio patch looks fine to me.. I dont think I have access to the portage svn, but anyone who does has my blessing to apply it.
Comment 8 Zac Medico gentoo-dev 2006-05-26 15:40:33 UTC
(In reply to comment #7)
> the cpio patch looks fine to me..

Thanks for your feedback.  This is in svn r3419.
Comment 9 solar (RETIRED) gentoo-dev 2006-05-26 16:44:33 UTC
cpio wont exists in all stages. On GNU systems it has to be explicitly 
merged. rsync however will exist in all stages across all arches.
That is probably the safest route to go imo.
Comment 10 Zac Medico gentoo-dev 2006-05-26 17:12:46 UTC
Created attachment 87609 [details, diff]
patch to use rsync instead of cpio

This is in svn r3420.
Comment 11 Zac Medico gentoo-dev 2006-05-27 04:20:00 UTC
This has been released in 2.1_rc3.