From 515204913c9168e8db77c96fdd7c29feba5bb6f4 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 30 Sep 2014 15:32:08 +0200 Subject: Embed changelog entry date and time instead of build date and time This makes reproducible builds possible. For non-package builds, simply use the start of the Unix time. Also make sure that all time values are in the UTC timezone. Closes: #762674 --- python/apt_pkgmodule.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc index 5f211b3e..ca20ef18 100644 --- a/python/apt_pkgmodule.cc +++ b/python/apt_pkgmodule.cc @@ -880,8 +880,13 @@ extern "C" void initapt_pkg() // Version.. PyModule_AddStringConstant(Module,"VERSION",(char *)pkgVersion); PyModule_AddStringConstant(Module,"LIB_VERSION",(char *)pkgLibVersion); - PyModule_AddStringConstant(Module,"DATE",__DATE__); - PyModule_AddStringConstant(Module,"TIME",__TIME__); +#ifdef DATE + PyModule_AddStringConstant(Module,"DATE",DATE); + PyModule_AddStringConstant(Module,"TIME",TIME); +#else + PyModule_AddStringConstant(Module,"DATE", "Jan 1 1970"); + PyModule_AddStringConstant(Module,"TIME", "00:00:00"); +#endif // My constants PyModule_AddIntConstant(Module,"PRI_IMPORTANT",pkgCache::State::Important); -- cgit v1.2.3