[issue237] smart hangs when upgrading the whole system

so at Labix Tracker tracker at labix.org
Sat Oct 28 09:43:41 PDT 2006


so <so at lalisio.com> added the comment:

i think i'm getting closer to where in the code it's looping, but not knowing 
the internals of smart i have no idea if i got something, nor how a fix would 
look like. 

with the help of pydb and some rather silly print statements it seems to me as 
if the problem is in transaction.py; the sortUpgrades() function is called 
over and over again, apparently out of the "while pending" loop in 
Transaction._pending(), near line 733. concrete reason seems to be kind of a 
circular dependency. if i put some prints into sortUpgrades() like

if newpkg in pkgupgs or priority[pkg] > priority[newpkg]:
    if newpkg in pkgupgs:
        print newpkg, 'in pkgupgs'
    if priority[pkg] > priority[newpkg]:
        print '%s (%s) > %s (%s)' % (pkg, priority[pkg], newpkg, 
priority[newpkg])
    print ('breaking loop for pkg: %s; newpkg: %s' %  (pkg, newpkg))
    print
    newpkgs.insert(i, pkg)
    break

i see some pairs of packages being swapped a lot:

breaking loop for pkg: kde-config-3.5-6.fc6 at noarch; newpkg: 
kde-config-3.5-6 at noarch
breaking loop for pkg: kde-config-3.5-5.fc6 at noarch; newpkg: 
kde-config-3.5-5 at noarch
breaking loop for pkg: kde-config-3.5-6.fc6 at noarch; newpkg: 
kde-config-3.5-6 at noarch
breaking loop for pkg: kde-config-3.5-5.fc6 at noarch; newpkg: 
kde-config-3.5-5 at noarch

and 

breaking loop for pkg: kde-config-kdebase-3.5-6.fc6 at noarch; newpkg: 
kde-config-kdebase-3.5-6 at noarch
breaking loop for pkg: kde-config-kdebase-3.5-5.fc6 at noarch; newpkg: 
kde-config-kdebase-3.5-5 at noarch
breaking loop for pkg: kde-config-kdebase-3.5-6.fc6 at noarch; newpkg: 
kde-config-kdebase-3.5-6 at noarch
breaking loop for pkg: kde-config-kdebase-3.5-5.fc6 at noarch; newpkg: 
kde-config-kdebase-3.5-5 at noarch

those packages are from kde-redhat. none of them is currently installed, so 
they seem to be dependencies of to-be-installed packages.

now, i might be fully on a false track here: i just disabled all kde-redhat 
repos - with the result, that smart hangs again, but this time, nothing is 
printed :-(

may be someone with more zen has a hint about how to debug why sortUpgrades() 
is being called again and again? is there any global structure that one could 
record and compare so as to see if the the state of the structure is looping 
somehow? may be inspecting of the ChangeSet could help?

_______________________________________
Labix issue tracker <tracker at labix.org>
<http://tracker.labix.org/issue237>
_______________________________________



More information about the Smart mailing list