Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r14174 - main/trunk/pym/repoman
Date: Mon, 31 Aug 2009 02:47:36
Message-Id: E1Mi1kb-00054K-D2@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-08-31 07:56:28 +0000 (Mon, 31 Aug 2009)
3 New Revision: 14174
4
5 Modified:
6 main/trunk/pym/repoman/utilities.py
7 Log:
8 Bug #283292 - Fix FindPortdir() to prevent OSError: [Errno 2] from stat when
9 $PWD is unset. Thanks to Jonathan Callen <en.ABCD@×××××.com> for this patch.
10
11
12 Modified: main/trunk/pym/repoman/utilities.py
13 ===================================================================
14 --- main/trunk/pym/repoman/utilities.py 2009-08-30 20:09:05 UTC (rev 14173)
15 +++ main/trunk/pym/repoman/utilities.py 2009-08-31 07:56:28 UTC (rev 14174)
16 @@ -346,7 +346,7 @@
17 portdir_overlay = None
18 location = os.getcwd()
19 pwd = os.environ.get('PWD', '')
20 - if pwd != location and os.path.realpath(pwd) == location:
21 + if pwd and pwd != location and os.path.realpath(pwd) == location:
22 # getcwd() returns the canonical path but that makes it hard for repoman to
23 # orient itself if the user has symlinks in their portage tree structure.
24 # We use os.environ["PWD"], if available, to get the non-canonical path of