On Tue, 3 Jul 2007, Florian Festi wrote:
Frédéric PICA wrote:
Greets,
I saw versionlock not locking a package, I'm using the latest versionlock
with the yum provided in RHEL5
The package not locked is gnupg:
#rpm -q gnupg
gnupg-1.4.5-12
#rpm -q gnupg >> /etc/yum/pluginconf.d/locklist
I have modified version lock to be able to see what happens :
for pkg in locklist:
print pkg
print splitFilename("%s" % pkg)
(n, v, r, e, a) = splitFilename("%s" % pkg)
Here is what I get from yum :
Reading version lock configuration
gnupg-1.4.5-12
('gnupg-1.4.5-1', 'gnupg', '1.4', '', '5-12')
freetype-2.2.1-16.el5
('freetype', '2.2.1', '16', '', 'el5')
gnupg in not parsed correctly. Addind a point to the end of the package in
the locklist corrected the problem.
What's wrong with splitFilename ?? Is there a way to correct that ?
Package name have to be splitted correctly, a package name is like that
isn't it ? name-version-release.arch
rpm -q gnupg doesn't give you a file name
try rpm -q --qf "%{name}-%{version}-%{release}.%{arch}\n" gnupg
or put %_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch} in
your ~/.rpmmacros
Altough one could argue that splitFilename() could check for valid arch
names...
One could argue that versionlock should document the format it expects :)
The thing is, it expects ENVRA, not NEVRA format.
With repoquery that's easy, just use 'repoquery --envra' but with rpm
you'll need some more creativity:
rpm -qa --qf "%|epoch?{%{epoch}}:{0}|:%{name}-%{version}-%{release}.%{arch}\n"
- Panu -
_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel