switch news timestamp and unread/read storage to '/var/lib/gentoo' like the GLEP...
authorAlec Warner <antarus@gentoo.org>
Tue, 16 Jan 2007 16:59:34 +0000 (16:59 -0000)
committerAlec Warner <antarus@gentoo.org>
Tue, 16 Jan 2007 16:59:34 +0000 (16:59 -0000)
svn path=/main/trunk/; revision=5673

bin/emerge
pym/portage_const.py
pym/portage_news.py

index 1e4926752901c5bd2a135793c5b375e0d4504c9f..95aae5ef2442397095aa03e784a9314b45820aa3 100755 (executable)
@@ -30,6 +30,7 @@ except ImportError:
        import portage
 del os.environ["PORTAGE_LEGACY_GLOBALS"]
 from portage import digraph, portdbapi
+from portage_const import NEWS_LIB_PATH
 
 import emergehelp, xpak, commands, errno, re, socket, time, types
 import output
@@ -3560,7 +3561,7 @@ def post_emerge(settings, mtimedb, retval):
        chk_updated_cfg_files(target_root, config_protect)
        
        NEWS_PATH = os.path.join( "metadata", "news" )
-       UNREAD_PATH = os.path.join( target_root, portage.PRIVATE_PATH, 'news')
+       UNREAD_PATH = os.path.join( target_root, NEWS_LIB_PATH, 'news')
        porttree = portdbapi( porttree_root = settings["PORTDIR"], mysettings = settings )
        newsReaderDisplay = False
        
index f5b392506d9b5b7c192548319147594437dc1129..7b44a6c1aff08df6cd50c8456d38e7de9eb83543 100644 (file)
@@ -23,6 +23,7 @@ CUSTOM_PROFILE_PATH     = USER_CONFIG_PATH+"/profile"
 PORTAGE_BASE_PATH       = os.path.join(os.sep, os.sep.join(__file__.split(os.sep)[:-2]))
 PORTAGE_BIN_PATH        = PORTAGE_BASE_PATH+"/bin"
 PORTAGE_PYM_PATH        = PORTAGE_BASE_PATH+"/pym"
+NEWS_LIB_PATH           = "/var/lib/gentoo"
 PROFILE_PATH            = "/etc/make.profile"
 LOCALE_DATA_PATH        = PORTAGE_BASE_PATH+"/locale"
 
index 7624bed2d08b09996f5351b7bc914bb3e0920d5f..50da11f8d93ed06e20095cccde602c0e251a782f 100644 (file)
@@ -3,7 +3,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-from portage_const import PRIVATE_PATH, INCREMENTALS, PROFILE_PATH
+from portage_const import INCREMENTALS, PROFILE_PATH, NEWS_LIB_PATH
 from portage import config, vartree, vardbapi, portdbapi
 from portage_util import ensure_dirs
 from portage_data import portage_gid
@@ -29,7 +29,7 @@ class NewsManager(object):
        def __init__( self, root, NEWS_PATH, UNREAD_PATH, LANGUAGE_ID='en' ):
                self.NEWS_PATH = NEWS_PATH
                self.UNREAD_PATH = UNREAD_PATH
-               self.TIMESTAMP_PATH = os.path.join( root, PRIVATE_PATH, NewsManager.TIMESTAMP_FILE )
+               self.TIMESTAMP_PATH = os.path.join( root, self.NEWS_LIB_PATH, NewsManager.TIMESTAMP_FILE )
                self.target_root = root
                self.LANGUAGE_ID = LANGUAGE_ID
                self.config = config( config_root = os.environ.get("PORTAGE_CONFIGROOT", "/"),