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

Bug 244578

Summary: app-portage/eix-0.13.3-r1 doesn't honor ~/.eixrc when ran as a postsync hook to emerge --sync
Product: Gentoo Linux Reporter: Jeremy Olexa (darkside) (RETIRED) <darkside>
Component: New packagesAssignee: Martin Väth <martin>
Status: RESOLVED INVALID    
Severity: normal CC: genstef
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-10-27 02:02:38 UTC
I have update-eix as a postsync hook when portage does an emerge --sync. When update-eix runs, it doesn't honor ~/.eixrc.

My contents of .eixrc are:
%% cat .eixrc 
EXCLUDE_OVERLAY="/home/olexa/sandbox/gentoo-x86"

But, it still shows ebuilds from that overlay. When I run update-eix on the command line, it does honor .eixrc when ran as root or my user.
Comment 1 Martin Väth 2008-10-27 14:32:33 UTC
I cannot reproduce this here. Perhaps your cron does not export HOME=/root?
(Note: It is important that this variable is exported, not only that it is
set shell-internally. update-eix will show in the output a message like
"No $HOME found in environment." if it is not exported).
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-10-27 14:34:10 UTC
(In reply to comment #1)
> I cannot reproduce this here. Perhaps your cron does not export HOME=/root?
> (Note: It is important that this variable is exported, not only that it is
> set shell-internally. update-eix will show in the output a message like
> "No $HOME found in environment." if it is not exported).
> 

Thanks, I will check it out and report back.
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-10-29 16:08:04 UTC
hmm, I put HOME="/home/olexa" in my crontabe file because that is where my .eixrc is located, shouldn't that be correct? (It didn't effect anything)
Comment 4 Martin Väth 2008-10-30 10:51:20 UTC
I am not sure (and it may depend on the cron program) whether cron really
_exports_ the variables. You can check it by executing the shell script
  sh -c 'echo $HOME'
(it is important to use single quotes and to call a new shell).
As a workaround, you can put a shell script to call update-eix instead of
inserting update-eix directly into the postsync-hook:

#!/bin/sh
export HOME=/home/olexa
exec update-eix "${@}"
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-11-07 21:07:19 UTC
got it, thx for the "tech support" ;-)