diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-11-22 20:45:51 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-11-22 20:45:51 +0100 |
commit | 7834f4ebba4ff4dab254cd25d67f0c9a5e6cbe46 (patch) | |
tree | 737dc1921395ac0cda836d1d4a4ec2c96059260b /tools | |
parent | a96029501d215f16535ab3a879ac384e042c7df1 (diff) |
rebuild packages when subpackage choice changes by user
Diffstat (limited to 'tools')
-rw-r--r-- | tools/adk/pkgrebuild.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tools/adk/pkgrebuild.c b/tools/adk/pkgrebuild.c index 5a8f438c1..314025582 100644 --- a/tools/adk/pkgrebuild.c +++ b/tools/adk/pkgrebuild.c @@ -127,6 +127,40 @@ int main() { if (value != NULL) pkg_name = strdup(value); } + string = strstr(pbuf, "PKG_SUBPKGS:="); + if (string != NULL) { + string[strlen(string)-1] = '\0'; + key = strtok(string, ":="); + value = strtok(NULL, "=\t"); + token = strtok(value, " "); + while (token != NULL) { + keystr = malloc(256); + memset(keystr, 0, 256); + strncat(keystr, "ADK_PACKAGE_", 12); + strncat(keystr, token, strlen(token)); + strmap_put(pkgmap, keystr, pkgdirp->d_name); + token = strtok(NULL, " "); + free(keystr); + keystr = NULL; + } + } + string = strstr(pbuf, "PKG_SUBPKGS+="); + if (string != NULL) { + string[strlen(string)-1] = '\0'; + key = strtok(string, "+="); + value = strtok(NULL, "=\t"); + token = strtok(value, " "); + while (token != NULL) { + keystr = malloc(256); + memset(keystr, 0, 256); + strncat(keystr, "ADK_PACKAGE_", 12); + strncat(keystr, token, strlen(token)); + strmap_put(pkgmap, keystr, pkgdirp->d_name); + token = strtok(NULL, " "); + free(keystr); + keystr = NULL; + } + } string = strstr(pbuf, "PKG_FLAVOURS:="); if (string != NULL) { string[strlen(string)-1] = '\0'; |