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

RFC: dpkg-conffile cmdline interface draft

okay, before i do any proper coding on a cmdline utility, i thought we
should work out the details of the cmdline interface.  this is an initial
draft of what i was thinking, comments requested :)


	dpkg-conffile - inspect status and conttents of conffiles


	dpkg-conffile is a program designed to inspect and report on
	the status of conffiles provided by packages that have been
	installed on the system.  It can be used to inspect the status
	on individual files, packages, or system wide.


	dpkg-conffile [options] <action> <args>


	--admindir dir

		Change  default  administrative directory, which contains
		many  files  that  give  information  about   status   of
		installed  or  uninstalled  packages,  etc.  (Defaults to

	-r, --recursive

		Used in combination with some commands to activate
		recursive behavior for matching conffile_paths.


	-o, --orig conffile_path

		Output the package's original version of the conffile.

	-d, --diff conffile_path

		Show the delta between the package's original version of
		the conffile and the currently installed conffile.  The
		return value is that of the underlying call to diff(1).

	-l, --list packagename

		List the conffiles that are shipped in packagename.
		The conffiles do not have to exist in their installed

	-s, --status conffile_path

		Show the status of the single file at conffile_path.  See
		STATUS CODES for a description of the output format.


	When run with --status one line is output for each file, in the
	format CODE:CONTEXT:PATH, where PATH is the path of the queried file,
	and CODE is one of the following:

	O:	(Original) File is in its original state.
	D:	(Deleted) File has been deleted.
	M:	(Modified) File has been modified.
	U:	(Unknown) No conffile database available for this file/package.
	E:	(Error) Not a conffile?

	CONTEXT is additional information, if available, to complement the
	CODE.  At the time of writing it is not used but left for future


	For all modes but -d/--diff, the command returns 0 on success and
	nonzero on error.  When diffing a file

	Get list of all changed conffiles on system under /etc/apache2:

		dpkg-conffile -r --status /etc/apache2

	Get list of all conffiles provided by the apt package:

		dpkg-conffile -l apt

	Output the original (packaged) version of /etc/wgetrc:

		dpkg-conffile -o /etc/wgetrc

	Show a diff of the local changes made to /etc/wgetrc:

		dpkg-conffile -d /etc/wgetrc

	Show a diff of all conffiles:

		dpkg-conffile -r -d /etc

	dpkg(1), diff(1)


Attachment: signature.asc
Description: Digital signature

Reply to: