gccver = getgccversion(chost)
unameout=platform.release()+" "+platform.machine()
- return "Portage " + portage.VERSION +" ("+profilever+", "+gccver+", "+libcver+", "+unameout+")"
+ return "Portage %s (%s, %s, %s, %s)" % \
+ (portage.VERSION, profilever, gccver, libcver, unameout)
def git_sync_timestamps(settings, portdir):
"""
binarytree, myroot, mysettings["PKGDIR"], settings=mysettings)
return trees
+if VERSION == 'HEAD':
+ class _LazyVersion(proxy.objectproxy.ObjectProxy):
+ def _get_target(self):
+ global VERSION
+ if VERSION is not self:
+ return VERSION
+ if os.path.isdir(os.path.join(PORTAGE_BASE_PATH, '.git')):
+ status, output = subprocess_getstatusoutput(
+ "cd %s ; git describe --tags" % \
+ _shell_quote(PORTAGE_BASE_PATH))
+ if os.WIFEXITED(status) and os.WEXITSTATUS(status) == os.EX_OK:
+ VERSION = output
+ return VERSION
+ VERSION = 'HEAD'
+ return VERSION
+ VERSION = _LazyVersion()
+
class _LegacyGlobalProxy(proxy.objectproxy.ObjectProxy):
__slots__ = ('_name',)