Le 2023-02-01 à 23 h 14, Paul Wise a écrit :
On Wed, 2023-02-01 at 08:22 -0500, Jérôme Charaoui wrote:

Specifically, I added to d/puppet-agent.maintscript:

      mv_conffile /etc/default/puppet-agent /etc/default/puppet 7.21.0-2~
      mv_conffile /etc/init.d/puppet-agent /etc/init.d/puppet 7.21.0-2~

Do you know why this isn't working as intended?

According to the dpkg-maintscript-helper manual page:

    If the conffile has not been shipped for several versions, and you
    are now modifying the maintainer scripts to clean up the obsolete
    file, prior-version should be based on the version of the package
    that you are now preparing, not the first version of the package
    that lacked the conffile.
   For example, for a conffile removed in version 2.0-1 of a package,
    prior-version should be set to 2.0-1~. This will cause the conffile
    to be removed even if the user rebuilt the previous version 1.0-1 as
    1.0-1local1. Or a package switching a path from a symlink (shipped
    in version 1.0-1) to a directory (shipped in version 2.0-1), but
    only performing the actual switch in the maintainer scripts in
    version 3.0-1, should set prior-version to 3.0-1~.

So 7.22.0-3~ should have been used for the version number, but
for the next upload it should be 7.22.0-4~ or similar instead.

Thanks for the clarification. I think you meant that I should have used prior-version "7.21.0-3~" instead of "7.21.0.2~", because the first version of the package with the service renamed was "7.21.0-3", and that is also the version where I added those lines in d/puppet-agent.maintscript.

I'll adjust the prior-version to "7.22.0-4~" in my next upload, hopefully that fixes things.

-- Jérôme

Reply via email to