Bug 294481

Summary: Not possible to redirect a repository, empty URL reported
Product: [openSUSE] openSUSE 10.3 Reporter: Ladislav Slezák <lslezak>
Component: libzyppAssignee: Ladislav Slezák <lslezak>
Status: RESOLVED FIXED QA Contact: Klaus Kämpf <kkaempf>
Severity: Major    
Priority: P5 - None CC: locilka, ma
Version: Alpha 6   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Ladislav Slezák 2007-07-25 12:55:03 UTC
Media change callback (zypp::media::MediaChangeReport::requestMedia()) currently doesn't allow repository redirection. Yast cannot pass the new URL back to libzypp and even more libzypp handles "change" action as "retry":

MediaSetAccess.cc:
  else if (user == media::MediaChangeReport::RETRY ||                                                                  
    user == media::MediaChangeReport::CHANGE_URL)

(In the old API yast used source.redirect(medium_nr, new_url) call to redirect the source.)

Another problem is that the passed Repository object is NoRepository (i.e. yast displays empty URL in the popup dialog).
Comment 1 Duncan Mac-Vicar 2007-07-26 09:37:03 UTC
I have to investigate.
Comment 2 Ladislav Slezák 2007-07-30 09:45:50 UTC
*** Bug 293102 has been marked as a duplicate of this bug. ***
Comment 3 Duncan Mac-Vicar 2007-08-06 10:59:38 UTC
Jano, I remember you changed something about meda change, had something to do with this?
Comment 4 Jan Kupec 2007-08-06 12:02:04 UTC
Yes, all is explained in this mail: http://lists.opensuse.org/zypp-devel/2007-07/msg00099.html

Lada we also discussed and found a solution. Do you remember what it was? :O)
Comment 5 Ladislav Slezák 2007-08-06 13:28:19 UTC
See http://lists.opensuse.org/zypp-devel/2007-07/msg00100.html

Pkg-bindings should change the passed URL and return CHANGE_URL value. The problem with too many popup dialogs won't occur, pkg-bindings should remember the old and the new URL and do automatic redirection if the requested URL has already been redirected.
Comment 6 Jan Kupec 2007-08-30 17:01:28 UTC
done in libzypp svn r7033, zypper is also adapted. Lado, please do the pkg-bindings part.
Comment 7 Ladislav Slezák 2007-08-30 18:19:17 UTC
yast2-pkg-bindings-2.15.47 contain just compile fix, I'll implement the redirection in the next version.
Comment 8 Ladislav Slezák 2007-09-03 11:06:35 UTC
Fully implemented in yast2-pkg-bindings-2.15.49