Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
!!! Found 2 make.conf files, using both ???
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 4055
Location: india

PostPosted: Sun Jan 20, 2013 5:14 am    Post subject: !!! Found 2 make.conf files, using both ??? Reply with quote

Code:
localhost ramaswamy # emerge googleearth
!!! Found 2 make.conf files, using both '/etc/make.conf' and '/etc/portage/make.conf'
Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) sci-geosciences/googleearth-6.2.2.6613
>>> Downloading 'http://dl.google.com/dl/earth/client/current/google-earth-stable_current_i386.deb'
--2013-01-20 10:41:50--  http://dl.google.com/dl/earth/client/current/google-earth-stable_current_i386.deb
Resolving dl.google.com... 74.125.236.32, 74.125.236.33, 74.125.236.34, ...
Connecting to dl.google.com|74.125.236.32|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 30809718 (29M) [application/x-debian-package]
Saving to: ‘/usr/portage/distfiles/GoogleEarthLnux-6.2.2.6613_i386.deb’


how suddenly it finds 2 make.conf
till this time such a line was not present
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Sun Jan 20, 2013 5:55 am    Post subject: Reply with quote

padoor,

make.conf should only be in /etc/portage. If you have two of them, one overrides the other - I forget which one actually takes precedence.

It appears that a check was added to emerge to warn for that condition.
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4594

PostPosted: Sun Jan 20, 2013 10:07 am    Post subject: Reply with quote

/etc/portage/make.conf override /etc/make.conf, i use this because /etc/make.conf keep local settings and /etc/portage/make.conf is a symlink to a shared make.conf with my other hosts.

I'm sad to see this might be considered an error, even it's just a warning for now.
Back to top
View user's profile Send private message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 4055
Location: india

PostPosted: Sun Jan 20, 2013 11:26 am    Post subject: Reply with quote

i see that now after that emerge the /etc/make.conf is not seen anymore.
it has been removed or merged with the portage/make.conf.
i cold not find a make.conf in /etc
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4594

PostPosted: Sun Jan 20, 2013 11:35 am    Post subject: Reply with quote

Please provide your portage version, i would like see if it really remove the /etc/make.conf
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 4557

PostPosted: Sun Jan 20, 2013 12:28 pm    Post subject: Reply with quote

This is just a reaction to a bug (I forgot the number) which suggests that portage should warn if the old locations are found so that user do not get confused if one gets overridden by the other. I doubt that portage will stop to support the old locations.
Back to top
View user's profile Send private message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 4055
Location: india

PostPosted: Sun Jan 20, 2013 12:43 pm    Post subject: Reply with quote

Code:
[I] sys-apps/portage
     Available versions:  [M]2.1.6.7_p1 2.1.11.9 2.1.11.31 ~2.1.11.33 ~2.1.11.36 ~*2.2.0_alpha142 ~*2.2.0_alpha144 ~*2.2.0_alpha147 **9999 {{build doc epydoc +ipc less linguas_pl pypy1_9 python2 python3 selinux xattr}}
     Installed versions:  2.1.11.31(12:00:54 12/23/12)(ipc -build -doc -epydoc -linguas_pl -pypy2_0 -python2 -python3 -selinux -xattr)
     Homepage:            http://www.gentoo.org/proj/en/portage/index.xml
     Description:         Portage is the package management and distribution system for Gentoo



Code:
tux ramaswamy # dir /etc
ConsoleKit         fstab           lsb-release    revdep-rebuild
DIR_COLORS         fuse.conf           lvm       rmt
ImageMagick         gai.conf           lxdm       rpc
NetworkManager         gconf           machine-id     rsyncd.conf
OpenCL            gentoo-release        mail       runlevels
UPower            ggz.modules        mailcap       sandbox.conf
X11            gnome-settings-daemon  man.conf       sandbox.d
acpi            gnome-vfs-2.0        mime.types     securetty
adobe            gnome-vfs-mime-magic   mke2fs.conf    security
ati            gpm           modprobe.d     sensors.d
bash            group           mplayer       sensors3.conf
bonobo-activation     group-           mtab       services
ca-certificates       gshadow           mtools       sgml
ca-certificates.conf  gshadow-           nanorc       shadow
conf.d            gtk-2.0           networks       shadow-
cpufreqd.conf         gtk-3.0           nscd.conf       shells
cron.daily         gxine           nsswitch.conf  skel
csh.env            host.conf           ntp.conf       sound
cups            hosts           pam.d       ssh
cupshelpers         hotplug           pango       ssl
dbus-1            hotplug.d           papersize       ssmtp
default            init.d           passwd       sudoers
dhcpcd.conf         inittab           passwd-       sudoers.d
dispatch-conf.conf    inputrc           pki       sysctl.conf
dmtab            issue           pm          sysctl.d
drirc            issue.logo        polkit-1       syslog-ng
e2fsck.conf         kernel           portage       terminfo
eclean            ld.so.cache        ppp       timezone
eixrc            ld.so.conf        prelink.conf   udev
env.d            ld.so.conf.d        profile       vmware
environment         libnl           profile.d       wgetrc
etc-update.conf       local.d           profile.env    whois.conf
filesystems         locale.gen        protocols       wpa_supplicant
fltk            localtime           qt4       xdg
fonts            login.defs        rc.conf       xinetd.d
foomatic         logrotate.d        resolv.conf    xml
tux ramaswamy # eix portage


