diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:09 +0000 |
commit | 3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c (patch) | |
tree | 9532e637f47d6ff7246ccbabb62d4e2b4b5908df /src/deb/build.c | |
parent | Adding debian version 1.22.6. (diff) | |
download | dpkg-3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c.tar.xz dpkg-3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c.zip |
Merging upstream version 1.22.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/deb/build.c')
-rw-r--r-- | src/deb/build.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/deb/build.c b/src/deb/build.c index 1f0c050..a418dd1 100644 --- a/src/deb/build.c +++ b/src/deb/build.c @@ -544,7 +544,9 @@ parse_timestamp(const char *value) errno = 0; timestamp = strtoimax(value, &end, 10); - if (value == end || *end || errno != 0) + if (value == end || *end) + ohshit(_("unable to parse timestamp '%.255s'"), value); + else if (errno != 0) ohshite(_("unable to parse timestamp '%.255s'"), value); return timestamp; @@ -597,7 +599,7 @@ do_build(const char *const *argv) m_output(stdout, _("<standard output>")); timestamp_str = getenv("SOURCE_DATE_EPOCH"); - if (timestamp_str) + if (str_is_set(timestamp_str)) timestamp = parse_timestamp(timestamp_str); else timestamp = time(NULL); @@ -614,7 +616,7 @@ do_build(const char *const *argv) * unlink our temporary file so others can't mess with it. */ tfbuf = path_make_temp_template("dpkg-deb"); gzfd = mkstemp(tfbuf); - if (gzfd == -1) + if (gzfd < 0) ohshite(_("failed to make temporary file (%s)"), _("control member")); /* Make sure it's gone, the fd will remain until we close it. */ if (unlink(tfbuf)) @@ -686,7 +688,7 @@ do_build(const char *const *argv) * temporary file so others can't mess with it. */ tfbuf = path_make_temp_template("dpkg-deb"); gzfd = mkstemp(tfbuf); - if (gzfd == -1) + if (gzfd < 0) ohshite(_("failed to make temporary file (%s)"), _("data member")); /* Make sure it's gone, the fd will remain until we close it. */ if (unlink(tfbuf)) |