summaryrefslogtreecommitdiff
path: root/adk/tools
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-05-29 11:40:49 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-29 21:56:31 +0200
commitf14c1fc5515445840d2fbe3350cff0c03eae0b55 (patch)
tree7617315e619f969c13e79c1f44c2428871719357 /adk/tools
parent365261c9db442081290b7d21aba6201244af294d (diff)
resolve merge conflict
Diffstat (limited to 'adk/tools')
-rw-r--r--adk/tools/pkgmaker.c23
1 files changed, 15 insertions, 8 deletions
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.<section>.<subsection>");
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)