You are not logged in.

#1 2004-10-01 17:35:39

dcbdbis
Member
From: Aurora, Colorado
Registered: 2004-09-10
Posts: 247

Wildcards in Package names

Hello Folks,


Reviewed the man pages for pacman, and I don't see anything that jumps out at me.

Example... I'd like to be able to issue the following command:

pacman -Sy fortune-mod*

Suggestions?


Thanks!


Dave........................

Offline

#2 2004-10-01 18:46:29

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Re: Wildcards in Package names

dcbdbis wrote:

Example... I'd like to be able to issue the following command:

pacman -Sy fortune-mod*

Yeah. Good question.  I tried that out sometime ago, and it didn't work.  I don't believe pacman likes "globbing", which is strange because the arcade game loved "gobbling"...  In all seriousness, I'd would like to know too, since it would be nice to do so when upgrading a package set like XFCE-4 (with all the plugins and doodads).

Offline

#3 2004-10-01 19:36:21

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Wildcards in Package names

One note, I *think* dp will be releasing a fortune-mod-all package or something like this; it will be a group that installs all the fortunes.

Second note, pacman doesn't support globbing, but you should be able to write a shell script that did the trick using a combination of pacman -Ss, pacman -Su, grep, and awk. Or other tools you might prefer. wink

Third note, I thought somebody did write a script like this... wasn't that the script Xentac was supposed to write in 45 seconds?  hit forum search.

Dusty

Offline

#4 2004-10-01 19:47:47

luisfelipe
Member
Registered: 2004-05-06
Posts: 96

Re: Wildcards in Package names

The group you mentioned was already released. Just pacman -S fortune-mods
and it should install all the new fortune-mod's (apparently the old ones are not in
the group yet).

Just let me ask a newbie question :
wouldn't the shell kinda fuck up something like :
fortune -S fortune-mod*
???

I am pretty sure that the wildcards are treated by the shell, so if you were on a directory
that had two files called 'mamma' and 'pappa', the shell would try to run :
pacman -S fortune-modmamma pappa

Isn't it so ?

Offline

#5 2004-10-01 20:03:47

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Wildcards in Package names

pseudo script:

for pkg in `pacman -Ss fortune-mod | grep fortune-mod*`
   pacman -S $pkg
end

ok, this won't work exactly... the grep is there so I can yank out the descriptions... I'm not on a linux box, so I can't test it.... I'll monkey around at home... (damn i need to setup ssh on my home box...)

Offline

#6 2004-10-01 21:58:48

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: Wildcards in Package names

globbing support is on the todo list.

In the meantime...

# pacman -S `pacman -Ss fortune-mod | cut -d/ -f2 | grep ^fortune-mod | cut -d' ' -f1`

Offline

#7 2005-03-20 21:04:33

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: Wildcards in Package names

Is globbing support still on the todo list? wink I think this would be a very useful feature.


I am a gated community.

Offline

#8 2005-03-21 03:23:13

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Re: Wildcards in Package names

stonecrest wrote:

Is globbing support still on the todo list? wink I think this would be a very useful feature.

I don't know if it is, but I see problems with it's implementation.  Imagine using wildcards for the Open Office package or even perl.  Then, some people will complain, "damn...we need regular expression syntax now, so pacman can minimize the number of packages returned..."

In my XFCE example, "group" sets handle it perfectly.  Even `pacman -Sy gtk*` could be handled with a "group" definition I think.  If "group" doesn't handle that example, maybe a "supergroup" definition could.  It would pull in "gtk, gtk2, gtk-perl, gtk2-perl, etc."  That would be nice to have, but personally, I prefer the 'tedious' nature of individually selecting packages, so I can have greater control over what's installed, instead of removing wildcard packages later that I don't need.

Offline

#9 2005-03-21 04:36:02

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: Wildcards in Package names

skoal wrote:

but personally, I prefer the 'tedious' nature of individually selecting packages, so I can have greater control over what's installed, instead of removing wildcard packages later that I don't need.

And no one is forcing you to use it. tongue It's obviously not perfect in every situation, but it can only help, not hurt. You don't have to use it.

I came from Fedora to Arch and yum allows wildcard expressions. The first thing I did when I came to Arch was try a "pacman -S xfce4*". When that failed to work, I got annoyed and manually selected all the packages I needed. I'm sure I'm not the only one who has gone this path with Arch.

Yes, groups are a nicety (although not nearly as flexible as wildcards), but tell me how one is supposed to find out what groups exist? How is a new user supposed to know that there is a xfce4 group, for example? Trying "pacman -Ss xfce4" doesn't even tell me there's such a group.

As for your statement about implementation problems (i.e. OOo and perl), I don't follow. As I said, yum uses wildcards and I never had people complaining about its implementation of wildcards.

THat's just my lowly opinion, take it for what it's worth. And just to clarify, I bumped this thread back up because a user in #archlinux tried to use a wildcard, found out they couldn't, and didn't know what to do (i.e. didn't know there were groups).

P.S. skoal.. your latest post is much different than your previous post in this thread tongue


I am a gated community.

Offline

#10 2005-03-21 05:30:47

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Re: Wildcards in Package names

stonecrest wrote:

P.S. skoal.. your latest post is much different than your previous post in this thread tongue

Not at all.  I just learned how to use pacman effectively since my original post, and/or the 'group' feature was added to pacman/makepkg.

The point I was making is that 'group'ing of package sets resolved any need for me using 'globbing', like XFCE for example. 

What I'm trying to pry from you is a real world example of how a wildcard would be handy from our current package repos.  Pick any package 'glob' and compare that to the implementation of currently 'group'ing them instead. 

To answer your question about discovering 'groups', check the download sections.  It shows what 'group' any particular package belongs to.

Ideologically speaking, if there's 'more than one way to skin a cat', at what point does the cat just say, "shoot me already!"...

Offline

#11 2005-03-21 17:56:02

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: Wildcards in Package names

skoal wrote:

To answer your question about discovering 'groups', check the download sections.  It shows what 'group' any particular package belongs to.

Maybe this is the root of the problem then. When a user wants to install xfce4.2, for example, they are supposed to go to the website to see the listing of groups? Does this not sound a little.. unintuitive? Maybe the only thing that needs to be "fixed" is to make it more obvious within pacman that there are groups and how you can get a listing of them. To a new user, even seeing that packages are organized into groups on the website does not make it the least bit obvious that you can pacman -S these groups.


I am a gated community.

Offline

#12 2005-03-21 18:06:46

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Wildcards in Package names

To get a list of the groups:
pacman -Sg

Offline

#13 2005-03-21 22:35:10

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Re: Wildcards in Package names

stonecrest wrote:

To a new user, even seeing that packages are organized into groups on the website does not make it the least bit obvious that you can pacman -S these groups.

I'll buy that for a dollar.  I don't know how anyone new to any distro will get it right the first time though, unless you're oscar.  That guy's a genious.  His father was 'deep thought'.  42.  I had trouble with yum, pacman, etc the first time as well.  Just about once a week I see some guy having problems with the xfce4 install, and it usually is because he upgraded the packages individually, so your point is well taken.

Don't get me wrong stonecrest, wildcards could be handy, but I think it's messy in comparison with using 'groups'.  I guess my initial 'request' (if it could even be called that) has evolved over the months.  Maybe the powers that be are gradually phasing in more 'group' sets as they can.  By last count, I really only see 8 unique ones.

Offline

#14 2005-03-23 01:48:32

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: Wildcards in Package names

Snowman wrote:

To get a list of the groups:
pacman -Sg

Maybe I'm not being clear.  While that information is somewhat useful, it's still pretty hidden from the user. What I would like to see is that when you download a package that is within one of these groups, say xfce4-panel, it tells the user "hey, this is part of a xfce4 group - you might want to check that out". That would be ideal to me. This way, if I'm a new user who doesn't know about groups or I just didn't think to check if there's a group already, pacman will tell me when I start to manually grab some packages.

Skoal, I hear you.. I'm starting to agree that wildcards might not be so hot after all and I'm going to rescind my request for it wink But I still think more should be done to make it obvious that such groups exist, and my suggestion above would hopefully accomplish this. There might be other nice ways to handle this as well, but it's what first came to mind.


I am a gated community.

Offline

#15 2005-03-23 03:45:04

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Wildcards in Package names

stonecrest wrote:
Snowman wrote:

To get a list of the groups:
pacman -Sg

Maybe I'm not being clear.  While that information is somewhat useful, it's still pretty hidden from the user. What I would like to see is that when you download a package that is within one of these groups, say xfce4-panel, it tells the user "hey, this is part of a xfce4 group - you might want to check that out". That would be ideal to me. This way, if I'm a new user who doesn't know about groups or I just didn't think to check if there's a group already, pacman will tell me when I start to manually grab some packages.

I agree with that.  This could be easily implemented.  Some packages already show a message "If you want functionality X, install package Y".

Offline

#16 2012-03-12 07:23:50

technolog
Member
From: Europe / Slovenia / Grosuplje
Registered: 2012-01-28
Posts: 117

Re: Wildcards in Package names

What is up with this?

Offline

#17 2012-03-12 08:04:56

Blµb
Member
Registered: 2008-02-10
Posts: 224

Re: Wildcards in Package names

apeiro wrote:

globbing support is on the todo list.

In the meantime...

# pacman -S `pacman -Ss fortune-mod | cut -d/ -f2 | grep ^fortune-mod | cut -d' ' -f1`

/me wonders if the `` part's cuts aren't doing the same as adding -q ...
pacman -Ssq fortune-mod

I get the same output...

also works for -Q of course, I frequently use pacman -S `pacman -Qqu |grep ...` (or without the grep since -Su screws up some replacements I have installed)


You know you're paranoid when you start thinking random letters while typing a password.
A good post about vim
Python has no multithreading.

Offline

#18 2012-03-12 08:21:40

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: Wildcards in Package names

technolog, Blµb , you noticed how really ancient this thread ist? Please do not necro-bump.

Closing.


To know or not to know ...
... the questions remain forever.

Offline

Board footer

Powered by FluxBB