[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 :)


	sean

NAME
	
	dpkg-conffile - inspect status and conttents of conffiles

SYNOPSIS

	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.

USAGE

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

OPTIONS

	--admindir dir

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

	-r, --recursive

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

ACTIONS

	-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
		locations.

	-s, --status conffile_path

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

STATUS CODES

	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
	expansion.

RETURN CODE

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

	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


SEE ALSO
	dpkg(1), diff(1)





-- 

Attachment: signature.asc
Description: Digital signature


Reply to: