NAME

lcfg-pkgcfg - A tool for querying LCFG build metadata files

VERSION

This documentation refers to lcfg-reltool version 0.2.6

USAGE

lcfg-pkgcfg --get=name

lcfg-pkgcfg --get=name --in ~/cvs/lcfg-foo

lcfg-pkgcfg --get=name --in ~/cvs/lcfg-foo/lcfg.yml

lcfg-pkgcfg --get=vcs.genchangelog

lcfg-pkgcfg --set schema=2 --set license=gpl

lcfg-pkgcfg --skeleton

lcfg-pkgcfg --skeleton --set name=foo --set version=1.0.0

lcfg-pkgcfg --in META.yml --out lcfg.yml

DESCRIPTION

This tool allows the user to create LCFG build package specification files and also query and modify the data stored. The tool can display or modify any attributes stored in a scalar or list form. It is also possible to clone existing metadata files, including those used for Perl CPAN modules.

OPTIONS

--in

The input LCFG build package specification metadata file name. If no path is passed into the script then it uses the lcfg.yml file in the current-directory. Otherwise you can specify a particular metadata file (in which case any name is acceptable) or a particular directory, in which case lcfg.yml will be used automatically.

--out

The output LCFG build package specification metadata file name. If no path is passed into the script then it uses the input file name. Otherwise you can specify a particular metadata file (in which case any name is acceptable) or a particular directory, in which case lcfg.yml will be used automatically. This is only normally used when part of the specification is updated (--set or --skeleton).

There is an interesting additional feature which makes it possible to clone metadata files. When the input and output filenames differ then the data from the input will be copied to the output, anything irrelevant will be ignored. It is thus possible to create an LCFG metadata file from a CPAN metadata file (META.yml).

--get

Specify the name of the attribute to query. See LCFG::Build::PkgSpec for the full list of attributes. Attributes which are stored as arrays, such as the author and platforms lists, will be flattened to a string (e.g. "fedora5, fedora6, scientificlinux5"). It is possible to query the values stored in a hash by joining the key names with a period (.). For example vcs.genchangelog or build.gencmake, you can access any hash element as deep as you like. If the value of an element is an array it will be stringified as described above.

--set

Set the value for a attribute in the LCFG build package specification, see LCFG::Build::PkgSpec for the full list of attributes. It is possible to set any number of key-value pairs at the same time. Each pair should be separated by just an '=' sign and preceded by the --set option.

--skeleton

Create a skeleton package specification. As a default it sets the package name to 'skeleton', which is not what you want, and leaves most stuff blank. You can combine this option with a list of --set options to create the package specification you actually wanted. You should be aware that if you use this option with a project that already has a lcfg.yml specification that file will be overwritten with the new settings.

--help

Show the documentation.

CONFIGURATION AND ENVIRONMENT

By default this script reads and writes to the lcfg.yml file for a project.

There are no other separate configuration files and no environment variables need to be altered.

EXIT STATUS

When attempting to fetch the value for an attribute, if it is not part of the LCFG::Build::PkgSpec API the exit status will be 2. If the lookup fails for any other reason the script will exit with an error status of 3. Any other error will result in a non-zero exit status.

DEPENDENCIES

This application requires LCFG::Build::PkgSpec

SEE ALSO

lcfg-cfg2meta(1), LCFG::Build::PkgSpec, LCFG::Build::Tools

PLATFORMS

This is the list of platforms on which we have tested this software. We expect this software to work on any Unix-like platform which is supported by Perl.

ScientificLinux5, ScientificLinux6

BUGS AND LIMITATIONS

It is not currently possible to query or set metadata which is stored as part of a hash reference (e.g. the version-control information). Anyone with good ideas as to how this can be sensibly achieved please contact the author.

There are no known bugs in this application. Please report any problems to bugs@lcfg.org, feedback and patches are also always very welcome.

AUTHOR

Stephen Quinney <squinney@inf.ed.ac.uk>

LICENSE AND COPYRIGHT

Copyright (C) 2008-2019 University of Edinburgh. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the terms of the GPL, version 2 or later.