Skip to content

Changing e-mail in package control file is now easy

April 11, 2011

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):

GUI to set up e-mail replacement

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:"domi@old.fr"="dod@new.fr"' \
 -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:
  domi@old.fr: dod@new.fr

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

Advertisements
8 Comments
  1. gregoa permalink

    sweet!

    now we only need this integrated into dh-make-perl’s refresh command, and a common file for pkg-perl would also be nice.

  2. Gonéri permalink

    Hi Dominique,

    This is a nice idea, but what about the changelog? Such changes need to be stored. Is it something easy to do with Config::Model?

    Cheers

    • There are 2 major problems that make changelog very hard to integrate:

      • There’s no formal syntax. Although, there are some conventions for Debian changelog
      • changelog are incremental files by nature. They don’t represent a state, but a stream of actions.

      So, I don’t see what can be done for this issue.

      All the best

      • gregoa permalink

        there are quite a few tools that handle debian/changelog in one way or another. maybe one of them is in perl and can be reusued?

  3. What about a badly formatted entry about the changes in the debian/changelog. The package won’t build and maintainer will have to correctly rewrite it. But at least the changes won’t be forgotten.
    This would be very useful when package maintenance is done by a team.

  4. The issue is not how to format the changelog addendum but what to put in there. Config::Model is not designed to keep track of what’s changed.

    There may be a way by comparing the loaded file with the generated file. But it won’t give much more than a svn diff.

    I’m still scratching my head …

  5. gregoa: yes. If a way can be found to know what has been changed, using dch will probably be the best way to update the changelog.

    all the best

  6. if you use dch, you will need to know if you need to complet the current changelog entry or create a new one.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: