kellyjonbrazil / jc

CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Dictionaries. This allows piping of output to tools like jq and simplifying automation scripts.
MIT License
7.87k stars 207 forks source link

New parser: apt-cache #325

Closed chriscroome closed 7 months ago

chriscroome commented 1 year ago

It would be nice to have the output of apt-cache --quiet show and perhaps also apt-cache --quiet policy as JSON, see the Debian manpage.

Note that while apt show and apt policy has similar outputs they are not always the same and just supporting apt-cache is probably sensible.

apt-cache show

An example from a Debian Buster server with backports enabled:

apt-cache --quiet show systemd
Package: systemd
Version: 247.3-6~bpo10+1
Installed-Size: 16121
Maintainer: Debian systemd Maintainers <pkg-systemd-maintainers@lists.alioth.debian.org>
Architecture: amd64
Depends: libacl1 (>= 2.2.23), libapparmor1 (>= 2.13), libaudit1 (>= 1:2.2.1), libcap2 (>= 1:2.10), libcryptsetup12 (>= 2:2.0.1), libgnutls30 (>= 3.6.6), libgpg-error0 (>= 1.14), libip4tc0 (>= 1.6.0+snapshot20161117), libkmod2 (>= 5~), liblz4-1 (>= 0.0~r130), libmount1 (>= 2.30), libpam0g (>= 0.99.7.1), libseccomp2 (>= 2.3.1), libsystemd0 (= 247.3-6~bpo10+1), systemd-timesyncd | time-daemon, util-linux (>= 2.27.1), mount (>= 2.26), adduser
Pre-Depends: libblkid1 (>= 2.24), libc6 (>= 2.28), libgcrypt20 (>= 1.8.0), liblz4-1 (>= 0.0~r122), liblzma5 (>= 5.1.1alpha+20120614), libselinux1 (>= 2.1.9), libzstd1 (>= 1.4.0)
Recommends: dbus
Suggests: systemd-container, policykit-1
Conflicts: consolekit, libpam-ck-connector
Breaks: python-dbusmock (<< 0.18), python3-dbusmock (<< 0.18), resolvconf (<< 1.83~), systemd-shim (<< 10-4~), udev (<< 247~)
Description-en: system and service manager
 systemd is a system and service manager for Linux. It provides aggressive
 parallelization capabilities, uses socket and D-Bus activation for starting
 services, offers on-demand starting of daemons, keeps track of processes using
 Linux control groups, maintains mount and automount points and implements an
 elaborate transactional dependency-based service control logic.
 .
 systemd is compatible with SysV and LSB init scripts and can work as a
 drop-in replacement for sysvinit.
 .
 Installing the systemd package will not switch your init system unless you
 boot with init=/lib/systemd/systemd or install systemd-sysv in addition.
Description-md5: 19399579cbc0c47a303288bf15eadcd4
Multi-Arch: foreign
Homepage: https://www.freedesktop.org/wiki/Software/systemd
Section: admin
Priority: important
Filename: pool/main/s/systemd/systemd_247.3-6~bpo10+1_amd64.deb
Size: 4382056
SHA256: 2035450655ad02faa0f75dc952128b503e51df5795c67273c0f62e75c509dcb0

Package: systemd
Version: 241-7~deb10u8
Installed-Size: 13484
Maintainer: Debian systemd Maintainers <pkg-systemd-maintainers@lists.alioth.debian.org>
Architecture: amd64
Replaces: udev (<< 228-5)
Depends: libacl1 (>= 2.2.23), libapparmor1 (>= 2.9.0-3+exp2), libaudit1 (>= 1:2.2.1), libcap2 (>= 1:2.10), libcryptsetup12 (>= 2:1.6.0), libgnutls30 (>= 3.6.6), libgpg-error0 (>= 1.14), libidn11 (>= 1.13), libip4tc0 (>= 1.6.0+snapshot20161117), libkmod2 (>= 5~), liblz4-1 (>= 0.0~r130), libmount1 (>= 2.30), libpam0g (>= 0.99.7.1), libseccomp2 (>= 2.3.1), libsystemd0 (= 241-7~deb10u8), util-linux (>= 2.27.1), mount (>= 2.26), adduser
Pre-Depends: libblkid1 (>= 2.24), libc6 (>= 2.28), libgcrypt20 (>= 1.8.0), liblz4-1 (>= 0.0~r122), liblzma5 (>= 5.1.1alpha+20120614), libselinux1 (>= 2.1.9)
Recommends: libpam-systemd, dbus
Suggests: systemd-container, policykit-1
Conflicts: consolekit, libpam-ck-connector
Breaks: apparmor (<< 2.9.2-1), ifupdown (<< 0.8.5~), laptop-mode-tools (<< 1.68~), python-dbusmock (<< 0.18), python3-dbusmock (<< 0.18), systemd-shim (<< 10-4~), udev (<< 228-5)
Description-en: system and service manager
 systemd is a system and service manager for Linux. It provides aggressive
 parallelization capabilities, uses socket and D-Bus activation for starting
 services, offers on-demand starting of daemons, keeps track of processes using
 Linux control groups, maintains mount and automount points and implements an
 elaborate transactional dependency-based service control logic.
 .
 systemd is compatible with SysV and LSB init scripts and can work as a
 drop-in replacement for sysvinit.
 .
 Installing the systemd package will not switch your init system unless you
 boot with init=/bin/systemd or install systemd-sysv in addition.
Description-md5: 00afa0c6fd35cc93a91e4654874648cb
Multi-Arch: foreign
Homepage: https://www.freedesktop.org/wiki/Software/systemd
Tag: admin::boot, implemented-in::c, interface::daemon, role::program,
 works-with::software:running
Section: admin
Priority: important
Filename: pool/main/s/systemd/systemd_241-7~deb10u8_amd64.deb
Size: 3496060
MD5sum: 51a8de8b75a388c4965baf50ca788897
SHA256: a60a47ef65cf1d5680555b749a22e679c2889095df10031a6321771e70e9ce4d

From what I can see each version of a package is separated by an empty line and each package listing is colon separated unless the value is on multiple lines and in this case the value is indented by one space. If the value contains commas it is a list.

However I haven't found a specification for this output.

apt-cache policy

See the The apt-cache policy Command section of the The Debian Administrator's Handbook.

An example output, again on Debian Buster with backports enabled:

apt-cache --quiet policy systemd
apt-cache policy systemd
systemd:
  Installed: 241-7~deb10u8
  Candidate: 241-7~deb10u8
  Version table:
     247.3-6~bpo10+1 100
        100 https://deb.debian.org/debian buster-backports/main amd64 Packages
 *** 241-7~deb10u8 500
        500 https://deb.debian.org/debian buster/main amd64 Packages
        500 https://deb.debian.org/debian-security buster/updates/main amd64 Packages
        100 /var/lib/dpkg/status

And without a package name and several 3rd party repos enabled:

apt-cache policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 https://dl.yarnpkg.com/debian stable/main all Packages
     release o=yarn,a=stable,n=stable,l=yarn-stable,c=main,b=all
     origin dl.yarnpkg.com
 500 https://dl.yarnpkg.com/debian stable/main amd64 Packages
     release o=yarn,a=stable,n=stable,l=yarn-stable,c=main,b=amd64
     origin dl.yarnpkg.com
 500 https://deb.nodesource.com/node_16.x buster/main amd64 Packages
     release o=Node Source,n=buster,l=Node Source,c=main,b=amd64
     origin deb.nodesource.com
 500 https://packages.icinga.com/debian icinga-buster/main amd64 Packages
     release o=debian icinga-buster,a=icinga-buster,n=icinga-buster,l=debian icinga-buster,c=main,b=amd64
     origin packages.icinga.com
 100 https://deb.debian.org/debian buster-backports/main amd64 Packages
     release o=Debian Backports,a=buster-backports,n=buster-backports,l=Debian Backports,c=main,b=amd64
     origin deb.debian.org
 500 https://deb.debian.org/debian-security buster/updates/non-free amd64 Packages
     release v=10,o=Debian,a=oldstable,n=buster,l=Debian-Security,c=non-free,b=amd64
     origin deb.debian.org
 500 https://deb.debian.org/debian-security buster/updates/main amd64 Packages
     release v=10,o=Debian,a=oldstable,n=buster,l=Debian-Security,c=main,b=amd64
     origin deb.debian.org
 500 https://deb.debian.org/debian buster/non-free amd64 Packages
     release v=10.13,o=Debian,a=oldstable,n=buster,l=Debian,c=non-free,b=amd64
     origin deb.debian.org
 500 https://deb.debian.org/debian buster/contrib amd64 Packages
     release v=10.13,o=Debian,a=oldstable,n=buster,l=Debian,c=contrib,b=amd64
     origin deb.debian.org
 500 https://deb.debian.org/debian buster/main amd64 Packages
     release v=10.13,o=Debian,a=oldstable,n=buster,l=Debian,c=main,b=amd64
     origin deb.debian.org
Pinned packages:
     php-icinga -> 2.11.2-1.buster with priority 100
     php-icinga -> 2.11.1-1.buster with priority 100
     php-icinga -> 2.11.0-1.buster with priority 100
     php-icinga -> 2.10.3-1.buster with priority 100
     php-icinga -> 2.10.1-1.buster with priority 100
     php-icinga -> 2.10.0-2.buster with priority 100
     php-icinga -> 2.10.0-1.buster with priority 100
     php-icinga -> 2.9.7-1.buster with priority 100
     php-icinga -> 2.9.6-1.buster with priority 100
     php-icinga -> 2.9.5-1.buster with priority 100
     php-icinga -> 2.9.4-1.buster with priority 100
     php-icinga -> 2.9.3-1.buster with priority 100
     php-icinga -> 2.9.2-1.buster with priority 100
     php-icinga -> 2.9.1-1.buster with priority 100
     php-icinga -> 2.9.0-1.buster with priority 100
     php-icinga -> 2.8.6-1.buster with priority 100
     php-icinga -> 2.8.5-1.buster with priority 100
     php-icinga -> 2.8.4-1.buster with priority 100
     php-icinga -> 2.8.3-1.buster with priority 100
     php-icinga -> 2.8.2-1.buster with priority 100
     php-icinga -> 2.8.1-1.buster with priority 100
     php-icinga -> 2.8.0-1.buster with priority 100
     php-icinga -> 2.7.6-1.buster with priority 100
     php-icinga -> 2.7.5-1.buster with priority 100
     php-icinga -> 2.7.4-1.buster with priority 100
     php-icinga -> 2.7.3-1.buster with priority 100
     php-icinga -> 2.7.2-1.buster with priority 100
     php-icinga -> 2.7.1-1.buster with priority 100
     php-icinga -> 2.7.0-1.buster with priority 100
     php-icinga -> 2.6.4-1.buster with priority 100
     php-icinga -> 2.6.3-1.buster with priority 100
     icingabeat -> 7.17.4 with priority 100
     icingabeat -> 7.14.2 with priority 100
     icingabeat -> 7.5.2 with priority 100
     icingaweb2-module-monitoring -> 2.11.2-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.11.1-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.11.0-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.10.3-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.10.1-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.10.0-2.buster with priority 100
     icingaweb2-module-monitoring -> 2.10.0-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.9.7-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.9.6-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.9.5-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.9.4-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.9.3-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.9.2-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.9.1-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.9.0-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.8.6-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.8.5-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.8.4-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.8.3-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.8.2-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.8.1-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.8.0-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.7.6-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.7.5-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.7.4-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.7.3-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.7.2-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.7.1-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.7.0-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.6.4-1.buster with priority 100
     icingaweb2-module-monitoring -> 2.6.3-1.buster with priority 100
     icinga2-bin -> 2.13.6-1+debian10 with priority 100
     icinga2-bin -> 2.13.5-1.buster with priority 100
     icinga2-bin -> 2.13.4-1.buster with priority 100
     icinga2-bin -> 2.13.3-1.buster with priority 100
     icinga2-bin -> 2.13.2-1.buster with priority 100
     icinga2-bin -> 2.13.1-1.buster with priority 100
     icinga2-bin -> 2.13.0-1.buster with priority 100
     icinga2-bin -> 2.12.9-1.buster with priority 100
     icinga2-bin -> 2.12.8-1.buster with priority 100
     icinga2-bin -> 2.12.7-1.buster with priority 100
     icinga2-bin -> 2.12.6-1.buster with priority 100
     icinga2-bin -> 2.12.5-1.buster with priority 100
     icinga2-bin -> 2.12.4-1.buster with priority 100
     icinga2-bin -> 2.12.3-1.buster with priority 100
     icinga2-bin -> 2.12.2-1.buster with priority 100
     icinga2-bin -> 2.12.1-1.buster with priority 100
     icinga2-bin -> 2.12.0-1.buster with priority 100
     icinga2-bin -> 2.11.11-1.buster with priority 100
     icinga2-bin -> 2.11.10-1.buster with priority 100
     icinga2-bin -> 2.11.9-1.buster with priority 100
     icinga2-bin -> 2.11.8-1.buster with priority 100
     icinga2-bin -> 2.11.7-1.buster with priority 100
     icinga2-bin -> 2.11.6-1.buster with priority 100
     icinga2-bin -> 2.11.5-1.buster with priority 100
     icinga2-bin -> 2.11.4-1.buster with priority 100
     icinga2-bin -> 2.11.3-1.buster with priority 100
     icinga2-bin -> 2.11.2-1.buster with priority 100
     icinga2-bin -> 2.11.1-1.buster with priority 100
     icinga2-bin -> 2.11.0-2.buster with priority 100
     icinga2-bin -> 2.11.0-1.buster with priority 100
     icinga2-bin -> 2.10.7-1.buster with priority 100
     icinga2-bin -> 2.10.5-1.buster with priority 100
     icinga2-bin -> 2.10.4-1.buster with priority 100
     icinga2-doc -> 2.13.6-1+debian10 with priority 100
     icinga2-doc -> 2.13.5-1.buster with priority 100
     icinga2-doc -> 2.13.4-1.buster with priority 100
     icinga2-doc -> 2.13.3-1.buster with priority 100
     icinga2-doc -> 2.13.2-1.buster with priority 100
     icinga2-doc -> 2.13.1-1.buster with priority 100
     icinga2-doc -> 2.13.0-1.buster with priority 100
     icinga2-doc -> 2.12.9-1.buster with priority 100
     icinga2-doc -> 2.12.8-1.buster with priority 100
     icinga2-doc -> 2.12.7-1.buster with priority 100
     icinga2-doc -> 2.12.6-1.buster with priority 100
     icinga2-doc -> 2.12.5-1.buster with priority 100
     icinga2-doc -> 2.12.4-1.buster with priority 100
     icinga2-doc -> 2.12.3-1.buster with priority 100
     icinga2-doc -> 2.12.2-1.buster with priority 100
     icinga2-doc -> 2.12.1-1.buster with priority 100
     icinga2-doc -> 2.12.0-1.buster with priority 100
     icinga2-doc -> 2.11.11-1.buster with priority 100
     icinga2-doc -> 2.11.10-1.buster with priority 100
     icinga2-doc -> 2.11.9-1.buster with priority 100
     icinga2-doc -> 2.11.8-1.buster with priority 100
     icinga2-doc -> 2.11.7-1.buster with priority 100
     icinga2-doc -> 2.11.6-1.buster with priority 100
     icinga2-doc -> 2.11.5-1.buster with priority 100
     icinga2-doc -> 2.11.4-1.buster with priority 100
     icinga2-doc -> 2.11.3-1.buster with priority 100
     icinga2-doc -> 2.11.2-1.buster with priority 100
     icinga2-doc -> 2.11.1-1.buster with priority 100
     icinga2-doc -> 2.11.0-2.buster with priority 100
     icinga2-doc -> 2.11.0-1.buster with priority 100
     icinga2-doc -> 2.10.7-1.buster with priority 100
     icinga2-doc -> 2.10.5-1.buster with priority 100
     icinga2-doc -> 2.10.4-1.buster with priority 100
     nodejs -> 16.18.1-deb-1nodesource1 with priority 100
     icinga2-ido-pgsql -> 2.13.6-1+debian10 with priority 100
     icinga2-ido-pgsql -> 2.13.5-1.buster with priority 100
     icinga2-ido-pgsql -> 2.13.4-1.buster with priority 100
     icinga2-ido-pgsql -> 2.13.3-1.buster with priority 100
     icinga2-ido-pgsql -> 2.13.2-1.buster with priority 100
     icinga2-ido-pgsql -> 2.13.1-1.buster with priority 100
     icinga2-ido-pgsql -> 2.13.0-1.buster with priority 100
     icinga2-ido-pgsql -> 2.12.9-1.buster with priority 100
     icinga2-ido-pgsql -> 2.12.8-1.buster with priority 100
     icinga2-ido-pgsql -> 2.12.7-1.buster with priority 100
     icinga2-ido-pgsql -> 2.12.6-1.buster with priority 100
     icinga2-ido-pgsql -> 2.12.5-1.buster with priority 100
     icinga2-ido-pgsql -> 2.12.4-1.buster with priority 100
     icinga2-ido-pgsql -> 2.12.3-1.buster with priority 100
     icinga2-ido-pgsql -> 2.12.2-1.buster with priority 100
     icinga2-ido-pgsql -> 2.12.1-1.buster with priority 100
     icinga2-ido-pgsql -> 2.12.0-1.buster with priority 100
     icinga2-ido-pgsql -> 2.11.11-1.buster with priority 100
     icinga2-ido-pgsql -> 2.11.10-1.buster with priority 100
     icinga2-ido-pgsql -> 2.11.9-1.buster with priority 100
     icinga2-ido-pgsql -> 2.11.8-1.buster with priority 100
     icinga2-ido-pgsql -> 2.11.7-1.buster with priority 100
     icinga2-ido-pgsql -> 2.11.6-1.buster with priority 100
     icinga2-ido-pgsql -> 2.11.5-1.buster with priority 100
     icinga2-ido-pgsql -> 2.11.4-1.buster with priority 100
     icinga2-ido-pgsql -> 2.11.3-1.buster with priority 100
     icinga2-ido-pgsql -> 2.11.2-1.buster with priority 100
     icinga2-ido-pgsql -> 2.11.1-1.buster with priority 100
     icinga2-ido-pgsql -> 2.11.0-2.buster with priority 100
     icinga2-ido-pgsql -> 2.11.0-1.buster with priority 100
     icinga2-ido-pgsql -> 2.10.7-1.buster with priority 100
     icinga2-ido-pgsql -> 2.10.5-1.buster with priority 100
     icinga2-ido-pgsql -> 2.10.4-1.buster with priority 100
     icingadb-redis-tools -> 7.0.5-1.buster with priority 100
     icingadb-redis-tools -> 7.0.2-1.buster with priority 100
     icingadb-redis-tools -> 6.2.6-2.buster with priority 100
     icingadb-redis-tools -> 6.2.6-1.buster with priority 100
     icingadb -> 1.1.0-1+debian10 with priority 100
     icingadb -> 1.0.0-1.buster with priority 100
     icinga-php-common -> 1.0.0-1.buster with priority 100
     icinga-l10n -> 1.2.0-1.buster with priority 100
     icinga-l10n -> 1.1.0-1.buster with priority 100
     icinga-l10n -> 1.0.0-1.buster with priority 100
     icingacli -> 2.11.2-1.buster with priority 100
     icingacli -> 2.11.1-1.buster with priority 100
     icingacli -> 2.11.0-1.buster with priority 100
     icingacli -> 2.10.3-1.buster with priority 100
     icingacli -> 2.10.1-1.buster with priority 100
     icingacli -> 2.10.0-2.buster with priority 100
     icingacli -> 2.10.0-1.buster with priority 100
     icingacli -> 2.9.7-1.buster with priority 100
     icingacli -> 2.9.6-1.buster with priority 100
     icingacli -> 2.9.5-1.buster with priority 100
     icingacli -> 2.9.4-1.buster with priority 100
     icingacli -> 2.9.3-1.buster with priority 100
     icingacli -> 2.9.2-1.buster with priority 100
     icingacli -> 2.9.1-1.buster with priority 100
     icingacli -> 2.9.0-1.buster with priority 100
     icingacli -> 2.8.6-1.buster with priority 100
     icingacli -> 2.8.5-1.buster with priority 100
     icingacli -> 2.8.4-1.buster with priority 100
     icingacli -> 2.8.3-1.buster with priority 100
     icingacli -> 2.8.2-1.buster with priority 100
     icingacli -> 2.8.1-1.buster with priority 100
     icingacli -> 2.8.0-1.buster with priority 100
     icingacli -> 2.7.6-1.buster with priority 100
     icingacli -> 2.7.5-1.buster with priority 100
     icingacli -> 2.7.4-1.buster with priority 100
     icingacli -> 2.7.3-1.buster with priority 100
     icingacli -> 2.7.2-1.buster with priority 100
     icingacli -> 2.7.1-1.buster with priority 100
     icingacli -> 2.7.0-1.buster with priority 100
     icingacli -> 2.6.4-1.buster with priority 100
     icingacli -> 2.6.3-1.buster with priority 100
     icingaweb2-common -> 2.11.2-1.buster with priority 100
     icingaweb2-common -> 2.11.1-1.buster with priority 100
     icingaweb2-common -> 2.11.0-1.buster with priority 100
     icingaweb2-common -> 2.10.3-1.buster with priority 100
     icingaweb2-common -> 2.10.1-1.buster with priority 100
     icingaweb2-common -> 2.10.0-2.buster with priority 100
     icingaweb2-common -> 2.10.0-1.buster with priority 100
     icingaweb2-common -> 2.9.7-1.buster with priority 100
     icingaweb2-common -> 2.9.6-1.buster with priority 100
     icingaweb2-common -> 2.9.5-1.buster with priority 100
     icingaweb2-common -> 2.9.4-1.buster with priority 100
     icingaweb2-common -> 2.9.3-1.buster with priority 100
     icingaweb2-common -> 2.9.2-1.buster with priority 100
     icingaweb2-common -> 2.9.1-1.buster with priority 100
     icingaweb2-common -> 2.9.0-1.buster with priority 100
     icingaweb2-common -> 2.8.6-1.buster with priority 100
     icingaweb2-common -> 2.8.5-1.buster with priority 100
     icingaweb2-common -> 2.8.4-1.buster with priority 100
     icingaweb2-common -> 2.8.3-1.buster with priority 100
     icingaweb2-common -> 2.8.2-1.buster with priority 100
     icingaweb2-common -> 2.8.1-1.buster with priority 100
     icingaweb2-common -> 2.8.0-1.buster with priority 100
     icingaweb2-common -> 2.7.6-1.buster with priority 100
     icingaweb2-common -> 2.7.5-1.buster with priority 100
     icingaweb2-common -> 2.7.4-1.buster with priority 100
     icingaweb2-common -> 2.7.3-1.buster with priority 100
     icingaweb2-common -> 2.7.2-1.buster with priority 100
     icingaweb2-common -> 2.7.1-1.buster with priority 100
     icingaweb2-common -> 2.7.0-1.buster with priority 100
     icingaweb2-common -> 2.6.4-1.buster with priority 100
     icingaweb2-common -> 2.6.3-1.buster with priority 100
     icingaweb2-module-doc -> 2.11.2-1.buster with priority 100
     icingaweb2-module-doc -> 2.11.1-1.buster with priority 100
     icingaweb2-module-doc -> 2.11.0-1.buster with priority 100
     icingaweb2-module-doc -> 2.10.3-1.buster with priority 100
     icingaweb2-module-doc -> 2.10.1-1.buster with priority 100
     icingaweb2-module-doc -> 2.10.0-2.buster with priority 100
     icingaweb2-module-doc -> 2.10.0-1.buster with priority 100
     icingaweb2-module-doc -> 2.9.7-1.buster with priority 100
     icingaweb2-module-doc -> 2.9.6-1.buster with priority 100
     icingaweb2-module-doc -> 2.9.5-1.buster with priority 100
     icingaweb2-module-doc -> 2.9.4-1.buster with priority 100
     icingaweb2-module-doc -> 2.9.3-1.buster with priority 100
     icingaweb2-module-doc -> 2.9.2-1.buster with priority 100
     icingaweb2-module-doc -> 2.9.1-1.buster with priority 100
     icingaweb2-module-doc -> 2.9.0-1.buster with priority 100
     icingaweb2-module-doc -> 2.8.6-1.buster with priority 100
     icingaweb2-module-doc -> 2.8.5-1.buster with priority 100
     icingaweb2-module-doc -> 2.8.4-1.buster with priority 100
     icingaweb2-module-doc -> 2.8.3-1.buster with priority 100
     icingaweb2-module-doc -> 2.8.2-1.buster with priority 100
     icingaweb2-module-doc -> 2.8.1-1.buster with priority 100
     icingaweb2-module-doc -> 2.8.0-1.buster with priority 100
     icingaweb2-module-doc -> 2.7.6-1.buster with priority 100
     icingaweb2-module-doc -> 2.7.5-1.buster with priority 100
     icingaweb2-module-doc -> 2.7.4-1.buster with priority 100
     icingaweb2-module-doc -> 2.7.3-1.buster with priority 100
     icingaweb2-module-doc -> 2.7.2-1.buster with priority 100
     icingaweb2-module-doc -> 2.7.1-1.buster with priority 100
     icingaweb2-module-doc -> 2.7.0-1.buster with priority 100
     icingaweb2-module-doc -> 2.6.4-1.buster with priority 100
     icingaweb2-module-doc -> 2.6.3-1.buster with priority 100
     icinga2-ido-mysql -> 2.13.6-1+debian10 with priority 100
     icinga2-ido-mysql -> 2.13.5-1.buster with priority 100
     icinga2-ido-mysql -> 2.13.4-1.buster with priority 100
     icinga2-ido-mysql -> 2.13.3-1.buster with priority 100
     icinga2-ido-mysql -> 2.13.2-1.buster with priority 100
     icinga2-ido-mysql -> 2.13.1-1.buster with priority 100
     icinga2-ido-mysql -> 2.13.0-1.buster with priority 100
     icinga2-ido-mysql -> 2.12.9-1.buster with priority 100
     icinga2-ido-mysql -> 2.12.8-1.buster with priority 100
     icinga2-ido-mysql -> 2.12.7-1.buster with priority 100
     icinga2-ido-mysql -> 2.12.6-1.buster with priority 100
     icinga2-ido-mysql -> 2.12.5-1.buster with priority 100
     icinga2-ido-mysql -> 2.12.4-1.buster with priority 100
     icinga2-ido-mysql -> 2.12.3-1.buster with priority 100
     icinga2-ido-mysql -> 2.12.2-1.buster with priority 100
     icinga2-ido-mysql -> 2.12.1-1.buster with priority 100
     icinga2-ido-mysql -> 2.12.0-1.buster with priority 100
     icinga2-ido-mysql -> 2.11.11-1.buster with priority 100
     icinga2-ido-mysql -> 2.11.10-1.buster with priority 100
     icinga2-ido-mysql -> 2.11.9-1.buster with priority 100
     icinga2-ido-mysql -> 2.11.8-1.buster with priority 100
     icinga2-ido-mysql -> 2.11.7-1.buster with priority 100
     icinga2-ido-mysql -> 2.11.6-1.buster with priority 100
     icinga2-ido-mysql -> 2.11.5-1.buster with priority 100
     icinga2-ido-mysql -> 2.11.4-1.buster with priority 100
     icinga2-ido-mysql -> 2.11.3-1.buster with priority 100
     icinga2-ido-mysql -> 2.11.2-1.buster with priority 100
     icinga2-ido-mysql -> 2.11.1-1.buster with priority 100
     icinga2-ido-mysql -> 2.11.0-2.buster with priority 100
     icinga2-ido-mysql -> 2.11.0-1.buster with priority 100
     icinga2-ido-mysql -> 2.10.7-1.buster with priority 100
     icinga2-ido-mysql -> 2.10.5-1.buster with priority 100
     icinga2-ido-mysql -> 2.10.4-1.buster with priority 100
     icingadb-redis-sentinel -> 7.0.5-1.buster with priority 100
     icingadb-redis-sentinel -> 7.0.2-1.buster with priority 100
     icingadb-redis-sentinel -> 6.2.6-2.buster with priority 100
     icingadb-redis-sentinel -> 6.2.6-1.buster with priority 100
     icinga2-common -> 2.13.6-1+debian10 with priority 100
     icinga2-common -> 2.13.5-1.buster with priority 100
     icinga2-common -> 2.13.4-1.buster with priority 100
     icinga2-common -> 2.13.3-1.buster with priority 100
     icinga2-common -> 2.13.2-1.buster with priority 100
     icinga2-common -> 2.13.1-1.buster with priority 100
     icinga2-common -> 2.13.0-1.buster with priority 100
     icinga2-common -> 2.12.9-1.buster with priority 100
     icinga2-common -> 2.12.8-1.buster with priority 100
     icinga2-common -> 2.12.7-1.buster with priority 100
     icinga2-common -> 2.12.6-1.buster with priority 100
     icinga2-common -> 2.12.5-1.buster with priority 100
     icinga2-common -> 2.12.4-1.buster with priority 100
     icinga2-common -> 2.12.3-1.buster with priority 100
     icinga2-common -> 2.12.2-1.buster with priority 100
     icinga2-common -> 2.12.1-1.buster with priority 100
     icinga2-common -> 2.12.0-1.buster with priority 100
     icinga2-common -> 2.11.11-1.buster with priority 100
     icinga2-common -> 2.11.10-1.buster with priority 100
     icinga2-common -> 2.11.9-1.buster with priority 100
     icinga2-common -> 2.11.8-1.buster with priority 100
     icinga2-common -> 2.11.7-1.buster with priority 100
     icinga2-common -> 2.11.6-1.buster with priority 100
     icinga2-common -> 2.11.5-1.buster with priority 100
     icinga2-common -> 2.11.4-1.buster with priority 100
     icinga2-common -> 2.11.3-1.buster with priority 100
     icinga2-common -> 2.11.2-1.buster with priority 100
     icinga2-common -> 2.11.1-1.buster with priority 100
     icinga2-common -> 2.11.0-2.buster with priority 100
     icinga2-common -> 2.11.0-1.buster with priority 100
     icinga2-common -> 2.10.7-1.buster with priority 100
     icinga2-common -> 2.10.5-1.buster with priority 100
     icinga2-common -> 2.10.4-1.buster with priority 100
     icinga-php-thirdparty -> 0.11.0-1.buster with priority 100
     icinga-php-thirdparty -> 0.10.0-2.buster with priority 100
     icinga-php-thirdparty -> 0.10.0-1.buster with priority 100
     icingadb-redis -> 7.0.5-1.buster with priority 100
     icingadb-redis -> 7.0.2-1.buster with priority 100
     icingadb-redis -> 6.2.6-2.buster with priority 100
     icingadb-redis -> 6.2.6-1.buster with priority 100
     icinga2 -> 2.13.6-1+debian10 with priority 100
     icinga2 -> 2.13.5-1.buster with priority 100
     icinga2 -> 2.13.4-1.buster with priority 100
     icinga2 -> 2.13.3-1.buster with priority 100
     icinga2 -> 2.13.2-1.buster with priority 100
     icinga2 -> 2.13.1-1.buster with priority 100
     icinga2 -> 2.13.0-1.buster with priority 100
     icinga2 -> 2.12.9-1.buster with priority 100
     icinga2 -> 2.12.8-1.buster with priority 100
     icinga2 -> 2.12.7-1.buster with priority 100
     icinga2 -> 2.12.6-1.buster with priority 100
     icinga2 -> 2.12.5-1.buster with priority 100
     icinga2 -> 2.12.4-1.buster with priority 100
     icinga2 -> 2.12.3-1.buster with priority 100
     icinga2 -> 2.12.2-1.buster with priority 100
     icinga2 -> 2.12.1-1.buster with priority 100
     icinga2 -> 2.12.0-1.buster with priority 100
     icinga2 -> 2.11.11-1.buster with priority 100
     icinga2 -> 2.11.10-1.buster with priority 100
     icinga2 -> 2.11.9-1.buster with priority 100
     icinga2 -> 2.11.8-1.buster with priority 100
     icinga2 -> 2.11.7-1.buster with priority 100
     icinga2 -> 2.11.6-1.buster with priority 100
     icinga2 -> 2.11.5-1.buster with priority 100
     icinga2 -> 2.11.4-1.buster with priority 100
     icinga2 -> 2.11.3-1.buster with priority 100
     icinga2 -> 2.11.2-1.buster with priority 100
     icinga2 -> 2.11.1-1.buster with priority 100
     icinga2 -> 2.11.0-2.buster with priority 100
     icinga2 -> 2.11.0-1.buster with priority 100
     icinga2 -> 2.10.7-1.buster with priority 100
     icinga2 -> 2.10.5-1.buster with priority 100
     icinga2 -> 2.10.4-1.buster with priority 100
     icingadb-web -> 1.0.2-1+debian10 with priority 100
     icingadb-web -> 1.0.1-1+debian10 with priority 100
     icingadb-web -> 1.0.0-1.buster with priority 100
     vim-icinga2 -> 2.13.6-1+debian10 with priority 100
     vim-icinga2 -> 2.13.5-1.buster with priority 100
     vim-icinga2 -> 2.13.4-1.buster with priority 100
     vim-icinga2 -> 2.13.3-1.buster with priority 100
     vim-icinga2 -> 2.13.2-1.buster with priority 100
     vim-icinga2 -> 2.13.1-1.buster with priority 100
     vim-icinga2 -> 2.13.0-1.buster with priority 100
     vim-icinga2 -> 2.12.9-1.buster with priority 100
     vim-icinga2 -> 2.12.8-1.buster with priority 100
     vim-icinga2 -> 2.12.7-1.buster with priority 100
     vim-icinga2 -> 2.12.6-1.buster with priority 100
     vim-icinga2 -> 2.12.5-1.buster with priority 100
     vim-icinga2 -> 2.12.4-1.buster with priority 100
     vim-icinga2 -> 2.12.3-1.buster with priority 100
     vim-icinga2 -> 2.12.2-1.buster with priority 100
     vim-icinga2 -> 2.12.1-1.buster with priority 100
     vim-icinga2 -> 2.12.0-1.buster with priority 100
     vim-icinga2 -> 2.11.11-1.buster with priority 100
     vim-icinga2 -> 2.11.10-1.buster with priority 100
     vim-icinga2 -> 2.11.9-1.buster with priority 100
     vim-icinga2 -> 2.11.8-1.buster with priority 100
     vim-icinga2 -> 2.11.7-1.buster with priority 100
     vim-icinga2 -> 2.11.6-1.buster with priority 100
     vim-icinga2 -> 2.11.5-1.buster with priority 100
     vim-icinga2 -> 2.11.4-1.buster with priority 100
     vim-icinga2 -> 2.11.3-1.buster with priority 100
     vim-icinga2 -> 2.11.2-1.buster with priority 100
     vim-icinga2 -> 2.11.1-1.buster with priority 100
     vim-icinga2 -> 2.11.0-2.buster with priority 100
     vim-icinga2 -> 2.11.0-1.buster with priority 100
     vim-icinga2 -> 2.10.7-1.buster with priority 100
     vim-icinga2 -> 2.10.5-1.buster with priority 100
     vim-icinga2 -> 2.10.4-1.buster with priority 100
     icingadb-redis-server -> 7.0.5-1.buster with priority 100
     icingadb-redis-server -> 7.0.2-1.buster with priority 100
     icingadb-redis-server -> 6.2.6-2.buster with priority 100
     icingadb-redis-server -> 6.2.6-1.buster with priority 100
     icinga-php-library -> 0.10.0-1+debian10 with priority 100
     icinga-php-library -> 0.9.1-1.buster with priority 100
     icinga-php-library -> 0.9.0-1.buster with priority 100
     icinga-php-library -> 0.8.1-1.buster with priority 100
     icinga-php-library -> 0.8.0-1.buster with priority 100
     icinga-php-library -> 0.7.0-1.buster with priority 100
     icinga-php-library -> 0.6.1-1.buster with priority 100
     icinga-php-library -> 0.6.0-1.buster with priority 100
     icingaweb2 -> 2.11.2-1.buster with priority 100
     icingaweb2 -> 2.11.1-1.buster with priority 100
     icingaweb2 -> 2.11.0-1.buster with priority 100
     icingaweb2 -> 2.10.3-1.buster with priority 100
     icingaweb2 -> 2.10.1-1.buster with priority 100
     icingaweb2 -> 2.10.0-2.buster with priority 100
     icingaweb2 -> 2.10.0-1.buster with priority 100
     icingaweb2 -> 2.9.7-1.buster with priority 100
     icingaweb2 -> 2.9.6-1.buster with priority 100
     icingaweb2 -> 2.9.5-1.buster with priority 100
     icingaweb2 -> 2.9.4-1.buster with priority 100
     icingaweb2 -> 2.9.3-1.buster with priority 100
     icingaweb2 -> 2.9.2-1.buster with priority 100
     icingaweb2 -> 2.9.1-1.buster with priority 100
     icingaweb2 -> 2.9.0-1.buster with priority 100
     icingaweb2 -> 2.8.6-1.buster with priority 100
     icingaweb2 -> 2.8.5-1.buster with priority 100
     icingaweb2 -> 2.8.4-1.buster with priority 100
     icingaweb2 -> 2.8.3-1.buster with priority 100
     icingaweb2 -> 2.8.2-1.buster with priority 100
     icingaweb2 -> 2.8.1-1.buster with priority 100
     icingaweb2 -> 2.8.0-1.buster with priority 100
     icingaweb2 -> 2.7.6-1.buster with priority 100
     icingaweb2 -> 2.7.5-1.buster with priority 100
     icingaweb2 -> 2.7.4-1.buster with priority 100
     icingaweb2 -> 2.7.3-1.buster with priority 100
     icingaweb2 -> 2.7.2-1.buster with priority 100
     icingaweb2 -> 2.7.1-1.buster with priority 100
     icingaweb2 -> 2.7.0-1.buster with priority 100
     icingaweb2 -> 2.6.4-1.buster with priority 100
     icingaweb2 -> 2.6.3-1.buster with priority 100

To me apt-cache policy looks harder to parse than apt-cache show, perhaps a specification for this output would be needed?

chriscroome commented 1 year ago

Perhaps this is not relevant but I've just found the APT JSON Hooks documentation:

APT 1.6 introduces support for hooks that talk JSON-RPC 2.0. Hooks act as a server, and APT as a client.

However I can't see how to access / create the $APT_HOOK_SOCKET, there is a Bash integration test script but my attempt to run it only got as far as:

./test/integration/test-apt-cli-json-hooks 
E: You need to build tree first 
E: Looks like the testcases ended prematurely with exitcode: 1
kellyjonbrazil commented 1 year ago

Thanks for the parser suggestions! I'll start working on some of these new parsers for the next release.

kellyjonbrazil commented 1 year ago

Interesting, it looks like the apt-cache show output works pretty well with the Key/value parser. Just a couple fields that could be split up:

{
  "Package": "systemd",
  "Version": "241-7~deb10u8",
  "Installed-Size": "13484",
  "Maintainer": "Debian systemd Maintainers <pkg-systemd-maintainers@lists.alioth.debian.org>",
  "Architecture": "amd64",
  "Depends": "libacl1 (>= 2.2.23), libapparmor1 (>= 2.9.0-3+exp2), libaudit1 (>= 1:2.2.1), libcap2 (>= 1:2.10), libcryptsetup12 (>= 2:1.6.0), libgnutls30 (>= 3.6.6), libgpg-error0 (>= 1.14), libidn11 (>= 1.13), libip4tc0 (>= 1.6.0+snapshot20161117), libkmod2 (>= 5~), liblz4-1 (>= 0.0~r130), libmount1 (>= 2.30), libpam0g (>= 0.99.7.1), libseccomp2 (>= 2.3.1), libsystemd0 (= 241-7~deb10u8), util-linux (>= 2.27.1), mount (>= 2.26), adduser",
  "Pre-Depends": "libblkid1 (>= 2.24), libc6 (>= 2.28), libgcrypt20 (>= 1.8.0), liblz4-1 (>= 0.0~r122), liblzma5 (>= 5.1.1alpha+20120614), libselinux1 (>= 2.1.9)",
  "Recommends": "libpam-systemd, dbus",
  "Suggests": "systemd-container, policykit-1",
  "Conflicts": "consolekit, libpam-ck-connector",
  "Breaks": "apparmor (<< 2.9.2-1), ifupdown (<< 0.8.5~), laptop-mode-tools (<< 1.68~), python-dbusmock (<< 0.18), python3-dbusmock (<< 0.18), systemd-shim (<< 10-4~), udev (<< 228-5)",
  "Description-en": "system and service manager\nsystemd is a system and service manager for Linux. It provides aggressive\nparallelization capabilities, uses socket and D-Bus activation for starting\nservices, offers on-demand starting of daemons, keeps track of processes using\nLinux control groups, maintains mount and automount points and implements an\nelaborate transactional dependency-based service control logic.\n.\nsystemd is compatible with SysV and LSB init scripts and can work as a\ndrop-in replacement for sysvinit.\n.\nInstalling the systemd package will not switch your init system unless you\nboot with init=/bin/systemd or install systemd-sysv in addition.",
  "Description-md5": "00afa0c6fd35cc93a91e4654874648cb",
  "Multi-Arch": "foreign",
  "Homepage": "https://www.freedesktop.org/wiki/Software/systemd",
  "Section": "admin",
  "Priority": "important",
  "Filename": "pool/main/s/systemd/systemd_241-7~deb10u8_amd64.deb",
  "Size": "3496060",
  "SHA256": "a60a47ef65cf1d5680555b749a22e679c2889095df10031a6321771e70e9ce4d",
  "Replaces": "udev (<< 228-5)",
  "Tag": "admin::boot, implemented-in::c, interface::daemon, role::program,\nworks-with::software:running",
  "MD5sum": "51a8de8b75a388c4965baf50ca788897"
}
chriscroome commented 1 year ago

Don't forget that apt-cache show might list several packages if, for example, backports is enabled and the package is available from the main repo and also backports.

kellyjonbrazil commented 11 months ago

It looks like apt-cache show has the same output as the new deb-packages-index parser in dev:

https://github.com/kellyjonbrazil/jc/issues/480

It looks like I could check specific fields for commas, like:

Depends Pre-Depends Recommends Suggests Conflicts Breaks Tag

kellyjonbrazil commented 8 months ago

I have a working version of the apt-cache show command parser in the dev branch.

chriscroome commented 8 months ago

It looks good but it only displays the last one?

apt-cache show systemd | jc --apt-cache-show -p
[
  {
    "package": "systemd",
    "version": "252.22-1~deb12u1",
    "installed-size": "9653",
    "maintainer": "Debian systemd Maintainers <pkg-systemd-maintainers@lists.alioth.debian.org>",
    "architecture": "amd64",
    "provides": "systemd-sysusers (= 252.22-1~deb12u1), systemd-tmpfiles (= 252.22-1~deb12u1)",
    "depends": "libacl1 (>= 2.2.23), libaudit1 (>= 1:2.2.1), libblkid1 (>= 2.24.2), libcryptsetup12 (>= 2:2.4), libfdisk1 (>= 2.33), libkmod2 (>= 15), libp11-kit0 (>= 0.23.18.1), libseccomp2 (>= 2.3.1), libsystemd-shared (= 252.22-1~deb12u1), libsystemd0 (= 252.22-1~deb12u1), mount",
    "pre-depends": "libblkid1 (>= 2.24), libc6 (>= 2.34), libcap2 (>= 1:2.10), libgcrypt20 (>= 1.10.0), liblz4-1 (>= 0.0~r122), liblzma5 (>= 5.1.1alpha+20120614), libmount1 (>= 2.30), libselinux1 (>= 3.1~), libssl3 (>= 3.0.0), libzstd1 (>= 1.5.2)",
    "recommends": "default-dbus-system-bus | dbus-system-bus, systemd-timesyncd | time-daemon",
    "suggests": "systemd-container, systemd-homed, systemd-userdbd, systemd-boot, systemd-resolved, libfido2-1, libqrencode4, libtss2-esys-3.0.2-0, libtss2-mu0, libtss2-rc0, polkitd | policykit-1",
    "conflicts": "consolekit, libpam-ck-connector, systemd-shim",
    "breaks": "less (<< 563), resolvconf (<< 1.83~), sicherboot (<< 0.1.6), udev (<< 247~)",
    "description-en": "system and service manager",
    "description-md5": "2728f00e9cb47f195aa39097a3afbc42",
    "multi-arch": "foreign",
    "homepage": "https://www.freedesktop.org/wiki/Software/systemd",
    "section": "admin",
    "priority": "important",
    "filename": "pool/main/s/systemd/systemd_252.22-1~deb12u1_amd64.deb",
    "size": 3031764,
    "sha256": "0c971c39033481078058f2407d8c68234ea454ea168ba2a17649bb97242ec674",
    "tag": "admin::boot, implemented-in::c, interface::daemon, role::program,",
    "md5sum": "1eabc7000ba33dcf2017d1b7da391f20"
  }
]
apt-cache show systemd
Package: systemd
Version: 254.5-1~bpo12+3
Installed-Size: 10401
Maintainer: Debian systemd Maintainers <pkg-systemd-maintainers@lists.alioth.debian.org>
Architecture: amd64
Provides: systemd-sysusers (= 254.5-1~bpo12+3), systemd-tmpfiles (= 254.5-1~bpo12+3)
Depends: libacl1 (>= 2.2.23), libaudit1 (>= 1:2.2.1), libcryptsetup12 (>= 2:2.4), libfdisk1 (>= 2.33), libkmod2 (>= 15), libp11-kit0 (>= 0.23.18.1), libseccomp2 (>= 2.3.1), libsystemd-shared (= 254.5-1~bpo12+3), libsystemd0 (= 254.5-1~bpo12+3), systemd-dev (>= 254.5-1~bpo12+3), mount
Pre-Depends: libblkid1 (>= 2.30.2), libc6 (>= 2.36), libcap2 (>= 1:2.10), libgcrypt20 (>= 1.10.0), liblz4-1 (>= 0.0~r122), liblzma5 (>= 5.1.1alpha+20120614), libmount1 (>= 2.30), libselinux1 (>= 3.1~), libssl3 (>= 3.0.0), libzstd1 (>= 1.5.2)
Recommends: default-dbus-system-bus | dbus-system-bus, systemd-timesyncd | time-daemon
Suggests: systemd-container, systemd-homed, systemd-userdbd, systemd-boot, systemd-resolved, libfido2-1, libqrencode4, libtss2-esys-3.0.2-0, libtss2-mu0, libtss2-rc0, polkitd, python3:any, python3-pefile
Conflicts: consolekit, libpam-ck-connector, systemd-shim
Breaks: less (<< 563), sicherboot (<< 0.1.6)
Description-en: system and service manager
 systemd is a system and service manager for Linux. It provides aggressive
 parallelization capabilities, uses socket and D-Bus activation for starting
 services, offers on-demand starting of daemons, keeps track of processes using
 Linux control groups, maintains mount and automount points and implements an
 elaborate transactional dependency-based service control logic.
 .
 Installing the systemd package will not switch your init system unless you
 boot with init=/lib/systemd/systemd or install systemd-sysv in addition.
Description-md5: 2728f00e9cb47f195aa39097a3afbc42
Multi-Arch: foreign
Homepage: https://www.freedesktop.org/wiki/Software/systemd
Section: admin
Priority: important
Filename: pool/main/s/systemd/systemd_254.5-1~bpo12+3_amd64.deb
Size: 3308424
SHA256: 4754d13df1c7051a21742016231cb0fb4fcfa50c513a6b602d076a6b927168ce

Package: systemd
Version: 252.22-1~deb12u1
Installed-Size: 9653
Maintainer: Debian systemd Maintainers <pkg-systemd-maintainers@lists.alioth.debian.org>
Architecture: amd64
Provides: systemd-sysusers (= 252.22-1~deb12u1), systemd-tmpfiles (= 252.22-1~deb12u1)
Depends: libacl1 (>= 2.2.23), libaudit1 (>= 1:2.2.1), libblkid1 (>= 2.24.2), libcryptsetup12 (>= 2:2.4), libfdisk1 (>= 2.33), libkmod2 (>= 15), libp11-kit0 (>= 0.23.18.1), libseccomp2 (>= 2.3.1), libsystemd-shared (= 252.22-1~deb12u1), libsystemd0 (= 252.22-1~deb12u1), mount
Pre-Depends: libblkid1 (>= 2.24), libc6 (>= 2.34), libcap2 (>= 1:2.10), libgcrypt20 (>= 1.10.0), liblz4-1 (>= 0.0~r122), liblzma5 (>= 5.1.1alpha+20120614), libmount1 (>= 2.30), libselinux1 (>= 3.1~), libssl3 (>= 3.0.0), libzstd1 (>= 1.5.2)
Recommends: default-dbus-system-bus | dbus-system-bus, systemd-timesyncd | time-daemon
Suggests: systemd-container, systemd-homed, systemd-userdbd, systemd-boot, systemd-resolved, libfido2-1, libqrencode4, libtss2-esys-3.0.2-0, libtss2-mu0, libtss2-rc0, polkitd | policykit-1
Conflicts: consolekit, libpam-ck-connector, systemd-shim
Breaks: less (<< 563), resolvconf (<< 1.83~), sicherboot (<< 0.1.6), udev (<< 247~)
Description-en: system and service manager
 systemd is a system and service manager for Linux. It provides aggressive
 parallelization capabilities, uses socket and D-Bus activation for starting
 services, offers on-demand starting of daemons, keeps track of processes using
 Linux control groups, maintains mount and automount points and implements an
 elaborate transactional dependency-based service control logic.
 .
 Installing the systemd package will not switch your init system unless you
 boot with init=/lib/systemd/systemd or install systemd-sysv in addition.
Description-md5: 2728f00e9cb47f195aa39097a3afbc42
Multi-Arch: foreign
Homepage: https://www.freedesktop.org/wiki/Software/systemd
Tag: admin::boot, implemented-in::c, interface::daemon, role::program,
 works-with::software:running
Section: admin
Priority: important
Filename: pool/main/s/systemd/systemd_252.22-1~deb12u1_amd64.deb
Size: 3031764
MD5sum: 1eabc7000ba33dcf2017d1b7da391f20
SHA256: 0c971c39033481078058f2407d8c68234ea454ea168ba2a17649bb97242ec674
kellyjonbrazil commented 8 months ago

This parser is an alias of rpm-qi so you won’t be able to test without cloning the dev branch or also downloading and replacing that parser file in place. I’ll double check that it is outputting all of the entries.

chriscroome commented 8 months ago

Thanks, I didn't realise that and simply downloaded the new parser.

kellyjonbrazil commented 7 months ago

Added in v1.25.2