| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507 |
- --- apt-pkg/deb/debsystem.cc 2003-06-10 09:13:47.000000000 -0500
- +++ apt-pkg/deb/debsystem.cc 2003-09-12 10:24:15.152860000 -0500
- @@ -162,7 +162,7 @@
- be the only users of these */
- Cnf.CndSet("Dir::State::userstatus","status.user"); // Defunct
- Cnf.CndSet("Dir::State::status","/var/lib/dpkg/status");
- - Cnf.CndSet("Dir::Bin::dpkg","/usr/bin/dpkg");
- + Cnf.CndSet("Dir::Bin::dpkg","@l_prefix@/bin/dpkg");
-
- return true;
- }
- @@ -187,7 +187,7 @@
- signed Score = 0;
- if (FileExists(Cnf.FindFile("Dir::State::status","/var/lib/dpkg/status")) == true)
- Score += 10;
- - if (FileExists(Cnf.FindFile("Dir::Bin::dpkg","/usr/bin/dpkg")) == true)
- + if (FileExists(Cnf.FindFile("Dir::Bin::dpkg","@l_prefix@/bin/dpkg")) == true)
- Score += 10;
- if (FileExists("/etc/debian_version") == true)
- Score += 10;
- --- apt-pkg/init.cc 2003-06-10 09:10:21.000000000 -0500
- +++ apt-pkg/init.cc 2003-09-12 10:24:15.172832000 -0500
- @@ -45,10 +45,10 @@
- Cnf.Set("APT::Architecture",COMMON_OS "-" COMMON_CPU);
- // CNC:2002-09-10
- //Cnf.Set("APT::Build-Essential::", "build-essential");
- - Cnf.Set("Dir","/");
- + Cnf.Set("Dir","@l_prefix@");
-
- // State
- - Cnf.Set("Dir::State","var/lib/apt/");
- + Cnf.Set("Dir::State","var/@name@/lib/");
-
- /* Just in case something goes horribly wrong, we can fall back to the
- old /var/state paths.. */
- @@ -61,13 +61,13 @@
- Cnf.Set("Dir::State::cdroms","cdroms.list");
-
- // Cache
- - Cnf.Set("Dir::Cache","var/cache/apt/");
- + Cnf.Set("Dir::Cache","var/@name@/cache/");
- Cnf.Set("Dir::Cache::archives","archives/");
- Cnf.Set("Dir::Cache::srcpkgcache","srcpkgcache.bin");
- Cnf.Set("Dir::Cache::pkgcache","pkgcache.bin");
-
- // Configuration
- - Cnf.Set("Dir::Etc","etc/apt/");
- + Cnf.Set("Dir::Etc","etc/@name@/");
- Cnf.Set("Dir::Etc::sourcelist","sources.list");
- // CNC:2003-03-03
- Cnf.Set("Dir::Etc::sourceparts","sources.list.d");
- @@ -76,7 +76,7 @@
- Cnf.Set("Dir::Etc::main","apt.conf");
- Cnf.Set("Dir::Etc::parts","apt.conf.d");
- Cnf.Set("Dir::Etc::preferences","preferences");
- - Cnf.Set("Dir::Bin::methods","/usr/lib/apt/methods");
- + Cnf.Set("Dir::Bin::methods","@l_prefix@/lib/apt/methods");
-
- bool Res = true;
-
- --- apt-pkg/luaiface.cc 2003-06-10 09:10:10.000000000 -0500
- +++ apt-pkg/luaiface.cc 2003-09-12 10:24:15.190908000 -0500
- @@ -59,7 +59,7 @@
- Lua::Lua()
- : DepCache(0), Cache(0), Fix(0), DontFix(0)
- {
- - _config->CndSet("Dir::Bin::scripts", "/usr/lib/apt/scripts");
- + _config->CndSet("Dir::Bin::scripts", "@l_prefix@/lib/apt/scripts");
-
- const luaL_reg lualibs[] = {
- {"base", luaopen_base},
- --- apt-pkg/rpm/rpmhandler.cc 2003-06-10 09:12:44.000000000 -0500
- +++ apt-pkg/rpm/rpmhandler.cc 2003-09-12 10:24:15.220455000 -0500
- @@ -383,9 +383,9 @@
- File = "Packages";
- #endif
- if (DirectoryOnly == true)
- - return _config->Find("RPM::RootDir")+"/var/lib/rpm";
- + return _config->Find("RPM::RootDir")+"@dbpath@";
- else
- - return _config->Find("RPM::RootDir")+"/var/lib/rpm/"+File;
- + return _config->Find("RPM::RootDir")+"@dbpath@/"+File;
- }
-
- bool RPMDBHandler::Skip()
- --- apt-pkg/rpm/rpmhandler.h 2003-06-10 09:12:36.000000000 -0500
- +++ apt-pkg/rpm/rpmhandler.h 2003-09-12 10:28:48.228417000 -0500
- @@ -12,6 +12,7 @@
-
- #include <apt-pkg/fileutl.h>
-
- +#include <rpm/glob.h>
- #include <rpm/rpmlib.h>
- #include <rpm/rpmmacro.h>
-
- --- apt-pkg/rpm/rpmpackagedata.cc 2003-06-10 09:12:34.000000000 -0500
- +++ apt-pkg/rpm/rpmpackagedata.cc 2003-09-12 10:31:37.552481000 -0500
- @@ -12,6 +12,7 @@
-
- #include <apti18n.h>
-
- +#include <rpm/glob.h>
- #include <rpm/rpmlib.h>
-
- RPMPackageData::RPMPackageData()
- --- apt-pkg/rpm/rpmpm.cc 2003-06-10 09:12:46.000000000 -0500
- +++ apt-pkg/rpm/rpmpm.cc 2003-09-12 10:32:29.231349000 -0500
- @@ -34,6 +34,7 @@
- #include <iostream>
-
-
- +#include <rpm/glob.h>
- #include <rpm/rpmlib.h>
- /*}}}*/
-
- --- apt-pkg/rpm/rpmrecords.h 2003-06-10 09:12:18.000000000 -0500
- +++ apt-pkg/rpm/rpmrecords.h 2003-09-12 10:33:05.832241000 -0500
- @@ -21,6 +21,7 @@
-
- #include <apt-pkg/pkgrecords.h>
- #include <apt-pkg/fileutl.h>
- +#include <rpm/glob.h>
- #include <rpm/rpmlib.h>
-
-
- --- apt-pkg/rpm/rpmsrcrecords.h 2003-06-10 09:12:46.000000000 -0500
- +++ apt-pkg/rpm/rpmsrcrecords.h 2003-09-12 10:36:00.104583000 -0500
- @@ -17,6 +17,7 @@
-
- #include <apt-pkg/srcrecords.h>
- #include <apt-pkg/fileutl.h>
- +#include <rpm/glob.h>
- #include <rpm/rpmlib.h>
-
-
- --- apt-pkg/rpm/rpmsystem.cc 2003-06-10 09:12:35.000000000 -0500
- +++ apt-pkg/rpm/rpmsystem.cc 2003-09-12 10:24:15.244358000 -0500
- @@ -120,12 +120,12 @@
- /* These are the rpm specific configuration variables.. */
- bool rpmSystem::Initialize(Configuration &Cnf)
- {
- - Cnf.CndSet("Dir::Bin::rpm","/bin/rpm");
- + Cnf.CndSet("Dir::Bin::rpm","@l_bindir@/rpm");
- Cnf.CndSet("Dir::Etc::rpmpriorities", "rpmpriorities");
- Cnf.CndSet("Dir::Etc::translatelist", "translate.list");
- Cnf.CndSet("Dir::Etc::translateparts", "translate.list.d");
- Cnf.CndSet("Dir::State::prefetch", "prefetch");
- - Cnf.CndSet("Dir::Locale","/usr/share/locale");
- + Cnf.CndSet("Dir::Locale","@l_prefix@/share/locale");
- Cnf.CndSet("Acquire::DistroID","Conectiva"); // hee hee
- Cnf.CndSet("Acquire::CDROM::Mount", "/mnt/cdrom");
- Cnf.CndSet("Acquire::CDROM::Copy-All", "true");
- @@ -197,7 +197,7 @@
-
- if (FileExists(RPMDBHandler::DataPath(false)))
- Score += 10;
- - if (FileExists(Cnf.FindFile("Dir::Bin::rpm","/bin/rpm")) == true)
- + if (FileExists(Cnf.FindFile("Dir::Bin::rpm","@l_bindir@/rpm")) == true)
- Score += 10;
-
- return Score;
- --- apt-pkg/rpm/rpmversion.cc 2003-06-10 09:12:33.000000000 -0500
- +++ apt-pkg/rpm/rpmversion.cc 2003-09-12 10:38:49.691754000 -0500
- @@ -22,6 +22,7 @@
- #include <apt-pkg/rpmversion.h>
- #include <apt-pkg/pkgcache.h>
-
- +#include <rpm/glob.h>
- #include <rpm/rpmlib.h>
- #include <rpm/misc.h>
-
- --- configure.in 2003-06-10 09:04:02.000000000 -0500
- +++ configure.in 2003-09-12 13:08:37.264445000 -0500
- @@ -48,14 +48,14 @@
- AC_CHECK_HEADER(rpm/rpmlib.h,
- [
- AC_CHECK_LIB(rpmdb,rpmdbOpen,
- - [RPMDBLIBS="-lrpmdb"],
- + [RPMDBLIBS="@rpmlibs@"],
- [RPMDBLIBS="-ldb-3.1"],
- - [-lrpm -lrpmio -lz -lbz2 -lpopt])
- + [@rpmlibs@ @l_rpmlibs@])
-
- AC_CHECK_LIB(rpm,rpmdbGetIteratorOffset,
- [AC_DEFINE_UNQUOTED(HAVE_RPM, 1)
- AC_DEFINE_UNQUOTED(HAVE_RPM4, 1)
- - RPMLIBS="-lrpm $RPMDBLIBS -lrpmio -lz -lbz2 -lpopt"
- + RPMLIBS="@rpmlibs@ $RPMDBLIBS @l_rpmlibs@"
- AC_CHECK_LIB(rpm, rpmtsUpdateDSI,
- [AC_DEFINE_UNQUOTED(HAVE_RPM41, 1)
- rpm_version="4.1"],
- @@ -64,11 +64,11 @@
- ],
- [AC_CHECK_LIB(rpm,rpmdbFirstRecNum,
- [AC_DEFINE_UNQUOTED(HAVE_RPM, 1)
- - RPMLIBS="-lrpm -ldb1 -lz -lbz2 -lpopt"
- + RPMLIBS="@rpmlibs@"
- rpm_version="3"],,
- - [-ldb1 -lz -lbz2 -lpopt])
- + [@rpmlibs@])
- ],
- - [$RPMDBLIBS -lrpmio -lz -lbz2 -lpopt])
- + [$RPMDBLIBS @rpmlibs@ @l_rpmlibs@])
-
- AC_SUBST(RPMLIBS)
- ])
- --- methods/gpg.cc 2003-06-10 09:14:06.000000000 -0500
- +++ methods/gpg.cc 2003-09-12 10:24:15.270075000 -0500
- @@ -195,7 +195,7 @@
- return "could not spawn new process";
- else if (pid == 0)
- {
- - string path = _config->Find("Dir::Bin::gpg", "/usr/bin/gpg");
- + string path = _config->Find("Dir::Bin::gpg", "@l_prefix@/bin/gpg");
- string pubring = "";
- const char *argv[16];
- int argc = 0;
- --- test/scratch.cc 2003-06-10 09:20:33.000000000 -0500
- +++ test/scratch.cc 2003-09-12 10:24:15.304800000 -0500
- @@ -49,7 +49,7 @@
-
- /* Db.GetFLCache().BeginDiverLoad();
- pkgFLCache::PkgIterator Pkg(Db.GetFLCache(),0);
- - if (Db.GetFLCache().AddDiversion(Pkg,"/usr/include/linux/kerneld.h","/usr/bin/nslookup") == false)
- + if (Db.GetFLCache().AddDiversion(Pkg,"/usr/include/linux/kerneld.h","@l_prefix@/bin/nslookup") == false)
- cerr << "Error!" << endl;
-
- const char *Tmp = "/usr/include/linux/kerneld.h";
- --- tools/cached_md5.cc 2003-06-10 09:14:45.000000000 -0500
- +++ tools/cached_md5.cc 2003-09-12 13:27:32.586894000 -0500
- @@ -6,6 +6,7 @@
- #include <dirent.h>
- #include <errno.h>
- #include <fcntl.h>
- +#include <rpm/glob.h>
- #include <rpm/rpmlib.h>
- #include <stdlib.h>
- #include <string.h>
- --- tools/genpkglist.cc 2003-06-10 09:14:47.000000000 -0500
- +++ tools/genpkglist.cc 2003-09-12 13:24:43.717633000 -0500
- @@ -6,6 +6,7 @@
- #include <dirent.h>
- #include <errno.h>
- #include <fcntl.h>
- +#include <rpm/glob.h>
- #include <rpm/rpmlib.h>
- #include <stdlib.h>
- #include <string.h>
- @@ -368,7 +369,7 @@
- }
-
- int scandir(const char * dir, struct dirent *** namelist,
- - int (* select)(struct dirent *),
- + int (* select)(const struct dirent *),
- int (* cmp)(const void *, const void *))
-
- {
- --- tools/gensrclist.cc 2003-06-10 09:14:44.000000000 -0500
- +++ tools/gensrclist.cc 2003-09-12 13:28:59.653936000 -0500
- @@ -6,6 +6,7 @@
- #include <dirent.h>
- #include <errno.h>
- #include <fcntl.h>
- +#include <rpm/glob.h>
- #include <rpm/rpmlib.h>
- #include <stdlib.h>
- #include <string.h>
- @@ -133,6 +134,89 @@
- }
- #endif
-
- +#ifndef HAVE_SCANDIR
- +// from glibc 1.09.1 mod'd by jmik, ins'd by asm, fix'd by sbi
- +int alphasort(const void * a, const void * b)
- +{
- + return strcmp ((*(struct dirent **) a)->d_name,
- + (*(struct dirent **) b)->d_name);
- +}
- +
- +int scandir(const char * dir, struct dirent *** namelist,
- + int (* select)(const struct dirent *),
- + int (* cmp)(const void *, const void *))
- +
- +{
- + DIR *dp = opendir (dir);
- + struct dirent **v = NULL;
- + size_t vsize = 0, i;
- + struct dirent *d;
- + int save;
- +
- + if (dp == NULL)
- + return -1;
- +
- + save = errno;
- + errno = 0;
- +
- + i = 0;
- + while ((d = readdir (dp)) != NULL)
- + {
- + if (select == NULL || (*select) (d))
- + {
- + if (i == vsize)
- + {
- + struct dirent **newv;
- + if (vsize == 0)
- + vsize = 10;
- + else
- + vsize *= 2;
- + newv = (struct dirent **) realloc (v, vsize * sizeof (*v));
- + if (newv == NULL)
- + {
- + lose:
- + errno = ENOMEM;
- + break;
- + }
- + v = newv;
- + }
- +
- + v[i] = (struct dirent *) malloc (d->d_reclen);
- + if (v[i] == NULL)
- + goto lose;
- +
- + // *v[i++] = *d;
- + memcpy(v[i], d, d->d_reclen);
- + i++;
- + }
- + }
- +
- + v[i] = NULL;
- +
- + if (errno != 0)
- + {
- + save = errno;
- + (void) closedir (dp);
- + while (i > 0)
- + free (v[--i]);
- + free (v);
- + errno = save;
- + return -1;
- + }
- +
- + (void) closedir (dp);
- + errno = save;
- +
- + /* Sort the list if we have a comparison function to sort with. */
- + if (cmp != NULL)
- + qsort (v, i, sizeof (struct dirent *), cmp);
- +
- + *namelist = v;
- + return i;
- +}
- +// end of new stuff from glibc
- +#endif
- +
- int main(int argc, char ** argv)
- {
- char buf[300];
- --- tools/cached_md5.cc.orig 2003-09-13 20:46:01.000000000 +0200
- +++ tools/cached_md5.cc 2003-09-13 20:50:59.000000000 +0200
- @@ -1,7 +1,6 @@
- /*
- * $Id: cached_md5.cc,v 1.4 2003/01/29 13:47:31 niemeyer Exp $
- */
- -#include <alloca.h>
- #include <ctype.h>
- #include <dirent.h>
- #include <errno.h>
- --- tools/genpkglist.cc.orig 2003-09-13 20:46:01.000000000 +0200
- +++ tools/genpkglist.cc 2003-09-13 20:50:44.000000000 +0200
- @@ -1,7 +1,6 @@
- /*
- * $Id: genpkglist.cc,v 1.7 2003/01/30 17:18:21 niemeyer Exp $
- */
- -#include <alloca.h>
- #include <ctype.h>
- #include <dirent.h>
- #include <errno.h>
- --- tools/gensrclist.cc.orig 2003-09-13 20:46:01.000000000 +0200
- +++ tools/gensrclist.cc 2003-09-13 20:51:13.000000000 +0200
- @@ -1,7 +1,6 @@
- /*
- * $Id: gensrclist.cc,v 1.8 2003/01/30 17:18:21 niemeyer Exp $
- */
- -#include <alloca.h>
- #include <ctype.h>
- #include <dirent.h>
- #include <errno.h>
- --- apt-pkg/rpm/rpmindexfile.h.orig 2003-06-10 16:12:48.000000000 +0200
- +++ apt-pkg/rpm/rpmindexfile.h 2003-09-16 11:06:24.000000000 +0200
- @@ -140,7 +140,7 @@
- {
- protected:
-
- - virtual string MainType() const {return "srclist";}
- + virtual string MainType() const {return "00APT.srclist";}
-
- public:
-
- --- apt-pkg/rpm/rpmindexfile.cc.orig 2003-06-10 16:12:52.000000000 +0200
- +++ apt-pkg/rpm/rpmindexfile.cc 2003-09-16 11:08:04.000000000 +0200
- @@ -58,7 +58,7 @@
- Res = URI;
- }
- else
- - Res = URI + Dist + "/base/";
- + Res = URI + Dist + "/";
-
- Res += Type;
-
- @@ -145,7 +145,7 @@
- Res = URI;
- }
- else
- - Res = URI + Dist + "/base/";
- + Res = URI + Dist + "/";
-
- Res += Type + '.' + Section;
-
- @@ -274,8 +274,8 @@
- if (Repository->IsAuthenticated() == true &&
- Repository->HasRelease() == false)
- return true;
- - new pkgAcqIndex(Owner,Repository,IndexURI("srclist"),Info("srclist"),
- - "srclist");
- + new pkgAcqIndex(Owner,Repository,IndexURI("00APT.srclist"),Info("00APT.srclist"),
- + "00APT.srclist");
- return true;
- }
- /*}}}*/
- @@ -344,10 +344,10 @@
- if (Repository->IsAuthenticated() == true &&
- Repository->HasRelease() == false)
- return true;
- - new pkgAcqIndex(Owner,Repository,IndexURI("pkglist"),Info("pkglist"),
- - "pkglist");
- - new pkgAcqIndexRel(Owner,Repository,IndexURI("release"),Info("release"),
- - "release");
- + new pkgAcqIndex(Owner,Repository,IndexURI("00APT.pkglist"),Info("00APT.pkglist"),
- + "00APT.pkglist");
- + new pkgAcqIndexRel(Owner,Repository,IndexURI("00APT.release"),Info("00APT.release"),
- + "00APT.release");
- return true;
- }
- /*}}}*/
- @@ -421,7 +421,7 @@
- return _error->Error(_("Problem opening %s"),PackageFile.c_str());
- }
- // We call SubProgress with Size(), since we won't call SelectFile() here.
- - Prog.SubProgress(Size(),Info("pkglist"));
- + Prog.SubProgress(Size(),Info("00APT.pkglist"));
- if (Gen.MergeFileProvides(Parser) == false)
- return _error->Error(_("Problem with MergeFileProvides %s"),
- PackageFile.c_str());
- --- tools/genpkglist.cc.orig 2003-06-10 16:14:47.000000000 +0200
- +++ tools/genpkglist.cc 2003-09-16 11:05:22.000000000 +0200
- @@ -544,9 +544,9 @@
- }
- }
- pkglist_path = string(rpmsdir);
- - rpmsdir = rpmsdir + "/RPMS." + string(op_suf);
- + rpmsdir = rpmsdir + "/" + string(op_suf);
-
- - string dirtag = "RPMS." + string(op_suf);
- + string dirtag = string(op_suf);
-
- entry_no = scandir(rpmsdir.c_str(), &dirEntries, selectDirent, alphasort);
- if (entry_no < 0) {
- @@ -558,9 +558,9 @@
- chdir(rpmsdir.c_str());
-
- if (pkgListSuffix != NULL)
- - pkglist_path = pkglist_path + "/base/pkglist." + pkgListSuffix;
- + pkglist_path = pkglist_path + "/00APT.pkglist." + pkgListSuffix;
- else
- - pkglist_path = pkglist_path + "/base/pkglist." + op_suf;
- + pkglist_path = pkglist_path + "/00APT.pkglist." + op_suf;
-
-
- if (pkgListAppend == true && FileExists(pkglist_path)) {
- --- tools/gensrclist.cc.orig 2003-06-10 16:14:44.000000000 +0200
- +++ tools/gensrclist.cc 2003-09-16 11:05:41.000000000 +0200
- @@ -198,10 +198,10 @@
- } else
- strcpy(buf, arg_dir);
-
- - strcat(buf, "/SRPMS.");
- + strcat(buf, "/");
- strcat(buf, arg_suffix);
-
- - srpmdir = "SRPMS." + string(arg_suffix);
- + srpmdir = string(arg_suffix);
- #ifdef OLD_FLATSCHEME
- if (flatStructure) {
- // add the last component of the directory to srpmdir
- @@ -242,9 +242,9 @@
- chdir(buf);
-
- if (srcListSuffix != NULL)
- - sprintf(buf, "%s/srclist.%s", cwd, srcListSuffix);
- + sprintf(buf, "%s/00APT.srclist.%s", cwd, srcListSuffix);
- else
- - sprintf(buf, "%s/srclist.%s", cwd, arg_suffix);
- + sprintf(buf, "%s/00APT.srclist.%s", cwd, arg_suffix);
-
- if (srcListAppend == true && FileExists(buf)) {
- outfd = fdOpen(buf, O_WRONLY|O_APPEND, 0644);
|