Downgrading packages after removing a repository

Andrew Sayers andrew-ubuntu-devel at pileofstuff.org
Wed Aug 5 14:09:04 UTC 2009


Michael Bienia wrote:
> On 2009-08-05 12:55:04 +0100, Andrew Sayers wrote:
>> Michael Bienia wrote:
>> <snip>
>>> Indepenent of how hard you make it to break an installation, there will
>>> be someone who managed to break it nonetheless and expects from you to
>>> unbreak it. And at the same time you will annoy experienced users who
>>> know what they are doing.
>> I don't follow this part.  Could you explain how the proposed solution 
>> (warnings on upgrade, warnings on downgrade) increases the number of 
>> people who expect Ubuntu to unbreak their system, or the number of 
>> annoyed experienced users?
> 
> It was related to the part where you commented that if Ubuntu makes it
> possible to break installations (addind 3rd party repositories) it
> should also provide tools to unbreak it again.
> But perhaps I misunderstood it or read too much into it that if Ubuntu
> doesn't provide these tools, it shouldn't provide options to shoot
> oneself into the foot (possibly break an installation).
> 
> Adding additional warnings might help if done right, but I currently see
> some problems I don't currently see a solution for:
> - you certainly won't warn on every upgrade else the warning is useless
>   (when you warn about every possible upgrade the warning gets ignored:
>    the last 20 upgrades went fine, why should this one break things?)
> - how to identify repositories to warn about updates from?
> - you can't rely on apt (or dpkg) about the warning (how should it know
>   which updates are "safe" and which not) and you can't rely on the
>   packages itself either (which 3rd party package will contain a warning
>   that it might break user data on downgrades?)
> 
> Michael
> 

These are very good points - how about warning when upgrading to a 
version with a different Origin, Label, Suite, Version, or Codename line 
in the Release file, or when enabling downgrades?

For example:

     These packages will be upgraded from repositories that are
     incompatible with their current repositories:

      * libfoo
        * old origin: Ubuntu
        * new origin: LP-PPA-andrew-bugs-launchpad-net
      * gbar
        * old origin: LP-PPA-andrew-bugs-launchpad-net
        * new origin: Evilsoft Inc.
        * old label: Ubuntu
        * new label: EvilWare
      * kqux
        * old suite: jaunty
        * new suite: karmic
        * old codename: jaunty
        * new codename: karmic
        * old version: 9.04
        * new version: 9.10

     WARNING: Incompatible repositories are not supported.
     Incompatible repositories can cause data loss, can make programs
     unable to run, and can even make your computer unable to boot.

And:

     WARNING: downgrades are not supported.

     Downgrading packages can cause data loss, can make programs
     unable to run, and can even make your computer unable to boot.

On the command-line, I would suggest printing the upgrade warning 
whenever relevant packages are apt-get installed or upgraded, and 
putting the downgrade warning next to the relevant command-line option 
in the man page.

In a GUI, I would suggest printing the upgrade warning whenever packages 
are installed or upgraded in any way, and printing the downgrade warning 
when the user clicks on some type of "allow downgrades for this session" 
button.

	- Andrew




More information about the Ubuntu-devel-discuss mailing list