[Yum-devel] Patch for yum-versionlock.1 man page

Gerhardus Geldenhuis gerhardus.geldenhuis at gmail.com
Wed Dec 30 17:59:03 UTC 2009


On Wed, Dec 30, 2009 at 4:29 AM, James Antill <james at fedoraproject.org> wrote:
>
>  You have write access to your git instance, you can then use either
> "git show" or "git format-patch" to send patches to the list.
>
>>
>> The  default  place to put package version lock information (one
>> package and version per. line)
>>
>> reading it implies that you can have multiple entries for a single
>> package with different versions...  does it need clarification or can
>> you indeed have multiple versions of the same package in the lock
>> list. If so I do not understand the "use case" and would like to
>> clarify it further in the documentation or remove ambiguity. Would
>> greatly appreciate any clarifications.
>
>  Yes, you can "lock" to multiple versions.
>  This only seems weird if you think about "versionlock" as locking the
> package in the rpmdb from changing ... which is a natural assumption,
> and often how the plugin is used, but not quiet what it does. The plugin
> actually "locks" the versions of a package yum can see from it's
> repositories.

That unfortunately confuses me more... I thought I understood it and
then I tried an experiment...

I created a local repo with the following packages:
gerrard-first-1.0-1.noarch : Toets rpm vir myself
gerrard-first-1.0-2.noarch : Toets rpm vir myself
gerrard-first-1.0-3.noarch : Toets rpm vir myself
gerrard-first-1.0-4.noarch : Toets rpm vir myself
gerrard-first-1.1-4.noarch : Toets rpm vir myself
gerrard-first-2.1-0.noarch : Toets rpm vir myself

After reading your reply I thought that versionlock could be described
as a "list limiter" in other words if I have the following packages in
versionlock.list
0:gerrard-first-2.1-0
0:gerrard-first-1.1-4

then only those packages will show when I do a yum search gerrard
--showduplicates

That is not the case and I still get a full listing.

I have tested this on Centos 5.4 with the
yum-versionlock-1.1.16-13.el5.centos plugin
I also manually installed the latest versionlock plugin as detailed in
the FAQ but  I get errors when doing any yum operation then...
When I rewrote the FAQ I could lock files using the latest pluging
without errors so maybe my "basic" package is a bit buggy... if fact I
did some more testing(while writing email) and versionlock does not
behave as expected with my package.

Is there a test package/test repo that I can use for
testing/experiments? I scanned through the git trees and could not see
anything obviously named.

The error I get is:
[root at localhost yum-plugins]# yum versionlock gerrard-first-2.1-0.noarch
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
 * addons: mirror.bytemark.co.uk
 * base: mirror.bytemark.co.uk
 * extras: mirror.bytemark.co.uk
 * updates: mirror.bytemark.co.uk
Adding versionlock on: 0:gerrard-first-2.1-0
versionlock added: 1
[root at localhost yum-plugins]# yum search gerrard
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
 * addons: mirror.as29550.net
 * base: mirror.as29550.net
 * extras: mirror.as29550.net
 * updates: mirror.as29550.net
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 178, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 349, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self,
self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 626, in doCommand
    return base.search(extcmds)
  File "/usr/share/yum-cli/cli.py", line 799, in search
    for (po, keys, matched_value) in matching:
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 1813,
in searchGenerator
    for sack in self.pkgSack.sacks.values():
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 661, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 515,
in _getSacks
    self.plugins.run('exclude')
  File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 179, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/versionlock.py", line 186, in exclude_hook
    ape = conduit._base.pkgSack.addPackageExcluder
AttributeError: 'MetaSack' object has no attribute 'addPackageExcluder'

Regards

-- 
Gerhardus Geldenhuis


More information about the Yum-devel mailing list