Bugzilla – Bug 157453
rug with local yum repository: download failed
Last modified: 2006-06-19 14:07:18 UTC
I am failing to use rug in Beta 7: with a repository on a local file system, I get the below result. With a repository over http, I run into ``Download failed: Download failed: (http://w3.suse.de/~agruen/foo) The request timed out'': $ cd /var/tmp $ mkdir -p foo/dir $ cd foo $ cp /mounts/dist/install/SLP/SUSE-10.1-Beta7/i386/CD1/suse/i586/novfs-kmp-default-1.2.0_2.6.16_rc5_git9_2-7.i586.rpm dir/ $ createrepo . $ rug service-add --type=yum file:///var/tmp/foo $ rug subscribe foo $ rug search novfs-kmp-default S | Catalog | Bundle | Name | Version | Arch --+---------+--------+-------------------+---------------------------+----- | foo | | novfs-kmp-default | 1.2.0_2.6.16_rc5_git9_2-7 | i586 $ rug install novfs-kmp-default Resolving Dependencies... The following packages will be installed: novfs-kmp-default 1.2.0_2.6.16_rc5_git9_2-7 (file:///var/tmp/foo) Downloading Packages... 0% Download failed: Download failed: (file:///var/tmp/foo) File not found: /var/tmp/foo ====================================================== $ rug service-delete foo $ rug service-add http://w3.suse.de/~agruen/foo foo $ rug subscribe foo $ rug install novfs-kmp-default Resolving Dependencies... The following packages will be installed: novfs-kmp-default 1.2.0_2.6.16_rc5_git9_2-7 (http://w3.suse.de/~agruen/foo) Downloading Packages... 0% Download failed: Download failed: (http://w3.suse.de/~agruen/foo) The request timed out
It might be already fixed, but I'm not sure. There was another bug where zypp helper set the 'local', 'package_filename' and 'package_url' incorrectly. It was a bug about not been able to install local packages, which is related, but not necessary the same code path. So, in this case, parse-metadata should set local=1, package_url=null, package_filename=/path/to/file --> Klaus
This was fixed in rev 2508 (2006-03-16)
Well, download is working now for an http:// service, but I can't get the service-add to work with a YUM service and file:// URI. It complains that it's an invalid URI scheme. I can't see a reason to explicitly exclude file:// URI's, so that may be worth revisiting at some point. Downloads work, so I'm verifying the bug.
IIRC, file: does not allow a hostname, so use file:/foo/bar/baz (single slash after colon). Marius, maybe you can add some comment here ?!
The "file" scheme in the Url allows hostname, but the MediaDIR still rejects it. We can disable/remove this check (ctor in MediaDIR.cc): MIL << "MediaDIR::MediaDIR(" << url_r << ")" << endl; +#if 0 if( !url_r.getHost().empty()) { ZYPP_THROW(MediaBadUrlException(url_r, "Hostname not allowed in the Url" )); } +#endif } Should I do it?
Ahm... There is also a differece between "dir" and "file" zypp::Url scheme - "dir" does not allow a hostname. This would need a change as well.
Created attachment 90228 [details] Patch needed to allow a hostname in "dir" and "file" url's