Mailinglist Archive: opensuse-bugs (15872 mails)

< Previous Next >
[Bug 304966] YaST2 package selector version selection is ignored
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Thu, 30 Aug 2007 08:52:02 -0600 (MDT)
  • Message-id: <20070830145202.E5F9B245350@xxxxxxxxxxxxxxxxxxxxxx>
https://bugzilla.novell.com/show_bug.cgi?id=304966#c6


Stefan Hundhammer <sh@xxxxxxxxxx> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
             Status|NEW                                             |NEEDINFO
      Info Provider|                                                |benji.weber@xxxxxxxxx




--- Comment #6 from Stefan Hundhammer <sh@xxxxxxxxxx>  2007-08-30 08:52:02 MST ---
Looking at the code, I can't see anything suspicious. From what I can see, when
you get the "Candidate changed" log line, the package selector calls
zypp::Selectable::setStatus() on that particular version you selected:


void
YQPkgVersionsView::checkForChangedCandidate()
{
    if ( ! firstChild() || ! _selectable )
        return;

    QListViewItem * item = firstChild()->firstChild();

    while ( item )
    {
        YQPkgVersion * versionItem = dynamic_cast<YQPkgVersion *> (item);

        if ( versionItem && versionItem->isOn() )
        {
            ZyppObj newCandidate = versionItem->zyppObj();

            if ( newCandidate != _selectable->candidateObj() )
            {
                y2milestone( "Candidate changed" );

                // Change status of selectable

                ZyppStatus status = _selectable->status();

                if ( _selectable->installedObj() &&
                     _selectable->installedObj()->edition() ==
newCandidate->edition() )
                {
                    // Switch back to the original instance -
                    // the version that was previously installed
                    status = S_KeepInstalled;
                }
                else
                {
                    switch ( status )
                    {
                        case S_KeepInstalled:
                        case S_Protected:
                        case S_AutoDel:
                        case S_AutoUpdate:
                        case S_Del:
                        case S_Update:

                            status = S_Update;
                            break;

                        case S_NoInst:
                        case S_Taboo:
                        case S_Install:
                        case S_AutoInstall:
                            status = S_Install;
                            break;
                    }
                }

                _selectable->set_status( status );


                // Set candidate

                _selectable->setCandidate( newCandidate );
                emit candidateChanged( newCandidate );
                return;
            }
        }

        item = item->nextSibling();
    }
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >
References