[zypp-devel] How to add multiple baseurl=URIs to zypper repo from command line?
if i create a zypper repo from command line, zypper ar -t rpm-md http://my/repo/uri/ "TEST" zypper mr -e -r -p 10 -n "TEST" "TEST" that generates, as expected, cat /etc/zypp/repos.d/TEST.repo [TEST] name=TEST enabled=1 autorefresh=1 baseurl=http://my/repo/uri/ type=rpm-md priority=10 keeppackages=0 i can manually edit/add a 2nd repo, baseurl=http://my/repo/uri/ + baseurl=http://my/repo/uri2/ and zypper will failover to the 2nd repo if the 1st is unavailable, etc. how does one add additional baseurl=URIs from the command line? -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
PGNet wrote:
if i create a zypper repo from command line,
zypper ar -t rpm-md http://my/repo/uri/ "TEST" zypper mr -e -r -p 10 -n "TEST" "TEST"
that generates, as expected,
cat /etc/zypp/repos.d/TEST.repo [TEST] name=TEST enabled=1 autorefresh=1 baseurl=http://my/repo/uri/ type=rpm-md priority=10 keeppackages=0
i can manually edit/add a 2nd repo,
baseurl=http://my/repo/uri/ + baseurl=http://my/repo/uri2/
and zypper will failover to the 2nd repo if the 1st is unavailable, etc.
how does one add additional baseurl=URIs from the command line?
You can't Duncan -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
ok. https://bugzilla.novell.com/show_bug.cgi?id=472517 thanks. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
PGNet wrote:
ok.
https://bugzilla.novell.com/show_bug.cgi?id=472517
thanks.
Does the multiple url stuff really works? I have never tested it, it has never been an official feature. I was thinking that we may enhance it by using Url::downloads() and skip urls based on network status. Duncan -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Does the multiple url stuff really works? I have never tested it, it has never been an official feature.
I was thinking that we may enhance it by using Url::downloads() and skip urls based on network status.
"really work". good question ... well, i'd had a repeatedly failing repo this morning, and added a second baseurl. it then worked. what i did NOT check, is whether it actually failed-over. checking with, cat OS11-update.repo [OS11-update] name=OS11-update enabled=1 autorefresh=1 baseurl=http://suse.mirrors.tds.net/pub/opensuse/update/11.1X baseurl=ftp://suse.mirrors.tds.net/pub/opensuse/update/11.1 type=rpm-md priority=30 keeppackages=0 the 1st URI should fail ... zypper clean OS11-update Specified repositories have been cleaned up. zypper -vvvvv ref OS11-update Verbosity: 5 Non-option program arguments: 'OS11-update' Initializing Target Specified repositories: OS11-update Checking whether to refresh metadata for OS11-update Retrieving: ftp://suse.mirrors.tds.net/pub/opensuse/update/11.1/repodata/repomd.xml [done] Repository 'OS11-update' is up to date. Specified repositories have been refreshed. if i s/11.1X/11.1/g, then, zypper clean OS11-update zypper -vvvvv ref OS11-update i get the same, zypper -vvvvv ref OS11-update Verbosity: 5 Non-option program arguments: 'OS11-update' Initializing Target Specified repositories: OS11-update Checking whether to refresh metadata for OS11-update Retrieving: ftp://suse.mirrors.tds.net/pub/opensuse/update/11.1/repodata/repomd.xml [done (714 B/s)] Repository 'OS11-update' is up to date. Specified repositories have been refreshed. so, it looks like the answer to your question is, "no". and i've been just lucky :-/ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
PGNet wrote:
Does the multiple url stuff really works? I have never tested it, it has never been an official feature.
I was thinking that we may enhance it by using Url::downloads() and skip urls based on network status.
"really work". good question ...
well, i'd had a repeatedly failing repo this morning, and added a second baseurl.
it then worked.
what i did NOT check, is whether it actually failed-over.
checking with, ... so, it looks like the answer to your question is, "no".
and i've been just lucky :-/
Hi, I can't see any possibility for multiple baseurl entries in .repo file (or any other entry) in the documentation: http://en.opensuse.org/Standards/RepoInfo It seems you were lucky to add the "working" URL as the "last" one, which indicates the .repo file parser in libzypp runs through the file line by line and uses the last entry (guessing). Bye Lukas -- Lukas Ocilka, YaST Developer (xn--luk-gla45d) ----------------------------------------------------------------- Ano, ano. Moudry rozkaz. Sam jsem nemel v tech gratulacich jasno.
Lukas Ocilka wrote:
I can't see any possibility for multiple baseurl entries in .repo file (or any other entry) in the documentation: http://en.opensuse.org/Standards/RepoInfo
Well, the first guys implementing the "standard" (yum) do actually support multiple urls. libzypp supports it code-wise, but it is not a feature, mainly because the behavior is undefined: from yum man page: *baseurl* Must be a URL to the directory where the yum repository's 'repodata' directory lives. Can be an http://, ftp:// or file:// URL. You can specify multiple URLs in one baseurl statement. The best way to do this is like this: [repositoryid] name=Some name for this repository baseurl=url://server1/path/to/repository/ url://server2/path/to/repository/ url://server3/path/to/repository/ If you list more than one baseurl= statement in a repository you will find yum will ignore the earlier ones and probably act bizarrely. Don't do this, you've been warned. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Duncan Mac-Vicar Prett wrote:
Lukas Ocilka wrote:
I can't see any possibility for multiple baseurl entries in .repo file (or any other entry) in the documentation: http://en.opensuse.org/Standards/RepoInfo
Well, the first guys implementing the "standard" (yum) do actually support multiple urls. libzypp supports it code-wise, but it is not a feature, mainly because the behavior is undefined:
from yum man page:
*baseurl* Must be a URL to the directory where the yum repository's 'repodata' directory lives. Can be an http://, ftp:// or file:// URL. You can specify multiple URLs in one baseurl statement. The best way to do this is like this: [repositoryid] name=Some name for this repository baseurl=url://server1/path/to/repository/ url://server2/path/to/repository/ url://server3/path/to/repository/
If you list more than one baseurl= statement in a repository you will find yum will ignore the earlier ones and probably act bizarrely. Don't do this, you've been warned.
eh. So do we do: baseurl=url://server1/path/to/repository/ url://server2/path/to/repository/ or baseurl=url://server1/path/to/repository/ baseurl=url://server2/path/to/repository/ I guess the former, according to the yum help. That means fixing in libzypp's RepoFileReader, IIRC? - -- cheers, jano Ján Kupec YaST team - ---------------------------------------------------------(PGP)--- Key ID: 637EE901 Fingerprint: 93B9 C79B 2D20 51C3 800B E09B 8048 46A6 637E E901 - ---------------------------------------------------------(IRC)--- Server: irc.freenode.net Nick: jniq Channels: #zypp #yast #suse #susecz - ---------------------------------------------------------(EOF)--- -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkmK8ocACgkQgEhGpmN+6QFvMACZAbeXKB4rhmJmwxGbY7eZ3B9o YOsAnRAc6Fue5h+hFRjjdLAVFE722zir =LH/m -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Thu, Feb 05, 2009 at 03:07:03PM +0100, Jan Kupec wrote:
Duncan Mac-Vicar Prett wrote:
Lukas Ocilka wrote:
I can't see any possibility for multiple baseurl entries in .repo file (or any other entry) in the documentation: http://en.opensuse.org/Standards/RepoInfo
Well, the first guys implementing the "standard" (yum) do actually support multiple urls. libzypp supports it code-wise, but it is not a feature, mainly because the behavior is undefined:
from yum man page:
*baseurl* Must be a URL to the directory where the yum repository's 'repodata' directory lives. Can be an http://, ftp:// or file:// URL. You can specify multiple URLs in one baseurl statement. The best way to do this is like this: [repositoryid] name=Some name for this repository baseurl=url://server1/path/to/repository/ url://server2/path/to/repository/ url://server3/path/to/repository/
If you list more than one baseurl= statement in a repository you will find yum will ignore the earlier ones and probably act bizarrely. Don't do this, you've been warned.
eh. So do we do:
baseurl=url://server1/path/to/repository/ url://server2/path/to/repository/
or
baseurl=url://server1/path/to/repository/ baseurl=url://server2/path/to/repository/
I guess the former, according to the yum help. That means fixing in libzypp's RepoFileReader, IIRC?
I can confirm that the former works with yum. I do use baseurl=http://hostname1/... http://hostname2/... ^ spaces on servers that share a common repo file with a list of repositories, but where some of the hosts can only reach hostname1 and other hosts can only reach hostname2. (Restrictions inherent to network setup make it impossible to use the same URL on all servers, but this way I still can share an exact copy of the repo file on all of them.) It would be nice if this works in libzypp as well. Peter -- "WARNING: This bug is visible to non-employees. Please be respectful!" SUSE LINUX Products GmbH Research & Development
Jan Kupec wrote:
eh. So do we do:
baseurl=url://server1/path/to/repository/ url://server2/path/to/repository/
or
baseurl=url://server1/path/to/repository/ baseurl=url://server2/path/to/repository/
I guess the former, according to the yum help. That means fixing in libzypp's RepoFileReader, IIRC?
I'm afraid that an undefined behavior cannot be "fixed" in Libzypp unless it is defined in yum. Push upstream (yum) to define that and fix accordingly, don't define your own incompatible way unless needed. L.
Lukas Ocilka wrote:
I'm afraid that an undefined behavior cannot be "fixed" in Libzypp unless it is defined in yum.
Push upstream (yum) to define that and fix accordingly, don't define your own incompatible way unless needed.
L.
I think robustness on the network side can be achieved much better with the aria2 way. However 2 ideas come to my mind. - make possible to open a media with multiple urls, and if the backend allows (like aria) we can pass all them. - the multiple urls seem useful for having a CD and http repo at the same time. If network is down, you use CD, if you dont have the CD loaded, you use network. Duncan -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Thu, Feb 05, 2009 at 03:29:17PM +0100, Duncan Mac-Vicar Prett wrote:
Lukas Ocilka wrote:
I'm afraid that an undefined behavior cannot be "fixed" in Libzypp unless it is defined in yum.
Push upstream (yum) to define that and fix accordingly, don't define your own incompatible way unless needed.
L.
I think robustness on the network side can be achieved much better with the aria2 way.
However 2 ideas come to my mind. - make possible to open a media with multiple urls, and if the backend allows (like aria) we can pass all them. - the multiple urls seem useful for having a CD and http repo at the same time. If network is down, you use CD, if you dont have the CD loaded, you use network.
I think what I just described in my other mail is another valid usecase. (Although it is really an edge case.) The aria2 way helps where the download server serves metalinks, but it doesn't help for 3rd party repositories which just runs an ordinary Apache. So fallback URLs can be useful sometimes. Of course, otherwise I agree that in most cases that concern openSUSE the aria2 way is all that's needed. Peter -- "WARNING: This bug is visible to non-employees. Please be respectful!" SUSE LINUX Products GmbH Research & Development
participants (5)
-
Duncan Mac-Vicar Prett
-
Jan Kupec
-
Lukas Ocilka
-
Peter Poeml
-
PGNet