diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-12-30 23:12:32 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-12-30 23:12:32 +0100 |
commit | 23251c0c6ee9f7c0d3c4b20a5db9f51b4a0cc361 (patch) | |
tree | 1733ae79f43339c477e22184105194f37cef39df /tools/adk | |
parent | 5bfdfbcee97c930c3c14dc3745089ac28e76ca41 (diff) |
fix some bugs, when starting with fresh checkout
Diffstat (limited to 'tools/adk')
-rw-r--r-- | tools/adk/pkgmaker.c | 43 | ||||
-rw-r--r-- | tools/adk/pkgrebuild.c | 2 |
2 files changed, 5 insertions, 40 deletions
diff --git a/tools/adk/pkgmaker.c b/tools/adk/pkgmaker.c index d59515a8d..abcfbfc20 100644 --- a/tools/adk/pkgmaker.c +++ b/tools/adk/pkgmaker.c @@ -171,29 +171,6 @@ static void iter(const char *key, const char *value, const void *obj) { fclose(config); } -static char *print_target_depline(char *value, int neg, char *sp, FILE *cfg) { - - char *val; - char *np; - char *sptr; - - sptr = NULL; - np = ""; - val = strdup(value); - /* strtok_r is required here */ - val = strtok_r(val, " ", &sptr); - while (val != NULL) { - if (neg == 1) np = "!"; - fprintf(cfg, "%s%s%s", sp, np, val); - val = strtok_r(NULL, " ", &sptr); - if (neg == 1) - sp = " && "; - else - sp = " || "; - } - return(val); -} - static char *tolowerstr(char *string) { int i; @@ -234,7 +211,7 @@ int main() { DIR *pkgdir, *pkglistdir; struct dirent *pkgdirp; - FILE *pkg, *cfg, *target, *menuglobal, *section; + FILE *pkg, *cfg, *menuglobal, *section; char hvalue[MAXVALUE]; char buf[MAXPATH]; char tbuf[MAXPATH]; @@ -248,8 +225,8 @@ int main() { char *pkg_host_depends, *pkg_arch_depends, *pkg_flavours, *pkg_choices, *pseudo_name; char *packages, *pkg_name_u, *pkgs; char *saveptr, *p_ptr, *s_ptr; - int result, neg; - StrMap *pkgmap, *targetmap, *sectionmap; + int result; + StrMap *pkgmap, *sectionmap; pkg_name = NULL; pkg_descr = NULL; @@ -288,19 +265,6 @@ int main() { } fclose(section); - /* read target list and create a hash table */ - //target = fopen("target/target.lst", "r"); - //if (target == NULL) - // fatal_error("target listfile is missing."); - - //targetmap = strmap_new(HASHSZ); - //while (fgets(tbuf, MAXPATH, target) != NULL) { - // key = strtok(tbuf, "\t"); - // value = strtok(NULL, "\t"); - // strmap_put(targetmap, key, value); - //} - //fclose(target); - if (mkdir("package/pkgconfigs.d", S_IRWXU) > 0) fatal_error("creation of package/pkgconfigs.d failed."); if (mkdir("package/pkglist.d", S_IRWXU) > 0) @@ -774,7 +738,6 @@ int main() { /* create Config.in.auto */ strmap_enum(sectionmap, iter, NULL); - strmap_delete(targetmap); strmap_delete(sectionmap); fclose(menuglobal); closedir(pkgdir); diff --git a/tools/adk/pkgrebuild.c b/tools/adk/pkgrebuild.c index 314025582..e6497b8c7 100644 --- a/tools/adk/pkgrebuild.c +++ b/tools/adk/pkgrebuild.c @@ -31,9 +31,11 @@ StrMap *configmap, *configoldmap, *pkgmap; +/* static void iter(const char *key, const char *value, const void *obj) { fprintf(stderr, "key: %s value: %s\n", key, value); } +*/ static void iter_disabled(const char *key, const char *value, const void *obj) { |