launchpad

Automatically redirect PPA to new package name


I maintain the PPA for Bookworm here: https://launchpad.net/bookworm

Recently I have changed the package name from "bookworm" to "com.github.babluboy.bookworm" based on the RDNN requirements of Elementary OS AppStore

This requires that the installation on Ubuntu is done by the command "sudo apt-get install com.github.babluboy.bookworm" instead of "sudo apt-get install bookworm".

While I have signposted this on Launchpad and the Bookworm website, there are a lots of posts and blogs on the internet from earlier asking users to use the "sudo apt-get install bookworm" command. This will install an old package (still in the PPA) which I don't update anymore.

Is there a way I can set up in Launchpad so that the older package automatically points to the new one for installation.

A hack that I can think of is to update the old package so that there is a big banner on the app providing instructions to switch to the new package. But thought of asking here if there is a more elegant way to manage package name changes in PPA


Solution

  • What you need is a transitional package with the old name. This will be an empty package with no actual contents, which has the new package as a dependency. When people update/install the bookworm package, it will be installed, and will pull the new package as a dependency. A future version of the new package can declare the old one as a conflict, and remove it while updating.

    Debian Wiki has the information you need in much more detail. For a number of package transition scenarios, see this:

    https://wiki.debian.org/PackageTransition

    Case #5 : Rename is what you need from there. The exact page you want is this

    https://wiki.debian.org/RenamingPackages

    There are other methods explained on that page, like the 'Clean Slate Method', but the 'Transition package method' is the one which is much more cleaner, and recommended. (If you search apt for 'transitional package', you'll find a lot of them).