[PATCH 4/8] Reset dnf package sack

Brian C. Lane bcl at redhat.com
Thu Jul 10 15:15:46 UTC 2014


On Thu, Jul 10, 2014 at 09:48:25AM +0200, Ales Kozumplik wrote:
> On 07/10/2014 02:06 AM, Brian C. Lane wrote:
> >-        self._base.reset(goal=True)
> >+        self._base.reset(sack=True, goal=True)
> >+        self.gatherRepoMetadata()
> 
> This shouldn't be necessary. checkSoftwareSelection() gets called upon
> applying the sw spoke and at that point
> 
> 1) what Anaconda calls the "base" repo was initialized from setup()
> 2) additional repos were initialized when applying the source spokes.
> 
> So I'm wondering what sequence of UI actions can bring us to a different
> state.

DNF doesn't like it when you try to re-add things that have already been
selected for install, so when checkSoftwareSelection is called on exit
from software spoke or when it is called right before the installation
starts it raises an error about core being installed already.

We're leaving the repos and cached metadata alone, so resetting the sack
isn't a huge performance hit.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list