wpkg --verify-fields ...

The --verify-fields option is used along the --verify and --install commands to run C like expressions against the fields of the control file of the specified packages.

Say that each time you create a package you save the date in it as a long integer (Unix date) with a line like this in your control file:

X-Unix-Date: $(time())

Then you find a really bad bug on a given date (say 12345678) and when creating a repository, you want to check that all your packages are safe (were not created before that date.) You can use the --verify-fields as follow:

wpkg --verify-fields 'getfield("X-Unix-Date") > 12345678' --verify <package-name> ...

This --verify command fails (wpkg exits with 1) if the verification expression returns false, which it will do if any one package specified on the wpkg command line after the --verify option was created before the specified date.

The --verify-fields supports any number of expressions up to the next command line option or the end of the command line.

The supported expressions are the same as those accepted in your control file fields when written between $(...).

Note that you may add such a verification field in your WPKG_OPTIONS environment variable or wpkg.conf files.

IMPORTANT NOTE

Before version 0.9.0, this option was called --validate-fields. It looks like the term verify is better suited in the Debian like environment. See the Obsolete and renamed command line options for other details.