Meego Wiki
Views

Upgrading MeeGo Versions

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
 
(One intermediate revision not shown)
Line 48: Line 48:
(add any repo that you think you might need here, such as handset or IVI).
(add any repo that you think you might need here, such as handset or IVI).
-
This last step installs the GPG key as /etc/pki/rpm-gpg/RPM-GPG-KEY-meego01:
+
clearing zypper's cache:
-
   # zypper install --force meego-release
+
  # zypper clean --all
 +
  # zypper refresh
 +
 
 +
That should make zypper forget all about the old repositories. The refresh step forces zypper to get the new repo data, and since we don't have the key installed yet,
 +
it will prompt for temporarily accepting it.
 +
 
 +
The following step installs the GPG key as /etc/pki/rpm-gpg/RPM-GPG-KEY-meego01:
 +
 
 +
   # zypper install --force --from core meego-release
 +
 
 +
You can follow up by repeating the 'clear' and 'refresh' step to confirm zypper now accepts the signed key.
=== Then what? ===
=== Then what? ===
Line 62: Line 72:
1.1 are not consistent. Don't worry, you'll get newer software, not old stuff.
1.1 are not consistent. Don't worry, you'll get newer software, not old stuff.
-
Start with clearing zypper's cache:
+
=== The easy method ===
-
   # zypper clean --all
+
   # zypper dup
-
  # zypper refresh
+
-
That should make zypper forget all about the old repositories, and check and use the new key we just
+
This calls `zypper dist-upgrade`. It basically tries to do what the manual procedure below is. If it
-
installed. If everything is OK, you will not get warnings about keys here anymore.
+
works for you, awesome. I have not yet had too much experience with the automated way but it seems to
 +
work well.
-
=== Upgrading all your packages ===
+
=== Upgrading all your packages manually ===
Now we need to upgrade all the installed packages. There are several ways of doing this, but my favorite
Now we need to upgrade all the installed packages. There are several ways of doing this, but my favorite

Latest revision as of 21:24, 31 October 2010

Contents

So you want to upgrade your MeeGo system from 1.(x) to 1.(x+1)

There's been a lot of questions recently on the forums and IRC about how to upgrade an existing MeeGo installation from e.g. 1.0 to 1.1 without reinstalling. This isn't something that's easy right now, and certainly not supported. However, it is very much so possible with zypper, and requires special attention to the process in order to not end up with a non-booting system, or worse (data loss).

Warning: do not try this at home

The procedure described below assumes that you know what packages do and which ones you can (probably) miss, upgrade or temporary break while you upgrade your system. It's not a short procedure, it's not safe, it's not guaranteed to work. If you have any chance to do a reinstall, do that instead.

Please reinstall instead

Yes, this is the supported method. Take the time to backup your data, or convert your box to use a /home partition so that the next upgrade you can just rewrite your root partition without losing your personal data. Copy your data to something safe, like another computer, or a usb hard drive.

Make Backups

I'm not responsible for you losing your data. You are yourself.

Ok, get on with it already

Upgrading a live and running installation of MeeGo 1.0 to 1.1 can be accomplished by forcing zypper to reinstall all packages and package groups from the 1.1 repo's instead of the 1.0 repo's.

In essence, one needs to delete all the 1.0 repo files, and add the 1.1 repo files:

 # cd /etc/zypp/repo.d/
 # rm -f *.repo

Then you need to get the new repo's and keys:

Find the .ks file for the image you want to install, for instance over here: [[1]]

