Mailinglist Archive: zypp-devel (47 mails)
| < Previous | Next > |
Re: [zypp-devel] zypper bad design issues
- From: Duncan Mac-Vicar Prett <dmacvicar@xxxxxxx>
- Date: Thu, 28 May 2009 12:29:57 +0200
- Message-id: <4A1E67A5.6030405@xxxxxxx>
Volker Kuhlmann wrote:
You are confused, as the repo file includes the alias. That is the sole
purpose of a .repo file, it has the alias, url and other settings
together in one file.
name is just a description. What do you expect here?, that it takes all
information from the .repo file _except_ the alias you are giving to it?
The .repo file already includes the alias.
name == description, alias is what you expect from a short name. Blame
the yum guys for their taste on naming (that is why you also find tags
named_like_this and others named-like-this). We try to be compatible
instead of inventing yet more names.
So a example of "name" is : "openSUSE 11.1 repo"
An example of alias is: "opensuse11"
However, there is no real restriction on what the alias can contains, it
will just be hard to type if it is too complex, as it is supposed to be
an uniqueid to be given for operations.
That is the alias. And I can see it. It also shows the numbers, which
you can also use. Be careful that numbers change once you add and remove
repos, at is the ordering number.
5 | home_dmacvicar_ruby | dmacvicar ruby packages
(openSUSE_Factory) | Yes | No
again, name == description in this case. alias == what you expect as a name.
If you are editing the files yourself, you should know the concepts,
they are pretty standard among smart, yum and zypper. I do agree the
name and alias thing is confusing, but using different names would it
make even more confusing, and bad taste for naming is something you find
almost everywhere in the Linux world, and the usual solution is to
invent a new name. Hey we just came from renaming sources, catalogs and
channels to repositories only because it looks like its the most used
word right now.
--
Duncan Mac-Vicar P. - Engineering Manager, YaST
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
I've forever been confused by the bad repo management design in zypper
with regards to handling of repo name, alias, and description, and
adding/modifying repos.
2) zypper ar -h
addrepo (ar) [options] <URI> <alias>
addrepo (ar) [options] <FILE.repo>
The second version is missing the <alias> specification.
You are confused, as the repo file includes the alias. That is the sole
purpose of a .repo file, it has the alias, url and other settings
together in one file.
3) zypper ar URL://someplace.repo aliasstring
puts aliasstring int othe alias (good) but destroys the name (very bad).
The result is useless unless I am careful with the choce of aliasstring,
and in any case havong identical strings for name and alias is pointless
(ditch one of them altogether).
name is just a description. What do you expect here?, that it takes all
information from the .repo file _except_ the alias you are giving to it?
The .repo file already includes the alias.
4) There is no repo description, but there is a useless name/alias
scheme. I suggest to dump the alias in favour of name, and to use what
is the name as description.
name == description, alias is what you expect from a short name. Blame
the yum guys for their taste on naming (that is why you also find tags
named_like_this and others named-like-this). We try to be compatible
instead of inventing yet more names.
So a example of "name" is : "openSUSE 11.1 repo"
An example of alias is: "opensuse11"
However, there is no real restriction on what the alias can contains, it
will just be hard to type if it is too complex, as it is supposed to be
an uniqueid to be given for operations.
5) zypper lr needs to show some useable short name which can easily be
copy/pasted and used(pasted) on the command line, and some informative
description.
That is the alias. And I can see it. It also shows the numbers, which
you can also use. Be careful that numbers change once you add and remove
repos, at is the ordering number.
5 | home_dmacvicar_ruby | dmacvicar ruby packages
(openSUSE_Factory) | Yes | No
6) Adding the repos offered by yast results in a meaningless alias
("repo_somenumber") and an informative description in the name field (of
zypper lr) which is however unusable as a name.
again, name == description in this case. alias == what you expect as a name.
It makes for a frustrating repo management experience :(
If you are editing the files yourself, you should know the concepts,
they are pretty standard among smart, yum and zypper. I do agree the
name and alias thing is confusing, but using different names would it
make even more confusing, and bad taste for naming is something you find
almost everywhere in the Linux world, and the usual solution is to
invent a new name. Hey we just came from renaming sources, catalogs and
channels to repositories only because it looks like its the most used
word right now.
--
Duncan Mac-Vicar P. - Engineering Manager, YaST
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
| < Previous | Next > |