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

Re: SAT based britney



Hi,

On Fri, Jun 24, 2011 at 08:26:28AM +0200, Raphael Hertzog wrote:
> On Thu, 23 Jun 2011, Mehdi Dogguy wrote:
> > Yes, but zack's answer confirms that (at least for me) we won't have any
> > better solutions because testing migration problem isn't a trivial
> > problem. So, personally, I remain not convinced that a new SAT solver
> > would make things easier or better for us. We will have to enter "hints"
> > (no matter what implementation is used) to make choices the solver can't
> > infer automatically. (as julien said in the beginning of this thread).
> Well, from my understanding the SAT solver would drop the need to provide
> "easy" hints. "force" hints where you deliberately break dependencies
> would require some input to tell the solver which constraints can be
> broken.

FWIW b2 (in non-compatible mode, i.e. not compatible with b1) tries to
automatically hint some circular dependencies with easy before the main
run:

| def auto_hinter(self):
|     """Auto hint circular dependencies
|
|     This method tries to auto hint circular dependencies analyzing the update
|     excuses relationships. If they build a circular dependency, which we already
|     know as not-working with the standard do_all algorithm, try to `easy` them.
|     """
|     self.__log("> Processing hints from the auto hinter", type="I")
|
|     # consider only excuses which are valid candidates
|     excuses = dict([(x.name, x) for x in self.excuses if x.name in self.upgrade_me])
|
|     def find_related(e, hint, first=False):
|         if e not in excuses:
|             return False
|         excuse = excuses[e]
|         if e in self.sources['testing'] and self.sources['testing'][e][VERSION] == excuse.ver[1]:
|             return True
|         if not first:
|             hint[e] = excuse.ver[1]
|         if len(excuse.deps) == 0:
|             return hint
|         for p in excuse.deps:
|             if p in hint: continue
|             if not find_related(p, hint):
|                 return False
|         return hint
|
|     # loop on them
|     cache = []
|     for e in excuses:
|         excuse = excuses[e]
|         if e in self.sources['testing'] and self.sources['testing'][e][VERSION] == excuse.ver[1] or \
|            len(excuse.deps) == 0:
|             continue
|         hint = find_related(e, {}, True)
|         if hint and e in hint and hint not in cache:
|             self.do_hint("easy", "autohinter", hint.items())
|             cache.append(hint)

It should help with the easy cases like shorewall.  I don't know how well it
works with others.  And the switch will be to b2's compatible mode first,
with b1 running in parallel and diffed afterwards.

I'm mainly stating this for completeness and awareness.  Not as any input
whatsoever on the SAT idea.

Kind regards,
Philipp Kern
-- 
 .''`.  Philipp Kern                        Debian Developer
: :' :  http://philkern.de                         Stable Release Manager
`. `'   xmpp:phil@0x539.de                         Wanna-Build Admin
  `-    finger pkern/key@db.debian.org

Attachment: signature.asc
Description: Digital signature


Reply to: