Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 1667c8ea70e0b665a2e26660748536e6 > files > 26

etckeeper-1.4-1.fc17.noarch.rpm

#!/bin/sh
# Output to stdout a *sorted* list of all currently installed 
# (or removed but still with config-files) packages, in the
# format "package version\n" (or something similar).
if [ "$LOWLEVEL_PACKAGE_MANAGER" = dpkg ]; then
	dpkg-query -W -f '${Status}\t${Package} ${Version}\n' | \
		egrep '(ok installed|ok config-files)' | cut -f2,3
elif [ "$LOWLEVEL_PACKAGE_MANAGER" = rpm ]; then
	rpm -qa --qf "%|epoch?{%{epoch}}:{0}|:%{name}-%{version}-%{release}.%{arch}\n" | sort
fi