clearlinux / swupd-server

Software update server (deprecated)
Other
13 stars 17 forks source link

Ensure os-core bundle is listed in groups.ini #26

Closed incandescant closed 7 years ago

incandescant commented 8 years ago

As discussed in pull #22 this patch adds a simple check to ensure that the groups.ini file contains the os-core bundle and exits, informing the user the bundle is required, if it does not.

bradTpeters commented 8 years ago

Other than the conflicts which must be resolved and my style input, looks good

incandescant commented 8 years ago

Updated to rebase on master and resolve conflicts.

I've left the while (1) for now because checking the return value of next_group() still requires we break out of the loop early somehow if it returns NULL, requiring one of either a break or early return.

Perhaps this is why other call sites of next_group() use a while (1) rather than a while (ret)?

If while (ret) is still the preferred style I can follow on with a change like:

    while (ret) {
        char *group = next_group();
        if (!group) {
            break;
        }
        if (strcmp(group, "os-core") == 0) {
            ret = 0;
        }
    }
phmccarty commented 7 years ago

This change looks good to me. +1