On Thu, Mar 26, 2009 at 02:44:23PM -0400, Joey Hess wrote: > Tobias Gruetzmacher wrote: > > It would be great if one could force etckeeper to commit the "changes" > > after each apt run, even if /etc wasn't changed. As things are now, you > > get nice commit messages for each update, install, uninstall, but only > > if any of the involved packages changes /etc. Forcing commits would > > preserve information over every install/uninstall/update in etckeeper's > > history. > > etckeeper's mention of package changes is not meant to be a > general-purpose log of such changes. dpkg already generates such a log > in /var/log/dpkg.log*. > > etckeeper only mentions package changes because it's a cheap way to get > a general idea of what kind of upgrade caused changes to files in /etc. > If there were better ways to record that information (such as only > recording info about the packages that actually owned the configuration > files that were changed), then etckeeper would use them. > > Thus, what you're asking for is both a duplicate feature, and a side > effect of what is currently a suboptimal implementation, which we > certianly don't want to turn into a feature we have to keep long-term, if > better means[1] become available.
At some LUG, we decided that keeping a full list of installed packages
was something interesting to track. We added two simple scripts to
etckeeper default configuration in order to do this:
--- 8< --- /etc/etckeeper/init.d/30initial-package-list ---------------
#!/bin/sh
set -e
if ! [ -e .package-list ]; then
echo "# Generated by etckeeper. Do not edit." > .package-list
echo "" >> .package-list
chmod 600 .package-list
etckeeper list-installed >> .package-list
fi
--- >8 ----------------------------------------------------------------
--- 8< --- /etc/etckeeper/post-install.d/10refresh-package-list -------
#!/bin/sh
set -e
echo "# Generated by etckeeper. Do not edit." > .package-list
echo "" >> .package-list
etckeeper list-installed >> .package-list
--- >8 ----------------------------------------------------------------
As every package installation refreshes /etc/.package-list, a new commit
is made for every package installation. I think this is close to what
Tobias wishes.
Joey, I think this could quite easily be turned into a configurable
option, but looking at your answer above, it does not look like
something you support. I'm leaving those scripts here as a reference,
though.
Cheers,
--
Jérémy Bobbio .''`.
[email protected] : :Ⓐ : # apt-get install anarchism
`. `'`
`-
signature.asc
Description: Digital signature

