summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-02-15 20:44:35 +0000
committerZac Medico <zmedico@gentoo.org>2010-02-15 20:44:35 +0000
commit8e301d58e9aa1cf7ddbf2432f63951fb4e79e075 (patch)
tree5dcdda5e2086152358524cf12099e8cd2a469bc9
parentd488c9f345f923825b722ae3cff0302d631c4842 (diff)
downloadportage-8e301d58e9aa1cf7ddbf2432f63951fb4e79e075.tar.gz
portage-8e301d58e9aa1cf7ddbf2432f63951fb4e79e075.tar.bz2
portage-8e301d58e9aa1cf7ddbf2432f63951fb4e79e075.zip
Add a BUILD_TIME vdb entry containing the integer number of seconds since the
unix Epoch. This will be useful for creating package sets that involve comparison of installed packages to binary packages, especially for binhost users. See discussion here: http://archives.gentoo.org/gentoo-portage-dev/msg_d068a8deefd179cc23808bc23f3de200.xml svn path=/main/trunk/; revision=15357
-rw-r--r--pym/portage/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index bd32e7f3e..8a749dc5a 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -5988,6 +5988,11 @@ def _post_src_install_uid_fix(mysettings, out=None):
'w', encoding=_encodings['repo.content'],
errors='strict').write(str(size) + '\n')
+ codecs.open(_unicode_encode(os.path.join(build_info_dir,
+ 'BUILD_TIME'), encoding=_encodings['fs'], errors='strict'),
+ 'w', encoding=_encodings['repo.content'],
+ errors='strict').write(str(int(time.time())) + '\n')
+
use = frozenset(mysettings['PORTAGE_USE'].split())
for k in _vdb_use_conditional_keys:
v = mysettings.configdict['pkg'].get(k)