the 2 make.conf message came up first time and then /etc/make.conf is missing
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)
Back to top
View user's profile Send private message
Martin Cmelik
n00b
n00b


Joined: 14 Oct 2010
Posts: 42
Location: Prague

PostPosted: Tue Dec 23, 2014 8:43 am    Post subject: Reply with quote

Hi,

can someone please pay attention to this?
For me it is really a bug because MAN page https://dev.gentoo.org/~zmedico/portage/doc/man/make.conf.5.html do not state that files are in conflict, they could both exist together and this is actually what I want to achieve as well. System-based /etc/make.conf while local admin can tune it via /etc/portage/make.conf

Please let me know if I better should report it as a bug

Thank you!
_________________
Code:
where there is a shell, there is a way
Back to top
View user's profile Send private message
charles17
l33t
l33t


Joined: 02 Mar 2008
Posts: 682

PostPosted: Tue Dec 23, 2014 9:19 am    Post subject: Reply with quote

See bug 465164.
Back to top
View user's profile Send private message
Martin Cmelik
n00b
n00b


Joined: 14 Oct 2010
Posts: 42
Location: Prague

PostPosted: Tue Dec 23, 2014 10:35 am    Post subject: Reply with quote

charles17 wrote:
See bug 465164.


Thank you

Unfortunately last update is more than one year old. Is there a way how to escalate this?
_________________
Code:
where there is a shell, there is a way
Back to top
View user's profile Send private message
Naib
Advocate
Advocate


Joined: 21 May 2004
Posts: 4334
Location: Removed by Neddy

PostPosted: Tue Dec 23, 2014 12:55 pm    Post subject: Reply with quote

Martin Cmelik wrote:
charles17 wrote:
See bug 465164.


Thank you

Unfortunately last update is more than one year old. Is there a way how to escalate this?
just reply with it with some more infomation (not just a *bump*)
_________________
the table is made from wood. forget what you learnt, the table is made from carbon. forget what you learnt, the table is made from protons. forget what you learnt, the table is made from quarks. forget what you learnt, the table is good for shagging on
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4594

PostPosted: Tue Dec 23, 2014 8:44 pm    Post subject: Reply with quote

I'm afraid it's my bug, like many of my bugs, i just lost hope and drop the issue. You cannot "battle" any dev in bugs.gentoo.org ; that's something i've learned the hard way.
But if you feel luckier or less bore than me, good luck.
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 4557

PostPosted: Tue Dec 23, 2014 10:43 pm    Post subject: Reply with quote

I think if you want to reopen the bug you should at least mention which specific problem you want to solve: I cannot see that Zac's valid question about the reason was answered in that bug report. However:
Martin Cmelik wrote:
For me it is really a bug because MAN page https://dev.gentoo.org/~zmedico/portage/doc/man/make.conf.5.html do not state that files are in conflict

IMHO, this is a bug in the manpage: It should probably be recommended to drop the old location.
Obviously, the reason why the old location is still supported and documented is to avoid forcing users to a transition which might cause unexpected breakage for them; you can (and should) not expect more from it than a compatibility cludge:
The manpage is not clear at all what happens if both files exist: Does one information override the other? can variables from one file be used in the other? etc... So any behaviour in the corner case of both files existing is "valid".
Quote:
and this is actually what I want to achieve as well. System-based /etc/make.conf while local admin can tune it via /etc/portage/make.conf

Meanwhile, /etc/portage/make.conf can be a directory. Thus, there are much better ways to achieve what you want: You can make in this directoy symlinks to one (or several) "your whole computer zoo"-defaults, to one (or several) more system-specific overrides, as well as one (or several) local overrides (which all in turn can be directories as well). I recommend to give the symlinks names like "20-global-defaults" "50-my-graphics-hardware" etc (i.e., starting with numbers) so that you can be sure about the order in which the files are read (so that you can use "global" variables as shortcuts in more specific files, etc.).
I use this since years and find it much more flexible and clearer than to rely on undocumented behaviour of an "old" location overriding a "new" location of a config file or vice versa: You as the admin can explicitly determine the order (by the names) and can fine-tune which files override which other files (e.g. you can even have several local and global files overriding each other partly which might be useful in a very complex system zoo).
BTW: This new approach also plays much better with ufed, since you can have USE-flags in their own separate file which is then modified by ufed.
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4594

