Re: Some questions on apt-pkg
On Sat, Oct 23, 1999 at 05:18:38PM -0600, Jason Gunthorpe was heard to say:
> > 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.
Mm. That has the potential to be...problematic. I'll see what I can do with
> > -> What exactly does the Soft argument to pkgDepCache::MarkKeep do?
> It toggles the autokept flag which isn't presently used by anything at
> > -> 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'
Maybe I'm misunderstanding something, but this seems like the Wrong Way to do
things... As I understand it, you want me to override (in my own tool) the
calculation of the candidate version of a package so that some packages will
have a different candidate version than the 'normal' one. The problem here is
that this isn't standard across the apt tools, and in fact isn't even written
back to the disk as far as I can tell, so if (for example) the user downgrades
package foo from version 1.06-1 to 1.05-9, the next run of 'apt-get upgrade'
will clobber this change and bring foo back to 1.06-1.
I thought (maybe I'm wrong :/ ) that there were fields in the apt cache which
could be used to override and/or influence the automatic selection of candidate
versions: Package::TargetVer and Package::TargetDist. Am I wrong here? What
are these actually used for? If I'm right, why can't users of apt-pkg modify
these? It would seem to be necessary in order to properly select a particular
package version and have it be 'sticky'. If I'm wrong, is there any way to
make user selections of package versions 'sticky' across tools? This seems like
a fairly important feature to me. (maybe I'm overlooking a really simple way to
After the game, the king and the pawn go in the same box.
-- Italian proverb