Ticket #191 (new defect)

Opened 6 months ago

Last modified 5 months ago

parse_match doesn't handle wildcards in all atom aspects correctly/allow parsing wildcards to pmerge

Reported by: sputnick@… Owned by: masterdriverz
Priority: normal Milestone:
Component: pkgcore Version: 0.4.7.2
Keywords: Cc:

Description

I was trying to remove all packages of a given slot.

pmerge -C 'kde-base/*' works and wants to remove all KDE packages as expected pmerge -C 'kde-base/*:kde-4' should remove all KDE packages in the given slot, but that does not work.

Same for pmerge -C '*/*:kde-4', which I'd expect to remove all packages of the kde-4 slot.

Not using wildcards does not seem to work either; pmerge 'kde-base/kdm:kde-4' claims it's not finding a match, while emerge 'kde-base/kdm:kde-4' works fine.

Change History

comment:1 follow-up: ↓ 3 Changed 6 months ago by ferringb

  • milestone 0.4.7.3 deleted

pmerge 'kde-base/kdm:kde-4' works fine for me; suggest you look at the pquery --raw results for it, and --debug for pmerge.

Regarding the rest, originally disallowed '*' since enabling it for pmerge itself is rather fugly- you'll notice 'pmerge dev-util/*' isn't supported, nor is 'pmerge -C dev-util/*'.

Need a fairly good counter arg to enable that by default on the commandline, since it's pretty dangerous in most usage.

comment:2 Changed 6 months ago by sputnick@…

Hmm, regarding the slots issue, there might be something wrong with keywords/unmask instead. Need to re-check that.

Refering to wildcards, there should be some sane way to remove (or reinstall, upgrade, whatever) all packages of a given slot or matching a wildcarded specs. Maybe it is enough to teach pquery that, such that one can pipe its output into pmerge then if need be. A --slot option is definitely missing in pquery (or did I miss it?)... given the fact that I seem to be able to search for basically everything else, that should be added somehow, either as a wildcard or as a separate parameter...

comment:3 in reply to: ↑ 1 Changed 5 months ago by masterdriverz

  • owner set to masterdriverz
  • summary changed from pkgspec doesn't handle slots correctly to parse_match doesn't handle wildcards in all atom aspects correctly/allow parsing wildcards to pmerge

Replying to ferringb:

Need a fairly good counter arg to enable that by default on the commandline, since it's pretty dangerous in most usage.

It's also fairly useful. Example (actually happened), today, I decided I would only use a kernel installed from my kernel git checkout, so I wanted to uninstall all kernels installed from ebuilds. pmerge -C sys-kernel/* suits what I want to do perfectly. I don't see why it should be crippled because people do stupid things. Maybe if we pause and print a warning in big letters and beep a lot, we can enable it?

Regardless of whether it should be enabled or not, parse_match handles wildcards in slots/repoid wrong, and also 'cat/*:slot' wrong. This is a work in progress on my machine.

Note: See TracTickets for help on using tickets.