Bug 140317

Summary: online_update fails -- URL is apparently defective
Product: [openSUSE] SUSE Linux 10.1 Reporter: Juergen Weigert <jw>
Component: YOUAssignee: E-mail List <yast2-maintainers>
Status: RESOLVED FIXED QA Contact: Klaus Kämpf <kkaempf>
Severity: Blocker    
Priority: P5 - None CC: aj, opensuse
Version: Alpha 4   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: patch to correct url-escaping

Description Juergen Weigert 2005-12-20 11:45:48 UTC
online_update -k -s 
fails with the following error message:

Error while requesting servers: ERROR(You:Error getting youservers file.)

~/.y2log contains:

2005-12-20 11:53:00 <1> linux(5789) [packagemanager++] PMYouServers.cc(fetchMachID):186 fetchMachID returns empty.
2005-12-20 11:53:00 <1> linux(5789) [packagemanager++] PMYouServers.cc(requestServers):404 url: 'http%2F%2Fwww.suse.de%2Fcgi-bin%2Fsuseservers.cgi%3Fproduct=SUSE%20LINUX%3Fversion=10.0.42%3Fbasearch=i386%3Farch=i686%3Flang=de%3Fbusiness=0%3Fcheck=1%3Fdistproduct=SUSE-Linux-CD-OSS-i386-10.0.42-Alpha4%3Fsuse-release=SUSE%20LINUX%2010.0.42%(i586)%20OSS%20Alpha4%3Fyast2-online-update=2.13.2-2%3Fyast2-packagemanager=2.13.11-2%3Fliby2util=2.13.3-3%3Ftimezone=Europe%2FBerlin%3Fmachid='
2005-12-20 11:53:00 <3> linux(5789) [mediaaccess] MediaAccess.cc(open):71 ERROR(Media:invalid URL) opening ://
2005-12-20 11:53:00 <1> linux(5789) [mediaaccess++] MediaAccess.cc(~MediaAccess):62 MediaAccess( closed )
2005-12-20 11:53:28 <1> linux(5830) [PM_online_update] online_update.cc(main):212 CMD: online_update -k -s


Libcurl fails. The URL is probably misquoted. The query string starts with '&' instead of '?'.

Michl: YOU-Logs for Alpha4 are blocked by this defect.
Comment 1 Klaus Kämpf 2005-12-20 12:17:44 UTC
*Very* strange. The code explictly says ' url += "?product ..." ' and ' += "&..." ' for all other attributes.

Fresh install or upgrade ?
Comment 2 Juergen Weigert 2005-12-20 13:28:40 UTC
fresh install.
ssh root@10.10.103.54
/home/testy/.y2log
Comment 3 Klaus Kämpf 2005-12-20 14:22:45 UTC
Argh, found it.

Juergen, that bug was introduced with the last enhancement to also pass information from /etc/SuSE-release to suseservers.cgi.
So this bug should've been detected before ...

Aj, I will have to submit a new yast2-packagemanager :-(
Comment 4 Klaus Kämpf 2005-12-20 14:50:57 UTC
fix submitted to autobuild, yast2-packagemanager-2.13.13
Comment 5 Juergen Weigert 2005-12-21 12:00:09 UTC
Klaus, I guess this should not have happend now?

testy@g54:~> rm ~/.y2log 
testy@g54:~> rpm -qf /usr/bin/online_update 
yast2-packagemanager-2.13.13-2
testy@g54:~> /usr/bin/online_update -k -s
Fehler bei der Server-Anfrage: ERROR(You:Fehler beim Holen der YOU-Server-Datei.)
testy@g54:~> grep -i url ~/.y2log 
2005-12-21 12:40:09 <1> d54(11257) [packagemanager++] PMYouProduct.cc(PMYouProduct):67 YouUrl: 
2005-12-21 12:40:09 <1> d54(11257) [packagemanager++] PMYouServers.cc(requestServers):404 url: 'http%2F%2Fwww.suse.de%2Fcgi-bin%2Fsuseservers.cgi%26product=SUSE%20LINUX%3Fversion=10.0.42%3Fbasearch=i386%3Farch=i686%3Flang=de%3Fbusiness=0%3Fcheck=1%3Fdistproduct=SUSE-Linux-CD-OSS-i386-10.0.42-Alpha4%3Fsuse-release=SUSE%20LINUX%2010.0.42%20(i586)%20OSS%20Alpha4%3Fyast2-online-update=2.13.2-2%3Fyast2-packagemanager=2.13.13-2%3Fliby2util=2.13.3-3%3Ftimezone=Europe%2FBerlin%3Fmachid=e33b8c6c7f59defafc'
2005-12-21 12:40:09 <3> d54(11257) [mediaaccess] MediaAccess.cc(open):71 ERROR(Media:invalid URL) opening ://
testy@g54:~> 
Comment 6 Juergen Weigert 2005-12-21 18:28:31 UTC
Created attachment 61574 [details]
patch to correct url-escaping

2.13.13 fixes something else. 
We need to escapeURL() each element seperatly. A global escapeURL destroys the syntactic elements '://' and '/', '?' and '&'.
Comment 7 Klaus Kämpf 2005-12-22 08:33:08 UTC
Applied, thanks !

2.13.14 -> stable
Comment 8 Juergen Weigert 2005-12-22 13:46:26 UTC
*** Bug 140744 has been marked as a duplicate of this bug. ***