summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorbubulle@debian.org <>2007-06-21 10:10:35 +0200
committerbubulle@debian.org <>2007-06-21 10:10:35 +0200
commit4344b05c9b472b84752b8f9f75a372ce1356bcd9 (patch)
treec55cbead8fa7b355c40983ef6db5bfcba2b818a0 /apt-pkg
parentf44fec87348beacb381b947db5d4d0632d6c8926 (diff)
parentff6bf1be3844bcda15303efc81e234ede7501e3c (diff)
sync with mvo
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/contrib/configuration.cc5
-rw-r--r--apt-pkg/contrib/strutl.h1
-rw-r--r--apt-pkg/depcache.cc3
-rw-r--r--apt-pkg/depcache.h1
-rw-r--r--apt-pkg/pkgcachegen.h2
5 files changed, 7 insertions, 5 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index c60ad3b0a..7914bd07b 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -422,6 +422,7 @@ bool Configuration::ExistsAny(const char *Name) const
string key = Name;
if (key.size() > 2 && key.end()[-2] == '/')
+ {
if (key.find_first_of("fdbi",key.size()-1) < key.size())
{
key.resize(key.size() - 2);
@@ -432,7 +433,7 @@ bool Configuration::ExistsAny(const char *Name) const
{
_error->Warning(_("Unrecognized type abbreviation: '%c'"), key.end()[-3]);
}
-
+ }
return Exists(Name);
}
/*}}}*/
@@ -506,7 +507,7 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool AsSectional,
CurLine++;
// This should be made to work instead, but this is better than looping
if (F.fail() && !F.eof())
- return _error->Error(_("Line %d too long (max %d)"), CurLine, sizeof(Buffer));
+ return _error->Error(_("Line %d too long (max %lu)"), CurLine, sizeof(Buffer));
_strtabexpand(Buffer,sizeof(Buffer));
_strstrip(Buffer);
diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h
index ae1244ecd..53146ced7 100644
--- a/apt-pkg/contrib/strutl.h
+++ b/apt-pkg/contrib/strutl.h
@@ -20,6 +20,7 @@
#include <stdlib.h>
#include <string>
+#include <cstring>
#include <vector>
#include <iostream>
#include <time.h>
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index fe981ea76..50a75843f 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -216,7 +216,6 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly)
pkgCache::PkgIterator pkg=Cache->FindPkg(pkgname);
if(pkg.end() || pkg.VersionList().end())
continue;
- bool oldAuto = section.FindI("Auto-Installed");
bool newAuto = (PkgState[pkg->ID].Flags & Flag::Auto);
if(_config->FindB("Debug::pkgAutoRemove",false))
std::clog << "Update exisiting AutoInstall info: "
@@ -1150,7 +1149,7 @@ bool pkgDepCache::Policy::IsImportantDep(DepIterator Dep)
string s = _config->Find("APT::Install-Recommends-Section","");
if(s.size() > 0)
{
- const char *sec = Dep.TargetPkg().Section();
+ const char *sec = Dep.ParentVer().Section();
if (sec && strcmp(sec, s.c_str()) == 0)
return true;
}
diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h
index 84fed7f37..7adf6fe7f 100644
--- a/apt-pkg/depcache.h
+++ b/apt-pkg/depcache.h
@@ -45,6 +45,7 @@
#include <regex.h>
#include <vector>
+#include <memory>
class pkgDepCache : protected pkgCache::Namespace
{
diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h
index a47b097b3..b6715294a 100644
--- a/apt-pkg/pkgcachegen.h
+++ b/apt-pkg/pkgcachegen.h
@@ -51,7 +51,7 @@ class pkgCacheGenerator
// Flag file dependencies
bool FoundFileDeps;
- bool NewPackage(pkgCache::PkgIterator &Pkg,const string &Pkg);
+ bool NewPackage(pkgCache::PkgIterator &Pkg,const string &PkgName);
bool NewFileVer(pkgCache::VerIterator &Ver,ListParser &List);
bool NewFileDesc(pkgCache::DescIterator &Desc,ListParser &List);
unsigned long NewVersion(pkgCache::VerIterator &Ver,const string &VerStr,unsigned long Next);