Hello community, here is the log from the commit of package libzypp checked in at Thu Sep 20 16:32:20 CEST 2007. -------- --- libzypp/libzypp.changes 2007-09-20 11:23:27.000000000 +0200 +++ /mounts/work_src_done/STABLE/libzypp/libzypp.changes 2007-09-20 15:38:11.000000000 +0200 @@ -1,0 +2,8 @@ +Thu Sep 20 15:19:53 CEST 2007 - ma@suse.de + +- Avoid calling rpm repeatedly in case of an error. This is fault-prone, + esp. if the error occurred executing the packages post-install script. +- version 3.24.5 +- revision 7317 + +------------------------------------------------------------------- Old: ---- libzypp-3.24.4.tar.bz2 New: ---- libzypp-3.24.5.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzypp.spec ++++++ --- /var/tmp/diff_new_pack.n10268/_old 2007-09-20 16:31:36.000000000 +0200 +++ /var/tmp/diff_new_pack.n10268/_new 2007-09-20 16:31:36.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package libzypp (Version 3.24.4) +# spec file for package libzypp (Version 3.24.5) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -16,9 +16,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build AutoReqProv: on Summary: Package, Patch, Pattern, and Product Management -Version: 3.24.4 +Version: 3.24.5 Release: 1 -Source: libzypp-3.24.4.tar.bz2 +Source: libzypp-3.24.5.tar.bz2 Source1: libzypp-rpmlintrc Prefix: /usr Provides: yast2-packagemanager @@ -44,7 +44,7 @@ Ladislav Slezak <lslezak@suse.cz> %package devel -Requires: libzypp == 3.24.4 +Requires: libzypp == 3.24.5 Requires: libxml2-devel curl-devel openssl-devel rpm-devel glibc-devel zlib-devel Requires: bzip2 popt-devel dbus-1-devel glib2-devel hal-devel boost-devel libstdc++-devel Requires: cmake @@ -129,6 +129,11 @@ %{_libdir}/pkgconfig/libzypp.pc %changelog * Thu Sep 20 2007 - ma@suse.de +- Avoid calling rpm repeatedly in case of an error. This is fault-prone, + esp. if the error occurred executing the packages post-install script. +- version 3.24.5 +- revision 7317 +* Thu Sep 20 2007 - ma@suse.de - If a package is deselected by user, apply this soft lock to all available versions of this package. - version 3.24.4 ++++++ libzypp-3.24.4.tar.bz2 -> libzypp-3.24.5.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.24.4/devel/devel.ma/Parse.cc new/libzypp-3.24.5/devel/devel.ma/Parse.cc --- old/libzypp-3.24.4/devel/devel.ma/Parse.cc 2007-09-20 11:23:13.000000000 +0200 +++ new/libzypp-3.24.5/devel/devel.ma/Parse.cc 2007-09-20 15:38:01.000000000 +0200 @@ -308,6 +308,11 @@ return true; } +bool install() +{ + SEC << getZYpp()->commit( ZYppCommitPolicy() ) << endl; +} + /////////////////////////////////////////////////////////////////// struct ConvertDbReceive : public callback::ReceiveReport<target::ScriptResolvableReport> @@ -553,32 +558,22 @@ USR << "pool: " << pool << endl; SEC << pool.knownRepositoriesSize() << endl; - if ( 0 ) + if ( 1 ) { { - zypp::base::LogControl::TmpLineWriter shutUp; - //getZYpp()->initTarget( sysRoot ); - getZYpp()->initTarget( "/" ); + zypp::base::LogControl::TmpLineWriter shutUp; + getZYpp()->initTarget( sysRoot ); + //getZYpp()->initTarget( "/" ); } MIL << "Added target: " << pool << endl; } //std::for_each( pool.begin(), pool.end(), Xprint() ); - - repo::DeltaCandidates deltas( repo::makeDeltaCandidates( pool.knownRepositoriesBegin(), - pool.knownRepositoriesEnd() ) ); - - DBG << "patch: " << deltas.patchRpms(0).size() << " " << deltas.patchRpms(0) << endl; - DBG << "delta: " << deltas.deltaRpms(0).size() << " " << deltas.deltaRpms(0) << endl; - - PoolItem pi( getPi<Package>( "kernel-default", Edition("2.6.22.5-12") ) ); - USR << pi << endl; - USR << repoProvidePackage( pi ) << endl; - - pi = getPi<Package>( "update-test-affects-package-manager", Edition("99-99") ); + PoolItem pi = getPi<Package>( "update-test-affects-package-manager", Edition("99-99") ); USR << pi << endl; - USR << repoProvidePackage( pi ) << endl; + pi.status().setTransact( true, ResStatus::USER ); + //install(); /////////////////////////////////////////////////////////////////// INT << "===[END]============================================" << endl << endl; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.24.4/package/libzypp.changes new/libzypp-3.24.5/package/libzypp.changes --- old/libzypp-3.24.4/package/libzypp.changes 2007-09-20 11:23:13.000000000 +0200 +++ new/libzypp-3.24.5/package/libzypp.changes 2007-09-20 15:38:02.000000000 +0200 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Thu Sep 20 15:19:53 CEST 2007 - ma@suse.de + +- Avoid calling rpm repeatedly in case of an error. This is fault-prone, + esp. if the error occurred executing the packages post-install script. +- version 3.24.5 +- revision 7317 + +------------------------------------------------------------------- Thu Sep 20 11:00:04 CEST 2007 - ma@suse.de - If a package is deselected by user, apply this soft lock to all diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.24.4/VERSION.cmake new/libzypp-3.24.5/VERSION.cmake --- old/libzypp-3.24.4/VERSION.cmake 2007-09-20 11:23:13.000000000 +0200 +++ new/libzypp-3.24.5/VERSION.cmake 2007-09-20 15:38:02.000000000 +0200 @@ -47,4 +47,4 @@ SET(LIBZYPP_MAJOR "3") SET(LIBZYPP_MINOR "24") SET(LIBZYPP_COMPATMINOR "24") -SET(LIBZYPP_PATCH "4") +SET(LIBZYPP_PATCH "5") diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.24.4/zypp/target/TargetImpl.cc new/libzypp-3.24.5/zypp/target/TargetImpl.cc --- old/libzypp-3.24.4/zypp/target/TargetImpl.cc 2007-09-20 11:23:14.000000000 +0200 +++ new/libzypp-3.24.5/zypp/target/TargetImpl.cc 2007-09-20 15:38:02.000000000 +0200 @@ -519,78 +519,50 @@ progress.connect(); bool success = true; unsigned flags = 0; + // Why force and nodeps? + // + // Because zypp builds the transaction and the resolver asserts that + // everything is fine. + // We use rpm just to unpack and register the package in the database. + // We do this step by step, so rpm is not aware of the bigger context. + // So we turn off rpms internal checks, because we do it inside zypp. + flags |= rpm::RpmDb::RPMINST_NODEPS; + flags |= rpm::RpmDb::RPMINST_FORCE; + // if (p->installOnly()) flags |= rpm::RpmDb::RPMINST_NOUPGRADE; if (policy_r.dryRun()) flags |= rpm::RpmDb::RPMINST_TEST; if (policy_r.rpmNoSignature()) flags |= rpm::RpmDb::RPMINST_NOSIGNATURE; try { - progress.tryLevel( target::rpm::InstallResolvableReport::RPM ); + progress.tryLevel( target::rpm::InstallResolvableReport::RPM_NODEPS_FORCE ); rpm().installPackage( localfile, flags ); if ( progress.aborted() ) { WAR << "commit aborted by the user" << endl; progress.disconnect(); + success = false; abort = true; break; } - } catch (Exception & excpt_r) { ZYPP_CAUGHT(excpt_r); - WAR << "Install failed, retrying with --nodeps" << endl; - if (policy_r.dryRun()) + if ( policy_r.dryRun() ) { WAR << "dry run failed" << endl; progress.disconnect(); break; } - - try - { - progress.tryLevel( target::rpm::InstallResolvableReport::RPM_NODEPS ); - flags |= rpm::RpmDb::RPMINST_NODEPS; - rpm().installPackage( localfile, flags ); - - if ( progress.aborted() ) - { - WAR << "commit aborted by the user" << endl; - abort = true; - progress.disconnect(); - break; - } - } - catch (Exception & excpt_r) - { - ZYPP_CAUGHT(excpt_r); - WAR << "Install failed again, retrying with --force --nodeps" << endl; - - try - { - progress.tryLevel( target::rpm::InstallResolvableReport::RPM_NODEPS_FORCE ); - flags |= rpm::RpmDb::RPMINST_FORCE; - rpm().installPackage( localfile, flags ); - } - catch (Exception & excpt_r) - { - remaining.push_back( *it ); - success = false; - ZYPP_CAUGHT(excpt_r); - } - - if ( progress.aborted() ) - { - WAR << "commit aborted by the user" << endl; - abort = true; - progress.disconnect(); - break; - } - } + // else + WAR << "Install failed" << endl; + remaining.push_back( *it ); + success = false; } - if (success - && !policy_r.dryRun()) + + if ( success && !policy_r.dryRun() ) { it->status().resetTransact( ResStatus::USER ); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-3.24.4/zypp/ZYppCallbacks.h new/libzypp-3.24.5/zypp/ZYppCallbacks.h --- old/libzypp-3.24.4/zypp/ZYppCallbacks.h 2007-09-20 11:23:14.000000000 +0200 +++ new/libzypp-3.24.5/zypp/ZYppCallbacks.h 2007-09-20 15:38:02.000000000 +0200 @@ -24,12 +24,12 @@ /////////////////////////////////////////////////////////////////// namespace zypp { ///////////////////////////////////////////////////////////////// - + struct ProgressReport : public callback::ReportBase { virtual void start( const ProgressData &/*task*/ ) {} - + virtual bool progress( const ProgressData &/*task*/ ) { return true; } @@ -46,7 +46,7 @@ struct ProgressReportAdaptor { - + ProgressReportAdaptor( const ProgressData::ReceiverFnc &fnc, callback::SendReport<ProgressReport> &report ) : _fnc(fnc) @@ -54,7 +54,7 @@ , _first(true) { } - + bool operator()( const ProgressData &progress ) { if ( _first ) @@ -62,27 +62,27 @@ _report->start(progress); _first = false; } - + _report->progress(progress); bool value = true; if ( _fnc ) value = _fnc(progress); - - + + if ( progress.finalReport() ) { _report->finish(progress); } return value; } - + ProgressData::ReceiverFnc _fnc; callback::SendReport<ProgressReport> &_report; bool _first; }; - + //////////////////////////////////////////////////////////////////////////// - + namespace repo { // progress for downloading a resolvable @@ -343,7 +343,7 @@ { /** * Prompt for authentication data. - * + * * \param url URL which required the authentication * \param msg prompt text * \param auth_data input/output object for handling authentication @@ -425,6 +425,7 @@ }; // the level of RPM pushing + /** \deprecated We fortunately no longer do 3 attempts. */ enum RpmLevel { RPM, RPM_NODEPS, ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de