Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 53674 - PORTDIR_OVERLAY requires duplicating files from the original portage_dir
Summary: PORTDIR_OVERLAY requires duplicating files from the original portage_dir
Status: RESOLVED REMIND
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Lowest enhancement (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-11 14:52 UTC by Peter S. Mazinger
Modified: 2008-02-29 21:54 UTC (History)
2 users (show)

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


Attachments
Small bash script to symlink files dir into an overlay (efiles,914 bytes, text/plain)
2006-01-05 01:58 UTC, Alec Warner
Details
Same thing, but with two bug fixes ;) (efiles,870 bytes, text/plain)
2006-01-05 02:00 UTC, Alec Warner
Details
evil hack to use user_src_{unpack,compile,install} (user_function.diff,1.37 KB, patch)
2006-03-07 05:31 UTC, Hanno Zysik (geki)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter S. Mazinger 2004-06-11 14:52:46 UTC
if only an ebuild is copied from the original and changed in the overlay directory, then following vars are not interpreted correctly
DISTDIR/FILESDIR, these should allow to place new or replacement files to distfiles, or the overlay package/files directory, but if the ebuild used some files from the earlier FILESDIR, it won't be found, so all the needed files have to be copied to the new location as well, distfiles is ignored completely
also Manifest and digest-* are required, although only digest makes really sense if some source packages change their md5sum (but it should not be mandatory)
the profiles handling does not work at all (non-stackable) from this directory

Reproducible: Always
Steps to Reproduce:
1. create an overlay dir and copy gcc-ebuild there
2. set the overlay dir in make.conf
3. run emerge gcc



Expected Results:  
it should interpret digest if it is present instead of the original one
it should find files in the overlay and the original dir
it should find files in overlay distfiles
if a file is found in the overlay dir as replacement for the original profile 
file, this should be used instead of the original
Comment 1 Ciaran McCreesh 2004-06-11 15:47:40 UTC
How the heck would that work??? Ebuilds use ${FILESDIR}/blah.patch, for example.
Comment 2 Brian Harring (RETIRED) gentoo-dev 2004-06-11 15:54:59 UTC
What you're asking for provides little benefit, and a crapload of code complexity.

The filesdir is specific to the package definition- by definition, I mean the repository/category/package directory.  You're asking for portage to be aware of all packages w/ the same cat/name across repositories, and treat their files dir as one directory.

It's a change from how things are done, and it's a pita to implement... personally, I just use a script, I wouldn't want portage to do what you're asking- if I'm testing a modification to a patch in an overlay, when I emerge a package out of the tree (non-overlay), I expect it to use the patch that's in the tree- I don't want the possibility of portage trying to be helpful, and grabbing the potentially borked patch in my overlay that happens to have the same name.

portage crew?  your thoughts?
Comment 3 SpanKY gentoo-dev 2004-06-11 16:09:44 UTC
i think it's kind of a nice idea ... search path for $FILESDIR ... the problem is that i think it could *easily* introduce obscure bugs
Comment 4 Peter S. Mazinger 2004-06-12 03:17:51 UTC
what do you think of making links in the overlay directory to the files used in the respective ebuild (looking for FILESDIR) when ebuild digest is running
the distfiles would need inverse link from the overlay_dir to /usr/portage/distfiles, although I do not like the distfiles links solution
Comment 5 Brian Harring (RETIRED) gentoo-dev 2004-08-04 21:31:11 UTC
Strikes me as an idea for a script to add to gentoolkit{,-dev}.
Comment 6 Nicholas Jones (RETIRED) gentoo-dev 2004-10-09 21:10:00 UTC
Dev-portage won't be doing this.

A tool to simplify your life might be possible.
If tools-portage is interested, they can take it.
Comment 7 Alec Warner archtester Gentoo Infrastructure gentoo-dev Security 2005-07-28 21:42:12 UTC
Carpaski says it all.
Comment 8 Alec Warner archtester Gentoo Infrastructure gentoo-dev Security 2006-01-05 01:58:05 UTC
Created attachment 76221 [details]
Small bash script to symlink files dir into an overlay
Comment 9 Alec Warner archtester Gentoo Infrastructure gentoo-dev Security 2006-01-05 02:00:45 UTC
Created attachment 76222 [details]
Same thing, but with two bug fixes ;)
Comment 10 Hanno Zysik (geki) 2006-03-07 02:13:05 UTC
I have an alternative idea.
What I see is that there are pre_* and post_* functions to common functions of an ebuild.
Now why do not add user_* stub functions to portage that a user can set in a overlay like PORTDIR_OVERLAY which are run after pre_*, post_* and common functions.
There the user can do all his/her evil things.
Let a variable like OFILESDIR point to the filesdir of an overlay.

Is there a flag like '-R' for epatch to unapply patches from FILESDIR.
This would be nice to have for that.
Comment 11 Hanno Zysik (geki) 2006-03-07 05:31:37 UTC
Created attachment 81596 [details, diff]
evil hack to use user_src_{unpack,compile,install}

Set USERFUNC_OVERLAY="/path/to/overlay" in /etc/make.conf.
Create paths like for PORTDIR_OVERLAY - /path/to/overlay/category/PN/files.

user_src_* executes after src_*
OFILESDIR points to /path/to/overlay/category/PN/files

Why user_src_* functions?
Hell, sometimes I just want to add patches. And just for that I have to copy the whole subtree. That is horrible.

You just add /path/to/overlay/category/PN/P.ebuild
New patches go into /path/to/overlay/category/PN/files
(like epatch ${OFILESDIR}/your.diff, ${FILESDIR} being still valid)
You can overwrite a single function from ebuild to do selective replacements.
No more the need to copy the complete subtree.

This sounds evil. ;)
Comment 12 Marius Mauch (RETIRED) gentoo-dev 2006-03-07 10:14:37 UTC
You can use /etc/portage/bashrc for that already.
Comment 13 michael@smith-li.com 2008-02-29 21:54:49 UTC
While this idea is not without merit, it doesn't look like it's going to be put in an official Gentoo package any time soon. Please check back in a couple more years...