michal-grzedzicki / rpms / rpm

Forked from rpms/rpm 5 months ago
Clone

352c6c Permit ndb database queries on read-only media

Authored and Committed by chantra 2 years ago
    Permit ndb database queries on read-only media
    
    GH#1040
    
    Test with:
    ```
    btrfs subvol del /tmp/r /tmp/r1
    btrfs subvol create /tmp/r && dnf install \
        /data/mock2/centos-8-x86_64/result/{rpm,rpm-libs}-4.14.3-21.4.el8.x86_64.rpm \
        -y --installroot /tmp/r && \
        btrfs subvol snapshot -r /tmp/r /tmp/r1
    systemd-nspawn -D /tmp/r rpm -qa
    systemd-nspawn -D /tmp/r1 rpm -qa
    ```
    
    Before the patch, it would fail on /tmp/r1 (RO) with:
    ```
    rpmxdbOpen: Read-only file system
    error: cannot open Name index using unknown db - Operation not permitted
    (1)
    ```
    
        
file modified
+2 -0