Bug 706532 - product-id plugin appears to delete the "other" product certs when using the yum --disablerepo=* option
Summary: product-id plugin appears to delete the "other" product certs when using the ...
Keywords:
Status: CLOSED DUPLICATE of bug 707313
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.7
Hardware: Unspecified
OS: Unspecified
urgent
unspecified
Target Milestone: rc
: ---
Assignee: Chris Duryee
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: 675214
TreeView+ depends on / blocked
 
Reported: 2011-05-20 20:12 UTC by John Sefler
Modified: 2011-05-24 18:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-24 18:12:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2011-05-20 20:12:53 UTC
Description of problem:
If i install a package using this format:
yum install <package> --disablerepo=* --enablerepo=<repo>
then the product-id plugin appears to delete product certs that came from other repos.

Version-Release number of selected component (if applicable):
# rpm -q subscription-manager
subscription-manager-0.95.5.18-1.el5


How reproducible:


Steps to Reproduce:
Create two repos that point to two trees with different product certs...
I created these...

[root@jsefler-RHEL57ServerBeta12 ~]# cat /etc/yum.repos.d/latest57client.repo 
[latest57client]
name=rhel $releasever - $basearch
baseurl=http://download.devel.redhat.com/nightly/latest-RHEL5.7-Client/tree-x86_64/Client/
enabled=1
gpgcheck=0

[root@jsefler-RHEL57ServerBeta12 ~]# cat /etc/yum.repos.d/latest57server.repo 
[latest57server]
name=rhel $releasever - $basearch
baseurl=http://download.devel.redhat.com/nightly/latest-RHEL5.7-Server/tree-x86_64/Server/
enabled=1
gpgcheck=0

[root@jsefler-RHEL57ServerBeta12 ~]# rm -rf /etc/pki/product/*
[root@jsefler-RHEL57ServerBeta12 ~]# 

[root@jsefler-RHEL57ServerBeta12 ~]# yum install zsh -y --disablerepo=* --enablerepo=latest57client
Loaded plugins: product-id, security, subscription-manager
Updating Red Hat repositories.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package zsh.x86_64 0:4.2.6-5.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package     Arch           Version                Repository              Size
================================================================================
Installing:
 zsh         x86_64         4.2.6-5.el5            latest57client         1.7 M

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 1.7 M
Downloading Packages:
zsh-4.2.6-5.el5.x86_64.rpm                               | 1.7 MB     00:01     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : zsh                                                      1/1 
duration: 193(ms)
installing: 82.pem
Installed products updated.

Installed:
  zsh.x86_64 0:4.2.6-5.el5                                                      

Complete!
[root@jsefler-RHEL57ServerBeta12 ~]# 


^^^ Note the "installing: 82.pem".  That's good.


[root@jsefler-RHEL57ServerBeta12 ~]# yum install zsh-html -y --disablerepo=* --enablerepo=latest57server
Loaded plugins: product-id, security, subscription-manager
Updating Red Hat repositories.
latest57server                                           | 1.4 kB     00:00     
latest57server/primary                                   | 1.1 MB     00:00     
latest57server                                                        3259/3259
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package zsh-html.x86_64 0:4.2.6-5.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package         Arch          Version              Repository             Size
================================================================================
Installing:
 zsh-html        x86_64        4.2.6-5.el5          latest57server        361 k

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 361 k
Downloading Packages:
zsh-html-4.2.6-5.el5.x86_64.rpm                          | 361 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : zsh-html                                                 1/1 
latest57server/productid                                 | 1.7 kB     00:00     
duration: 313(ms)
deleting: /etc/pki/product/82.pem
installing: 69.pem
Installed products updated.

Installed:
  zsh-html.x86_64 0:4.2.6-5.el5                                                 

Complete!
[root@jsefler-RHEL57ServerBeta12 ~]# 


^^^ Note the "installing: 69.pem".  That's also good.
^^^ Note the "deleting: /etc/pki/product/82.pem".  That's bad!


Now let's uninstall the packages to see what happens...

[root@jsefler-RHEL57ServerBeta12 ~]# yum remove zsh zsh-html
Loaded plugins: product-id, security, subscription-manager
Updating Red Hat repositories.
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package zsh.x86_64 0:4.2.6-5.el5 set to be erased
---> Package zsh-html.x86_64 0:4.2.6-5.el5 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package          Arch           Version                Repository         Size
================================================================================
Removing:
 zsh              x86_64         4.2.6-5.el5            installed         3.6 M
 zsh-html         x86_64         4.2.6-5.el5            installed         1.9 M

Transaction Summary
================================================================================
Remove        2 Package(s)
Reinstall     0 Package(s)
Downgrade     0 Package(s)

Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing        : zsh-html                                                 1/2 
  Erasing        : zsh                                                      2/2 
duration: 528(ms)
installing: 82.pem
Installed products updated.

Removed:
  zsh.x86_64 0:4.2.6-5.el5             zsh-html.x86_64 0:4.2.6-5.el5            

Complete!
[root@jsefler-RHEL57ServerBeta12 ~]# ls /etc/pki/product/
69.pem  82.pem


^^^ Note: that "82.pem" actually got re-installed during the yum removal process.  I guess that's interesting and probably correct.


Actual results:
When using the --disablerepo=* option during a yum install, the "other" product ids get deleted.

Expected results:
I don't think a yum install should result in a deleted product cert.

Additional info:

Comment 1 Chris Duryee 2011-05-24 18:12:52 UTC

*** This bug has been marked as a duplicate of bug 707313 ***


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