Open the kickstart file, and look for the lines that add repo files to the kickstart. These are the new repo files you should import on your system: (Note: you need to add "repodata/" after the link found in the kickstart files)

 # zypper addrepo --type rpm-md --check --name adobe            http://linuxdownload.adobe.com/linux/i386/repodata/                     adobe
 # zypper addrepo --type rpm-md --check --name=core             http://repo.meego.com/MeeGo/releases/1.1/core/repos/ia32/packages/      core
 # zypper addrepo --type rpm-md --check --name=netbook          http://repo.meego.com/MeeGo/releases/1.1/netbook/repos/ia32/packages/   netbook
 # zypper addrepo --type rpm-md --check --name=non-oss          http://repo.meego.com/MeeGo/releases/1.1/non-oss/repos/ia32/packages/   non-oss
 # zypper addrepo --type rpm-md --check --name=updates-core     http://repo.meego.com/MeeGo/updates/1.1/core/repos/ia32/packages/       updates-core
 # zypper addrepo --type rpm-md --check --name=updates-netbook  http://repo.meego.com/MeeGo/updates/1.1/netbook/repos/ia32/packages/    updates-netbook
 # zypper addrepo --type rpm-md --check --name=updates-non-oss  http://repo.meego.com/MeeGo/updates/1.1/non-oss/repos/ia32/packages/    updates-non-oss

(add any repo that you think you might need here, such as handset or IVI).

clearing zypper's cache:

 # zypper clean --all
 # zypper refresh

That should make zypper forget all about the old repositories. The refresh step forces zypper to get the new repo data, and since we don't have the key installed yet, it will prompt for temporarily accepting it.

The following step installs the GPG key as /etc/pki/rpm-gpg/RPM-GPG-KEY-meego01:

 # zypper install --force --from core meego-release

You can follow up by repeating the 'clear' and 'refresh' step to confirm zypper now accepts the signed key.

Then what?

Well, that was the easy part. Now zypper knows nothing but the new repository files and whatever we get it to install, it will be from the new 1.1 repositories.

This is where the hard and dangerous part starts: We need to tell zypper to basically reinstall every package, but from the new repositories. Just running a 'zypper update' will not work, as zypper refuses to downgrade packages. Yes, you will be "downgrading" packages because version numbers between 1.0 and 1.1 are not consistent. Don't worry, you'll get newer software, not old stuff.

The easy method

 # zypper dup

This calls `zypper dist-upgrade`. It basically tries to do what the manual procedure below is. If it works for you, awesome. I have not yet had too much experience with the automated way but it seems to work well.

Upgrading all your packages manually

Now we need to upgrade all the installed packages. There are several ways of doing this, but my favorite method is to clean the system from old packages first that are not needed to do the upgrade:

 # init 3

that's right, drop to the console. This way we can just remove a ton of packages, which makes the critical part of the upgrade a bit easier. At least you won't be stuck in an Xorg session that froze up leaving you unable to go to the console and forcing you to reboot a machine that was just reinstalling glibc making all your programs unrunnable because ldconfig wasn't run (yeah, it's happened to me).

 # zypper remove mutter
 # zypper remove gtk+-2
 # ...

Check the list properly and make sure you're not deleting vital libraries and packages. Although this step is optional, pruning the update list is highly recommended.

Next we'll make a list of packages that need upgrading to the new repo versions, and install those one by one:

 # for p in `zypper pa| grep ^v |cut -d '|' -f3`; do zypper -n install --force $p l done

Repeat this until nothing happens anymore, possibly followed by:

 # zypper refresh

Also, check the output of

 # zypper pa

and look for packages that have a v at the start of the line:

 # zypper pa| grep ^v
 v | core       | build                                                    | 2010.04.15-1.3             | noarch
 v | core       | evolution-data-server                                    | 2.30.2~20100629-1.11       | i586  
 v | netbook    | gcalctool                                                | 5.25.91-1.88               | i586  

those still need to be forced to update, or removed.

Some packages refuse to be upgraded even so, they might need to be forced with repo, like this:

 # zypper install --force --from core sample-media

If zypper refuses to upgrade a package marked with v after a few tries, try removing the package, and reinstalling it. Or see if the package is now under a new name and the newly named package needs to be installed instead.

Conclusion

While dangerous and a lot of work, it's possible with zypper to force reinstallation of all the packages against a new repository one-by-one with --force. This is definitely not recommended for anyone who wants their system to be stable and/or safe. Please use at your own risk.

Personal tools