[SM-Sorcery-Bugs] [Bug 14587] New: wrong default provider selected

bugzilla-daemon at bugs.sourcemage.org bugzilla-daemon at bugs.sourcemage.org
Sun Jul 20 14:11:33 EDT 2008


http://bugs.sourcemage.org/show_bug.cgi?id=14587

           Summary: wrong default provider selected
           Product: Sorcery
           Version: 1.13.x
          Platform: x86-64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: subroutines
        AssignedTo: sm-sorcery-bugs at lists.ibiblio.org
        ReportedBy: mikael.morin at tele2.fr


I havn't seen this reported in the bugzilla, though it's been randomly
happening with me for months. 

The symptoms were that upon system update, sorcery was trying to install for
examples cups-old instead of cups which was already installed, or xfree86 or
xorg instead of xorg-server already installed. 
The worst was that it was happening behind my back. 
When I was watching the thing (pressing enter to accelerate), the bug didn't
appear. 

I finally decided to find out where things went wrong, to fill a bug report a
little better than "something is randomly happening". 

It appears that in the choice for a default provider, the answer variable is
not declared as local, and thus keeps the value of the preceding call to
select_list_sub. 
The first time it works beautifully, but the second it fails or not depending
on wether the default value is the same or not. 
But if the user presses enter, the answer value is overwritten and the correct
default value is selected. 

The fix is rather obvious: 

*** /root/libmisc_old   2008-07-17 00:01:41.000000000 +0200
--- libmisc     2008-07-17 00:27:59.000000000 +0200
***************
*** 530,535 ****
--- 530,536 ----
    local hashname=$2
    local msgstr=$3
    local default=$4
+   local answer

    local result


-- 
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the SM-Sorcery-Bugs mailing list