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

Re: [buildd-tools-devel] apt-get option to keep dummy packages



On Thursday 18 November 2010 05:29:22 David Kalnischkies wrote:
> On Wed, Nov 17, 2010 at 19:55, Andres Mejia <mcitadel@gmail.com> wrote:
> > I'm helping out with testing the new apt resolver used in the latest
> > sbuild in unstable. Question I have is, is there some option or set of
> > options that will cause apt-get to refuse to remove a package or maybe a
> > set of packages. For example, aptitude has this option.
> > 
> > -o Aptitude::ProblemResolver::Hints::KeepDummy=reject <dummy_package>
> > :UNINST
> > 
> > This means aptitude won't accept a solution where the <dummy_package>
> > will be uninstalled.
> 
> A similar thing could be implemented easily in pkgDepCache::IsDeleteOk, but
> if your command is really an 'apt-get install whatever' apt should never
> accept a solution in which whatever is not installed. It will either fail
> bigtime (if it is really impossible to install) or provide even an insane
> solution (remove half of the system, for example).
> 
> 
> I would try to avoid using special hints for the resolver as a user never
> would give such hints, so you might hide problems a user would encounter
> without these hints and after all, what does it help if sbuild can build a
> package if a random user can't do it?
> 
> I mean, what does it help to have a package installed which is broken?
> The check if is broken or if it is installed at all doesn't look to
> different an either way is a build failure…

The way the apt and aptitude resolvers work in sbuild is that a dummy package 
is created which has all Build-Depends and Build-Conflicts listed as Depends 
and Conflicts for the dummy package. This dummy package is then forced to be 
installed using 'dpkg --force-depends --force-conflicts'. Afterwards, at least 
in the case with apt, an 'apt-get -yf install' is run to resolve system 
dependencies. The result that's expected is that all build dependencies are 
installed.

What happens in some situations is that apt removes the dummy package instead. 
We want apt-get to refuse to give a solution resulting in the dummy package 
being removed.

> 
> Best regards
> 
> David Kalnischkies
> 
> _______________________________________________
> Buildd-tools-devel mailing list
> Buildd-tools-devel@lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/buildd-tools-devel

-- 
Regards,
Andres Mejia


Reply to: