[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH 0/6] Second call for review: conffile tracking / merging

This is the next iteration of the same patch series i've previously posted.

The changes since the last version are largely of an aesthetic or 
documentation-oriented nature.  For the sake of sanity I'll itemize
the changes below.

At this point it's becoming quite cumbersome to track the changes in
this fashion, so I would really appreciate getting at least Patches 1-3
committed, (everything up to the part where the hooks are added into
dpkg's operations), or otherwise hearing what needs to be done in order to
make them acceptable.  Note that these first patches not have any effect
on dpkg apart from compiling in and linking in some unused code, but
it will allow me to more easily submit future modifications and stop
needing to rebase as much.

I also have (unsubmitted here, but in my git p.d.o git repo) the beginnings
of a cmdline utility for inspection/interaction with the conffiledb.  It
isn't really worthy of review at this point beyond the RFC I posted earlier.

Notable changes:

 * rebased to master (c057025d8)
 * rename conffiles.{c,h} to conffiledb.{c,h} to be more descriptive
 * LOTS AND LOTS of (doxygen style) comments/documentation
 * formalized terminology used in comments and code (the "glossary" is
   included in the comments/docs).
 * change pathname convention from
   it may seem superficial but it in fact simplifies a lot of code.
 * change the names of macros, functions, enumerated types, etc to
   be generally more descriptive
 * formalize parameter/variable naming to be consistant for all functions
 * also change the names to contain a leading "conffiledb_" to follow
   the conventions elsewhere in dpkg
 * remove the "basedir" path definitions from dpkg.h and leave only
   the conffile db root dir there.  the basedirs are now defined by
   a static char array which is indexed to the respective enum values
   (which makes for simple code here and later in the cmdline program)
 * expose conff_db_path/conffiledb_path as non-static, as it's useful
   to the dpkg-conffile cmdline program as well
 * small bugfix in conff_reg_fd/conffiledb_register_new_conffile to ensure
   the target conffiledb path is always available.
 * conff_commit_new is replaced with slightly more general conffiledb_commit
 * new conffiledb_diff function
 * new base reference type "resolved" for storing successful merges
 * threw in some documentation for promptconfaction while i was there
 * expose a few more static functions, moving them from help.c to a new util.c

Sean Finney (6):
  Update promptconfaction() to also require package name
  Add doxygen comments for promptconfaction
  Conffile database handling functions
  Hook conffile database into dpkg unpack/configure/remove stages
  Implement 'm' option for conffile merging during conflict resolution
  Split some useful functions from help.c to (new) util.c

 lib/dpkg/dpkg.h  |    3 +
 src/Makefile.am  |    4 +-
 src/archives.c   |   18 +++-
 src/conffiledb.c |  292 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/conffiledb.h |  166 +++++++++++++++++++++++++++++++
 src/configure.c  |   52 +++++++++-
 src/help.c       |   72 -------------
 src/processarc.c |    4 +
 src/remove.c     |    3 +
 src/util.c       |  111 +++++++++++++++++++++
 10 files changed, 644 insertions(+), 81 deletions(-)
 create mode 100644 src/conffiledb.c
 create mode 100644 src/conffiledb.h
 create mode 100644 src/util.c

Reply to: