Bug 449989 - yum-versionlock doesn't work against package obsoletes?
yum-versionlock doesn't work against package obsoletes?
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-utils (Show other bugs)
5.2
All Linux
low Severity low
: rc
: ---
Assigned To: James Antill
Jan Hutař
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-04 12:33 EDT by James Ralston
Modified: 2009-01-20 17:05 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 17:05:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Ralston 2008-06-04 12:33:32 EDT
I'm trying to work around bug 448772 using yum-versionlock.

$ repoquery --quiet --envra --pkgnarrow=installed '*mstflint*' '*perftest*'
'*tvflash*' 'yum*' | sort
0:openib-mstflint-1.2-6.el5_1.1.x86_64
0:openib-perftest-1.2-6.el5_1.1.x86_64
0:openib-tvflash-0.9.2-6.el5_1.1.x86_64
0:yum-3.2.8-9.el5_2.1.noarch
0:yum-metadata-parser-1.1.2-2.el5.x86_64
0:yum-rhn-plugin-0.5.3-6.el5_2.6.noarch
0:yum-skip-broken-1.1.10-9.el5.noarch
0:yum-utils-1.1.10-9.el5.noarch
0:yum-versionlock-1.1.10-9.el5.noarch
1:yum-updatesd-0.9-2.el5.noarch

$ cat /etc/yum/pluginconf.d/versionlock.conf 
[main]
enabled = 1
locklist = /etc/yum/pluginconf.d/versionlock.list

$ cat /etc/yum/pluginconf.d/versionlock.list
0:openib-mstflint-1.2-6.el5_1.1.x86_64
0:openib-perftest-1.2-6.el5_1.1.x86_64
0:openib-tvflash-0.9.2-6.el5_1.1.x86_64

But:

$ yum update
Loading "versionlock" plugin
Loading "rhnplugin" plugin
Loading "skip-broken" plugin
This system is not registered with RHN.
RHN support will be disabled.
Reading version lock configuration
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package mstflint.x86_64 0:1.3-1.el5 set to be updated
---> Package tvflash.x86_64 0:0.9.0-2.el5 set to be updated
---> Package perftest.x86_64 0:1.2-10.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
 mstflint                x86_64     1.3-1.el5        rhel              162 k
     replacing  openib-mstflint.x86_64 1.2-6.el5_1.1

 perftest                x86_64     1.2-10.el5       rhel               72 k
     replacing  openib-perftest.x86_64 1.2-6.el5_1.1

 tvflash                 x86_64     0.9.0-2.el5      rhel               42 k
     replacing  openib-tvflash.x86_64 0.9.2-6.el5_1.1


Transaction Summary
=============================================================================
Install      3 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 276 k
Is this ok [y/N]: n
Exiting on user Command
Complete!

It would appear that versionlock is ineffective against package obsoletes.

I don't know if this is a bug or a limitation of the control that versionlock
has, but if it's in any way possible, versionlock should override EVERYTHING,
include explicit packages obsoletes.
Comment 1 Tuomo Soini 2008-06-04 13:30:33 EDT
# /etc/yum/pluginconf.d/versionlock.list
#
# List of pacakge versions you want to lock
#
# Format: NAME-VERSION-RELEASE, same as outpuf of
# rpm -qa --qf '%{name}-%{version}-%{release}\n'
Comment 2 James Antill 2008-06-04 14:22:50 EDT
 It's mostly a limitation, the way versionlock works is that it finds all the
available packages matching your "versionlocked name" and then excludes all the
ones with a different version.

 Looking for obsoletes against the name, and then excluding those, would solve
this problem.

 As a workaround you should be able to exclude the obsoleting package.
Comment 3 RHEL Product and Program Management 2008-06-04 18:43:34 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 4 James Ralston 2008-06-05 11:53:55 EDT
Ah... yum-versionlock is more like a yum-neverupdate, then.

While I can --exclude the obsoleting packages if I run yum by hand, the main
problem I am trying to solve is yum-updatesd's continual yammering.

(There's a certain irony here: RHEL 5.2 provided a much-improved yum-updatesd
(one that can actually send notifications for us now, because it no longer
requires localhost to run an SMTP server on port 25), but thanks to the circular
obsoletes chain, I'm about to turn it off again.)

If it wouldn't be a huge performance hit, I think versionlock should also look
for obsoletes against the listed packages, and exclude any packages that
obsolete the listed packages.  I think this behavior is more in line with user
expectations...
Comment 6 James Antill 2008-07-16 11:03:47 EDT
 You know you can put "exclude=blah" in your yum.conf? ... yum-updatesd will
respect that too.
Comment 7 James Antill 2008-07-28 00:44:10 EDT
 I think the latest upstream versionlock should fix this now (it has a
follow_obsoletes option) ... can you try that?

http://devel.linux.duke.edu/gitweb/?p=yum-utils.git;a=commit;h=b280cc1e1d5874d91c117549ec741f7fed9a1232
Comment 8 RHEL Product and Program Management 2008-07-28 00:50:53 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 9 James Ralston 2008-08-07 15:32:04 EDT
Is the latest upstream yum-versionlock packaged anywhere?

The latest in Rawhide is yum-versionlock-1.1.14-4.fc10, from 2008-05-29.  The diff in comment 7 looks like it needs something pretty close to upstream to apply...
Comment 28 errata-xmlrpc 2009-01-20 17:05:56 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0227.html

Note You need to log in before you can comment on or make changes to this bug.