def buildtime():
'''
Return the build date and time.
CLI Example:
.. code-block:: bash
salt '*' rpmlibpkg.buildtime
'''
installdate = lambda h: h.sprintf("%{INSTALLTID:date}")
installptime = lambda h: time.strptime(installdate(h), "%c")
ts = rpm.TransactionSet()
mi = ts.dbMatch()
first = min(installptime(h) for h in mi)
return time.asctime(first)
评论列表
文章目录