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.
(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?
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.
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.
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.
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
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.
(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.