Bug 177330 - up2date --dbpath=... no longer works
up2date --dbpath=... no longer works
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: up2date (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bret McMillan
Red Hat Satellite QA List
:
Depends On:
Blocks: 191074 191079
  Show dependency treegraph
 
Reported: 2006-01-09 14:01 EST by Daniel Larsson
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: up2date-4.4.69-25
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-03 16:19:06 EDT
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 Daniel Larsson 2006-01-09 14:01:58 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051219 Firefox/1.5

Description of problem:
up2date provides the option --dbpath=<path> to run against a different RPM database, but (I believe) with the change to support $RELEASE in URLs in /etc/sysconfig/rhn/sources, it is no longer working.

/usr/sbin/up2date tries to determine if RHN is used. Part of this involves parsing the sources file, which queries the RPM database to determine the value of $RELEASE. This initializes a singleton "ReadOnlyTransaction" (/usr/share/rhn/up2date_client/transaction.py) which is then used subsequently. Problem is initialization of this is done prior to parsing command line options, so --dbpath=<path> seems to not have any effect.

Version-Release number of selected component (if applicable):
up2date-4.4.50-4

How reproducible:
Always

Steps to Reproduce:
1. mkdir /tmp/myrpmdb
2. up2date -v -v -v --dbpath=/tmp/myrpmdb --dry-run redhat-release


Actual Results:  Output from up2date above (elided):
D: opening  db index       /var/lib/rpm/Name rdonly mode=0x0
...
The following packages you requested are already updated:
redhat-release
D: closed   db index       /var/lib/rpm/Providename
D: closed   db index       /var/lib/rpm/Name
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages


Expected Results:  Running the same thing with up2date-4.4.5-1:
D: opening  db environment /tmp/myrpmdb/Packages joinenv
D: opening  db index       /tmp/myrpmdb/Packages rdonly mode=0x0
D: locked   db index       /tmp/myrpmdb/Packages
D: opening  db index       /tmp/myrpmdb/Name rdonly mode=0x0
....
(bunch of packages that would have been installed)

Additional info:
Comment 4 Fanny Augustin 2006-04-10 20:26:20 EDT
Blocking rhnupr4u4 and rhnupr3u8 to track the progress of the release
Comment 5 Fanny Augustin 2006-04-13 15:28:17 EDT
Moving bugs to the CanFix List
Comment 6 Fanny Augustin 2006-05-08 15:05:11 EDT
This bug did not make the code freeze and it will not be fiixed during this
release cycle.  Re-aligning bug to the next release
Comment 7 Fanny Augustin 2006-05-08 16:04:12 EDT
This bug did not make the code freeze.  It will not be fixed in this releasee 
Reea ligning to the next one.
Comment 8 Clifford Perry 2006-08-03 16:19:06 EDT
Hi there, 
Performing a quick test it seems that the newest version of up2date for Red Hat
Enterprise Linux 4 does indeed work as you expect (and reported as broken). 

[root@dhcp59-213 ~]# rpm -q up2date
up2date-4.4.69-25
[root@dhcp59-213 ~]#
[root@dhcp59-213 ~]# mkdir /tmp/myrpmdb
[root@dhcp59-213 ~]# up2date -v -v -v --dbpath=/tmp/myrpmdb --dry-run redhat-release
D: opening  db environment /tmp/myrpmdb/Packages create:cdb:mpool
D: opening  db index       /tmp/myrpmdb/Packages create mode=0x0
D: locked   db index       /tmp/myrpmdb/Packages
D: opening  db index       /tmp/myrpmdb/Name create mode=0x0
D: opening  db index       /tmp/myrpmdb/Providename create mode=0x0
RPM error.  The message was:
Could not determine what version of Red Hat Linux you are running.
If you get this error, try running

                rpm --rebuilddb


D: closed   db index       /tmp/myrpmdb/Providename
D: closed   db index       /tmp/myrpmdb/Name
D: closed   db index       /tmp/myrpmdb/Packages
D: closed   db environment /tmp/myrpmdb/Packages
[root@dhcp59-213 ~]# 

Please see Errata - https://rhn.redhat.com/errata/RHBA-2006-0494.html

Regards,
Clifford. 

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