auc: update to version 0.2.4
authorDaniel Golle <daniel@makrotopia.org>
Fri, 27 Aug 2021 01:06:57 +0000 (02:06 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 27 Aug 2021 02:50:35 +0000 (03:50 +0100)
A stray ')' made auc skip the check if all mandatory fields of a
branch are present. Fix paranthesis in that if-clause to actually
check for all fields.

Don't even fetch package lists if checking only for release.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
utils/auc/Makefile
utils/auc/src/auc.c

index 2160487652bccc6297794924c4429766381b3c07..fb011cb6de264a9ec60583420bb9717c283c57e2 100644 (file)
@@ -5,7 +5,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=auc
-PKG_VERSION:=0.2.3
+PKG_VERSION:=0.2.4
 PKG_RELEASE:=$(AUTORELEASE)
 PKG_LICENSE:=GPL-3.0
 
index 2b7a430c720b23123e2573bb8e7beeb4424f4029..5a8cf654837a311f5d065f33d4ef727f906a153b 100644 (file)
@@ -1156,9 +1156,9 @@ static void process_branch(struct blob_attr *branch, bool only_active)
 
        /* mandatory fields */
        if (!(tb[BRANCH_ENABLED] && blobmsg_get_bool(tb[BRANCH_ENABLED]) &&
-               tb[BRANCH_NAME] && tb[BRANCH_PATH]) && tb[BRANCH_PATH_PACKAGES] &&
+               tb[BRANCH_NAME] && tb[BRANCH_PATH] && tb[BRANCH_PATH_PACKAGES] &&
                tb[BRANCH_UPDATES] && tb[BRANCH_PUBKEY] && tb[BRANCH_REPOS] &&
-               tb[BRANCH_VERSIONS] && tb[BRANCH_TARGETS])
+               tb[BRANCH_VERSIONS] && tb[BRANCH_TARGETS]))
                return;
 
        brname = blobmsg_get_string(tb[BRANCH_NAME]);
@@ -1707,15 +1707,15 @@ int main(int args, char *argv[]) {
        else if (revcmp > 0)
                        upg_check |= PKG_DOWNGRADE;
 
-       if ((rc = request_packages(branch)))
-               goto freebranches;
-
        if (release_only && !(upg_check & PKG_UPGRADE)) {
                fprintf(stderr, "Nothing to be updated. Use '-f' to force.\n");
                rc=0;
                goto freebranches;
        }
 
+       if ((rc = request_packages(branch)))
+               goto freebranches;
+
        upg_check |= check_installed_packages(reqbuf.head);
        if (upg_check & PKG_ERROR) {
                rc=-ENOPKG;