[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Renaming a package

On Fri, 3 Oct 2003, Peter S Galbraith wrote:

> In the upcoming version of the `emacs-goodies-el' source package, I want
> the following to happen to these bianry packages:
>  `emacs-goodies-extra-el'
>    -> removed and contents merged into `emacs-goodies-el'
>  `debbugs-el'
>    -> replaced by `debian-el'
> I did the following in the control file:
> Package: emacs-goodies-el
> Replaces: emacs-goodies-extra-el
> Conflicts: emacs-goodies-extra-el
> Provides: emacs-goodies-extra-el
> Package: debian-el
> Conflicts: debbugs-el
> Replaces: debbugs-el
> Provides: debbugs-el
> I created a Packages.gz file to test the upgrade to these and added an
> entry to it to sources.list.  Here's what happens:
> # apt-get -u dist-upgrade
> Reading Package Lists... Done
> Building Dependency Tree... Done
> Calculating Upgrade... Done
> The following packages have been kept back
>   dpkg-dev-el emacs-goodies-el libsmpeg0 printtool rwho
> The following packages will be upgraded
>   devscripts-el gnus-bonus-el
> So it's holding back the two affected packages.  However, installing
> them explicitely works:
> # apt-get install dpkg-dev-el emacs-goodies-el
> Reading Package Lists... Done
> Building Dependency Tree... Done
> The following extra packages will be installed:
>   debian-el
> The following packages will be REMOVED:
>   debbugs-el emacs-goodies-extra-el
> The following NEW packages will be installed:
>   debian-el
> The following packages will be upgraded
>   dpkg-dev-el emacs-goodies-el
> 2 packages upgraded, 1 newly installed, 2 to remove and 5  not upgraded.
> Need to get 480kB of archives. After unpacking 73.7kB will be freed.
> Do you want to continue? [Y/n] n
> Abort.
> Am I missing something?

Maybe, the fact that APT tries to not remove any of your currently
installed packages during an upgrade.

There is not a "standard" to make a package to disappear, but there is
something you can do to ensure that "apt-get upgrade" works: Just make
emacs-goodies-extra-el a dummy (empty) package which depends on
emacs-goodies-el, and make debbugs-el a dummy package which depends on
debian-el. Make them of extra priority and section oldlibs. Remove the
conflicts, so that these packages are actually installed.

Then "apt-get upgrade" will actually upgrade all the packages. After
the upgrade, dpkg --purge `deborphan` (which almost everybody usually
does anyway) should remove the dummy packages.

If you don't do that the user will have to read the release notes to
see which packages he/she should upgrade by hand, but that would be a
shame: the release notes are for things which we weren't able to fix
before the release. My "ideal" of release notes is like this:

-----------------------------cut here----------------------------------
To upgrade from woody to sarge, follow the usual procedure:

apt-get update
apt-get upgrade
apt-get dist-upgrade
-----------------------------cut here----------------------------------

If the ordinary tools to upgrade the system are not enough to upgrade
the system and the release notes are longer than that, I think it's a
clear sign that we have made something wrong.

Reply to: