summaryrefslogtreecommitdiffstats
path: root/pym/portage_news.py
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2007-01-18 17:37:27 +0000
committerAlec Warner <antarus@gentoo.org>2007-01-18 17:37:27 +0000
commitd2cf1889624bc7f7e1737deb871bdbbc637ee023 (patch)
tree63bf1c53a1cee29494f79ba3b25c4056f4225b88 /pym/portage_news.py
parent338f2b7bc07c7c2a86b7ed7792baabfe87e987ab (diff)
downloadportage-d2cf1889624bc7f7e1737deb871bdbbc637ee023.tar.gz
portage-d2cf1889624bc7f7e1737deb871bdbbc637ee023.tar.bz2
portage-d2cf1889624bc7f7e1737deb871bdbbc637ee023.zip
I really meant NEWS_LIB_PATH (/var/lib/gentoo) but decent idea to have a timestamp per repo ;)
svn path=/main/trunk/; revision=5704
Diffstat (limited to 'pym/portage_news.py')
-rw-r--r--pym/portage_news.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/pym/portage_news.py b/pym/portage_news.py
index 4434c1294..5cbb7c1a3 100644
--- a/pym/portage_news.py
+++ b/pym/portage_news.py
@@ -54,11 +54,12 @@ class NewsManager(object):
if repoid not in repos:
raise ValueError("Invalid repoID: %s" % repoid)
- if os.path.exists(self.TIMESTAMP_PATH):
+ timestamp_file = self.TIMESTAMP_PATH + repoid
+ if os.path.exists(timestamp_file):
# Make sure the timestamp has correct permissions.
- apply_permissions( filename=self.TIMESTAMP_FILE,
+ apply_permissions( filename=timestamp_file,
uid=self.config["PORTAGE_INST_UID"], gid=portage_gid, mode=664 )
- timestamp = os.stat(self.TIMESTAMP_PATH).st_mtime
+ timestamp = os.stat(timestamp_file).st_mtime
else:
timestamp = 0
@@ -104,7 +105,7 @@ class NewsManager(object):
unlockfile(unread_lock)
# Touch the timestamp file
- f = open(self.TIMESTAMP_PATH, "w")
+ f = open(timestamp_file, "w")
f.close()
def getUnreadItems( self, repoid, update=False ):