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

Bug 156146

Summary: app-portage/euses-2.5.2: only prints "Do you Gentoo?" - problems in getportdir
Product: Gentoo Linux Reporter: Martin von Gagern <Martin.vGagern>
Component: Current packagesAssignee: Jeroen Roovers (RETIRED) <jer>
Status: RESOLVED FIXED    
Severity: normal CC: tools-portage
Priority: High    
Version: 2006.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: euses-2.5.2-getportdir.patch

Description Martin von Gagern 2006-11-24 10:16:04 UTC
Whenever I try to use euses to find information about some USE flag, I only get a single line saying "Do you Gentoo?".

A little ltrace reveals that euses checks PORTDIR and continues with "(null)" as value for PORTDIR. Looking at the source, the result from getenv is unconditionally passed to snprintf, and later on only its lengh is checked to be nonzero. So a nonexistant environment variable becoms a NULL pointer returned from getenv becomes the string "(null)" becomes euses idea of a valid PORTDIR.
Comment 1 Martin von Gagern 2006-11-24 10:48:35 UTC
Created attachment 102671 [details, diff]
euses-2.5.2-getportdir.patch

This at least lets getportdir check if the environment variable is set. If so, use it, if not, check make.globales and make.conf.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2006-11-24 14:19:29 UTC
Sorry, I thought I had already fixed that. Seems I didn't publish the fixed version yet. 2.5.3 is in the tree with a fix similar to your patch. Thank you very much for the bug report.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2006-11-24 14:20:01 UTC
Forgot an option.