diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-12-20 05:16:44 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-12-20 05:16:44 +0000 |
commit | 1732c6978e3576fb9d690f45f428ead3eeea0740 (patch) | |
tree | 4ea430d78e8aab3a580ad9f693f9e26addfcb3fd /pym/portage/news.py | |
parent | Bug #202748 - When merging a binary package, only clean up (diff) | |
download | portage-1732c6978e3576fb9d690f45f428ead3eeea0740.tar.gz portage-1732c6978e3576fb9d690f45f428ead3eeea0740.tar.bz2 portage-1732c6978e3576fb9d690f45f428ead3eeea0740.zip |
Make some adjustments so that it's possible to install binary
packages without having a portage tree:
* Make portdbapi.aux_get() return early by raising a KeyError
if it detects that there is no portage tree.
* Move the ARCH and USERLAND sanity check to the last moment
in doebuild() and only require these variables if an
existing environment (such as environment.bz2) is
unavailable.
* Make the NewsManager constructor cope with a broken
make.profile symlink.
svn path=/main/trunk/; revision=8973
Diffstat (limited to 'pym/portage/news.py')
-rw-r--r-- | pym/portage/news.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pym/portage/news.py b/pym/portage/news.py index 540372e10..da7e159af 100644 --- a/pym/portage/news.py +++ b/pym/portage/news.py @@ -36,10 +36,12 @@ class NewsManager(object): portdir = portdb.porttree_root profiles_base = os.path.join(portdir, 'profiles') + os.path.sep - profile_path = normalize_path( - os.path.realpath(portdb.mysettings.profile_path)) - if profile_path.startswith(profiles_base): - profile_path = profile_path[len(profiles_base):] + profile_path = None + if portdb.mysettings.profile_path: + profile_path = normalize_path( + os.path.realpath(portdb.mysettings.profile_path)) + if profile_path.startswith(profiles_base): + profile_path = profile_path[len(profiles_base):] self._profile_path = profile_path # Ensure that the unread path exists and is writable. |