On Fri, Sep 21, 2007 at 09:51:42AM +0200, Nagy Gabor wrote:
The options that Dan originally suggested would still work though. But in this case, I would prefer them more symetrical, that is :
-S and -R look for packages first, and then fallback on groups. -Sg and -Rg only look for groups.
Yes, that assymetric -R and -S was even worse ;-) But I still prefer the deterministic way.
But if 90 % of the users would find this confusing, well...
Secondly, I began working a bit on this, and I have other questions.
1) -S looks for packages first, then fallbacks on groups. But there is actually a second fallback if group isn't found : providers. But I already saw an user once on IRC who was confused by this behavior : "why the hell isn't pacman installing what I asked it to?"
Yes, I don't keep this behaviour in my mind neither. This is rarely used imho, because if I know what I want to install then I use the correct package name; and -Ss also lists package names only.
-Ss also search for providers. Try pacman -Ss cdrtools , and then pacman -Ss ^cdrtools$ .
But personally, I think it's a neat feature. eg you can "pacman -S cdrtools" because you only remember that name, and don't know it has been replaced by cdrkit. And pacman will automatically pull cdrkit, since cdrtools doesn't exist but is providen by cdrkit.
I would prefer a confirmation message like "cdrtools package is not found. However cdrkit package provides it. Do you want to install cdrkit? [Y/n]"
But providers can also be used in a symmetric way: As I know, in frugalware repos there is no package named mta, but there are packages which provide mta. So user may want to do a "pacman -S mta" and pacman will choose a provider (~undeterministic). mta provision was introduced as a depend satisfier, so this can be helpful, if user did a "pacman -U darcs...tar.gz" and he got "unsatisfied dependencies: mta", and he want to resolve this by hand (using your famous --asdeps option ;-).
--asdeps is from Dan btw :) : http://projects.archlinux.org/git/?p=pacman.git;a=commit;h=a1e57cbec8209b64e... About providers, pacman choosing the first provider is really a problem. See the recent bug report : http://bugs.archlinux.org/task/8075
During I wrote this paragraph, I started to like the category idea: http://bugs.archlinux.org/task/7132 I start to understand the differences between groups and categories: Groups is designed to install a set of packages, categories is desinged to install few packages from that. So category may contain conflicting packages (imagine mta category here). However, I still prefer using groups as categories. But I can't imagine how we could do "pacman -Sg mta" with the current fronted: it's annoying that if the group has 100 members, I must answer to 100 questions, if I don't want to install the whole group/category. This method would be much better (but harder to implement): media group has the following members: 1-xmms, 2-audacious, 3-bmp, 4-moc ... Which packages do you want to install? 2,4 [or I could answer A (all)].
That would help solving the multive providers problem as well.