From 1732c6978e3576fb9d690f45f428ead3eeea0740 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 20 Dec 2007 05:16:44 +0000 Subject: 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 --- pym/portage/news.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'pym/portage/news.py') 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. -- cgit v1.2.3-1-g7c22