Although this might be the only simple and possible solution at this moment, I do not agree with it. We are introducing another version specific behaviour and hardcoded paths to scripts outside of our control to anaconda source. That is violating one of our long term goals of making anaconda independent on the product version. We discussed another kickstart script sections and fedora-release.rpm (or repodata file, ..) as a container for the release related scripts ages ago. What will we do in F18 when upgrade from F16 and F17 will need to be supported at the same time? The code checks the links, but what if someone comes with something even more wild? If we manage to get this kind of information to the repository, for example in the form of repodata/updates/<from-version>.ks with %prechroot script section, we might be able to do stuff like conversion to systemd, usrmove, ... without us being responsible for the code and without being tied to one particular version. Just my 2 cents.. Martin ----- Original Message ----- > From: "Brian C. Lane" <bcl@xxxxxxxxxx> > > When upgradig to F17 the dracut convertfs script needs to be > run on the target filesystem so that it can convert /bin, /sbin, > /lib and /lib64 to symlinks into /usr > --- > pyanaconda/dispatch.py | 3 ++- > pyanaconda/upgrade.py | 26 ++++++++++++++++++++++++++ > 2 files changed, 28 insertions(+), 1 deletions(-) > > diff --git a/pyanaconda/dispatch.py b/pyanaconda/dispatch.py > index 85e66b0..36ca40a 100644 > --- a/pyanaconda/dispatch.py > +++ b/pyanaconda/dispatch.py > @@ -40,7 +40,7 @@ from flags import flags > from upgrade import upgradeMountFilesystems > from upgrade import restoreTime > from upgrade import upgradeMigrateFind > -from upgrade import findRootParts, queryUpgradeContinue > +from upgrade import findRootParts, queryUpgradeContinue, upgradeUsr > from installmethod import doMethodComplete > from kickstart import doKickstart, runPostScripts > from sshd import doSshd > @@ -274,6 +274,7 @@ class Dispatcher(object): > self.add_step("upgradecontinue", queryUpgradeContinue) > self.add_step("upgrademigfind", upgradeMigrateFind) > self.add_step("upgrademigratefs") > + self.add_step("upgradeusr", upgradeUsr) > self.add_step("storagedone", storageComplete) > self.add_step("enablefilesystems", turnOnFilesystems) > self.add_step("upgbootloader") > diff --git a/pyanaconda/upgrade.py b/pyanaconda/upgrade.py > index 5d9fe4f..95b8cd7 100644 > --- a/pyanaconda/upgrade.py > +++ b/pyanaconda/upgrade.py > @@ -256,6 +256,31 @@ def upgradeMountFilesystems(anaconda): > except Exception as e: > log.warning("error checking selinux state: %s" %(e,)) > > +def upgradeUsr(anaconda): > + """ > + Handle the upgrade of /bin, /sbin, /lib, /lib64 to symlinks into > /usr/ > + This uses dracut's convertfs module > + """ > + dirs = ["/bin", "/sbin", "/lib", "/lib64"] > + dirs = [ROOT_PATH+d for d in dirs] > + if False not in map(os.path.islink, dirs): > + log.info("upgradeusr dirs are already symlinks") > + return > + > + # run /run/initramfs/usr/bin/convertfs <path_to_sysroot> > + if > iutil.execWithRedirect("/usr/lib/dracut/modules.d/30convertfs/convertfs.sh", > + [ROOT_PATH], > + stdout="/dev/tty5", > stderr="/dev/tty5"): > + log.error("convertfs failed") > + > + rc = anaconda.intf.messageWindow(_("/usr upgrade failed"), > + _("convertfs failed to upgrade your > system to symlink " > + "into /usr. This is required for Fedora > 17 to work." > + " The upgrade cannot continue." > + "\n\n")) > + sys.exit(0) > + log.info("convertfs was successful") > + > def setSteps(anaconda): > dispatch = anaconda.dispatch > dispatch.reset_scheduling() # scrap what is scheduled > @@ -278,6 +303,7 @@ def setSteps(anaconda): > "upgrademigratefs", > "enablefilesystems", > "upgradecontinue", > + "upgradeusr", > "reposetup", > "upgbootloader", > "postselection", > -- > 1.7.6.5 > > _______________________________________________ > Anaconda-devel-list mailing list > Anaconda-devel-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/anaconda-devel-list > _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list