Bug 859885 - inspect-list-applications does not list all installed RPM packages with same name and different versions
inspect-list-applications does not list all installed RPM packages with same ...
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-24 05:54 EDT by Richard W.M. Jones
Modified: 2012-11-01 16:24 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-01 16:24:21 EDT
Type: Bug
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 Richard W.M. Jones 2012-09-24 05:54:55 EDT
Description of problem:

With a Fedora 19 guest, inspect-list-applications does
not list all installed kernels.

$ sudo guestfish --ro -a /dev/vg_data/F19Rawhidex64 -i

Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

Operating system: Fedora release 18 (Spherical Cow)
/dev/mapper/vg_f18rawhidex64-lv_root mounted on /
/dev/sda2 mounted on /boot

><fs> inspect-list-applications /dev/vg_f18rawhidex64/lv_root | cat > /tmp/apps

The only kernel package in the returned list is:

[426] = {
  app_name: kernel
  app_display_name: 
  app_epoch: 0
  app_version: 3.5.0
  app_release: 0.rc4.git0.1.fc18
  app_install_path: 
  app_trans_path: 
  app_publisher: 
  app_url: 
  app_source_package: 
  app_summary: 
  app_description: 
}

However running 'rpm -q kernel' inside the machine shows
other kernel packages are installed:

$ rpm -q kernel
kernel-3.5.0-0.rc4.git0.1.fc18.x86_64
kernel-3.6.0-0.rc2.git0.2.bz847548.fc18.x86_64
kernel-3.6.0-0.rc6.git0.2.fc18.x86_64

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

guestfish 1.19.43 on Fedora 18 host.

How reproducible:

100% reliable.
Comment 1 Richard W.M. Jones 2012-09-24 05:56:48 EDT
In the guest:

$ rpm -qa | wc -l
1394

The number of apps returned by libguestfs was 1358
(ie. 36 missing).
Comment 2 Richard W.M. Jones 2012-09-24 09:19:37 EDT
I laboriously wrote an emacs macro to translate the output
of inspect-list-applications so it matches the output of
rpm -qa (minus the %{arch} field which unfortunately we don't
have in libguestfs).

Most of the differences are because of extra arch packages.  eg:

audit-libs-2.2.1-2.fc18.i686
audit-libs-2.2.1-2.fc18.x86_64

is reported as a single instance by libguestfs:

[47] = {
  app_name: audit-libs
  app_display_name: 
  app_epoch: 0
  app_version: 2.2.1
  app_release: 2.fc18
  app_install_path: 
  app_trans_path: 
  app_publisher: 
  app_url: 
  app_source_package: 
  app_summary: 
  app_description: 
}

This is arguably a bug in libguestfs, so I filed it as
a separate issue: bug 859949

The second issue is that RPM allows duplicate packages to
be installed (same name, different version) and libguestfs
does not show these.  eg:

kernel-3.5.0-0.rc4.git0.1.fc18
kernel-3.6.0-0.rc2.git0.2.bz847548.fc18
kernel-3.6.0-0.rc6.git0.2.fc18

is reported as a single package:

[426] = {
  app_name: kernel
  app_display_name: 
  app_epoch: 0
  app_version: 3.5.0
  app_release: 0.rc4.git0.1.fc18
  app_install_path: 
  app_trans_path: 
  app_publisher: 
  app_url: 
  app_source_package: 
  app_summary: 
  app_description: 
}

I don't know if it reports a particular version (eg. the
smallest) or just reports one at random.

These two issues account for all 36 "missing" packages.
This bug relates to the second issue.

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