Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 67162 - Design: how to keyword packages which over-write apple provided files
Summary: Design: how to keyword packages which over-write apple provided files
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Mac OSX (show other bugs)
Hardware: PPC All
: High normal (vote)
Assignee: osx porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 66677
  Show dependency tree
 
Reported: 2004-10-11 15:07 UTC by Nick Dimiduk (RETIRED)
Modified: 2006-04-12 10:52 UTC (History)
2 users (show)

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 Nick Dimiduk (RETIRED) gentoo-dev 2004-10-11 15:07:07 UTC
We have packages we'd like to mark stable.  The packages in question over-write files provided by Apple.  What do we do?  We have the collision-protect feature which allows portage to check before it writes, but how do we indicate within the ebuild that this is a problem?  Another FEATURE?  Use of the ppc-darwin KEYWORD?  (Yet another) USE flag?

Up until now, this has been managed on a case-by-case bases.  Do we want/need a general policy or even a set of guidelines from which to base future decisions?

Reproducible: Always
Steps to Reproduce:
Comment 1 Lina Pezzella (RETIRED) gentoo-dev 2004-10-11 15:34:24 UTC
We definitely need policy. From a QA standpoint, we ALWAYS need policy. Thanks for opening the bug. I'm in favor of the ppc-darwin solution because it requires no additional code and will catch 99.9% of the cases. (maybe 0.1% of packages will compile on macos but not ppc-darwin for some extremely odd and unforseable reason -- it is more foreseeable, though still unlikely, that packages will compile on ppc-darwin but not ppc-macos, in which case -- oh well -- it simply doesn't work)
Comment 2 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-10-12 05:18:02 UTC
Marking these packages so is definitely needed. Using ppc-darwin seems
not so bad, but aside from the "0.1%" of packages, ppc-darwin itself will
have {,open}darwin provided packages. How could we distinguish Gentoo
packages that collide with {,open}darwin ones if we use ppc-darwin for
that? 
Comment 3 Hasan Khalil (RETIRED) gentoo-dev 2004-10-12 20:27:11 UTC
The best solution seems to lie in creation of another keyword modifier much like '~'. This would never get past the rest of the devs, would it? One can dream...
Comment 4 Nathan 2004-11-03 13:34:06 UTC
Isn't this another good reason to install gentoo-macos stuff in a different root?  

Paths (or some similar method) could be set up to use stuff in the gentoo root-path by default, and go look in OSX's system if it isn't there, or vice-versa.

The "either overwrite or don't overwrite" seems like a bad question to me -- use 'em both!
Comment 5 Kito (RETIRED) gentoo-dev 2004-12-01 18:22:45 UTC
ok, after stewing over this for awhile.... PATHSPEC (alternate install root) is still a ways off, as an immediate fix to this problem, how about a separate profile (that defaults to FEATURES="-collision-protect" and an extended set of packages added emerge system)  and keyword (ppc-osx ?) to allow packages that have been tested and known to work in a mac os x system, even if they overwrite apple provided files, in the tree.

keep in mind, this would by no means be a free for all, meaning, only things that *safely* merge would be keyworded...i.e. proprietary apps should all still function as expected.

Just a thought.
Comment 6 Kito (RETIRED) gentoo-dev 2004-12-01 18:35:08 UTC
Oh, i forgot to mention what spawned the thought. i finally have a few more darwin and opendarwin machines running portage. Several packages that currently have open bugs, and which overwrite apple provided files DO NOT compile as is on 'pure' darwin nor opendarwin (autoconf,automake,perl,python,flex, few others.) but they *do* compile and work in os x. The reason for this varies from package to package, but the differences between the 3 darwin variants are indeed more significant than I first thought, so, long story even longer, using the ppc-darwin keyword just wouldn't work IMO.

Comment 7 Chris L. Mason 2004-12-01 19:01:32 UTC
What about people who want to install packages that depend on newer versions
of software bundled with osx, but don't want to overright any Apple-supplied
stuff, because this could break the system and/or software updates?  Will this
require waiting for PATHSPEC, or is there some other approach that could help
here?
Comment 8 Chris L. Mason 2004-12-01 19:02:07 UTC
s/overright/overwrite/

