From bd0c9b9ebb171d9dde81799dcbe7e6e8b30a86f6 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sat, 30 May 2020 08:43:20 -0700 Subject: [PATCH] dsynth - Work on count mismatch issues, fix binary pkg deletion * The remaining count issue was due to an incorrect test involving PKGF_NOTREADY, which also happens to be the code which is supposed to delete packages with missing or modified dependencies. * Fix the test. This should fix both the remaining count issue (any remaining issues will be logged in 05*.log), and hopefully also properly delete packages with missing or modified dependencies at the start of the run (logged as DELETE-PACKAGE in 00*.log). Reported-by: tuxillo --- usr.bin/dsynth/build.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/usr.bin/dsynth/build.c b/usr.bin/dsynth/build.c index ab00a57aad..0c086daff3 100644 --- a/usr.bin/dsynth/build.c +++ b/usr.bin/dsynth/build.c @@ -544,10 +544,13 @@ skip_to_flavor: pkg->flags |= *app & ~PKGF_NOTREADY; /* - * Clear PACKAGED bit if sub-dependencies aren't clean + * Clear the PACKAGED bit if sub-dependencies aren't clean. + * + * NOTE: PKGF_NOTREADY is not stored in pkg->flags, only in *app, + * so incorporate *app to test for it. */ if ((pkg->flags & PKGF_PACKAGED) && - (pkg->flags & (PKGF_NOTREADY|PKGF_ERROR|PKGF_NOBUILD))) { + ((pkg->flags | *app) & (PKGF_NOTREADY|PKGF_ERROR|PKGF_NOBUILD))) { pkg->flags &= ~PKGF_PACKAGED; ddassert(pkg->pkgfile); asprintf(&buf, "%s/%s", RepositoryPath, pkg->pkgfile); @@ -646,13 +649,13 @@ skip_to_flavor: *hasworkp = 1; if (first) { dlog(DLOG_ALL | DLOG_FILTER, - "[XXX] %s ALREADY-BUILT\n", + "[XXX] %s Already-Built\n", pkg->portdir); --BuildTotal; } else { dlog(DLOG_ABN | DLOG_FILTER, - "[XXX] %s PACKAGED UNEXPECTEDLY\n", - pkg->portdir); + "[XXX] %s flags=%08x Packaged Unexpectedly\n", + pkg->portdir, pkg->flags); /* ++BuildSuccessTotal; XXX not sure */ goto addlist; } -- 2.28.0