summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-07-15 13:21:21 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-08-10 17:27:58 +0200
commit4dc77823d360158d6870a5710cc8c17064f1308f (patch)
treec26b1040c6b6cc059411372ef81b6b030e18013c /apt-pkg
parentb291aa59ee63983204d8aeb166c388b1f97edce7 (diff)
remove the compatibility markers for 4.13 abi
We aren't and we will not be really compatible again with the previous stable abi, so lets drop these markers (which never made it into a released version) for good as they have outlived their intend already. Git-Dch: Ignore
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/algorithms.cc14
-rw-r--r--apt-pkg/algorithms.h10
-rw-r--r--apt-pkg/cacheiterators.h4
-rw-r--r--apt-pkg/contrib/configuration.cc6
-rw-r--r--apt-pkg/deb/deblistparser.cc5
-rw-r--r--apt-pkg/deb/deblistparser.h2
-rw-r--r--apt-pkg/deb/dpkgpm.cc9
-rw-r--r--apt-pkg/edsp.cc7
-rw-r--r--apt-pkg/packagemanager.cc24
-rw-r--r--apt-pkg/packagemanager.h10
-rw-r--r--apt-pkg/pkgcache.cc3
-rw-r--r--apt-pkg/pkgcache.h74
-rw-r--r--apt-pkg/pkgrecords.h7
-rw-r--r--apt-pkg/tagfile.cc28
-rw-r--r--apt-pkg/tagfile.h16
-rw-r--r--apt-pkg/upgrade.cc6
-rw-r--r--apt-pkg/upgrade.h5
17 files changed, 16 insertions, 214 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index db765febe..747b73e05 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -638,14 +638,6 @@ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg)
}
/*}}}*/
// ProblemResolver::Resolve - calls a resolver to fix the situation /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-#if APT_PKG_ABI < 413
-bool pkgProblemResolver::Resolve(bool BrokenFix)
-{
- return Resolve(BrokenFix, NULL);
-}
-#endif
bool pkgProblemResolver::Resolve(bool BrokenFix, OpProgress * const Progress)
{
std::string const solver = _config->Find("APT::Solver", "internal");
@@ -1144,12 +1136,6 @@ bool pkgProblemResolver::InstOrNewPolicyBroken(pkgCache::PkgIterator I)
/* This is the work horse of the soft upgrade routine. It is very gental
in that it does not install or remove any packages. It is assumed that the
system was non-broken previously. */
-#if APT_PKG_ABI < 413
-bool pkgProblemResolver::ResolveByKeep()
-{
- return ResolveByKeep(NULL);
-}
-#endif
bool pkgProblemResolver::ResolveByKeep(OpProgress * const Progress)
{
std::string const solver = _config->Find("APT::Solver", "internal");
diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h
index 28057fa5c..aad261b63 100644
--- a/apt-pkg/algorithms.h
+++ b/apt-pkg/algorithms.h
@@ -138,20 +138,10 @@ class pkgProblemResolver /*{{{*/
inline void Clear(pkgCache::PkgIterator Pkg) {Flags[Pkg->ID] &= ~(Protected | ToRemove);};
// Try to intelligently resolve problems by installing and removing packages
-#if APT_PKG_ABI >= 413
bool Resolve(bool BrokenFix = false, OpProgress * const Progress = NULL);
-#else
- bool Resolve(bool BrokenFix = false);
- bool Resolve(bool BrokenFix, OpProgress * const Progress);
-#endif
// Try to resolve problems only by using keep
-#if APT_PKG_ABI >= 413
bool ResolveByKeep(OpProgress * const Progress = NULL);
-#else
- bool ResolveByKeep();
- bool ResolveByKeep(OpProgress * const Progress);
-#endif
APT_DEPRECATED void InstallProtect();
diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h
index 4173326ca..7e6adb92f 100644
--- a/apt-pkg/cacheiterators.h
+++ b/apt-pkg/cacheiterators.h
@@ -211,14 +211,12 @@ class pkgCache::VerIterator : public Iterator<Version, VerIterator> {
// Accessors
inline const char *VerStr() const {return S->VerStr == 0?0:Owner->StrP + S->VerStr;}
inline const char *Section() const {return S->Section == 0?0:Owner->StrP + S->Section;}
-#if APT_PKG_ABI >= 413
/** \brief source package name this version comes from
Always contains the name, even if it is the same as the binary name */
inline const char *SourcePkgName() const {return Owner->StrP + S->SourcePkgName;}
/** \brief source version this version comes from
Always contains the version string, even if it is the same as the binary version */
inline const char *SourceVerStr() const {return Owner->StrP + S->SourceVerStr;}
-#endif
inline const char *Arch() const {
if ((S->MultiArch & pkgCache::Version::All) == pkgCache::Version::All)
return "all";
@@ -311,7 +309,7 @@ class pkgCache::DepIterator : public Iterator<Dependency, DepIterator> {
{
map_stringitem_t &Version;
map_pointer_t &Package;
- should_be_map_id_t &ID;
+ map_id_t &ID;
unsigned char &Type;
unsigned char &CompareOp;
map_pointer_t &ParentVer;
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 2500ab631..203de158b 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -253,12 +253,6 @@ string Configuration::FindDir(const char *Name,const char *Default) const
// Configuration::FindVector - Find a vector of values /*{{{*/
// ---------------------------------------------------------------------
/* Returns a vector of config values under the given item */
-#if APT_PKG_ABI < 413
-vector<string> Configuration::FindVector(const char *Name) const
-{
- return FindVector(Name, "");
-}
-#endif
vector<string> Configuration::FindVector(const char *Name, std::string const &Default, bool const Keys) const
{
vector<string> Vec;
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 7c21bd8b3..e57a3524f 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -141,7 +141,6 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver)
map_stringitem_t const idx = StoreString(pkgCacheGenerator::SECTION, Start, Stop - Start);
Ver->Section = idx;
}
-#if APT_PKG_ABI >= 413
// Parse the source package name
pkgCache::GrpIterator const G = Ver.ParentPkg().Group();
Ver->SourcePkgName = G->Name;
@@ -193,7 +192,6 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver)
}
}
}
-#endif
Ver->MultiArch = ParseMultiArch(true);
// Archive Size
@@ -962,7 +960,6 @@ unsigned char debListParser::GetPrio(string Str)
return Out;
}
/*}}}*/
-#if APT_PKG_ABI >= 413
bool debListParser::SameVersion(unsigned short const Hash, /*{{{*/
pkgCache::VerIterator const &Ver)
{
@@ -982,8 +979,6 @@ bool debListParser::SameVersion(unsigned short const Hash, /*{{{*/
return true;
}
/*}}}*/
-#endif
-
debDebFileParser::debDebFileParser(FileFd *File, std::string const &DebFile)
: debListParser(File, ""), DebFile(DebFile)
diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h
index 4bc3c2341..3884aafb9 100644
--- a/apt-pkg/deb/deblistparser.h
+++ b/apt-pkg/deb/deblistparser.h
@@ -71,9 +71,7 @@ class APT_HIDDEN debListParser : public pkgCacheGenerator::ListParser
virtual std::vector<std::string> AvailableDescriptionLanguages() APT_OVERRIDE;
virtual MD5SumValue Description_md5() APT_OVERRIDE;
virtual unsigned short VersionHash() APT_OVERRIDE;
-#if APT_PKG_ABI >= 413
virtual bool SameVersion(unsigned short const Hash, pkgCache::VerIterator const &Ver) APT_OVERRIDE;
-#endif
virtual bool UsePackage(pkgCache::PkgIterator &Pkg,
pkgCache::VerIterator &Ver) APT_OVERRIDE;
virtual map_filesize_t Offset() APT_OVERRIDE {return iOffset;};
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 3594a6efe..c578cc338 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -1846,16 +1846,7 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
time_t now = time(NULL);
fprintf(report, "Date: %s" , ctime(&now));
fprintf(report, "Package: %s %s\n", pkgname.c_str(), pkgver.c_str());
-#if APT_PKG_ABI >= 413
fprintf(report, "SourcePackage: %s\n", Ver.SourcePkgName());
-#else
- pkgRecords Recs(Cache);
- pkgRecords::Parser &Parse = Recs.Lookup(Ver.FileList());
- std::string srcpkgname = Parse.SourcePkg();
- if(srcpkgname.empty())
- srcpkgname = pkgname;
- fprintf(report, "SourcePackage: %s\n", srcpkgname.c_str());
-#endif
fprintf(report, "ErrorMessage:\n %s\n", errormsg);
// ensure that the log is flushed
diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc
index 25d53747c..5c53581fe 100644
--- a/apt-pkg/edsp.cc
+++ b/apt-pkg/edsp.cc
@@ -51,14 +51,7 @@ static void WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::Pkg
pkgCache::VerIterator const &Ver)
{
fprintf(output, "Package: %s\n", Pkg.Name());
-#if APT_PKG_ABI >= 413
fprintf(output, "Source: %s\n", Ver.SourcePkgName());
-#else
- pkgRecords Recs(Cache);
- pkgRecords::Parser &rec = Recs.Lookup(Ver.FileList());
- string srcpkg = rec.SourcePkg().empty() ? Pkg.Name() : rec.SourcePkg();
- fprintf(output, "Source: %s\n", srcpkg.c_str());
-#endif
fprintf(output, "Architecture: %s\n", Ver.Arch());
fprintf(output, "Version: %s\n", Ver.VerStr());
if (Pkg.CurrentVer() == Ver)
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index 016f4474c..78142ab13 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -1085,7 +1085,6 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
// PM::DoInstallPostFork - compat /*{{{*/
// ---------------------------------------------------------------------
/*}}}*/
-#if APT_PKG_ABI >= 413
pkgPackageManager::OrderResult
pkgPackageManager::DoInstallPostFork(int statusFd)
{
@@ -1107,22 +1106,10 @@ pkgPackageManager::DoInstallPostFork(APT::Progress::PackageManager *progress)
return Res;
}
-#else
-pkgPackageManager::OrderResult
-pkgPackageManager::DoInstallPostFork(int statusFd)
-{
- bool goResult = Go(statusFd);
- if(goResult == false)
- return Failed;
-
- return Res;
-}
-#endif
/*}}}*/
// PM::DoInstall - Does the installation /*{{{*/
// ---------------------------------------------------------------------
/* compat */
-#if APT_PKG_ABI >= 413
pkgPackageManager::OrderResult
pkgPackageManager::DoInstall(int statusFd)
{
@@ -1132,21 +1119,11 @@ pkgPackageManager::DoInstall(int statusFd)
delete progress;
return res;
}
-#else
-pkgPackageManager::OrderResult pkgPackageManager::DoInstall(int statusFd)
-{
- if(DoInstallPreFork() == Failed)
- return Failed;
-
- return DoInstallPostFork(statusFd);
-}
-#endif
/*}}}*/
// PM::DoInstall - Does the installation /*{{{*/
// ---------------------------------------------------------------------
/* This uses the filenames in FileNames and the information in the
DepCache to perform the installation of packages.*/
-#if APT_PKG_ABI >= 413
pkgPackageManager::OrderResult
pkgPackageManager::DoInstall(APT::Progress::PackageManager *progress)
{
@@ -1155,5 +1132,4 @@ pkgPackageManager::DoInstall(APT::Progress::PackageManager *progress)
return DoInstallPostFork(progress);
}
-#endif
/*}}}*/
diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h
index febab26dd..8de6ab3ad 100644
--- a/apt-pkg/packagemanager.h
+++ b/apt-pkg/packagemanager.h
@@ -95,9 +95,7 @@ class pkgPackageManager : protected pkgCache::Namespace
virtual bool Install(PkgIterator /*Pkg*/,std::string /*File*/) {return false;};
virtual bool Configure(PkgIterator /*Pkg*/) {return false;};
virtual bool Remove(PkgIterator /*Pkg*/,bool /*Purge*/=false) {return false;};
-#if APT_PKG_ABI >= 413
virtual bool Go(APT::Progress::PackageManager * /*progress*/) {return true;};
-#endif
virtual bool Go(int /*statusFd*/=-1) {return true;};
virtual void Reset() {};
@@ -112,13 +110,9 @@ class pkgPackageManager : protected pkgCache::Namespace
pkgRecords *Recs);
// Do the installation
-#if APT_PKG_ABI >= 413
OrderResult DoInstall(APT::Progress::PackageManager *progress);
// compat
APT_DEPRECATED OrderResult DoInstall(int statusFd=-1);
-#else
- OrderResult DoInstall(int statusFd=-1);
-#endif
// stuff that needs to be done before the fork() of a library that
// uses apt
@@ -126,14 +120,10 @@ class pkgPackageManager : protected pkgCache::Namespace
Res = OrderInstall();
return Res;
};
-#if APT_PKG_ABI >= 413
// stuff that needs to be done after the fork
OrderResult DoInstallPostFork(APT::Progress::PackageManager *progress);
// compat
APT_DEPRECATED OrderResult DoInstallPostFork(int statusFd=-1);
-#else
- OrderResult DoInstallPostFork(int statusFd=-1);
-#endif
// ?
bool FixMissing();
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 8cd716c6e..2348cca2d 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -87,9 +87,6 @@ pkgCache::Header::Header()
FileList = 0;
RlsFileList = 0;
-#if APT_PKG_ABI < 413
- APT_IGNORE_DEPRECATED(StringList = 0;)
-#endif
VerSysName = 0;
Architecture = 0;
SetArchitectures(0);
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index b3a2e3184..3fa815c15 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -85,45 +85,18 @@
using std::string;
#endif
-#if APT_PKG_ABI >= 413
+// size of (potentially big) files like debs or the install size of them
+typedef uint64_t map_filesize_t;
// storing file sizes of indexes, which are way below 4 GB for now
-typedef uint32_t map_filesize_t;
-typedef map_filesize_t should_be_map_filesize_t;
-#else
-typedef unsigned long map_filesize_t;
-typedef unsigned int should_be_map_filesize_t;
-#endif
-#if APT_PKG_ABI >= 413
+typedef uint32_t map_filesize_small_t;
// each package/group/dependency gets an id
typedef uint32_t map_id_t;
-typedef map_id_t should_be_map_id_t;
-#else
-typedef unsigned long map_id_t;
-typedef unsigned int should_be_map_id_t;
-#endif
-#if APT_PKG_ABI >= 413
// some files get an id, too, but in far less absolute numbers
typedef uint16_t map_fileid_t;
-typedef map_fileid_t should_be_map_fileid_t;
-#else
-typedef unsigned long map_fileid_t;
-typedef unsigned int should_be_map_fileid_t;
-#endif
-#if APT_PKG_ABI >= 413
// relative pointer from cache start
typedef uint32_t map_pointer_t;
-#else
-typedef unsigned int map_pointer_t;
-#endif
// same as the previous, but documented to be to a string item
typedef map_pointer_t map_stringitem_t;
-#if APT_PKG_ABI >= 413
-typedef uint64_t should_be_uint64_t;
-typedef uint64_t should_be_uint64_small_t;
-#else
-typedef unsigned long long should_be_uint64_t;
-typedef unsigned long should_be_uint64_small_t;
-#endif
class pkgVersioningSystem;
class pkgCache /*{{{*/
@@ -342,17 +315,12 @@ struct pkgCache::Header
/** \brief index of the first ReleaseFile structure */
map_pointer_t RlsFileList;
-#if APT_PKG_ABI < 413
- APT_DEPRECATED map_pointer_t StringList;
-#endif
/** \brief String representing the version system used */
map_pointer_t VerSysName;
/** \brief native architecture the cache was built against */
map_pointer_t Architecture;
-#if APT_PKG_ABI >= 413
/** \brief all architectures the cache was built against */
map_pointer_t Architectures;
-#endif
/** \brief The maximum size of a raw entry from the original Package file */
map_filesize_t MaxVerFileSize;
/** \brief The maximum size of a raw entry from the original Translation file */
@@ -378,26 +346,16 @@ struct pkgCache::Header
In the PkgHashTable is it possible that multiple packages have the same name -
these packages are stored as a sequence in the list.
The size of both tables is the same. */
-#if APT_PKG_ABI >= 413
unsigned int HashTableSize;
unsigned int GetHashTableSize() const { return HashTableSize; }
void SetHashTableSize(unsigned int const sz) { HashTableSize = sz; }
map_pointer_t GetArchitectures() const { return Architectures; }
void SetArchitectures(map_pointer_t const idx) { Architectures = idx; }
-#else
- // BEWARE: these tables are pretty much empty and just here for abi compat
- map_ptrloc PkgHashTable[2*1048];
- map_ptrloc GrpHashTable[2*1048];
- unsigned int GetHashTableSize() const { return PkgHashTable[0]; }
- void SetHashTableSize(unsigned int const sz) { PkgHashTable[0] = sz; }
- map_pointer_t GetArchitectures() const { return PkgHashTable[1]; }
- void SetArchitectures(map_pointer_t const idx) { PkgHashTable[1] = idx; }
-#endif
map_pointer_t * PkgHashTableP() const { return (map_pointer_t*) (this + 1); }
map_pointer_t * GrpHashTableP() const { return PkgHashTableP() + GetHashTableSize(); }
/** \brief Size of the complete cache file */
- should_be_uint64_small_t CacheFileSize;
+ map_filesize_small_t CacheFileSize;
bool CheckSizes(Header &Against) const APT_PURE;
Header();
@@ -423,7 +381,7 @@ struct pkgCache::Group
/** \brief Link to the next Group */
map_pointer_t Next; // Group
/** \brief unique sequel ID */
- should_be_map_id_t ID;
+ map_id_t ID;
};
/*}}}*/
@@ -495,7 +453,7 @@ struct pkgCache::Package
This allows clients to create an array of size PackageCount and use it to store
state information for the package map. For instance the status file emitter uses
this to track which packages have been emitted already. */
- should_be_map_id_t ID;
+ map_id_t ID;
/** \brief some useful indicators of the package's state */
unsigned long Flags;
};
@@ -537,7 +495,7 @@ struct pkgCache::ReleaseFile
/** \brief Link to the next ReleaseFile in the Cache */
map_pointer_t NextFile;
/** \brief unique sequel ID */
- should_be_map_fileid_t ID;
+ map_fileid_t ID;
};
/*}}}*/
// Package File structure /*{{{*/
@@ -576,7 +534,7 @@ struct pkgCache::PackageFile
/** \brief Link to the next PackageFile in the Cache */
map_pointer_t NextFile; // PackageFile
/** \brief unique sequel ID */
- should_be_map_fileid_t ID;
+ map_fileid_t ID;
};
/*}}}*/
// VerFile structure /*{{{*/
@@ -591,7 +549,7 @@ struct pkgCache::VerFile
/** \brief next step in the linked list */
map_pointer_t NextFile; // PkgVerFile
/** \brief position in the package file */
- should_be_map_filesize_t Offset; // File offset
+ map_filesize_t Offset; // File offset
/** @TODO document pkgCache::VerFile::Size */
map_filesize_t Size;
};
@@ -605,7 +563,7 @@ struct pkgCache::DescFile
/** \brief next step in the linked list */
map_pointer_t NextFile; // PkgVerFile
/** \brief position in the file */
- should_be_map_filesize_t Offset; // File offset
+ map_filesize_t Offset; // File offset
/** @TODO document pkgCache::DescFile::Size */
map_filesize_t Size;
};
@@ -622,14 +580,12 @@ struct pkgCache::Version
map_stringitem_t VerStr;
/** \brief section this version is filled in */
map_stringitem_t Section;
-#if APT_PKG_ABI >= 413
/** \brief source package name this version comes from
Always contains the name, even if it is the same as the binary name */
map_stringitem_t SourcePkgName;
/** \brief source version this version comes from
Always contains the version string, even if it is the same as the binary version */
map_stringitem_t SourceVerStr;
-#endif
/** \brief Multi-Arch capabilities of a package version */
enum VerMultiArch { None = 0, /*!< is the default and doesn't trigger special behaviour */
@@ -668,16 +624,16 @@ struct pkgCache::Version
/** \brief archive size for this version
For Debian this is the size of the .deb file. */
- should_be_uint64_t Size; // These are the .deb size
+ map_filesize_t Size; // These are the .deb size
/** \brief uncompressed size for this version */
- should_be_uint64_t InstalledSize;
+ map_filesize_t InstalledSize;
/** \brief characteristic value representing this version
No two packages in existence should have the same VerStr
and Hash with different contents. */
unsigned short Hash;
/** \brief unique sequel ID */
- should_be_map_id_t ID;
+ map_id_t ID;
/** \brief parsed priority value */
unsigned char Priority;
};
@@ -705,7 +661,7 @@ struct pkgCache::Description
map_pointer_t ParentPkg; // Package
/** \brief unique sequel ID */
- should_be_map_id_t ID;
+ map_id_t ID;
};
/*}}}*/
// Dependency structure /*{{{*/
@@ -745,7 +701,7 @@ struct pkgCache::Dependency
map_pointer_t NextDepends; // Dependency
/** \brief unique sequel ID */
- should_be_map_id_t ID;
+ map_id_t ID;
};
/*}}}*/
// Provides structure /*{{{*/
diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h
index 9e10409e4..0ed731f1f 100644
--- a/apt-pkg/pkgrecords.h
+++ b/apt-pkg/pkgrecords.h
@@ -68,17 +68,10 @@ class pkgRecords::Parser /*{{{*/
* choose the hash to be used.
*/
virtual HashStringList Hashes() const { return HashStringList(); };
-#if APT_PKG_ABI >= 413
APT_DEPRECATED std::string MD5Hash() const { return GetHashFromHashes("MD5Sum"); };
APT_DEPRECATED std::string SHA1Hash() const { return GetHashFromHashes("SHA1"); };
APT_DEPRECATED std::string SHA256Hash() const { return GetHashFromHashes("SHA256"); };
APT_DEPRECATED std::string SHA512Hash() const { return GetHashFromHashes("SHA512"); };
-#else
- APT_DEPRECATED std::string MD5Hash() { return GetHashFromHashes("MD5Sum"); };
- APT_DEPRECATED std::string SHA1Hash() { return GetHashFromHashes("SHA1"); };
- APT_DEPRECATED std::string SHA256Hash() { return GetHashFromHashes("SHA256"); };
- APT_DEPRECATED std::string SHA512Hash() { return GetHashFromHashes("SHA512"); };
-#endif
// These are some general stats about the package
virtual std::string Maintainer() {return std::string();};
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc
index cc63b213f..213a413cb 100644
--- a/apt-pkg/tagfile.cc
+++ b/apt-pkg/tagfile.cc
@@ -305,21 +305,11 @@ APT_IGNORE_DEPRECATED_PUSH
pkgTagSection::pkgTagSection()
: Section(0), d(new pkgTagSectionPrivate()), Stop(0)
{
-#if APT_PKG_ABI < 413
- TagCount = 0;
- memset(&Indexes, 0, sizeof(Indexes));
-#endif
memset(&AlphaIndexes, 0, sizeof(AlphaIndexes));
}
APT_IGNORE_DEPRECATED_POP
/*}}}*/
// TagSection::Scan - Scan for the end of the header information /*{{{*/
-#if APT_PKG_ABI < 413
-bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength)
-{
- return Scan(Start, MaxLength, true);
-}
-#endif
bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength, bool const Restart)
{
Section = Start;
@@ -345,11 +335,7 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength, bool const R
}
d->Tags.reserve(0x100);
}
-#if APT_PKG_ABI >= 413
unsigned int TagCount = d->Tags.size();
-#else
- APT_IGNORE_DEPRECATED(TagCount = d->Tags.size();)
-#endif
if (Stop == 0)
return false;
@@ -376,10 +362,6 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength, bool const R
lastTagData.NextInBucket = AlphaIndexes[lastTagHash];
APT_IGNORE_DEPRECATED_PUSH
AlphaIndexes[lastTagHash] = TagCount;
-#if APT_PKG_ABI < 413
- if (d->Tags.size() < sizeof(Indexes)/sizeof(Indexes[0]))
- Indexes[d->Tags.size()] = lastTagData.StartTag;
-#endif
APT_IGNORE_DEPRECATED_POP
d->Tags.push_back(lastTagData);
}
@@ -423,16 +405,10 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength, bool const R
if (AlphaIndexes[lastTagHash] != 0)
lastTagData.NextInBucket = AlphaIndexes[lastTagHash];
APT_IGNORE_DEPRECATED(AlphaIndexes[lastTagHash] = TagCount;)
-#if APT_PKG_ABI < 413
- APT_IGNORE_DEPRECATED(Indexes[d->Tags.size()] = lastTagData.StartTag;)
-#endif
d->Tags.push_back(lastTagData);
}
pkgTagSectionPrivate::TagData const td(Stop - Section);
-#if APT_PKG_ABI < 413
- APT_IGNORE_DEPRECATED(Indexes[d->Tags.size()] = td.StartTag;)
-#endif
d->Tags.push_back(td);
TrimRecord(false,End);
return true;
@@ -463,11 +439,7 @@ void pkgTagSection::Trim()
}
/*}}}*/
// TagSection::Exists - return True if a tag exists /*{{{*/
-#if APT_PKG_ABI >= 413
bool pkgTagSection::Exists(const char* const Tag) const
-#else
-bool pkgTagSection::Exists(const char* const Tag)
-#endif
{
unsigned int tmp;
return Find(Tag, tmp);
diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h
index 77a84c832..847a799f4 100644
--- a/apt-pkg/tagfile.h
+++ b/apt-pkg/tagfile.h
@@ -37,14 +37,7 @@ class pkgTagSectionPrivate;
class pkgTagSection
{
const char *Section;
- // We have a limit of 256 tags per section with the old abi
-#if APT_PKG_ABI < 413
- APT_DEPRECATED unsigned int Indexes[256];
-#endif
unsigned int AlphaIndexes[0x100];
-#if APT_PKG_ABI < 413
- APT_DEPRECATED unsigned int TagCount;
-#endif
pkgTagSectionPrivate * const d;
@@ -84,12 +77,7 @@ class pkgTagSection
* @return \b true if section end was found, \b false otherwise.
* Beware that internal state will be inconsistent if \b false is returned!
*/
-#if APT_PKG_ABI >= 413
APT_MUSTCHECK bool Scan(const char *Start, unsigned long MaxLength, bool const Restart = true);
-#else
- APT_MUSTCHECK bool Scan(const char *Start, unsigned long MaxLength, bool const Restart);
- APT_MUSTCHECK bool Scan(const char *Start, unsigned long MaxLength);
-#endif
inline unsigned long size() const {return Stop - Section;};
void Trim();
@@ -101,11 +89,7 @@ class pkgTagSection
* times, but only the last occurrence is available via Find methods.
*/
unsigned int Count() const;
-#if APT_PKG_ABI >= 413
bool Exists(const char* const Tag) const;
-#else
- bool Exists(const char* const Tag);
-#endif
void Get(const char *&Start,const char *&Stop,unsigned int I) const;
diff --git a/apt-pkg/upgrade.cc b/apt-pkg/upgrade.cc
index 6c8721da8..e7f2aae40 100644
--- a/apt-pkg/upgrade.cc
+++ b/apt-pkg/upgrade.cc
@@ -288,12 +288,6 @@ bool pkgMinimizeUpgrade(pkgDepCache &Cache)
}
/*}}}*/
// APT::Upgrade::Upgrade - Upgrade using a specific strategy /*{{{*/
-#if APT_PKG_ABI < 413
-bool APT::Upgrade::Upgrade(pkgDepCache &Cache, int mode)
-{
- return Upgrade(Cache, mode, NULL);
-}
-#endif
bool APT::Upgrade::Upgrade(pkgDepCache &Cache, int mode, OpProgress * const Progress)
{
APT_IGNORE_DEPRECATED_PUSH
diff --git a/apt-pkg/upgrade.h b/apt-pkg/upgrade.h
index 18b6aac7b..6cad64fd9 100644
--- a/apt-pkg/upgrade.h
+++ b/apt-pkg/upgrade.h
@@ -24,12 +24,7 @@ namespace APT {
FORBID_INSTALL_NEW_PACKAGES = 2,
ALLOW_EVERYTHING = 0
};
-#if APT_PKG_ABI >= 413
bool Upgrade(pkgDepCache &Cache, int UpgradeMode, OpProgress * const Progress = NULL);
-#else
- bool Upgrade(pkgDepCache &Cache, int UpgradeMode);
- bool Upgrade(pkgDepCache &Cache, int UpgradeMode, OpProgress * const Progress);
-#endif
}
}