Bug 395328

Summary: yast package installation: error popup only says "WRONG" for Show Details
Product: [openSUSE] openSUSE 11.0 Reporter: Martin Vidner <mvidner>
Component: YaST2Assignee: Ladislav Slezák <lslezak>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: coolo
Version: Beta 3plus   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2logs.tar.bz2

Description Martin Vidner 2008-05-29 08:07:16 UTC
Created attachment 218810 [details]
y2logs.tar.bz2

I got an error when trying to install packages using yast2-qt:

Cannot access installation medium Main Repository (OSS) (Medium 1)
Check that the server is available
URL: http://download.opensuse.org/distribution/SL-OSS-factory/inst-source/
Details:
  WRONG

It works after Retry so I assume the originating problem is the same as in bug 393940. In this report, my concern is that it should say something more meaningful in the details box.

I have already updated some packages after B3+, and the versions are:
libzypp-4.25.0-3
yast2-packager-2.16.50-2
yast2-pkg-bindings-2.16.37-2
yast2-qt-pkg-2.16.44-3
yast2-qt-2.16.49-2
Comment 1 Ladislav Slezák 2008-05-29 11:09:10 UTC
2008-05-29 09:50:56 <1> totoro(27536) [YCP] PackageCallbacks.ycp:699 MediaChange error: err'WRONG:WRONG', url'http://download.o
pensuse.org/distribution/SL-OSS-factory/inst-source/', prd'Main Repository (OSS)', cur'0'/'', wan'1'/'', devs: [], curr_dev: 0

the first "WRONG" is an error code (zypp::media::MediaChangeReport::Error), that's OK, but the second "WRONG" should be a textual description.

The string comes directly from libzypp.

Comment 2 Jan Kupec 2008-05-29 14:32:58 UTC
I guess Martin is right about the origin of this being bug 393940. So my question is what variable from the requestMedia() callback does contain the wrong "WRONG" text?
Comment 3 Ladislav Slezák 2008-06-02 14:27:16 UTC
From zypp::media::MediaChangeReport :

      virtual Action requestMedia(
        Url & /* url (I/O parameter) */
        , unsigned /*mediumNr*/
        , const std::string & /* label */
        , Error /*error*/
        , const std::string & /*description*/
        , const std::vector<std::string> & /* devices */
        , unsigned int & /* dev_current (I/O param) */
      ) { return ABORT; }

Variable 'description' contains the wrong text.
Comment 4 Jan Kupec 2008-06-02 15:02:46 UTC
*** Bug 392412 has been marked as a duplicate of this bug. ***
Comment 5 Ladislav Slezák 2008-06-03 13:38:24 UTC
The fix is really simple:

- string ret = PackageCallbacks::MediaChange(error_code, error_code, url, product, current, current_label, wanted,
+ string ret = PackageCallbacks::MediaChange(error_code, error, url, product, current, current_label, wanted,


Thanks Martin for the help with debugging!

Submitted in yast2-packager-2.16.53.
Comment 6 Ladislav Slezák 2008-06-03 13:58:05 UTC
Coolo, I just have submitted the new package to STABLE, the fix is really trivial (see the previous comment) and should go to 11.0