Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 156146 - app-portage/euses-2.5.2: only prints "Do you Gentoo?" - problems in getportdir
Summary: app-portage/euses-2.5.2: only prints "Do you Gentoo?" - problems in getportdir
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-24 10:16 UTC by Martin von Gagern
Modified: 2006-11-24 14:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
euses-2.5.2-getportdir.patch (euses-2.5.2-getportdir.patch,617 bytes, patch)
2006-11-24 10:48 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.