need sleep.
Comment 9 Kito (RETIRED) gentoo-dev 2004-12-02 08:57:51 UTC
Well, things like can prefixed binaries ala (g)sed can be done, but as the whole perl mess has made evident (Bug 57677) it gets tricky. My feeling at the moment is that until PATHSPEC is implemented, trying to accommodate both apple and gentoo versions of packages in all the ebuilds is simply too much to maintain. Keep in mind PATHSPEC is rumored to be here in the not so distant future, 
Comment 10 Hasan Khalil (RETIRED) gentoo-dev 2004-12-02 16:05:05 UTC
kito wrote 'tricky'.
I say impossible, or nearly so. Things get really difficult when you're bringing libraries into the picture. What happens when we need a g<lib>, and/or we have a library provided by macos but compiled with non-standard options (possibly also in a non-standard way) and we need to link against it in gentoo-space. I feel that 'tricky' here is an understatement to say the least.

In the end kito's point is IMO 100% correct; we can't feasibly do everything we want to without pathspec. I've been behind the idea of a new keyword since the problem really became bad in the first days of gentoo for os x's release. I was repeatedly told that we'd never get it past QA. ciaran, comments?
Comment 11 Kito (RETIRED) gentoo-dev 2004-12-02 17:09:39 UTC
Well, I maybe missing something, but I don't see how this is a QA problem. It will simply be another profile that resides somewhere in profiles/default-darwin/ and an extra line in arch.list. The biggest problem I see is users mixing the environments resulting in a system that noone has tested, but this would be akin to current linux users putting insane entries in CFLAGS... we simply can't account for everything.

However, to avoid potentially ugly conditionals in ebuilds, we would/will need a standardized way to test for the darwin userland as we will soon have essentially ~8 archs using it(ppc-macos{10.3,10.4},{x86,ppc}-od,{x86,ppc}-darwin,ppc-osx). 

I know this was supposed to be one of the benefits of exploding keywords but AFAIK has not been completely implemented yet. 
Comment 12 Ciaran McCreesh 2004-12-03 02:26:39 UTC
You don't need another keyword to handle overwrite stuff, you can mask the naughty packages in profile. Dunno how practical that'd be, mind...

As for checking for userland... We need a USERLAND variable added to all of the darwin profiles (*BSD do this already), and we need to ask the portage people to add USERLAND to the expand list if it isn't on there already. Then we could do `if use darwin` or `if use od` or whatever we decide upon...
Comment 13 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-12-03 03:05:04 UTC
We had a discussion about USERLAND variable and
portage people said it is Portage internal variable
that we should never set in any profiles. It is set
to BSD on darwin profiles.
Comment 14 Ciaran McCreesh 2004-12-03 06:23:24 UTC
Ok, we could call it something else :)
Comment 15 Hasan Khalil (RETIRED) gentoo-dev 2004-12-03 08:14:42 UTC
in response to kito's question about it being QA or not:
by QA I mean portage tree integrity and organization. QA
is probably not the best word for it; I apologize. By QA i
really meant that none of the other (non-macos) developers
would ever stand for it.

in response to Ciaran and USERLAND:
perhaps portage's behaviour in detecting/setting USERLAND
should be adapted? or perhaps we should discuss with the
portage devs on why USERLAND is portage internal only, what
uses it, and what would need to change to allow us to set it in
profiles... from my limited knowledge, I'd say that it'd be
'better' to set it in the profile.
Comment 16 Hasan Khalil (RETIRED) gentoo-dev 2005-01-23 12:45:38 UTC
This is obviously a non-trivial problem that we can't deal with just yet. Pathspec should provide some help with this, but is a ways away. j4rg0n and I will be bringing this up on the -dev mailing list soon. I will be marking all bugs depending on this one as 'resoved -> LATER', as we obviously can't deal with tihs problem for a while yet.
Comment 17 Hasan Khalil (RETIRED) gentoo-dev 2005-02-11 11:59:12 UTC
Kito: since you're taking care of this, why don't you go ahead and resolve this when you've made the appropriate profile adjustments that we decided upon (via IRC as well as ML).
Comment 18 Kito (RETIRED) gentoo-dev 2005-02-14 22:14:37 UTC
I think we finally found a solution...

http://gentoo-wiki.com/HOWTO_Gentoo_on_MAC_OSX_Bootstrap
Comment 19 Nathan 2005-02-15 15:10:28 UTC
Maybe I missed something, but since the bug has been marked resolved, what's the answer to the original question?
Comment 20 Kito (RETIRED) gentoo-dev 2005-02-15 15:48:55 UTC
The decision was to continue using the 'ppc-macos' keyword for packages that overwrite apple files. Users who do not wish to have any system files modified should use the 'Standard' os profile, which will have said packages masked to avoid collisions. Users that want to take advantage of packages in the portage tree that may overwrite apple system files, can use the 'Progressive' profile. 

if you visit the link I posted in my last comment, it will explain how to bootstrap accordingly.