Mailinglist Archive: zypp-devel (83 mails)

< Previous Next >
Re: [zypp-devel] Re: [zypp-commit] r10319 - in /branches/SuSE-Linux-11_0-Branch/libzypp: devel/devel.ma/NewPool.cc package/libzypp.changes zypp/target/rpm/RpmDb.cc
  • From: Michael Andres <ma@xxxxxxx>
  • Date: Tue, 3 Jun 2008 10:39:54 +0200
  • Message-id: <20080603083954.GB14287@xxxxxxx>
On Tue, Jun 03, Josef Reidinger wrote:

mlandres@xxxxxxxxxxxxxxxx wrote:
Author: mlandres
Date: Mon Jun 2 18:00:31 2008
New Revision: 10319
URL: http://svn.opensuse.org/viewcvs/zypp?rev=10319&view=rev
Log:
Allow to skip/abort failed package removal
Modified:
branches/SuSE-Linux-11_0-Branch/libzypp/devel/devel.ma/NewPool.cc
branches/SuSE-Linux-11_0-Branch/libzypp/package/libzypp.changes
branches/SuSE-Linux-11_0-Branch/libzypp/zypp/target/rpm/RpmDb.cc
Modified:
branches/SuSE-Linux-11_0-Branch/libzypp/devel/devel.ma/NewPool.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-Linux-11_0-Branch/libzypp/devel/devel.ma/NewPool.cc?rev=10319&r1=10318&r2=10319&view=diff
==============================================================================
--- branches/SuSE-Linux-11_0-Branch/libzypp/devel/devel.ma/NewPool.cc
(original)
+++ branches/SuSE-Linux-11_0-Branch/libzypp/devel/devel.ma/NewPool.cc Mon
Jun 2 18:00:31 2008
@@ -561,20 +561,16 @@
SEC << zypp::getZYpp()->diskUsage() << endl;
- for_( it, pool.begin(), pool.end() )
+ for_( it, pool.byKindBegin<SrcPackage>(), pool.byKindEnd<SrcPackage>()
)
{
- //MIL << *it << endl;
- //DBG << (*it)->diskusage() << endl;
+ MIL << *it << endl;
}
- PoolItem pu ( getPi<Package>("amarok") );
- PoolItem pi ( getPi<Package>("amarok",Edition("1.4.7-37")) );
-
- pi.status().setTransact( true, ResStatus::USER );
- SEC << zypp::getZYpp()->diskUsage() << endl;
+ for_( it, pool.byIdentBegin( ResKind::srcpackage, "zypper" ),
pool.byIdentEnd( ResKind::srcpackage, "zypper" ) )
+ {
+ WAR << *it << endl;
+ }
- pu.status().setTransact( true, ResStatus::USER );
- SEC << zypp::getZYpp()->diskUsage() << endl;
///////////////////////////////////////////////////////////////////
Modified: branches/SuSE-Linux-11_0-Branch/libzypp/package/libzypp.changes
URL:
http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-Linux-11_0-Branch/libzypp/package/libzypp.changes?rev=10319&r1=10318&r2=10319&view=diff
==============================================================================
--- branches/SuSE-Linux-11_0-Branch/libzypp/package/libzypp.changes
(original)
+++ branches/SuSE-Linux-11_0-Branch/libzypp/package/libzypp.changes Mon
Jun 2 18:00:31 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Jun 2 17:57:22 CEST 2008 - ma@xxxxxxx
+
+- Allow to skip/abort failed package removal. (bnc #226041) +- revision
10319
+
+-------------------------------------------------------------------
Mon Jun 2 17:37:02 CEST 2008 - dmacvicar@xxxxxxx
- import newer keys if a trusted key is updated
Modified: branches/SuSE-Linux-11_0-Branch/libzypp/zypp/target/rpm/RpmDb.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-Linux-11_0-Branch/libzypp/zypp/target/rpm/RpmDb.cc?rev=10319&r1=10318&r2=10319&view=diff
==============================================================================
--- branches/SuSE-Linux-11_0-Branch/libzypp/zypp/target/rpm/RpmDb.cc
(original)
+++ branches/SuSE-Linux-11_0-Branch/libzypp/zypp/target/rpm/RpmDb.cc Mon
Jun 2 18:00:31 2008
@@ -2110,17 +2110,28 @@
report->start( name_r );
- try
- {
- doRemovePackage(name_r, flags, report);
- }
- catch (RpmException & excpt_r)
- {
- report->problem(excpt_r); //! partial fix to bug #388810, \todo allow
to abort/retry failed rpm removal - report->finish(excpt_r);
- ZYPP_RETHROW(excpt_r);
- }
- report->finish();
+ do
+ try
+ {
+ doRemovePackage(name_r, flags, report);
+ report->finish();
+ break;
+ }
+ catch (RpmException & excpt_r)
+ {
+ RpmRemoveReport::Action user = report->problem( excpt_r );
+
+ if ( user == RpmRemoveReport::ABORT )
+ {
+ report->finish( excpt_r );
+ ZYPP_RETHROW(excpt_r);
+ }
+ else if ( user == RpmRemoveReport::IGNORE )
+ {
+ break;
+ }
+ }
+ while (true);
}


I think this doesn't work as expected, because this rethrowed exception is
catched by this code in TargetImpl.cc:700

I know. But the above is now consistent with install. Next it will have
to throw AbortRequestException, and the UserRequestExceptions will have to
be handled in commit.

continue with removing or installing packages. I now work on it in trunk
(more fixes like abort during progress and more) so I can backport some
safe part to 11.0.

I need to fix it now in 11.0. We need a well defined behaviour, otherwise
we can't handle the patch scripts properly.

--

cu,
Michael Andres

+------------------------------------------------------------------+
Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4
+------------------------------------------------------------------+
Michael Andres YaST Development ma@xxxxxxxxxx
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0
+------------------------------------------------------------------+

--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References