diff options
author | Paul Morgan <jumanjiman@gmail.com> | 2010-11-04 19:55:13 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-11-05 13:17:17 -0400 |
commit | 35080371afca5c81f8de7838661d5322dc39d98e (patch) | |
tree | 53d7674152028d82ff8984c52cafcc252266181a | |
parent | 4b8a70e61070a3168881d0845d9b30f08173f59c (diff) |
detect change in rpm epoch, name, version, release
ITIL compliance requires that _every_ package
change is detectable.
This fix ensures etckeeper properly reports any
change in rpm manifest, including epoch and release.
It uses an RPM query-format string that yields
reproducible results.
By example, assume you update a package that
differs only in the release number.
Before fix, etckeeper logs:
committing changes in /etc after yum run
Package changes:
After fix, etckeeper logs:
committing changes in /etc after yum run
Package changes:
-0:baseline-0.3.6-2.fc13.noarch
-0:baseline-devel-0.3.6-2.fc13.noarch
-0:baseline-release-0.3.6-2.fc13.noarch
+0:baseline-0.3.6-3.fc13.noarch
+0:baseline-devel-0.3.6-3.fc13.noarch
+0:baseline-release-0.3.6-3.fc13.noarch
Signed-off-by: Paul Morgan <jumanjiman@gmail.com>
-rwxr-xr-x | list-installed.d/50list-installed | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/list-installed.d/50list-installed b/list-installed.d/50list-installed index 177a6c2..f3f4eed 100755 --- a/list-installed.d/50list-installed +++ b/list-installed.d/50list-installed @@ -6,5 +6,5 @@ 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 --queryformat "%{name} %{version} %{arch}\n" | sort + rpm -qa --qf "%|epoch?{%{epoch}}:{0}|:%{name}-%{version}-%{release}.%{arch}\n" | sort fi |