PostPosted: Wed Dec 24, 2014 10:52 am    Post subject: Reply with quote

mv wrote:
The manpage is not clear at all what happens if both files exist: Does one information override the other? can variables from one file be used in the other? etc... So any behaviour in the corner case of both files existing is "valid".

https://dev.gentoo.org/~zmedico/portage/doc/man/make.conf.5.html wrote:
and settings from /etc/portage/make.conf will override settings from /etc/make.conf


Quote:
which specific problem you want to solve

Code:
ls -l /etc/portage/make.conf
lrwxrwxrwx 1 root root 35 29 avril  2013 /etc/portage/make.conf -> /mnt/faramir/portageshare/make.conf
grep CFLAGS /etc/make.conf
CFLAGS="-march=core2 -O2 -pipe -mfpmath=sse"
grep CFLAGS /etc/portage/make.conf
CFLAGS="override"
emerge --info | grep CFLAGS
CFLAGS="override"
umount /mnt/faramir/portageshare
emerge --info | grep CFLAGS
CFLAGS="-march=core2 -O2 -pipe -mfpmath=sse"


sourcing problem
Code:

echo CFLAGS=\"from /etc/portage\" > /etc/portage/make.conf
echo source /etc/portage/overidetest >> /etc/portage/make.conf
echo CFLAGS=\"overide\" > /etc/portage/mycflags
ln -s /etc/portage/mycflags /etc/portage/overidetest
emerge --info | grep CFLAGS
CFLAGS="overide"
rm /etc/portage/mycflags
emerge --info | grep CFLAGS
"/etc/portage/make.conf", line 2: /etc/portage/overidetest: No such file or directory


got it now?
i didn't yet test your portage is a directory, but are you sure any files in it could be a broken symlink and portage won't complain like when using source trick?
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 4557

PostPosted: Wed Dec 24, 2014 11:37 am    Post subject: Reply with quote

krinn wrote:
got it now?

No, not really. What do you want to achieve?
Quote:
but are you sure any files in it could be a broken symlink

Why would you want to put a broken symlink there? Why not create an empty file, a link to /dev/null, or remove the link if you do not want to put anything in it? Alternatively, you could rename the symlink into a hidden file (starting with .) - then portage would ignore it.

Edit: Out of interest, I just tested and have put a dead symlink in /etc/portage/make.conf: portage silently ignores it, so you can use it in the way you want it. (Although I still do not understand the reason.)
Back to top
View user's profile Send private message
Martin Cmelik
n00b
n00b


Joined: 14 Oct 2010
Posts: 42
Location: Prague

PostPosted: Wed Dec 24, 2014 11:59 am    Post subject: Reply with quote

mv wrote:
Meanwhile, /etc/portage/make.conf can be a directory. Thus, there are much better ways to achieve what you want: You can make in this directoy symlinks to one (or several) "your whole computer zoo"-defaults, to one (or several) more system-specific overrides, as well as one (or several) local overrides (which all in turn can be directories as well). I recommend to give the symlinks names like "20-global-defaults" "50-my-graphics-hardware" etc (i.e., starting with numbers) so that you can be sure about the order in which the files are read (so that you can use "global" variables as shortcuts in more specific files, etc.).


Sure, at the end this will be better as it is already widely used in all Linux systems (sysctl.d, logrotate.d, ...) but it will take much more time to achieve that. In our case I just need to remove approximately two lines of code.
_________________
Code:
where there is a shell, there is a way
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4594

PostPosted: Wed Dec 24, 2014 12:03 pm    Post subject: Reply with quote

if you take a look at first example, i just show you the link is broken because i unmount the mount point.

if my server has any problem, the mount point would be dead and the symlink broken, in that case, emerge will still works fine with all settings set by /etc/make.conf on each hosts.

while when using the same trick with source, portage is broken and output an error message.

So yes, there's a real and big difference between using the two forms : when both have their symlink working, no difference, but when symlink are broken one form lead to portage working (and better! knowing the server is down) while the second form lead to portage is not working.
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 4557

PostPosted: Wed Dec 24, 2014 12:07 pm    Post subject: Reply with quote

Martin Cmelik wrote:
but it will take much more time to achieve that

