From: Zac Medico Date: Tue, 10 Aug 2010 09:20:33 +0000 (-0700) Subject: Pretend that the current user's uid/gid are the 'portage' uid/gid, X-Git-Tag: v2.2_rc68~343 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=41fb4cd560fd0f915cc0d1a3766b6a642fab58cd;p=portage.git Pretend that the current user's uid/gid are the 'portage' uid/gid, so things go smoothly regardless of the current user and global user/group configuration. --- diff --git a/pym/portage/tests/runTests b/pym/portage/tests/runTests index a6f3b8f1c..9600f12a7 100755 --- a/pym/portage/tests/runTests +++ b/pym/portage/tests/runTests @@ -5,6 +5,13 @@ import os, sys import os.path as osp +import grp + +# Pretend that the current user's uid/gid are the 'portage' uid/gid, +# so things go smoothly regardless of the current user and global +# user/group configuration. +os.environ["PORTAGE_USERNAME"] = os.getlogin() +os.environ["PORTAGE_GRPNAME"] = grp.getgrgid(os.getgid()).gr_name # Insert our parent dir so we can do shiny import "tests" # This line courtesy of Marienz and Pkgcore ;)