1. backup the directory which contains your repo file.
cp -Rv /etc/zypp/repos.d/ /etc/zypp/repos.old/
2. Edit your repo file, this example your current repos points to 11.3.
and you want to change it to 11.4.
watch out for this bug: https://bugzilla.novell.com/show_bug.cgi?id=677425
3. Edit your repo files.
Using ex since it is a command based editor.
ex -sc 'argdo %s/11.3/11.4/ge|x' /etc/zypp/repos.d/*
Using ed since it is also a command base editor.
for file in /etc/zypp/repos.d/*.repo; do
ed -s "$file" <<< $'g/11.3/s//11.4/g\nw\nq'
done
ed -s "$file" <<< $'g/11.3/s//11.4/g\nw\nq'
done
If you dont like the above unix STANDARD command based editor probably because you never heard of it then you can choose the following. (at your won risk :P )
sed -i 's/11.3/11.4/g' /etc/zypp/repos.d/*
A lot of folks will argue that sed is a stream editor not a file editor and ed is the standard UNIX command-based editor but less known to most unix/linux users. Of course there is vi and emacs! OpenSuSE has perl-5 so we use the command below.
perl -pi -e 's/11.3/11.4/g' /etc/zypp/repos.d/*
4. Now you should see that your repos are pointing to 11.4 while doing a refresh. Accept the
keys from your new repos ( if there is) When its done you can dup using zypper.
zypper ref && zypper dup
5. It will show you what packages are going to be upgraded, install or remove. say yes to zypper and wait till its done.
Reboot is needed since you have upgraded everything in your system. [ don't forget to cross your fingers ;-) ]
Be good folks.
No comments:
Post a Comment