Author: locilka Date: Mon Apr 20 14:01:01 2009 New Revision: 56853 URL: http://svn.opensuse.org/viewcvs/yast?rev=56853&view=rev Log: - Fixed Vendor module to use zypp history file instead of using y2logRPM (bnc #456446). Modified: branches/tmp/SLE-11-SP1-Stash/installation/package/yast2-installation.changes branches/tmp/SLE-11-SP1-Stash/installation/src/modules/Vendor.ycp Modified: branches/tmp/SLE-11-SP1-Stash/installation/package/yast2-installation.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/SLE-11-SP1-Stash/installation/package/yast2-installation.changes?rev=56853&r1=56852&r2=56853&view=diff ============================================================================== --- branches/tmp/SLE-11-SP1-Stash/installation/package/yast2-installation.changes (original) +++ branches/tmp/SLE-11-SP1-Stash/installation/package/yast2-installation.changes Mon Apr 20 14:01:01 2009 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Apr 20 13:59:31 CEST 2009 - locilka@suse.cz + +- Fixed Vendor module to use zypp history file instead of using + y2logRPM (bnc #456446). + +------------------------------------------------------------------- Tue Apr 7 13:04:20 CEST 2009 - ug@suse.de - changed the error message of missing hard disks during Modified: branches/tmp/SLE-11-SP1-Stash/installation/src/modules/Vendor.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/SLE-11-SP1-Stash/installation/src/modules/Vendor.ycp?rev=56853&r1=56852&r2=56853&view=diff ============================================================================== --- branches/tmp/SLE-11-SP1-Stash/installation/src/modules/Vendor.ycp (original) +++ branches/tmp/SLE-11-SP1-Stash/installation/src/modules/Vendor.ycp Mon Apr 20 14:01:01 2009 @@ -33,8 +33,12 @@ global define void DriverUpdate1 () { list<string> updatefiles = (list<string>)WFM::Read (.local.dir, ["/update", []]); - if (size (updatefiles) <= 0) + if (size (updatefiles) <= 0) { + y2milestone ("No files in /update, skipping driver update..."); return; + } + + y2milestone ("Extracting driver update..."); // clean up, just in case SCR::Execute(.target.bash, "/bin/rm -rf /tmp/update"); @@ -43,19 +47,40 @@ WFM::Execute(.local.bash, "l=/var/log/driverupdate.log ; [ -f $l ] && /bin/cat $l " + ">> '" + String::Quote (Installation::destdir) + "$l'"); - // copy all update files + // copy all update files from inst-sys to installed system WFM::Execute(.local.bash, "/bin/cp -a /update " + "'" + String::Quote (Installation::destdir) + "/tmp/update'"); + string logfile = "/var/log/zypp/history"; + + string runcmd = + "cd /; \n" + + "for i in /tmp/update/[0-9]*/install ; do \n" + + // Logging extracting the driver update + " echo # Installing Driver Update from $i >>" + logfile + "; \n" + + " TMPFILE=${i}rpm_install_tmpfile; \n" + + " [ -x \"/bin/mktemp\" ] && TMPFILE=`/bin/mktemp`; \n" + + // Extracting the driver update archives + " cd $i; \n" + + " [ -f \"update.tar.gz\" ] && /bin/tar -zxf \"update.tar.gz\"; \n" + + " [ -f \"update.tgz\" ] && /bin/tar -zxf \"update.tgz\"; \n" + + // Installing all extracted RPMs + " rpm -Uv --force *.rpm 2>>$TMPFILE; \n" + + // Logging errors + " [ -s \"$TMPFILE\" ] && echo \"\">>" + logfile + " && sed 's/^\\(.*\\)/# \\1/' $TMPFILE>>" + logfile + "; \n" + + " rm -rf $TMPFILE; \n" + + // Running update.post script + " [ -f \"update.post\" ] && /bin/chmod +x \"update.post\" && \"update.post\" \"$i\"; \n" + + "done;"; + + y2milestone ("Calling: +--------------------------------------------------------- +%1 +---------------------------------------------------------", runcmd); + // unpack update files and run update.post scripts - SCR::Execute(.target.bash, - "cd / ; " + - "echo \"Installing driver update\" >> " + Directory::logdir + "/y2logRPM ; " + - "for i in /tmp/update/[0-9]*/install ; do " + - " [ -f \"$i/update.tar.gz\" ] && /bin/tar -zxf \"$i/update.tar.gz\" ; " + - " rpm -Uv $i/*.rpm 2 >> " + Directory::logdir + "/y2logRPM ; " + - " [ -f \"$i/update.post\" ] && /bin/chmod +x \"$i/update.post\" && \"$i/update.post\" \"$i\" ; " + - "done"); + // via SCR chrooted into the installed system + integer cmd = (integer) SCR::Execute (.target.bash, runcmd); } global define void DriverUpdate2 () -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org