Maybe there is a misunderstanding: This is already supported since years (from all tools which I use - including portage and eix); you just have to execute a few "mkdir" and "mv" commands once to use it now
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 4557

PostPosted: Wed Dec 24, 2014 12:10 pm    Post subject: Reply with quote

krinn wrote:
iif my server has any problem, the mount point would be dead and the symlink broken

I would be glad to get an error message in such a case instead of a possibly wrong configuration.
If you are in an emergency situation, you can just create an empty file or remove/rename the symlink temporarily.
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4594

PostPosted: Wed Dec 24, 2014 12:25 pm    Post subject: Reply with quote

mv wrote:
I would be glad to get an error message in such a case instead of a possibly wrong configuration.

Well i just don't, it's not portage works to tell me that, and it doesn't mean i'm in an emergency case anyway (i could myself just took it down on purpose).

But this gave me ability to use stuff like that:
FEATURES="-distcc" and CFLAGS="-march=native" or set MAKEOPTS="-j2" in /etc/make.conf
and FEATURES="distcc" in /etc/portage/make.conf with some MAKEOPTS="-j10"...
(that's not really about the server problem, as i just disable it so no host try to use any others hosts as helper if server is down and my network "may" be in trouble).

But i don't think i need to justify anything really, one form works, the other doesn't, it should be enough to anyone to consider such a change a problem.
And the problem is not that we might loose that ability to use both make.conf the problem is that using it you get a stupid message that is not informative to anyone as it doesn't tell user it's deprecated to use them both, just that it found two make.conf ; and this always even you are fully aware of it.
And not only by emerge but also by tools that use emerge like revdep-rebuild that for whatever reason output this like 3 or 5 times.
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 4557

PostPosted: Wed Dec 24, 2014 12:44 pm    Post subject: Reply with quote

krinn wrote:
mv wrote:
I would be glad to get an error message in such a case instead of a possibly wrong configuration.

Well i just don't, it's not portage works to tell me that

IMHO it is, if a config file cannot be read.
Anyhow, your problem can be solved with the appropriate /etc/portage/make.conf directory now (since dangling symlinks are ignored).

The ability to use some sort of conditionals in /etc/portage/make.conf would be nice, though: As almost always in config-files, it would be preferrable to have the full power of a programming language like a shell instead of just a limited possibility to set some variables. We had this discussion already in one of the systemd threads...
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 3303
Location: The Peanut Gallery

PostPosted: Wed Dec 24, 2014 5:22 pm    Post subject: Reply with quote

mv wrote:
Anyhow, your problem can be solved with the appropriate /etc/portage/make.conf directory now (since dangling symlinks are ignored).

OK, I'll take your word for it, as I'm not following all the ins and outs atm.
Quote:
The ability to use some sort of conditionals in /etc/portage/make.conf would be nice, though: As almost always in config-files, it would be preferrable to have the full power of a programming language like a shell instead of just a limited possibility to set some variables. We had this discussion already in one of the systemd threads...

It seems like what krinn had working before (base /etc/portage and overrides in /etc) allows him to do everything you might have wanted with a full-blown interpreter.

More recently, profiles in overlays can have bashrc selected in the same way as package.env, ie by conf filename.

Happy holidays, all :-)
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 4557

PostPosted: Wed Dec 24, 2014 9:34 pm    Post subject: Reply with quote

steveL wrote:
It seems like what krinn had working before (base /etc/portage and overrides in /etc) allows him to do everything you might have wanted with a full-blown interpreter.

It allows him to do exactly one "test": Whether nfs is on or off (or however he mounts). He might want to do a different test: based on hostname, network status, connected machines, ... a lot of uses might be thinkable.
Without a shell, he has to rely on a compatibility cludge which just works undocumented "by accident" just in his case, and he is lost, once this cludge is removed or works differently. This is exactly what I would prefer to not rely on in my config-files.
Quote:
profiles in overlays can have bashrc selected in the same way as package.env

I do not see the relation with this discussion: You also cannot select based on conditionals; and bashrc is full bash code, i.e. you can do all sort of tests anywayy, but unfortunately, it comes "too late" for many settings from make.conf.
It is not too late for CFLAGS/LDFLAGS 'though; I do use it (with some tricky tests) for setting CFLAGS, but then for this, one bashrc is enough, and I do not need a further selection mechanism, since I do the selection in bash.
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4594

PostPosted: Thu Dec 25, 2014 12:22 am    Post subject: Reply with quote

mv wrote:
he has to rely on a compatibility cludge which just works undocumented "by accident"

- It is not a random result but expected feature
- And i already quote it from the man page, just look at it yourself, so it's fully documented.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum