Bug 671200

Summary: readonly fs vs --root
Product: [Fedora] Fedora Reporter: Matthias Clasen <mclasen>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ffesti, gholms, jnovy, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-21 07:51:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Matthias Clasen 2011-01-20 18:19:27 UTC
I'm used to using rpm --root with liveimage-mount to create a list of packages on a live cd:

sudo liveimage-mount <iso> foo
rpm --root $PWD -qa --qf "%{SIZE} %{NAME}\n" | sort -g > ../list

This used to work until I updated to rpm 4.9.0, now it fails with 

error: db4 error(30) from dbenv->open: Read-only file system
error: cannot open Packages index using db4 - Read-only file system (30)
error: cannot open Packages database in /home/mclasen/dist-git/spin-kickstarts/foo/var/lib/rpm

Interestingly, using --dbpath instead of --root still works

Comment 1 Matthias Clasen 2011-01-20 18:22:26 UTC
Ugh, no, I was wrong.

Using --dbpath ./var/lib/rpm just ignores the . and treats it like the path was /var/lib/rpm. If I use --dbpath $PWD/var/lib/rpm, it fails in the same way.

Comment 2 Panu Matilainen 2011-01-21 07:51:43 UTC
Right, this is unintentional side-effect from reworking the rpmdb opening logic. Fixed in rpm-4.9.0-0.beta1.2.fc15, thanks for reporting.