usage: ucfq [options] (file|package)[file|package ...]
Normally, the script presents the information in a human readable tabular format, but that may be harder for a machine to parse. With this option, the output is a compact, colon separated line, with no dividers, headers, or footer.
Set the state directory to /path/to/dir
instead of the default
/var/lib/ucf
. Used mostly for testing.
This script takes a set of arguments, each of which is a package or a path to a configuration file, and outputs the associated package, if any, if the file exists on disk, and whether it has been modfied by te user. The output is either a human readable tabular form, or a compact colon-separated machine friendly format.
This script can potentially be used in package postinst
scripts
during purge to query the system for configuration files that may
still exist on the system, and whether these files have been locally
modified by the user -- assuming that the package registered all the
configuration files with ucf using ucfr
.
All class methods mediate access to class variables. All class methods can be invoked with zero or one parameters. When invoked with the optional parameter, the class method sets the value of the underlying class data. In either case, the value of the underlying variable is returned.
This is a combination view and controller class that mediates between the user and the internal model classes.
This is the constructor for the class. It takes a number of optional parameters. If the parameter Colons is present, then the output will be compact. The parameters DEBUG and VERBOSE turn on additional diagnostics from the script.
This routine is responsible for ensuring that the parameters passed in (presumably from the command line) are given preference.
This routine returns a reference to the configuration hash
This routine returns a Data::Dumper
for debugging purposes
This routine is the work horse routine -- it parses the command line arguments, and queries the on disk databases, determines of the files exist, and have been modified.
This routine generates a nicely formatted report based on the
information gathered during the processing. There are two kinds of
reports, the first being a user friendly tabular form, the second
(turned on by the -w
option) a easily parseable colon separated
report.
This moel class encapsulates the package-configuration file associations registry. It parses the data in the registry, and provides methods to query the registry based either on package name, or the full path of the configuration file.
This is the constructor for the class. It takes a required parameter StateDir, and based on that, proceeds toparse the registry and populate internal data structures.
This routine queries the registry and lists all configuration files associated with the given package. Takes the package name as a required parameter.
This routine queries the registry for the package associated with the given file. Takes the path of the configuration file as a required parameter.
This moel class encapsulates the configuration file hash database. It parses the data in the database, and provides methods to query the hash of the configuration file.
This routine queries the database for the hash associated with the developers version of the given file. Takes the path of the configuration file as a required parameter.
This is the encapsulation of a configuration file metadata.
This is the constructor for the class. It takes a number of optional parameters. If the parameter Colons is present, then the output will be compact. The parameters DEBUG and VERBOSE turn on additional diagnostics from the script.
This routine is the accessor method of the internal attribute that
holds package name associated with the file. If an optional value
is present, updates the value of the attribute.
This routine is the accessor method of the internal attribute that holds the information whether the file exists on disk or not.
This routine is the accessor method of the internal attribute that
holds the information whether the file exists on disk or not. If an
optional value
is present, updates the value of the attribute.
This routine is the accessor method of the internal attribute that
holds the hash for the developers version of the file. If an optional
value
is present, updates the value of the attribute. It also
notes whether or not the file is modified from the developers version.
This is an encapsulation of package metadata. Packages may be associated with configuration files.
This is the constructor for the class. It takes a number of optional parameters. If the parameter Colons is present, then the output will be compact. The parameters DEBUG and VERBOSE turn on additional diagnostics from the script.
This is a clas which holds lists of object names, either packages or configuration file object names. It provides methods to add, access, and remove objects, as well as an option to list all elements in the list.
This is the constructor for the class. It takes no arguments.
This is an accessor method for elements of the list. If an optional value argument exists, it creates or updates the element associtated with the vaslue. Takes in a required name, which is used as a kay, and an optional value argument. The value is returned.
Removes elements from the list. Take in an required name, which is used as the key for the element to delete.
This routine lists all the elements in the list. It does not take any options.
This is very inchoate, at the moment, and needs testing.
None Known so far.
Manoj Srivastava <srivasta\@debian.org>
This script is a part of the Ucf package, and is
Copyright (c) 2006 Manoj Srivastava <srivasta\@debian.org>
This program is free software; you can redistribute it and / or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA