From f14c1fc5515445840d2fbe3350cff0c03eae0b55 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 29 May 2014 11:40:49 +0200 Subject: resolve merge conflict --- adk/tools/pkgmaker.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'adk/tools') diff --git a/adk/tools/pkgmaker.c b/adk/tools/pkgmaker.c index 28e74dad1..148e7a756 100644 --- a/adk/tools/pkgmaker.c +++ b/adk/tools/pkgmaker.c @@ -225,17 +225,24 @@ static int hash_str(char *string) { static void iter(const char *key, const char *value, const void *obj) { - FILE *config, *section; + FILE *config, *section, *global; int hash; - char *valuestr, *pkg, *subpkg; + char *valuestr, *pkg, *subpkg, *subsect, *sect, *keystr; char buf[MAXPATH]; char infile[MAXPATH]; char outfile[MAXPATH]; + char configsect[MAXPATH]; + + keystr = strdup(key); + sect = strtok(keystr, "/"); + subsect = strtok(NULL, "/"); + + snprintf(configsect, MAXPATH, "package/Config.in.auto.%s.%s", sect, subsect); valuestr = strdup(value); - config = fopen("package/Config.in.auto", "a"); + config = fopen(configsect, "a"); if (config == NULL) - fatal_error("Can not open file package/Config.in.auto"); + fatal_error("Can not open file Config.in.auto.
."); hash = hash_str(valuestr); snprintf(infile, MAXPATH, "package/pkglist.d/sectionlst.%d", hash); @@ -358,7 +365,7 @@ int main() { p_ptr = NULL; s_ptr = NULL; - unlink("package/Config.in.auto"); + system("rm package/Config.in.auto.*"); unlink(runtime); /* open global sectionfile */ menuglobal = fopen("package/Config.in.auto.global", "w"); @@ -498,8 +505,8 @@ int main() { fclose(section); } } else - fatal_error("Can not find section description for package %s.", - pkgdirp->d_name); + fatal_error("Can not find section description %s for package %s.", + pkg_section, pkgdirp->d_name); fclose(pkg); continue; @@ -702,7 +709,7 @@ int main() { pseudo_name = malloc(MAXLINE); memset(pseudo_name, 0, MAXLINE); strncat(pseudo_name, token, strlen(token)); - while (strlen(pseudo_name) < 20) + while (strlen(pseudo_name) < 23) strncat(pseudo_name, ".", 1); if (snprintf(path, MAXPATH, "package/pkgconfigs.d/%s/Config.in.%s", pkgdirp->d_name, token) < 0) -- cgit v1.2.3