系统升级
目录
从 Leap 15.6 或更新版本升级
从 Leap 15.6 开始,openSUSE 提供了一个自动升级工具 opensuse-migration-tool,只需两行命令:
sudo zypper install opensuse-migration-tool sudo opensuse-migration-tool
然后按照界面指示操作即可。你可以选择升级到更新版本的 Leap 发行版或 SLE 企业发行版,也可以升级到 Tumbleweed 或 Slowroll 滚动发行版。
升级完成之后,请重启系统:
sudo zypper reboot
从 Leap 15.5 或更旧版本升级
Manual upgrade needs modifications of repositories, which is done automatically when using the opensuse-migration-tool. If you do not perform the following described steps, the upgrade will fail with repository errors.
Note on 3rd-party repositories
3rd-party repositories (e.g. OBS, Packman, VLC, ...) can cause issues during migration.
This is a big problem especially early in a Leap development cycle as 3rd repositories may be unavailable or broken. Some repositories might hardcode Leap version instead of using $RELEASEVER variable, leading to unresolved dependencies in outdated software.
We strongly recommend disabling all non-official repositories before migrating.
zypper lr -u | egrep -v "/distribution/|/update/" # list the 3rd party repos zypper modifyrepo -d <REPO_ID> # to disable individual repositories
Distribution repositories
As described above, Leap 16 no longer utilizes update, backport and SLE repositories. Updates are now deployed via the standard oss and non-oss repositories instead.
Prior upgrade to Leap 16, the no longer existing distribution repositories needs to be disabled or removed. If this step is skipped, the upgrade will likely fail due to non existing repository errors.
This is the old set of repositories for Leap 15.6 (without debug and source):
# | Alias | URI --+---------------------------+-------------------------+---------------------------------- 1 | openSUSE:repo-non-oss | http://cdn.opensuse.org/distribution/leap/15.6/repo/non-oss 2 | openSUSE:repo-oss | http://cdn.opensuse.org/distribution/leap/15.6/repo/oss 3 | openSUSE:repo-openh264 | http://codecs.opensuse.org/openh264/openSUSE_Leap 4 | openSUSE:update-backports | http://cdn.opensuse.org/update/leap/15.6/backports 5 | openSUSE:update-non-oss | http://cdn.opensuse.org/update/leap/15.6/non-oss 6 | openSUSE:update-oss | http://cdn.opensuse.org/update/leap/15.6/oss 7 | openSUSE:update-sle | http://cdn.opensuse.org/update/leap/15.6/sle
This is the new set of repositories for Leap 16.0 (without debug and source):
# | Alias | URI --+---------------------------+-------------------------+---------------------------------- 1 | openSUSE:repo-non-oss | http://cdn.opensuse.org/distribution/leap/16.0/repo/non-oss 2 | openSUSE:repo-oss | http://cdn.opensuse.org/distribution/leap/16.0/repo/oss 3 | openSUSE:repo-openh264 | http://codecs.opensuse.org/openh264/openSUSE_Leap
Manual upgrade with zypper dup
After you have adjusted your repositories as described above, run the following commands
sudo zypper --releasever 16.0 dup sudo reboot # After a successful migration
Manual upgrade using openSUSE-repos package
Check this news article for basic information about openSUSE-repos
Alternatively, you can manually install the openSUSE-repos package from Leap 16.0 to update repository definitions. Either get it from https://software.opensuse.org/package/openSUSE-repos-Leap.
As long as definitions did not change you can install openSUSE-repos from target release
sudo zypper --releasever 16.0 install openSUSE-repos-Leap
You can also get the package with osc
zypper in osc osc getbinaries -d /tmp openSUSE:Leap:16.0 openSUSE-repos:openSUSE-repos-Leap standard x86_64 sudo zypper in /tmp/openSUSE-repos-Leap*.rpm
Once you have Leap 16.0 repository definitions run
sudo zypper --releasever 16.0 dup sudo reboot # After a successful migration