From 23251c0c6ee9f7c0d3c4b20a5db9f51b4a0cc361 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 30 Dec 2010 23:12:32 +0100 Subject: fix some bugs, when starting with fresh checkout --- tools/adk/pkgmaker.c | 43 +++---------------------------------------- tools/adk/pkgrebuild.c | 2 ++ 2 files changed, 5 insertions(+), 40 deletions(-) (limited to 'tools') 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) { -- cgit v1.2.3