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

Re: Some questions on apt-pkg



On Sat, 23 Oct 1999, Daniel Burrows wrote:

>   Here's what I'd like to know (two things):
> 
>   -> pkgDepCache::MarkInstall appears to automatically and recursively install
>    dependencies if AutoInst is set to true.  Is there any way to find out what
>    it has done?  That is, I'd like to get a list of packages whose state has
>    magically changed.  I suppose I could just keep my own copy of each package's
>    status, but that seems a little..erm..ugly.

Several people have asked for this, but in general it is not really an
easy thing to do [think about the problem resolver for instance]. Each
caller will want to basically checkpoint then do some operations then
get a report of the changes - keeping track of them while running is not
reasonable due to all of the backtracking so I suggest that keeping an
array of the package status is the best route, it is cheap, simple and
handles all possible cases.

>      Also, if the user tries to do something that's not possible or where a
>    choice can be made, how can I find out?  (eg, where one of several packages
>    can be installed to fulfill a dependency)  Or is this Not Relevant?  (as
>    I wrote this question I thought of a [perhaps] better way to handle this than
>    what I was thinking :) )

In the event of a choice APT [via provides] apt selects one more or less
at random.
 
>   -> What exactly does the Soft argument to pkgDepCache::MarkKeep do?

It toggles the autokept flag which isn't presently used by anything at
all.

>   -> How can I change the `target version' and/or `target dist' of a package?  I
>    see lots of different ways to query it, but no way to modify it (eg, so the
>    user can say "downgrade this package to an older version").

You must subclass the depcache and provide your own version of the
function 'GetCandidateVer' 

Jason


Reply to: