267 lines
11 KiB
Diff
267 lines
11 KiB
Diff
diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/acquire-item.cc apt-0.5.15lorg2/apt-pkg/acquire-item.cc
|
|
--- apt-0.5.15lorg2.orig/apt-pkg/acquire-item.cc 2006-01-16 23:10:47 +0000
|
|
+++ apt-0.5.15lorg2/apt-pkg/acquire-item.cc 2006-04-01 17:25:00 +0000
|
|
@@ -48,7 +48,7 @@ using std::string;
|
|
// ---------------------------------------------------------------------
|
|
/* Returns false only if the checksums fail (the file not existing is not
|
|
a checksum mismatch) */
|
|
-bool VerifyChecksums(string File,unsigned long Size,string MD5)
|
|
+static bool VerifyChecksums(string File, unsigned long Size, string MD5)
|
|
{
|
|
struct stat Buf;
|
|
|
|
@@ -283,7 +283,7 @@ void pkgAcqIndex::Done(string Message,un
|
|
ErrorText = _("Size mismatch");
|
|
Rename(DestFile,DestFile + ".FAILED");
|
|
if (_config->FindB("Acquire::Verbose",false) == true)
|
|
- _error->Warning("Size mismatch of index file %s: %ul was supposed to be %ul",
|
|
+ _error->Warning("Size mismatch of index file %s: %lu was supposed to be %lu",
|
|
RealURI.c_str(), Size, FSize);
|
|
return;
|
|
}
|
|
@@ -559,7 +559,7 @@ void pkgAcqIndexRel::Done(string Message
|
|
ErrorText = _("Size mismatch");
|
|
Rename(DestFile,DestFile + ".FAILED");
|
|
if (_config->FindB("Acquire::Verbose",false) == true)
|
|
- _error->Warning("Size mismatch of index file %s: %ul was supposed to be %ul",
|
|
+ _error->Warning("Size mismatch of index file %s: %lu was supposed to be %lu",
|
|
RealURI.c_str(), Size, FSize);
|
|
return;
|
|
}
|
|
diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/luaiface.h apt-0.5.15lorg2/apt-pkg/luaiface.h
|
|
--- apt-0.5.15lorg2.orig/apt-pkg/luaiface.h 2006-01-16 23:10:47 +0000
|
|
+++ apt-0.5.15lorg2/apt-pkg/luaiface.h 2006-04-01 17:19:39 +0000
|
|
@@ -54,8 +54,9 @@ class Lua {
|
|
void RunInteractive(const string &PlaceHint)
|
|
{ RunInteractive(PlaceHint.c_str()); };
|
|
|
|
+ //or all of this RunScript should be void?
|
|
bool RunScript(const string &Script, const string &ChunkCacheKey="")
|
|
- { RunScript(Script.c_str(), (ChunkCacheKey.length() == 0) ?
|
|
+ { return RunScript(Script.c_str(), ChunkCacheKey.empty() ?
|
|
NULL : ChunkCacheKey.c_str()); };
|
|
bool RunScript(const char *Script, const char *ChunkCacheKey=NULL);
|
|
bool RunScripts(const char *ConfListKey, bool CacheChunks=false);
|
|
diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/pkgrecords.cc apt-0.5.15lorg2/apt-pkg/pkgrecords.cc
|
|
--- apt-0.5.15lorg2.orig/apt-pkg/pkgrecords.cc 2006-01-16 23:10:47 +0000
|
|
+++ apt-0.5.15lorg2/apt-pkg/pkgrecords.cc 2006-04-01 17:19:39 +0000
|
|
@@ -56,7 +56,8 @@ pkgRecords::~pkgRecords()
|
|
{
|
|
// CNC:2002-11-28
|
|
// See comments above.
|
|
- for (unsigned I = 0; I != PackageFileCount; I++)
|
|
+ // PackageFileCount is int according to apt-pkg/pkgrecords.h
|
|
+ for (int I = 0; I != PackageFileCount; I++)
|
|
delete Files[I];
|
|
delete [] Files;
|
|
}
|
|
diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/pkgsystem.h apt-0.5.15lorg2/apt-pkg/pkgsystem.h
|
|
--- apt-0.5.15lorg2.orig/apt-pkg/pkgsystem.h 2006-02-06 19:11:06 +0000
|
|
+++ apt-0.5.15lorg2/apt-pkg/pkgsystem.h 2006-04-01 17:19:39 +0000
|
|
@@ -90,7 +90,7 @@ class pkgSystem
|
|
// Return a list of system index files..
|
|
virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List) = 0;
|
|
// CNC:2003-11-21
|
|
- virtual bool AddSourceFiles(std::vector<pkgIndexFile *> &List) {};
|
|
+ virtual void AddSourceFiles(std::vector<pkgIndexFile *> &List) {};
|
|
virtual bool FindIndex(pkgCache::PkgFileIterator File,
|
|
pkgIndexFile *&Found) const = 0;
|
|
|
|
diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmhandler.cc apt-0.5.15lorg2/apt-pkg/rpm/rpmhandler.cc
|
|
--- apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmhandler.cc 2006-02-06 19:11:06 +0000
|
|
+++ apt-0.5.15lorg2/apt-pkg/rpm/rpmhandler.cc 2006-04-01 17:19:39 +0000
|
|
@@ -87,7 +87,7 @@ bool RPMFileHandler::Jump(unsigned Offse
|
|
{
|
|
if (FD == NULL)
|
|
return false;
|
|
- if (lseek(Fileno(FD),Offset,SEEK_SET) != Offset)
|
|
+ if (lseek(Fileno(FD),Offset,SEEK_SET) != (off_t)Offset)
|
|
return false;
|
|
return Skip();
|
|
}
|
|
@@ -347,7 +347,7 @@ string RPMDirHandler::MD5Sum()
|
|
|
|
|
|
RPMDBHandler::RPMDBHandler(bool WriteLock)
|
|
- : WriteLock(WriteLock), Handler(0)
|
|
+ : Handler(0), WriteLock(WriteLock)
|
|
{
|
|
#if RPM_VERSION >= 0x040000
|
|
RpmIter = NULL;
|
|
diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmpackagedata.cc apt-0.5.15lorg2/apt-pkg/rpm/rpmpackagedata.cc
|
|
--- apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmpackagedata.cc 2006-02-06 17:21:43 +0000
|
|
+++ apt-0.5.15lorg2/apt-pkg/rpm/rpmpackagedata.cc 2006-04-01 17:22:48 +0000
|
|
@@ -296,7 +296,6 @@ int RPMPackageData::RpmArchScore(const c
|
|
|
|
bool RPMPackageData::IsCompatArch(string Arch)
|
|
{
|
|
- bool compat = false;
|
|
for (vector<string>::iterator I = CompatArch[BaseArch].begin();
|
|
I != CompatArch[BaseArch].end(); I++) {
|
|
if (Arch == *I)
|
|
diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmpm.cc apt-0.5.15lorg2/apt-pkg/rpm/rpmpm.cc
|
|
--- apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmpm.cc 2006-01-16 23:10:47 +0000
|
|
+++ apt-0.5.15lorg2/apt-pkg/rpm/rpmpm.cc 2006-04-01 17:19:39 +0000
|
|
@@ -398,7 +398,7 @@ bool pkgRPMExtPM::ExecRPM(Item::RPMOps o
|
|
|
|
Args[n++] = _config->Find("Dir::Bin::rpm","rpm").c_str();
|
|
|
|
- bool nodeps;
|
|
+ bool nodeps = false;
|
|
|
|
switch (op)
|
|
{
|
|
@@ -421,6 +421,8 @@ bool pkgRPMExtPM::ExecRPM(Item::RPMOps o
|
|
operation = "-e";
|
|
nodeps = true;
|
|
break;
|
|
+ default:
|
|
+ return false;
|
|
}
|
|
Args[n++] = operation;
|
|
|
|
@@ -662,8 +664,7 @@ pkgRPMLibPM::~pkgRPMLibPM()
|
|
|
|
bool pkgRPMLibPM::AddToTransaction(Item::RPMOps op, vector<const char*> &files)
|
|
{
|
|
- int debug = _config->FindB("Debug::pkgRPMPM", false);
|
|
- int n = 0, rc, xx;
|
|
+ int rc;
|
|
FD_t fd;
|
|
rpmHeader hdr;
|
|
|
|
@@ -744,7 +745,6 @@ bool pkgRPMLibPM::Process(vector<const c
|
|
int rc = 0;
|
|
bool Success = false;
|
|
bool Interactive = _config->FindB("RPM::Interactive",true);
|
|
- int debug = _config->FindB("Debug::pkgRPMPM", false);
|
|
string Dir = _config->Find("RPM::RootDir");
|
|
rpmReadConfigFiles(NULL, NULL);
|
|
|
|
diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmrecords.cc apt-0.5.15lorg2/apt-pkg/rpm/rpmrecords.cc
|
|
--- apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmrecords.cc 2006-01-16 23:10:47 +0000
|
|
+++ apt-0.5.15lorg2/apt-pkg/rpm/rpmrecords.cc 2006-04-01 17:19:39 +0000
|
|
@@ -407,7 +407,7 @@ void rpmRecordParser::GetRec(const char
|
|
headerGetEntry(HeaderP, RPMTAG_ARCH, &type, (void **)&str, &count);
|
|
BufCatTag("\nArchitecture: ", str);
|
|
|
|
- snprintf(buf, sizeof(buf), "%d", Handler->FileSize());
|
|
+ snprintf(buf, sizeof(buf), "%lu", Handler->FileSize());
|
|
BufCatTag("\nSize: ", buf);
|
|
|
|
BufCatTag("\nMD5Sum: ", Handler->MD5Sum().c_str());
|
|
diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmsystem.cc apt-0.5.15lorg2/apt-pkg/rpm/rpmsystem.cc
|
|
--- apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmsystem.cc 2006-04-01 16:14:46 +0000
|
|
+++ apt-0.5.15lorg2/apt-pkg/rpm/rpmsystem.cc 2006-04-01 17:19:39 +0000
|
|
@@ -313,7 +313,7 @@ bool rpmSystem::AddStatusFiles(vector<pk
|
|
// System::AddSourceFiles - Register aditional source files /*{{{*/
|
|
// ---------------------------------------------------------------------
|
|
/* */
|
|
-bool rpmSystem::AddSourceFiles(vector<pkgIndexFile *> &List)
|
|
+void rpmSystem::AddSourceFiles(vector<pkgIndexFile *> &List)
|
|
{
|
|
const Configuration::Item *Top;
|
|
Top = _config->Tree("APT::Arguments");
|
|
@@ -330,7 +330,6 @@ bool rpmSystem::AddSourceFiles(vector<pk
|
|
}
|
|
}
|
|
}
|
|
- return true;
|
|
}
|
|
/*}}}*/
|
|
#ifdef OLD_FILEDEPS
|
|
diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmsystem.h apt-0.5.15lorg2/apt-pkg/rpm/rpmsystem.h
|
|
--- apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmsystem.h 2006-02-06 19:11:06 +0000
|
|
+++ apt-0.5.15lorg2/apt-pkg/rpm/rpmsystem.h 2006-04-01 17:19:39 +0000
|
|
@@ -61,7 +61,7 @@ class rpmSystem : public pkgSystem
|
|
virtual signed Score(Configuration const &Cnf);
|
|
virtual string DistroVer(Configuration const &Cnf);
|
|
virtual bool AddStatusFiles(vector<pkgIndexFile *> &List);
|
|
- virtual bool AddSourceFiles(vector<pkgIndexFile *> &List);
|
|
+ virtual void AddSourceFiles(vector<pkgIndexFile *> &List);
|
|
virtual bool FindIndex(pkgCache::PkgFileIterator File,
|
|
pkgIndexFile *&Found) const;
|
|
virtual bool ProcessCache(pkgDepCache &Cache,pkgProblemResolver &Fix);
|
|
diff -upk.orig apt-0.5.15lorg2.orig/cmdline/apt-get.cc apt-0.5.15lorg2/cmdline/apt-get.cc
|
|
--- apt-0.5.15lorg2.orig/cmdline/apt-get.cc 2006-01-17 18:41:29 +0000
|
|
+++ apt-0.5.15lorg2/cmdline/apt-get.cc 2006-04-01 17:19:39 +0000
|
|
@@ -1223,7 +1223,7 @@ bool TryToInstall(pkgCache::PkgIterator
|
|
// Check if it's a different version of a package already
|
|
// considered as a good solution.
|
|
bool AlreadySeen = false;
|
|
- for (int i = 0; i != GoodSolutions.size(); i++)
|
|
+ for (unsigned int i = 0; i != GoodSolutions.size(); i++)
|
|
{
|
|
pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]);
|
|
if (PrvPkg == GoodPkg)
|
|
@@ -1259,7 +1259,7 @@ bool TryToInstall(pkgCache::PkgIterator
|
|
}
|
|
}
|
|
vector<string> GoodSolutionNames;
|
|
- for (int i = 0; i != GoodSolutions.size(); i++)
|
|
+ for (unsigned int i = 0; i != GoodSolutions.size(); i++)
|
|
{
|
|
pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]);
|
|
GoodSolutionNames.push_back(GoodPkg.Name());
|
|
@@ -1307,7 +1307,7 @@ bool TryToInstall(pkgCache::PkgIterator
|
|
{
|
|
ioprintf(c1out,_("Package %s is a virtual package provided by:\n"),
|
|
Pkg.Name());
|
|
- for (int i = 0; i != GoodSolutions.size(); i++)
|
|
+ for (unsigned int i = 0; i != GoodSolutions.size(); i++)
|
|
{
|
|
pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]);
|
|
if (GoodPkg.CurrentVer().end() == false)
|
|
diff -upk.orig apt-0.5.15lorg2.orig/cmdline/apt-shell.cc apt-0.5.15lorg2/cmdline/apt-shell.cc
|
|
--- apt-0.5.15lorg2.orig/cmdline/apt-shell.cc 2006-01-16 23:10:47 +0000
|
|
+++ apt-0.5.15lorg2/cmdline/apt-shell.cc 2006-04-01 17:19:39 +0000
|
|
@@ -1292,7 +1292,7 @@ bool TryToInstall(pkgCache::PkgIterator
|
|
// Check if it's a different version of a package already
|
|
// considered as a good solution.
|
|
bool AlreadySeen = false;
|
|
- for (int i = 0; i != GoodSolutions.size(); i++)
|
|
+ for (unsigned int i = 0; i != GoodSolutions.size(); i++)
|
|
{
|
|
pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]);
|
|
if (PrvPkg == GoodPkg)
|
|
@@ -1328,7 +1328,7 @@ bool TryToInstall(pkgCache::PkgIterator
|
|
}
|
|
}
|
|
vector<string> GoodSolutionNames;
|
|
- for (int i = 0; i != GoodSolutions.size(); i++)
|
|
+ for (unsigned int i = 0; i != GoodSolutions.size(); i++)
|
|
{
|
|
pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]);
|
|
GoodSolutionNames.push_back(GoodPkg.Name());
|
|
@@ -1377,7 +1377,7 @@ bool TryToInstall(pkgCache::PkgIterator
|
|
{
|
|
ioprintf(c1out,_("Package %s is a virtual package provided by:\n"),
|
|
Pkg.Name());
|
|
- for (int i = 0; i != GoodSolutions.size(); i++)
|
|
+ for (unsigned int i = 0; i != GoodSolutions.size(); i++)
|
|
{
|
|
pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]);
|
|
if (GoodPkg.CurrentVer().end() == false)
|
|
@@ -4464,7 +4464,7 @@ int main(int argc,const char *argv[])
|
|
_lua->HasScripts("Scripts::AptCache::Command"));
|
|
#endif
|
|
|
|
- int largc;
|
|
+ unsigned int largc;
|
|
const char *largv[1024];
|
|
char *line, *p, *q;
|
|
largv[0] = "";
|
|
diff -upk.orig apt-0.5.15lorg2.orig/methods/gpg.cc apt-0.5.15lorg2/methods/gpg.cc
|
|
--- apt-0.5.15lorg2.orig/methods/gpg.cc 2006-01-16 23:10:47 +0000
|
|
+++ apt-0.5.15lorg2/methods/gpg.cc 2006-04-01 17:27:16 +0000
|
|
@@ -255,7 +255,8 @@ char *getFileSigner(const char *file, co
|
|
{
|
|
char *sig;
|
|
ptr = sig = ptr1 + sizeof(SIGPACK);
|
|
- while (isxdigit(*ptr) && (ptr-sig) < sizeof(keyid)) ptr++;
|
|
+ while (ptr < sig + sizeof(keyid) && isxdigit(*ptr))
|
|
+ ptr++;
|
|
*ptr = 0;
|
|
strcpy(keyid, sig);
|
|
}
|