Add a BUILD_TIME vdb entry containing the integer number of seconds since the
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 20:20:38 +0000 (20:20 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 20:20:38 +0000 (20:20 -0000)
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
(trunk r15357)

svn path=/main/branches/2.1.7/; revision=15584

pym/portage/__init__.py

index f753670ccc1ff4bb268acb715715a0197086ad22..cee402c320253b61fa175d2b481e5010b28a1d1e 100644 (file)
@@ -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)