diff options
-rw-r--r-- | apt-inst/contrib/arfile.h | 4 | ||||
-rw-r--r-- | apt-inst/contrib/extracttar.cc | 5 | ||||
-rw-r--r-- | apt-inst/contrib/extracttar.h | 8 | ||||
-rw-r--r-- | apt-inst/deb/debfile.cc | 8 | ||||
-rw-r--r-- | apt-inst/deb/debfile.h | 8 | ||||
-rw-r--r-- | apt-inst/dirstream.h | 12 | ||||
-rw-r--r-- | apt-pkg/algorithms.cc | 14 | ||||
-rw-r--r-- | apt-pkg/algorithms.h | 10 | ||||
-rw-r--r-- | apt-pkg/cacheiterators.h | 4 | ||||
-rw-r--r-- | apt-pkg/contrib/configuration.cc | 6 | ||||
-rw-r--r-- | apt-pkg/deb/deblistparser.cc | 5 | ||||
-rw-r--r-- | apt-pkg/deb/deblistparser.h | 2 | ||||
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 9 | ||||
-rw-r--r-- | apt-pkg/edsp.cc | 7 | ||||
-rw-r--r-- | apt-pkg/packagemanager.cc | 24 | ||||
-rw-r--r-- | apt-pkg/packagemanager.h | 10 | ||||
-rw-r--r-- | apt-pkg/pkgcache.cc | 3 | ||||
-rw-r--r-- | apt-pkg/pkgcache.h | 74 | ||||
-rw-r--r-- | apt-pkg/pkgrecords.h | 7 | ||||
-rw-r--r-- | apt-pkg/tagfile.cc | 28 | ||||
-rw-r--r-- | apt-pkg/tagfile.h | 16 | ||||
-rw-r--r-- | apt-pkg/upgrade.cc | 6 | ||||
-rw-r--r-- | apt-pkg/upgrade.h | 5 | ||||
-rw-r--r-- | apt-private/private-install.cc | 10 | ||||
-rw-r--r-- | cmdline/apt-cache.cc | 4 | ||||
-rw-r--r-- | cmdline/apt-get.cc | 33 |
26 files changed, 18 insertions, 304 deletions
diff --git a/apt-inst/contrib/arfile.h b/apt-inst/contrib/arfile.h index f53356847..297303a9d 100644 --- a/apt-inst/contrib/arfile.h +++ b/apt-inst/contrib/arfile.h @@ -62,11 +62,7 @@ struct ARArchive::Member unsigned long long Size; // Location of the data. -#if APT_PKG_ABI >= 413 unsigned long long Start; -#else - unsigned long Start; -#endif Member *Next; Member() : Start(0), Next(0) {}; diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc index be0b69d96..2c86d0d01 100644 --- a/apt-inst/contrib/extracttar.cc +++ b/apt-inst/contrib/extracttar.cc @@ -60,13 +60,8 @@ struct ExtractTar::TarHeader // ExtractTar::ExtractTar - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -#if APT_PKG_ABI >= 413 ExtractTar::ExtractTar(FileFd &Fd,unsigned long long Max,string DecompressionProgram) : File(Fd), MaxInSize(Max), DecompressProg(DecompressionProgram) -#else -ExtractTar::ExtractTar(FileFd &Fd,unsigned long Max,string DecompressionProgram) - : File(Fd), MaxInSize(Max), DecompressProg(DecompressionProgram) -#endif { GZPid = -1; Eof = false; diff --git a/apt-inst/contrib/extracttar.h b/apt-inst/contrib/extracttar.h index 57be956bd..22bb69e66 100644 --- a/apt-inst/contrib/extracttar.h +++ b/apt-inst/contrib/extracttar.h @@ -40,11 +40,7 @@ class ExtractTar GNU_LongLink = 'K',GNU_LongName = 'L'}; FileFd &File; -#if APT_PKG_ABI >= 413 unsigned long long MaxInSize; -#else - unsigned long MaxInSize; -#endif int GZPid; FileFd InFd; bool Eof; @@ -58,11 +54,7 @@ class ExtractTar bool Go(pkgDirStream &Stream); -#if APT_PKG_ABI >= 413 ExtractTar(FileFd &Fd,unsigned long long Max,std::string DecompressionProgram); -#else - ExtractTar(FileFd &Fd,unsigned long Max,std::string DecompressionProgram); -#endif virtual ~ExtractTar(); }; diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc index a8bf754e4..4853a13c7 100644 --- a/apt-inst/deb/debfile.cc +++ b/apt-inst/deb/debfile.cc @@ -203,11 +203,7 @@ bool debDebFile::MemControlExtract::DoItem(Item &Itm,int &Fd) /* Just memcopy the block from the tar extractor and put it in the right place in the pre-allocated memory block. */ bool debDebFile::MemControlExtract::Process(Item &/*Itm*/,const unsigned char *Data, -#if APT_PKG_ABI >= 413 unsigned long long Size,unsigned long long Pos) -#else - unsigned long Size,unsigned long Pos) -#endif { memcpy(Control + Pos, Data,Size); return true; @@ -236,11 +232,7 @@ bool debDebFile::MemControlExtract::Read(debDebFile &Deb) // --------------------------------------------------------------------- /* The given memory block is loaded into the parser and parsed as a control record. */ -#if APT_PKG_ABI >= 413 bool debDebFile::MemControlExtract::TakeControl(const void *Data,unsigned long long Size) -#else -bool debDebFile::MemControlExtract::TakeControl(const void *Data,unsigned long Size) -#endif { delete [] Control; Control = new char[Size+2]; diff --git a/apt-inst/deb/debfile.h b/apt-inst/deb/debfile.h index 6ad9b7659..02ebaae2e 100644 --- a/apt-inst/deb/debfile.h +++ b/apt-inst/deb/debfile.h @@ -82,19 +82,11 @@ class debDebFile::MemControlExtract : public pkgDirStream // Members from DirStream virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE; virtual bool Process(Item &Itm,const unsigned char *Data, -#if APT_PKG_ABI >= 413 unsigned long long Size,unsigned long long Pos) APT_OVERRIDE; -#else - unsigned long Size,unsigned long Pos); -#endif // Helpers bool Read(debDebFile &Deb); -#if APT_PKG_ABI >= 413 bool TakeControl(const void *Data,unsigned long long Size); -#else - bool TakeControl(const void *Data,unsigned long Size); -#endif MemControlExtract() : IsControl(false), Control(0), Length(0), Member("control") {}; MemControlExtract(std::string Member) : IsControl(false), Control(0), Length(0), Member(Member) {}; diff --git a/apt-inst/dirstream.h b/apt-inst/dirstream.h index 53ac24ba5..dac965db7 100644 --- a/apt-inst/dirstream.h +++ b/apt-inst/dirstream.h @@ -38,15 +38,10 @@ class pkgDirStream Directory, FIFO} Type; char *Name; char *LinkTarget; -#if APT_PKG_ABI >= 413 - unsigned long long Size; -#endif unsigned long Mode; unsigned long UID; unsigned long GID; -#if APT_PKG_ABI < 413 - unsigned long Size; -#endif + unsigned long long Size; unsigned long MTime; unsigned long Major; unsigned long Minor; @@ -55,13 +50,8 @@ class pkgDirStream virtual bool DoItem(Item &Itm,int &Fd); virtual bool Fail(Item &Itm,int Fd); virtual bool FinishedFile(Item &Itm,int Fd); -#if APT_PKG_ABI >= 413 virtual bool Process(Item &/*Itm*/,const unsigned char * /*Data*/, unsigned long long /*Size*/,unsigned long long /*Pos*/) {return true;}; -#else - virtual bool Process(Item &/*Itm*/,const unsigned char * /*Data*/, - unsigned long /*Size*/,unsigned long /*Pos*/) {return true;}; -#endif virtual ~pkgDirStream() {}; }; 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 } } diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc index 0b5e33ae5..116e01038 100644 --- a/apt-private/private-install.cc +++ b/apt-private/private-install.cc @@ -94,14 +94,9 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety) { pkgSimulate PM(Cache); -#if APT_PKG_ABI >= 413 APT::Progress::PackageManager *progress = APT::Progress::PackageManagerProgressFactory(); pkgPackageManager::OrderResult Res = PM.DoInstall(progress); delete progress; -#else - int status_fd = _config->FindI("APT::Status-Fd",-1); - pkgPackageManager::OrderResult Res = PM.DoInstall(status_fd); -#endif if (Res == pkgPackageManager::Failed) return false; @@ -307,14 +302,9 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety) _system->UnLock(); -#if APT_PKG_ABI >= 413 APT::Progress::PackageManager *progress = APT::Progress::PackageManagerProgressFactory(); pkgPackageManager::OrderResult Res = PM->DoInstall(progress); delete progress; -#else - int status_fd = _config->FindI("APT::Status-Fd", -1); - pkgPackageManager::OrderResult Res = PM->DoInstall(status_fd); -#endif if (Res == pkgPackageManager::Failed || _error->PendingError() == true) return false; diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index cfa789fd9..2fc721f69 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -392,10 +392,8 @@ static bool Stats(CommandLine &) stritems.insert(V->VerStr); if (V->Section != 0) stritems.insert(V->Section); -#if APT_PKG_ABI >= 413 stritems.insert(V->SourcePkgName); stritems.insert(V->SourceVerStr); -#endif for (pkgCache::DepIterator D = V.DependsList(); D.end() == false; ++D) { if (D->Version != 0) @@ -430,10 +428,10 @@ static bool Stats(CommandLine &) stritems.insert(F->Component); stritems.insert(F->IndexType); } + unsigned long Size = 0; for (std::set<map_stringitem_t>::const_iterator i = stritems.begin(); i != stritems.end(); ++i) Size += strlen(Cache->StrP + *i) + 1; - cout << _("Total globbed strings: ") << stritems.size() << " (" << SizeToStr(Size) << ')' << endl; stritems.clear(); diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index ca9650998..d515a0f4f 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -162,11 +162,7 @@ static pkgCache::RlsFileIterator GetReleaseFileForSourceRecord(CacheFile &CacheF // FindSrc - Find a source record /*{{{*/ // --------------------------------------------------------------------- /* */ -#if APT_PKG_ABI >= 413 static pkgSrcRecords::Parser *FindSrc(const char *Name, -#else -static pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, -#endif pkgSrcRecords &SrcRecs,string &Src, CacheFile &CacheFile) { @@ -276,19 +272,8 @@ static pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, { // the Version we have is possibly fuzzy or includes binUploads, // so we use the Version of the SourcePkg (empty if same as package) -#if APT_PKG_ABI >= 413 Src = Ver.SourcePkgName(); VerTag = Ver.SourceVerStr(); -#else - pkgRecords::Parser &Parse = Recs.Lookup(VF); - Src = Parse.SourcePkg(); - // no SourcePkg name, so it is the "binary" name - if (Src.empty() == true) - Src = TmpSrc; - VerTag = Parse.SourceVer(); - if (VerTag.empty() == true) - VerTag = Ver.VerStr(); -#endif break; } } @@ -319,17 +304,10 @@ static pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs, pkgCache::VerIterator Ver = Cache->GetCandidateVer(Pkg); if (Ver.end() == false) { -#if APT_PKG_ABI >= 413 if (strcmp(Ver.SourcePkgName(),Ver.ParentPkg().Name()) != 0) Src = Ver.SourcePkgName(); if (VerTag.empty() == true && strcmp(Ver.SourceVerStr(),Ver.VerStr()) != 0) VerTag = Ver.SourceVerStr(); -#else - pkgRecords::Parser &Parse = Recs.Lookup(Ver.FileList()); - Src = Parse.SourcePkg(); - if (VerTag.empty() == true) - VerTag = Parse.SourceVer(); -#endif } } } @@ -716,9 +694,6 @@ static bool DoSource(CommandLine &CmdL) pkgSourceList *List = Cache.GetSourceList(); // Create the text record parsers -#if APT_PKG_ABI < 413 - pkgRecords Recs(Cache); -#endif pkgSrcRecords SrcRecs(*List); if (_error->PendingError() == true) return false; @@ -746,11 +721,7 @@ static bool DoSource(CommandLine &CmdL) for (const char **I = CmdL.FileList + 1; *I != 0; I++, J++) { string Src; -#if APT_PKG_ABI >= 413 pkgSrcRecords::Parser *Last = FindSrc(*I,SrcRecs,Src,Cache); -#else - pkgSrcRecords::Parser *Last = FindSrc(*I,Recs,SrcRecs,Src,Cache); -#endif if (Last == 0) { return _error->Error(_("Unable to find a source package for %s"),Src.c_str()); } @@ -1056,11 +1027,7 @@ static bool DoBuildDep(CommandLine &CmdL) LastOwner = Last = Type->CreateSrcPkgParser(*I); } else { // normal case, search the cache for the source file -#if APT_PKG_ABI >= 413 Last = FindSrc(*I,SrcRecs,Src,Cache); -#else - Last = FindSrc(*I,Recs,SrcRecs,Src,Cache); -#endif } if (Last == 0) |