You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
4.5 KiB

  1. libapt-pkg v2 to v3 incorporates several source-incompatible changes
  2. that people need to be aware of.. Many of these changes are done so that
  3. most old source will continue to function, but perhaps at reduced
  4. functionality.
  5. * pkgDepCache is no longer self initializing, you have to call the Init
  6. method separately after constructing it. Users of pkgCacheFile do not
  7. need to worry about this
  8. * GetCandidateVer/etc is gone from the pkgCache. It exists only in the
  9. DepCache and is just an inline around the new Policy class
  10. * TargetVer/TargetDist have been eliminated. Nothing should have been using
  11. these.
  12. * There is a policy class. The v0 policy engine which has been used since
  13. APT 0.0.0 is instantiated by the DepCache by default. However pkgCacheFile
  14. constructs and initializes the new v4 engine. People accessing GetCandidate
  15. version outside of a CacheFile/DepCache will need to instantiate and
  16. initialize a policy engine on their own.
  17. * All byte counters are now doubles to advoid 4G wraparound. The compiler
  18. should generate warnings on any incorrect use of these.
  19. * The PriorityType/CompType/DepType functions have been moved out of the
  20. iterators and into generate static functions of pkgCache - inline stubs
  21. are left in the iterators.
  22. * The deb dependency element parser has been made into a static function
  23. of the list parser and enhanced to optionally understand architecture
  24. restrictions.
  25. * TagSections no longer include the trailing \n. This means that the
  26. Offset/Length of a package record in the version structure also does not
  27. include the trailing \n.
  28. * GenCaches::SelectFile accepts a site parameter now too.
  29. * Global version compare functions are gone. If you
  30. #define APT_COMPATIBILITY 1
  31. They will come back as they were before. Code should be updated to
  32. reference the compare functions to the VersioningSystem (VS) referenced
  33. by the Cache or _system structures.
  34. * Initialization is now two stage (define APT_COMPATIBILITY..) The first
  35. stage, pkgInitConfig is called before commandline parsing, and
  36. pkgInitSystem is called after. This gives the user the opportunity to
  37. override default settings from the config files before startup has been
  38. finalized.
  39. * pkgSourceList has been gutted. All the junk that was in there before is
  40. cleaned up and put in the pkgIndexFile class. There is very little API
  41. correspondence here..
  42. * pkgMakeStatusCacheMem is gone, pkgMakeStatusCache does the same thing if
  43. you set the AllowMem flag. Also, you can get a copy of the map used to
  44. store the cache to advoid having to remap it in the calling code. A bunch
  45. of other cache related functions are gone, but nobody should have been using
  46. them in the first place!
  47. * Downloading the 'Package' and 'Source' index files is different, use
  48. the GetIndexes call in SourceList.
  49. * SourceRecords::Parser::Source is gone, replaced with Index which does
  50. much the same thing.
  51. * DynamicMap has changed slightly, nobody should care
  52. * pkgMakeOnlyStatusCache exists, which creates a really small cache that
  53. only contains the status file, and in memory.
  54. * The pkgRecords stuff is changed to abstract through the index file list
  55. (should be transparent largely)
  56. * Locking is handled differently, there is no dpkg lock class, the _system
  57. class provides Lock/UnLock methods
  58. * pkgDepCache is not a subclass of pkgCache, it aggregates it now. Some
  59. compatibility functions are provided that make this transition fairly
  60. easy.
  61. * The following functions have had minor argument changes:
  62. - pkgSimulate(pkgDepCache &Cache);
  63. + pkgSimulate(pkgDepCache *Cache);
  64. - pkgProblemResolver(pkgDepCache &Cache);
  65. + pkgProblemResolver(pkgDepCache *Cache);
  66. - pkgDepCache(MMap &Map,Policy *Plcy = 0);
  67. + pkgDepCache(pkgCache *Cache,Policy *Plcy = 0);
  68. - pkgOrderList(pkgDepCache &Cache);
  69. + pkgOrderList(pkgDepCache *Cache);
  70. - pkgPackageManager(pkgDepCache &Cache);
  71. + pkgPackageManager(pkgDepCache *Cache);
  72. - pkgCache(MMap &Map,bool DoMap = true);
  73. + pkgCache(MMap *Map,bool DoMap = true);
  74. - pkgCacheGenerator(DynamicMMap &Map,OpProgress &Progress);
  75. + pkgCacheGenerator(DynamicMMap *Map,OpProgress *Progress);
  76. - pkgTagFile(FileFd &F,unsigned long Size = 32*1024);
  77. + pkgTagFile(FileFd *F,unsigned long Size = 32*1024);
  78. * Configuration class is const-correct
  79. * The legacy ability to create a PkgFileIterator that started at Begin
  80. is gone, everyone should be using FileBegin().
  81. * A new dependency relation called obsoletes that is similar to conflicts.