On Wed, Sep 03, Michael Matz wrote:
If I understand the code correctly I don't think this is a good idea. If the repofile doesn't have any entry for "distro_target" it will be skipped. I rather would think that this is supposed to mean "don't care".
Even _if_ it has a target-distro set (that's a new concept anyway, right?) why should we reject to use it? E.g. if it's completely self-contained (in the sense of only having external dependencies on, say, libc), like I would expect with some vendor repos, I can and want to use it on all distros.
Also, how is the name matched? Above it's a string comparison. But 11.1 and SLES11 will be roughly the same, for instance.
To me it sounds more a feature needlessly annoying users. What's the purpose of this?
Furthermore the location of this test in zypp/parser/RepoindexFileReader questionable. Parsing a file should not require an initialized target. Your code will throw e.g in installation mode because there is no target. You also restrict us to parse only matching repoinfos. That's %^&*(. Parsing a file is not the same as using a repo. This test is not a parsers job (->RepoManager). And the default action for repositories with unknown or not matching target distribution should probably be configurable. Why not asking the user, and if no user available, use a config default. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org