Changing e-mail in package control file is now easy
I often see on debian-perl IRC changelog related to e-mail changes. For instance, when a Debian contributor becomes a Debian developer, he often wants to change his old e-mail address in his brand new debian e-mail address.
This change is mostly done while updating packages to fix bugs or ship a new upstream releases. Since this change is trivial and mostly boring, forgetting about it is likely. Well, at least, that’s true for the author of this blog who did have to change he e-mail address recently.
The last version Config::Model Perl module (and its Dpkg model) offers a way to automatically perform this boring update task for you while you work on more interesting problems.
Dpkg model now provides a bunch of “meta” Dpkg parameters. These Meta parameters are used to customize the behavior of the Dpkg editor tool to suit your needs. Among these parameters, the “email-updates” meta parameters enable you to specify which email address to update and how.
Here’s a screenshot of config-edit GUI invoked on a package (with config-edit -application dpkg):
In this case, all occurrences of the dominique.dumont email will be replaced with the new domi.dumont email in the control and in the copyright file.
You can change or add new addresses using the GUI. When the package data (i.e. control, copyright and source) is saved, all meta information is also saved.
Meta dpkg data is saved in its own file, so the email change will be applied to all packages you will be working on:
E-mail address changes can also be specified in a command line:
$ config-edit -application dpkg \ 'meta email-updates:"email@example.com"="firstname.lastname@example.org"' \ -ui none -save
Note: this command must be run in a source package directory.
This new address change is stored in ~/.local/share/.dpkg-meta.yml or ~/.local/share/.dpkg-meta.yml:
--- email-updates: email@example.com: firstname.lastname@example.org
From now on, anytime you run config-edit -application dpkg (and save the data) while you work on a package, all occurrences of your old e-mail adress in debian.control will be changed with the new email address.
All the best