Ticket #247 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

Intrepid->Jaunty upgrade wants to clobber /etc/gconf/2/path.debathena

Reported by: jdreed Owned by:
Priority: normal Milestone: Summer 2010 (Lucid Deploy)
Component: -- Keywords:
Cc: Fixed in version:
Upstream bug:

Description

debathena / upgrade / jdreed 14:36 (Jonathan Reed)

I have a debconf dialog asking me what I want to do about
"path.debathena", because apparently gconf2-common wants to clobber it

debathena / upgrade / andersk 14:38 (Anders Kaseorg)

Oh, /etc/gconf/2/path is ucf-managed. Huh.

debathena / upgrade / andersk 14:38 (Anders Kaseorg)

Things should work if you let it clobber the file.

Change History

comment:1 Changed 12 years ago by jdreed

As it turns out, if you let gconf2-common clobber the file, then when it comes time to install debathena-gconf2-config, it detects that /etc/gconf/2/path.debathena has been modified and again prompts the user to overwrite it.

comment:2 Changed 12 years ago by jdreed

  • Milestone set to IAP 2010

comment:3 Changed 12 years ago by jdreed

Is this fixable? It will likely show up in the Jaunty->Karmic upgrade I'm told. If it's fixable, we should fix it. If not, we should document it and move on.

comment:4 Changed 12 years ago by jdreed

If it's "fixable" by moving it out of the way before the upgrade and then moving it back, so as to avoid do-release-upgrade complaining, then perhaps we should provide some sort of debathena-update_ws script which prepares the system for do-release-upgrade and then cleans up at the end

comment:5 Changed 12 years ago by jdreed

  • Priority changed from major to minor
  • Milestone changed from Karmic Deploy to The Distant Future

Documented.  http://kb.mit.edu/confluence/x/0wxa

Re-milestoning.

comment:6 Changed 12 years ago by broder

I think something more sinister may be going on here.

When I upgraded opus to Lucid, I got the prompt about overwriting /etc/gconf/2/path.debathena. After the upgrade finished, /etc/gconf/2/path.debathena had been reverted to the upstream gconf2 path file (and not /etc/gconf/2/path), meaning that gconf was being run with ~/.gconf as its source instead of ~/.gconf-debathena-lucid.

comment:7 Changed 12 years ago by broder

  • Priority changed from minor to major
  • Milestone changed from The Distant Future to Summer 2010 (Lucid Deploy)

I'm bumping the priority on this one, because I think we need to get a better understanding of what's going on before a bunch of people start upgrading their workstations.

comment:8 Changed 12 years ago by broder

Here's a thought:

Instead of diverting /etc/gconf/2/path, what if we diverted /usr/share/gconf/default.path, and then ran ucf /usr/share/gconf/default.path /etc/gconf/2/path ourselves? ucf would think that our version of /usr/share/gconf/default.path was the "upstream template", having been changed from the one that gconf2-common actually provides, and would silently replace the upstream /etc/gconf/2/path with our own.

I haven't exactly figured out what the right upgrade path is for machines that already have gconf2-config installed, though. Still working on that.

comment:9 Changed 12 years ago by broder

(This should work because /usr/share/gconf/default.path is installed as part of the gconf2-common package, meaning that in the case of a gconf2-common upgrade, our diversions would be respected, and ucf wouldn't notice any changes in /usr/share/gconf/default.path)

comment:10 Changed 12 years ago by broder

I think I've figured out how to execute this transition in a maximally Correct way.

First of all, there's the simple case. In the simple case, the user hasn't intentionally modified the gconf configuration after installing our package.

If that's the case, all we have to do is run ucf --purge /etc/gconf/2/path, divert /usr/share/gconf/default.path, then run ucf /usr/share/gconf/default.path /etc/gconf/2/path to re-sync everything back up.

Because of ucf's symlink handling (which means that users may have blindly overwritten our version of /etc/gconf/2/path with the upstream default version), I'm willing to assume that the user hasn't intentionally modified our gconf configuration if

  1. /etc/gconf/2/path still points to path.debathena (as opposed to path.debathena-orig)
  2. /etc/gconf/2/path.debathena matches any version of /etc/gconf/2/path shipped by either gconf2-common or debathena-gconf2-config

If one of these two conditions doesn't hold, then we know that the user made a conscious effort to change the configuration. In both cases, we shouldn't run ucf --purge, because that will destroy information about the file conflict.

If the first condition is false, that's good enough. Undoing the diversion won't change the contents of the file pointed to by /etc/gconf/2/path, so the next ucf run will put our configuration against the user's configuration.

If the first condition is true but the second condition is false, then we also need to replace /etc/gconf/2/path (which was previously /etc/gconf/2/path.debathena-orig) with /etc/gconf/2/path.debathena. Because the user has made changes to /etc/gconf/2/path.debathena, again this means that the next ucf run will put our configuration against the user's configuration. Scribbling over /etc/gconf/2/path isn't a problem here, because we assume the user modified path.debathena in lieu of modifying path.debathena-orig (now path)

comment:11 Changed 12 years ago by broder

Just as a note for myself, when this gets uploaded, here are the scenarios that should be tested:

  1. ucf --purge doesn't get run if the package wasn't previously installed
  2. No ucf conflict is presented if
    1. debathena-gconf2-config 1.6 is installed then upgraded to 1.7
    2. debathena-gconf2-config 1.6 is installed, the workstation's Ubuntu release is upgraded, ucf scribbles over /etc/gconf/2/path.debathena, then gconf2-config is upgraded to 1.7
    3. debathena-gconf2-config 1.6 is installed, workstation is upgraded, ucf scribbles over path.debathena, then debathena-gconf2-config scribbles over path.debathena, then gconf2-config is upgraded to 1.7
  1. A ucf conflict is presented if /etc/gconf/2/path points to path.debathena-orig on upgrade (NOTE: this doesn't work with my current code)
  2. A ucf conflict is presented if /etc/gconf/2/path.debathena is edited by hand

comment:12 Changed 12 years ago by broder

  • Status changed from new to development

Fixed in r24493.

Because a lot of the testing for this change revolves around upgrade behavior, I opted to put the package in development for the time being. This will make it a little easier to test various upgrade paths from machines that already update from proposed.

Once we've done some testing on the assorted upgrade paths, I'll move the package into proposed.

comment:13 Changed 12 years ago by broder

  • Status changed from development to proposed

Ok. I've now tested all of the scenarios I outlined in comment:11, so I've rebuilt the package and uploaded it to proposed.

comment:14 Changed 12 years ago by broder

  • Status changed from proposed to closed
  • Resolution set to fixed

Moved to production today.

Note: See TracTickets for help on using tickets.