diff -Nur apt-0.5.4cnc7.orig/tools/cached_md5.cc apt-0.5.4cnc7/tools/cached_md5.cc --- apt-0.5.4cnc7.orig/tools/cached_md5.cc Sat Jul 27 01:16:34 2002 +++ apt-0.5.4cnc7/tools/cached_md5.cc Tue Dec 10 16:59:14 2002 @@ -25,13 +25,15 @@ extern const char *__progname; +extern string cache_dir; + CachedMD5::CachedMD5(string DirName) { string fname = DirName; for (string::iterator i = fname.begin(); i != fname.end(); ++i) if ('/' == *i) *i = '_'; - CacheFileName = _config->FindDir("Dir::Cache", "/var/cache/apt") + '/' + + CacheFileName = cache_dir + '/' + __progname + '/' + fname + ".md5cache"; FILE *f = fopen(CacheFileName.c_str(), "r"); diff -Nur apt-0.5.4cnc7.orig/tools/genpkglist.cc apt-0.5.4cnc7/tools/genpkglist.cc --- apt-0.5.4cnc7.orig/tools/genpkglist.cc Sat Jul 27 01:22:48 2002 +++ apt-0.5.4cnc7/tools/genpkglist.cc Tue Dec 10 17:04:04 2002 @@ -340,6 +340,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" << endl; cerr << " distributions that use non-automatically generated" << endl; cerr << " file dependencies" << endl; @@ -431,6 +432,7 @@ // end of new stuff from glibc #endif /* !HAVE_SCANDIR */ +string cache_dir; int main(int argc, char ** argv) { @@ -449,7 +451,12 @@ int i; bool fullFileList = false; bool progressBar = 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) { @@ -460,6 +467,14 @@ cout << "genpkglist: filename missing for option --index"<] " << endl; + cerr << "usage: gensrclist [--cache-dir ] [] " << endl; cerr << "options:" << endl; // cerr << " --mapi ???????????????????" << endl; cerr << " --progress show a progress bar" << endl; @@ -124,6 +124,8 @@ cerr << " are in the same directory level"<