Skip to content

Commit

Permalink
detect change in rpm epoch, name, version, release
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jumanjiman authored and joeyh committed Nov 5, 2010
1 parent 4b8a70e commit 3508037
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion list-installed.d/50list-installed
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3508037

Please sign in to comment.