[prev in list] [next in list] [prev in thread] [next in thread]
List: rpm-devel
Subject: Re: Permitting patterns as rpm CLI arguments
From: Jeff Johnson <n3npq () mac ! com>
Date: 2009-12-04 22:35:12
Message-ID: 00AB6D27-8510-4323-9BC6-8C97529EBED1 () mac ! com
[Download RAW message or body]
On Dec 4, 2009, at 1:33 PM, Jeff Johnson wrote:
>
> Well the deed is largely done:
>
And now the patterns are applied to the RPMTAG_NVRA index:
$ /usr/bin/time rpm -q perl-5.10.0-82.fc11.i586
perl-5.10.0-82.fc11.i586
0.01user 0.05system 0:00.23elapsed 28%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+3347minor)pagefaults 0swaps
$ /usr/bin/time rpm -q perl-5.10.0-82.fc11
perl-5.10.0-82.fc11.i586
0.03user 0.06system 0:00.22elapsed 41%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+3336minor)pagefaults 0swaps
$ /usr/bin/time rpm -q perl-5.10.0
perl-5.10.0-82.fc11.i586
0.02user 0.05system 0:00.21elapsed 36%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+3331minor)pagefaults 0swaps
$ /usr/bin/time rpm -q perl
perl-5.10.0-82.fc11.i586
0.02user 0.06system 0:00.22elapsed 41%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+3337minor)pagefaults 0swaps
I've used this pattern, which matches full subfields at N-V-R.A boundaries:
if (_post == NULL) _post = "(-[^-]+-[^-]+|-[^-]+|)\\.[^.]+$";
because that is the traditional behavior.
But the N-V-R.A boundary restriction could be relaxed in the default.
Meanwhile, you can always write your own patterns with '^' and/or '$' anchors,
so I'm not sure its worth fussing about Newer! Better! Bestest!
73 de Jeff
______________________________________________________________________
RPM Package Manager http://rpm5.org
Developer Communication List rpm-devel@rpm5.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic