diff -ur apt-0.3.19cnc52/tools/genpkglist.cc apt-0.3.19cnc52-/tools/genpkglist.cc --- apt-0.3.19cnc52/tools/genpkglist.cc Thu Jul 12 23:47:33 2001 +++ apt-0.3.19cnc52-/tools/genpkglist.cc Wed Apr 24 15:50:01 2002 @@ -139,6 +139,7 @@ ~CachedMD5(); }; +string cache_dir; CachedMD5::CachedMD5(string DirName) { @@ -153,7 +154,7 @@ if (buf[i]=='/') buf[i]='_'; - string cachedir = _config->FindDir("Dir::Cache") + "/genpkglist"; + string cachedir = cache_dir + "/genpkglist"; filename = strdup(string(cachedir+string(buf)).c_str()); f = fopen(filename, "r"); @@ -501,6 +502,7 @@ cerr << "options:" << endl; cerr << " --index file to write srpm index data to" << endl; cerr << " --info file to read update info from" << endl; + cerr << " --cache-dir use named directory for md5 cache" << endl; cerr << " --bloat do not strip the package file list. Needed for some\ndistributions that use non-automatically generated file dependencies" << endl; } @@ -607,6 +609,11 @@ int i; bool fullFileList = false; + if (getenv("TMPDIR")) + cache_dir = getenv("TMPDIR"); + else + cache_dir = "/tmp"; + putenv("LC_ALL="); for (i = 1; i < argc; i++) { if (strcmp(argv[i], "--index") == 0) { @@ -617,6 +624,14 @@ cout << "genpkglist: filename missing for option --index"< 5) { - cerr << "usage: gensrclist " << endl; + cerr << "usage: gensrclist [--cache-dir ] " << endl; exit(1); }