From bc440889939a12cbeead2b37abf9daf3b458b765 Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Wed, 24 Apr 2002 13:54:18 +0000 Subject: [PATCH] - should work... Changed files: apt-md5-cache-dir-option.patch -> 1.1 --- apt-md5-cache-dir-option.patch | 92 ++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 apt-md5-cache-dir-option.patch diff --git a/apt-md5-cache-dir-option.patch b/apt-md5-cache-dir-option.patch new file mode 100644 index 0000000..7670a5a --- /dev/null +++ b/apt-md5-cache-dir-option.patch @@ -0,0 +1,92 @@ +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); + } + -- 2.43.0