Bläddra i källkod

libdpkg: Do not fail on current file removal in trk_explicit_interest_change

In case the new trigger interest file is empty and as such not needed
any longer, do not fail if the current file is not present.

Regression introduced in commit 83b591340ec92cf0e9814e8403da7711cbbc6b46.
Guillem Jover 15 år sedan
förälder
incheckning
104882f7fe
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      lib/dpkg/triglib.c

+ 1 - 1
lib/dpkg/triglib.c

@@ -430,7 +430,7 @@ trk_explicit_interest_remove(const char *newfilename)
 {
 {
 	if (unlink(newfilename))
 	if (unlink(newfilename))
 		ohshite(_("cannot remove `%.250s'"), newfilename);
 		ohshite(_("cannot remove `%.250s'"), newfilename);
-	if (unlink(trk_explicit_fn.buf))
+	if (unlink(trk_explicit_fn.buf) && errno != ENOENT)
 		ohshite(_("cannot remove `%.250s'"), trk_explicit_fn.buf);
 		ohshite(_("cannot remove `%.250s'"), trk_explicit_fn.buf);
 }
 }