Re: [PATCH 4/4] Fix theoretical race in interrupted dpkg --configure
There’s a typo in this one:
Jonathan Nieder wrote:
> --- a/src/configure.c
> +++ b/src/configure.c
> @@ -220,11 +216,6 @@ deferred_configure_conffile(struct pkginfo *pkg, struct conffile *conff)
> if (rename(cdr2.buf, cdr.buf))
> ohshite(_("unable to install `%.250s' as `%.250s'"),
> cdr2.buf, cdr.buf);
> - strcpy(cdr2rest, DPKGNEWEXT);
> - if (unlink(cdr2.buf))
> - warning(_("%s: failed to remove '%.250s': %s"),
> - pkg->name, cdr2.buf, strerror(errno));
> - break;
> default:
> internerr("unknown conffopt '%d'", what);
> }
The 'break;' should not have been removed.
In other words, the following paper-bag would be needed on top. Sorry
for the bogus code.
Nothing else like this seems to stand out among the remaining changes.
I did find what looks like a minor pre-existing bug. Patch to come.
src/configure.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/configure.c b/src/configure.c
index e4fffc9..79f973b 100644
--- a/src/configure.c
+++ b/src/configure.c
@@ -216,6 +216,7 @@ deferred_configure_conffile(struct pkginfo *pkg, struct conffile *conff)
if (rename(cdr2.buf, cdr.buf))
ohshite(_("unable to install `%.250s' as `%.250s'"),
cdr2.buf, cdr.buf);
+ break;
default:
internerr("unknown conffopt '%d'", what);
}
--
1.6.5.2
Reply to: