7
Thursday 2006-12-07:
Tips & TricksUseful Queries From Practice
I don't know if it's what you want,
but it's what you get.
OpenPKG's RPM provides the possibility to perform many useful queries
against an OpenPKG instance. The following is a collection of the most
useful queries we know of:
but it's what you get.
- Query the files in a package's payload:
openpkg rpm2cpio foo-*.src.rpm | cpio -itv
openpkg rpm -qplv foo-*.src.rpm
- Query all installed packages:
openpkg rpm -qa | sort - Query the configuration files (which are allowed to be edited)
of all or a particular installed packages:
openpkg rpm -qac | sort
openpkg rpm -qc foo - Query all files which were changed:
openpkg rpm -Va - Query whether all package dependencies are still met:
openpkg rpm -Va --nofiles - Query the build options of a package before and after installation:
openpkg rpm -qpi foo-*.src.rpm | grep ::with_
openpkg rpm -qi foo | grep ::with_ - Query the installed package a program in the $PATH belongs to:
openpkg rpm -qif `which foo` - Query all related files in an installed package which belong to a file:
openpkg rpm -qlf /prefix/path/to/file - Query how many of the installed packages are covered by which licenses:
openpkg rpm -qa --qf '%{LICENSE}\n' | sort | uniq -c | sort -n -r - Query how many of the installed packages are in a particular group:
openpkg rpm -qa --qf '%{GROUP}\n' | sort | uniq -c | sort -n -r - Query the current status of all run-command variables:
openpkg rc --config