Mailinglist Archive: opensuse-autoinstall (68 mails)
| < Previous | Next > |
[opensuse-autoinstall] OpenSUSE 11.0: Truly non-interactive "zypper update"?
- From: Bernd Nies <listuser@xxxxxxxxxx>
- Date: Thu, 26 Mar 2009 16:25:09 +0100
- Message-id: <49CB9E55.1070903@xxxxxxxxxx>
Hi,
Ist there a non-documented truly non-interactive option of zypper? I need to run it from an Autoyast postinstall script to perform updates after we have localized the software repositories. The code I use for this to perform is:
==CUT==
# Package repositories after installation
zypper repos -d
# Delete all repositories ...
repositories=`zypper repos | awk '($1~/^[0-9]+$/){print $1}'`
zypper removerepo $repositories
# Set install server as package repository ...
zypper addrepo http://$INSTSRV/suse/11.0 "openSUSE 11.0 DVD"
zypper addrepo http://$INSTSRV/suse/opensuse-updates/11.0 "openSUSE 11.0
Updates"
zypper modifyrepo -r "openSUSE 11.0 Updates"
zypper refresh -f
zypper repos -d
# One of installed patches affects the package manager itself
# Therefore we must run it at least twice. Somehow the RPM database is
# corrupt rebuild it or the list of available updates does not match.
cd /tmp
for (( i=1; i<=2; i++ )); do
echo "Updating system (run $i) ..."
zypper -n verify
zypper -n list-updates
zypper -n update --skip-interactive --auto-agree-with-licenses
--force-resolution
echo "Rebuilding RPM database ..."
rpm --rebuilddb -v
done
==CUT==
The option "--force-resolution" had to be added because there was once a smbclient patch that hindered an online update and asked to confirm to delete smbclient due to a serious bug. Now there has another patch appeared and that option aborts online update completely. Output from /var/adm/autoinstall/logs/i250swupdate.log:
==CUT==
+ zypper -n list-updates
Reading installed packages...
Patches
Warning: These are only the updates affecting the updater itself.
Other updates are available too.
Repository | Name | Version | Category | Status
----------------------+--------------+---------+-------------+-------
openSUSE 11.0 Updates | softwaremgmt | 365 | recommended | Needed
openSUSE 11.0 Updates | softwaremgmt | 462 | recommended | Needed
+ zypper -n update --skip-interactive --auto-agree-with-licenses
--force-resolution
Reading installed packages...
Problem: cannot install both patch:softwaremgmt-462.noarch and
patch:softwaremgmt-365.noarch
Solution 1: do not install patch:softwaremgmt-462.noarch
Solution 2: do not install patch:softwaremgmt-365.noarch
Choose from above solutions by number or cancel [1/2/C]: c
==CUT==
Isn't there an option that just does the right thing and updates all packages
to the latest release?
Thanks in advance.
Best regards,
Bernd
--
To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-autoinstall+help@xxxxxxxxxxxx
Ist there a non-documented truly non-interactive option of zypper? I need to run it from an Autoyast postinstall script to perform updates after we have localized the software repositories. The code I use for this to perform is:
==CUT==
# Package repositories after installation
zypper repos -d
# Delete all repositories ...
repositories=`zypper repos | awk '($1~/^[0-9]+$/){print $1}'`
zypper removerepo $repositories
# Set install server as package repository ...
zypper addrepo http://$INSTSRV/suse/11.0 "openSUSE 11.0 DVD"
zypper addrepo http://$INSTSRV/suse/opensuse-updates/11.0 "openSUSE 11.0
Updates"
zypper modifyrepo -r "openSUSE 11.0 Updates"
zypper refresh -f
zypper repos -d
# One of installed patches affects the package manager itself
# Therefore we must run it at least twice. Somehow the RPM database is
# corrupt rebuild it or the list of available updates does not match.
cd /tmp
for (( i=1; i<=2; i++ )); do
echo "Updating system (run $i) ..."
zypper -n verify
zypper -n list-updates
zypper -n update --skip-interactive --auto-agree-with-licenses
--force-resolution
echo "Rebuilding RPM database ..."
rpm --rebuilddb -v
done
==CUT==
The option "--force-resolution" had to be added because there was once a smbclient patch that hindered an online update and asked to confirm to delete smbclient due to a serious bug. Now there has another patch appeared and that option aborts online update completely. Output from /var/adm/autoinstall/logs/i250swupdate.log:
==CUT==
+ zypper -n list-updates
Reading installed packages...
Patches
Warning: These are only the updates affecting the updater itself.
Other updates are available too.
Repository | Name | Version | Category | Status
----------------------+--------------+---------+-------------+-------
openSUSE 11.0 Updates | softwaremgmt | 365 | recommended | Needed
openSUSE 11.0 Updates | softwaremgmt | 462 | recommended | Needed
+ zypper -n update --skip-interactive --auto-agree-with-licenses
--force-resolution
Reading installed packages...
Problem: cannot install both patch:softwaremgmt-462.noarch and
patch:softwaremgmt-365.noarch
Solution 1: do not install patch:softwaremgmt-462.noarch
Solution 2: do not install patch:softwaremgmt-365.noarch
Choose from above solutions by number or cancel [1/2/C]: c
==CUT==
Isn't there an option that just does the right thing and updates all packages
to the latest release?
Thanks in advance.
Best regards,
Bernd
--
To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-autoinstall+help@xxxxxxxxxxxx
| < Previous | Next > |