Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 219786

Summary: app-portage/layman's initial configuration involving editing make.conf could be automated
Product: Gentoo Linux Reporter: Maurice Volaski <mvolaski>
Component: New packagesAssignee: Gunnar Wrobel (RETIRED) <wrobel>
Status: RESOLVED FIXED    
Severity: enhancement CC: hkbst
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Maurice Volaski 2008-04-29 23:53:50 UTC
Layman (in app-portage) has involved instructions for the user regarding the make.conf file:

* Please add the 'source' statement to make.conf only AFTER 
 * you added your first overlay. Otherwise portage will fail.

The exact failure error is:
[Errno 2] No such file or directory: '/usr/portage/local/layman/make.conf' in /etc/make.conf

Simply creating this path and an empty make.conf file seems to eliminate the error. 

First, the user has see that portage is giving this message when the layman ebuild is being installed. Second, it seems that the ebuild itself could create this path and file on its own and then edit the make.conf file appropriately rather than burdening the user with getting the order right or remembering to do it. 

The actual editing of make.conf would involve copying the existing make.conf file, appending the line, and preparing a cfg file to be installed by running etc-update, but that's a run-of-the-mill user step.
Comment 1 Marijn Schouten (RETIRED) gentoo-dev 2008-04-30 00:06:39 UTC
(In reply to comment #0)
> The actual editing of make.conf would involve copying the existing make.conf
> file, appending the line

You'll need to do better than that, you need to determine whether there is already such a statement. Can you guarantee to do that correctly for every conceivable user setup?

Comment 2 Maurice Volaski 2008-05-01 17:37:46 UTC
This shouldn't be that hard, something like "grep source /etc/make.conf | grep layman -" should find whether the relevant line is there. I suppose some user could trip this up by having it on two lines, but that seems kind of remote.
Comment 3 Gunnar Wrobel (RETIRED) gentoo-dev 2008-06-02 16:19:02 UTC
The newer version (1.2.0) changes the storage location to /usr/local/portage/layman. The ebuild creates this directory now and places an empty make.conf there.

I won't add code to automatically modify /etc/make.conf because the idea of having an external make.conf is to refrain from something like that.
Comment 4 Gunnar Wrobel (RETIRED) gentoo-dev 2008-06-03 04:09:23 UTC
Preparing an empty make.conf in the storage location was actually a bad idea (overwrites old list of overlays) and has been removed again. So the behavious simply remains as before.
Comment 5 compguy284 2008-06-04 04:52:19 UTC
After I upgraded to layman-1.2.0 the old list of overlays was
still in /usr/portage/local/layman/make.conf so I moved everything 
from /usr/portage/local/layman/ to /usr/local/portage/layman/ and now 
upgrading to layman-1.2.0-r1 hosed my /usr/local/portage/layman/make.conf
Comment 6 Maurice Volaski 2008-07-10 17:14:19 UTC
I don't get it. 

1) You said preparing an empty make.conf erased the make.conf that was there. Well, isn't that a bug?

2) I see etc-update all the time automerging "trivial" updates. How is auto-editing the make.conf any different?

3) Assuming #2 is missing above, portage will "fail" if your make.conf is empty, but can't the portage team modify portage to be layman-aware. Then it might not even be necessary to include it as part of make.conf. Portage will know where to look for it and do that on its own. 
Comment 7 Gunnar Wrobel (RETIRED) gentoo-dev 2008-08-01 05:25:17 UTC
(In reply to comment #6)
> I don't get it. 
> 
> 1) You said preparing an empty make.conf erased the make.conf that was there.
> Well, isn't that a bug?

The internal make.conf in /usr/local/portage/layman is no configuration file so I don't consider that behaviour a bug.

> 
> 2) I see etc-update all the time automerging "trivial" updates. How is
> auto-editing the make.conf any different?

/etc/make.conf is a very central component of a Gentoo system. I don't think editing this file automatically is a reasonable thing to do. I'd rather accept the few confused users that did not correctly follow the post install instructions.

> 
> 3) Assuming #2 is missing above, portage will "fail" if your make.conf is
> empty, but can't the portage team modify portage to be layman-aware. Then it
> might not even be necessary to include it as part of make.conf. Portage will
> know where to look for it and do that on its own. 

Too much magic involved. But you can ask the portage guys about this.

>