]> git.saurik.com Git - apt.git/commitdiff
remove the compatibility markers for 4.13 abi
authorDavid Kalnischkies <david@kalnischkies.de>
Wed, 15 Jul 2015 11:21:21 +0000 (13:21 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Mon, 10 Aug 2015 15:27:58 +0000 (17:27 +0200)
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

26 files changed:
apt-inst/contrib/arfile.h
apt-inst/contrib/extracttar.cc
apt-inst/contrib/extracttar.h
apt-inst/deb/debfile.cc
apt-inst/deb/debfile.h
apt-inst/dirstream.h
apt-pkg/algorithms.cc
apt-pkg/algorithms.h
apt-pkg/cacheiterators.h
apt-pkg/contrib/configuration.cc
apt-pkg/deb/deblistparser.cc
apt-pkg/deb/deblistparser.h
apt-pkg/deb/dpkgpm.cc
apt-pkg/edsp.cc
apt-pkg/packagemanager.cc
apt-pkg/packagemanager.h
apt-pkg/pkgcache.cc
apt-pkg/pkgcache.h
apt-pkg/pkgrecords.h
apt-pkg/tagfile.cc
apt-pkg/tagfile.h
apt-pkg/upgrade.cc
apt-pkg/upgrade.h
apt-private/private-install.cc
cmdline/apt-cache.cc
cmdline/apt-get.cc

index f53356847f80156c055c9628602135e9ac5d27aa..297303a9d8403de1e28412c1368d5fcfa21b6685 100644 (file)
@@ -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) {};
index be0b69d96e66bfc0a1acad0668bfdcbd9cdc01f3..2c86d0d01053c143d6dd76ac3683b94d659edd86 100644 (file)
@@ -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;
index 57be956bd0649fe6b0b54292374dbd65fe9570e5..22bb69e66af108c9476457d2442ccaa5f11d3914 100644 (file)
@@ -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();
 };
 
index a8bf754e4e46fc0adea263ea14250b8658629281..4853a13c7ebd3c404a467da40b75ba8c0a11757f 100644 (file)
@@ -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];
index 6ad9b7659d5e237e0a493185e5b286c5d13b311d..02ebaae2e5481539270bc40bd96c31ffe503f5d6 100644 (file)
@@ -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) {};
index 53ac24ba5c8c5d02b8220c85edf24d6d57115269..dac965db79e93af355a50ccd78417e97949fcbb8 100644 (file)
@@ -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() {};   
 };
 
index db765febe0cb9b8c5c58eb29b36861d470d1c256..747b73e05b9880d566b18244d194871fe6ce59fd 100644 (file)
@@ -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");
index 28057fa5c05504f7dbc7a6ed4baf687af7c7889d..aad261b6334993c95fd6ffc946c7f7d571b424c7 100644 (file)
@@ -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();
 
index 4173326ca43859d3dc5c67835e69b45f3a1a6d24..7e6adb92f473c6bbd65d042b3cccb700fa085588 100644 (file)
@@ -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;
index 2500ab631452d2d717d8104c1822ed75e1ddeabf..203de158b5d536fff8e54c8c8aa2b03928f6be3d 100644 (file)
@@ -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;
index 7c21bd8b373fd4ed6f81260aee984f5ea1174f33..e57a3524fd0aa168a706e159f5925478b466106e 100644 (file)
@@ -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)
index 4bc3c23415b8c77429c0c3dea1e2795c91139f77..3884aafb9505b5b84cddc93f3707e568e1863892 100644 (file)
@@ -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;};
index 3594a6efe989980f5cc95062ae4e123334c7496e..c578cc338387983e549b99f013206090a4b637fa 100644 (file)
@@ -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
index 25d53747cf6b07cff3f34d1af17e646dd6c48606..5c53581fef2f27617cf21bb8489963f7f441ae3a 100644 (file)
@@ -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)
index 016f4474cb7297eb7ff71ae276c40ec7abe49f45..78142ab13a2f8291f5f9f99b1df6fa45c2b5c081 100644 (file)
@@ -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
                                                                        /*}}}*/       
index febab26dd6106731210906d8da4526e915508b24..8de6ab3ad47cfcba92ab19097a83c382d7bf4714 100644 (file)
@@ -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();
index 8cd716c6e7394020afdadbc07b99c403344e90ad..2348cca2d0b9c11954fda23685b6594cb56df591 100644 (file)
@@ -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);
index b3a2e3184b14e421821f86a9ea34ad796f3cb51b..3fa815c159600c3847dd56a074466e8fcd926f8f 100644 (file)
 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                                                  /*{{{*/
index 9e10409e47238fd1592b2db797f0603087211f33..0ed731f1f96e0493cb71b8b6986977d999622392 100644 (file)
@@ -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();};
index cc63b213f9cea975472c9d9ad2c19e22678990f0..213a413cb22d632e371d277b6fc033cafb220c5d 100644 (file)
@@ -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);
index 77a84c832d615bdc5537676b6e786dcb89370a40..847a799f4d5dfcb6f8320afb0644cddee076227e 100644 (file)
@@ -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;
 
index 6c8721da8672ce1973c368d200d71d9be9d531eb..e7f2aae4012cf076a7145d29c848c581e58417f4 100644 (file)
@@ -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
index 18b6aac7b03fedf7a25864c7538f3fc29b3545da..6cad64fd9b433cf8041c90b487964374c0ebcd4a 100644 (file)
@@ -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
    }
 }
 
index 0b5e33ae5d70b09539deda2f347dae53f4f44992..116e01038187775bf0eb1d3572aab383a98695fe 100644 (file)
@@ -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;
index cfa789fd9667d6223353700c71e4dce959f7e2c5..2fc721f693b58970b9c0d6d7f5b548af75905669 100644 (file)
@@ -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();
 
index ca96509984f3b6c1fae20e96bfce77fc7402f6df..d515a0f4fd42c99f5e9bcf5857347cc2656be13c 100644 (file)
@@ -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)