Config::Model::Dpkg - Edit and validate Dpkg source files
The following command must be run in a package source directory. Whenrun, cme will load most files from debian directory and launch a graphical editor:
debian
cme edit dpkg
You can choose to edit only debian/control or debian/copyright:
debian/control
debian/copyright
cme edit dpkg-control cme edit dpkg-copyright
You can also use cme to run sanity checks on the source files:
cme check dpkg
When run, cme may issue several warnings regarding the content of your file. You can choose to fix (most of) these warnings with the command:
cme fix dpkg
This code snippet will change the maintainer address in control file:
use Config::Model ; use Log::Log4perl qw(:easy) ; my $model = Config::Model -> new ( ) ; my $inst = $model->instance (root_class_name => 'Dpkg'); $inst -> config_root ->load("control source Maintainer=foo@bedian.arg") ; $inst->write_back() ;
This module provides a configuration editor (and models) for the files of a Debian source package. (i.e. most of the files contained in the debian directory of a source package).
This module can also be used to modify safely the content of these files from a Perl programs.
As mentioned in cme, several user interfaces are available:
A graphical interface is proposed by default if Config::Model::TkUI is installed.
A Fuse virtual file system with option cme fusefs dpkg -fuse_dir <mountpoint> if Fuse is installed (Linux only)
cme fusefs dpkg -fuse_dir <mountpoint>
Config::Model design does not really cope well with a some detail of Debian patch header specification (aka DEP-3). Description and subject are both authorized, but only one of them is required and using the 2 is forbidden. So, both fields are accepted, but subject is stored as description in the configuration tree. cme fix or cme edit will write back a description field.
cme fix
cme edit
Dominique Dumont, (dod at debian dot org)
cme
Config::Model
http://github.com/dod38fr/config-model/wiki/Using-config-model
To install Config::Model::Dpkg, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Config::Model::Dpkg
CPAN shell
perl -MCPAN -e shell install Config::Model::Dpkg
For more information on module installation, please visit the detailed CPAN module installation guide.