[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: CVS apt 0.4.0



On Sun, 17 Sep 2000, Daniel Burrows wrote:

>   ..which reminds me, what sort of API changes are occuring in 0.4.0?
> Will old code compile (without using the fancy new features) without too much
> trouble, or should we expect to have to perform major rewrites?

I'm not done yet, most code will still work - but I think integrating the
Conectiva work will break that too :>

Wakko{jgg}~/work/apt2/apt-pkg#cat ../doc/libapt-pkg2_to_3.txt 
libapt-pkg v2 to v3 incorperates several source-incompatible changes that
people need to be aware of.. Many of this changes are done so that most old
source will continue to function, but perhaps at reduced functionality.

* pkgDepCache is no longer self initilizing, you have to call the Init
  method seperately after constructing it. Users of pkgCacheFile do not
  need to worry about this
* GetCandidateVer/etc is gone from the pkgCache. It exists only in the 
  DepCache and is just an inline around the new Policy class
* TargetVer/TargetDist have been eliminated. Nothing should have been using
  these.
* There is a policy class. The v0 policy engine which has been used since
  APT 0.0.0 is instantiated by the DepCache by default. However pkgCacheFile 
  constructs and initializes the new v4 engine. People accessing GetCandidate
  version outside of a CacheFile/DepCache will need to instantiate and 
  initialize a policy engine on their own.
* All byte counters are now doubles to advoid 4G wraparound. The compiler 
  should generate warnings on any incorrect use of these.
* The PriorityType/CompType/DepType functions have been moved out of the 
  iterators and into generate static functions of pkgCache - inline stubs
  are left in the iterators. 
* The deb dependency element parser has been made into a static function
  of the list parser and enhanced to optionally understand architecture 
  restrictions.
* TagSections no longer include the trailing \n. This means that the 
  Offset/Length of a package record in the version structure also does not
  include the trailing \n.
* GenCaches::SelectFile accepts a site parameter now too.

Jason



Reply to: