aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/version
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/version')
-rw-r--r--libbuild2/version/init.cxx19
1 files changed, 18 insertions, 1 deletions
diff --git a/libbuild2/version/init.cxx b/libbuild2/version/init.cxx
index ced9c68..88f1080 100644
--- a/libbuild2/version/init.cxx
+++ b/libbuild2/version/init.cxx
@@ -374,7 +374,24 @@ namespace build2
path::temp_path ("manifest"),
m.version));
- mvfile (t.path, f, verb_never);
+
+
+ // Copy the original timestamps in order produce the same archive for
+ // the same distribution.
+ //
+ try
+ {
+ entry_time et (file_time (f));
+
+ mvfile (t.path, f, verb_never);
+
+ file_time (f, et);
+ }
+ catch (const system_error& e)
+ {
+ fail << "unable to get/set timestamp for " << f << ": " << e;
+ }
+
t.cancel ();
}