Mailinglist Archive: opensuse-commit (1248 mails)

< Previous Next >
commit libzypp for openSUSE:Factory
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Fri, 30 Apr 2010 00:53:05 +0200
  • Message-id: <20100429225305.2E6EA2029C@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package libzypp for openSUSE:Factory
checked in at Fri Apr 30 00:53:05 CEST 2010.



--------
--- libzypp/libzypp.changes 2010-04-27 11:52:05.000000000 +0200
+++ /mounts/work_src_done/STABLE/libzypp/libzypp.changes 2010-04-29
18:23:40.000000000 +0200
@@ -1,0 +2,32 @@
+Thu Apr 29 17:10:29 CEST 2010 - ma@xxxxxxx
+
+- Cleanup when deleting packages. New zypp.conf global option
+ solver.cleandepsOnRemove telling whether the solver should per
+ default try to remove packages exclusively required by the ones
+ he's asked to delete (default false).
+- Resolver::cleandepsOnRemove API to allow applications to change
+ the solver option.
+- version 7.4.0 (4)
+
+-------------------------------------------------------------------
+Thu Apr 29 01:13:40 CEST 2010 - ma@xxxxxxx
+
+- Update translations.
+
+-------------------------------------------------------------------
+Wed Apr 28 16:35:04 CEST 2010 - ma@xxxxxxx
+
+- Enable splitprovides on update.
+
+-------------------------------------------------------------------
+Wed Apr 28 01:13:37 CEST 2010 - ma@xxxxxxx
+
+- Update translations.
+
+-------------------------------------------------------------------
+Tue Apr 27 17:42:20 CEST 2010 - ma@xxxxxxx
+
+- Selectable: Classify broken but locked patch as isUnwanted (bnc#577118)
+- version 7.3.0 (2)
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
libzypp-7.2.0.tar.bz2

New:
----
libzypp-7.4.0.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.32RxoC/_old 2010-04-30 00:52:42.000000000 +0200
+++ /var/tmp/diff_new_pack.32RxoC/_new 2010-04-30 00:52:42.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package libzypp (Version 7.2.0)
+# spec file for package libzypp (Version 7.4.0)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -24,8 +24,8 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-build
AutoReqProv: on
Summary: Package, Patch, Pattern, and Product Management
-Version: 7.2.0
-Release: 2
+Version: 7.4.0
+Release: 1
Source: %{name}-%{version}.tar.bz2
Source1: %{name}-rpmlintrc
Prefix: /usr
@@ -39,7 +39,7 @@
BuildRequires: libudev-devel
BuildRequires: boost-devel dejagnu doxygen gcc-c++ gettext-devel graphviz
libxml2-devel

-BuildRequires: libsatsolver-devel >= 0.14.13
+BuildRequires: libsatsolver-devel >= 0.14.17
%if 0%{?suse_version}
%requires_eq satsolver-tools
%else

++++++ libzypp-7.2.0.tar.bz2 -> libzypp-7.4.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/VERSION.cmake
new/libzypp-7.4.0/VERSION.cmake
--- old/libzypp-7.2.0/VERSION.cmake 2010-04-27 11:28:45.000000000 +0200
+++ new/libzypp-7.4.0/VERSION.cmake 2010-04-29 18:08:13.000000000 +0200
@@ -59,10 +59,10 @@
# changes file. See './mkChangelog -h' for help.
#
SET(LIBZYPP_MAJOR "7")
-SET(LIBZYPP_COMPATMINOR "2")
-SET(LIBZYPP_MINOR "2")
+SET(LIBZYPP_COMPATMINOR "4")
+SET(LIBZYPP_MINOR "4")
SET(LIBZYPP_PATCH "0")
#
-# LAST RELEASED: 7.2.0 (2)
+# LAST RELEASED: 7.4.0 (4)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/devel/devel.ma/CleandepsOnRemove.cc
new/libzypp-7.4.0/devel/devel.ma/CleandepsOnRemove.cc
--- old/libzypp-7.2.0/devel/devel.ma/CleandepsOnRemove.cc 1970-01-01
01:00:00.000000000 +0100
+++ new/libzypp-7.4.0/devel/devel.ma/CleandepsOnRemove.cc 2010-04-29
18:08:13.000000000 +0200
@@ -0,0 +1,141 @@
+#include "Tools.h"
+
+#include <zypp/PoolQuery.h>
+#include <zypp/target/rpm/librpmDb.h>
+#include <zypp/parser/ProductFileReader.h>
+#include "zypp/pool/GetResolvablesToInsDel.h"
+#include "zypp/sat/WhatObsoletes.h"
+#include "zypp/ExternalProgram.h"
+
+///////////////////////////////////////////////////////////////////
+
+//static const Pathname sysRoot( getenv("SYSROOT") ? getenv("SYSROOT") :
"/Local/ROOT" );
+//static const Pathname sysRoot( "/tmp/ToolScanRepos" );
+static const Pathname sysRoot( "/" );
+
+///////////////////////////////////////////////////////////////////
+
+bool solve()
+{
+ bool rres = false;
+ {
+ //zypp::base::LogControl::TmpLineWriter shutUp;
+ //getZYpp()->resolver()->setOnlyRequires( true );
+ rres = getZYpp()->resolver()->resolvePool();
+ }
+ if ( ! rres )
+ {
+ ERR << "resolve " << rres << endl;
+ getZYpp()->resolver()->problems();
+ return false;
+ }
+ MIL << "resolve " << rres << endl;
+ return true;
+}
+
+bool upgrade()
+{
+ bool rres = false;
+ {
+ //zypp::base::LogControl::TmpLineWriter shutUp;
+ Measure x( "Upgrade" );
+ rres = getZYpp()->resolver()->doUpgrade();
+ }
+ if ( ! rres )
+ {
+ Measure x( "Upgrade Error" );
+ ERR << "upgrade " << rres << endl;
+ getZYpp()->resolver()->problems();
+ return false;
+ }
+ MIL << "upgrade " << rres << endl;
+ return true;
+}
+
+namespace zypp
+{
+ namespace target
+ {
+ void writeUpgradeTestcase();
+ }
+}
+
+std::ostream & operator<<( std::ostream & str, const sat::Solvable::SplitIdent
& obj )
+{
+ str << "{" << obj.ident() << "}{" << obj.kind() << "}{" << obj.name () <<
"}" << endl;
+ return str;
+}
+
+namespace zypp {
+std::ostream & dumpOn( std::ostream & str, const Url & obj )
+{
+ str << "{" << obj.getHost() << "}{" << obj.getPort() << "}";
+ return str;
+}
+}
+
+int main( int argc, char * argv[] )
+try {
+ --argc,++argv;
+ zypp::base::LogControl::instance().logToStdErr();
+ INT << "===[START]==========================================" << endl;
+ ///////////////////////////////////////////////////////////////////
+ if ( sysRoot == "/" )
+ ::unsetenv( "ZYPP_CONF" );
+ ResPool pool( ResPool::instance() );
+ sat::Pool satpool( sat::Pool::instance() );
+ ///////////////////////////////////////////////////////////////////
+ dumpRange( WAR << "satpool.multiversion " , satpool.multiversionBegin(),
satpool.multiversionEnd() ) << endl;
+ TestSetup::LoadSystemAt( sysRoot, Arch_i586 );
+ ///////////////////////////////////////////////////////////////////
+
+ char * fix[] = {
+ "test"
+ };
+ argv = fix;
+ argc = arraySize(fix);
+ for ( ; argc; --argc,++argv )
+ {
+ ui::Selectable::Ptr p( getSel<Package>( *argv ) );
+ if ( p )
+ USR << p->setToDelete() << endl;
+ else
+ ERR << p << endl;
+ }
+
+ std::set<PoolItem> todel;
+ {
+ getZYpp()->resolver()->setCleandepsOnRemove( false );
+ SEC << "=== Solve noclean:" << endl;
+ solve();
+ std::copy( make_filter_begin<resfilter::ByTransact>(pool),
+ make_filter_end<resfilter::ByTransact>(pool),
+ std::inserter( todel, todel.begin() ) );
+ WAR << todel << endl;
+ }
+ {
+ getZYpp()->resolver()->setCleandepsOnRemove( true );
+ SEC << "=== Solve clean:" << endl;
+ solve();
+ SEC << "========================================================" << endl;
+ for_( it, make_filter_begin<resfilter::ByTransact>(pool),
make_filter_end<resfilter::ByTransact>(pool) )
+ {
+ ( todel.find( *it ) == todel.end() ? INT : USR ) << *it << endl;
+ }
+ SEC << "========================================================" << endl;
+ }
+
+
+
+ ///////////////////////////////////////////////////////////////////
+ INT << "===[END]============================================" << endl <<
endl;
+ zypp::base::LogControl::instance().logNothing();
+ return 0;
+}
+catch ( const Exception & exp )
+{
+ INT << exp << endl << exp.historyAsString();
+}
+catch (...)
+{}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/devel/devel.ma/Main.cc
new/libzypp-7.4.0/devel/devel.ma/Main.cc
--- old/libzypp-7.2.0/devel/devel.ma/Main.cc 2010-04-27 11:28:45.000000000
+0200
+++ new/libzypp-7.4.0/devel/devel.ma/Main.cc 2010-04-29 18:08:13.000000000
+0200
@@ -90,28 +90,14 @@
TestSetup::LoadSystemAt( sysRoot, Arch_i586 );
///////////////////////////////////////////////////////////////////

- PoolQuery q;
- q.setMatchGlob();
-
- //q.addDependency( sat::SolvAttr("solvable:provides"), Capability("zypper =
1.4.1-1.1") );
- //q.addDependency( sat::SolvAttr("solvable:provides"), Capability("z* =
1.2.8") );
- q.addDependency( sat::SolvAttr("solvable:name"), "zypp*", Rel("="),
Edition("1.2.8") );
- //q.addDependency( sat::SolvAttr("solvable:provides"), "zypp*" );
- q.serialize( SEC );
-
- for_( solvIter, q.begin(), q.end() )
+ ui::Selectable::Ptr p( getSel<Package>( "kruler" ) );
+ if ( p )
{
- sat::Solvable solvable( *solvIter );
- USR << "Found matches in " << solvable << endl;
- if ( true )
- for_( attrIter, solvIter.matchesBegin(), solvIter.matchesEnd() )
- {
- sat::LookupAttr::iterator attr( *attrIter );
- USR << " " << attr.inSolvAttr() << "\t\"" << attr.asString() << "\""
<< endl;
- }
+ USR << p->setToDelete() << endl;
+ getZYpp()->resolver()->setCleandepsOnRemove( true );
+ solve();
}

-
///////////////////////////////////////////////////////////////////
INT << "===[END]============================================" << endl <<
endl;
zypp::base::LogControl::instance().logNothing();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/libzypp.spec.cmake
new/libzypp-7.4.0/libzypp.spec.cmake
--- old/libzypp-7.2.0/libzypp.spec.cmake 2010-04-27 11:28:45.000000000
+0200
+++ new/libzypp-7.4.0/libzypp.spec.cmake 2010-04-29 18:08:13.000000000
+0200
@@ -31,7 +31,7 @@
BuildRequires: libudev-devel
BuildRequires: boost-devel dejagnu doxygen gcc-c++ gettext-devel graphviz
libxml2-devel

-BuildRequires: libsatsolver-devel >= 0.14.13
+BuildRequires: libsatsolver-devel >= 0.14.17
%if 0%{?suse_version}
%requires_eq satsolver-tools
%else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/package/libzypp.changes
new/libzypp-7.4.0/package/libzypp.changes
--- old/libzypp-7.2.0/package/libzypp.changes 2010-04-27 11:28:45.000000000
+0200
+++ new/libzypp-7.4.0/package/libzypp.changes 2010-04-29 18:08:13.000000000
+0200
@@ -1,4 +1,36 @@
-------------------------------------------------------------------
+Thu Apr 29 17:10:29 CEST 2010 - ma@xxxxxxx
+
+- Cleanup when deleting packages. New zypp.conf global option
+ solver.cleandepsOnRemove telling whether the solver should per
+ default try to remove packages exclusively required by the ones
+ he's asked to delete (default false).
+- Resolver::cleandepsOnRemove API to allow applications to change
+ the solver option.
+- version 7.4.0 (4)
+
+-------------------------------------------------------------------
+Thu Apr 29 01:13:40 CEST 2010 - ma@xxxxxxx
+
+- Update translations.
+
+-------------------------------------------------------------------
+Wed Apr 28 16:35:04 CEST 2010 - ma@xxxxxxx
+
+- Enable splitprovides on update.
+
+-------------------------------------------------------------------
+Wed Apr 28 01:13:37 CEST 2010 - ma@xxxxxxx
+
+- Update translations.
+
+-------------------------------------------------------------------
+Tue Apr 27 17:42:20 CEST 2010 - ma@xxxxxxx
+
+- Selectable: Classify broken but locked patch as isUnwanted (bnc#577118)
+- version 7.3.0 (2)
+
+-------------------------------------------------------------------
Tue Apr 27 11:25:17 CEST 2010 - ma@xxxxxxx

- Use libudev to detect available cd/dvd devices (bnc#590707,fate#308980)
Files old/libzypp-7.2.0/po/zypp-po.tar.bz2 and
new/libzypp-7.4.0/po/zypp-po.tar.bz2 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/zypp/KeyRing.cc
new/libzypp-7.4.0/zypp/KeyRing.cc
--- old/libzypp-7.2.0/zypp/KeyRing.cc 2010-04-27 11:28:45.000000000 +0200
+++ new/libzypp-7.4.0/zypp/KeyRing.cc 2010-04-29 18:08:13.000000000 +0200
@@ -620,13 +620,12 @@
if(str::regex_match(line, what, rxNoKey))
{
if ( what.size() >= 1 )
+ {
id = what[1];
+ break;
+ }
//dumpRegexpResults(what);
}
- else
- {
- MIL << "'" << line << "'" << endl;
- }
}

if ( count == 0 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/zypp/ResPool.cc
new/libzypp-7.4.0/zypp/ResPool.cc
--- old/libzypp-7.2.0/zypp/ResPool.cc 2010-04-27 11:28:45.000000000 +0200
+++ new/libzypp-7.4.0/zypp/ResPool.cc 2010-04-29 18:08:13.000000000 +0200
@@ -14,6 +14,7 @@

#include "zypp/base/SerialNumber.h"

+#include "zypp/ZYppFactory.h"
#include "zypp/ResPool.h"
#include "zypp/pool/PoolImpl.h"
#include "zypp/pool/PoolStats.h"
@@ -53,6 +54,9 @@
ResPoolProxy ResPool::proxy() const
{ return _pimpl->proxy( *this ); }

+ Resolver & ResPool::resolver() const
+ { return *getZYpp()->resolver(); }
+
const SerialNumber & ResPool::serial() const
{ return _pimpl->serial(); }

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/zypp/ResPool.h
new/libzypp-7.4.0/zypp/ResPool.h
--- old/libzypp-7.2.0/zypp/ResPool.h 2010-04-27 11:28:45.000000000 +0200
+++ new/libzypp-7.4.0/zypp/ResPool.h 2010-04-29 18:08:13.000000000 +0200
@@ -27,6 +27,7 @@

class SerialNumber;
class ResPoolProxy;
+ class Resolver;

///////////////////////////////////////////////////////////////////
//
@@ -62,6 +63,9 @@
/** preliminary */
ResPoolProxy proxy() const;

+ /** The Resolver */
+ Resolver & resolver() const;
+
public:
/** The pools serial number. Changing whenever the
* whenever the content changes. (Resolvables or
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/zypp/Resolver.cc
new/libzypp-7.4.0/zypp/Resolver.cc
--- old/libzypp-7.2.0/zypp/Resolver.cc 2010-04-27 11:28:45.000000000 +0200
+++ new/libzypp-7.4.0/zypp/Resolver.cc 2010-04-29 18:08:13.000000000 +0200
@@ -33,9 +33,8 @@
// METHOD TYPE : Ctor
//
Resolver::Resolver( const ResPool & pool )
- {
- _pimpl = new solver::detail::Resolver(pool);
- }
+ : _pimpl( new Impl(pool) )
+ {}

///////////////////////////////////////////////////////////////////
//
@@ -75,14 +74,14 @@
{ _pimpl->doUpdate(); }

void Resolver::setForceResolve( bool yesno_r ) {
_pimpl->setForceResolve( yesno_r ); }
- bool Resolver::forceResolve() { return
_pimpl->forceResolve(); }
+ bool Resolver::forceResolve() const { return
_pimpl->forceResolve(); }

void Resolver::setIgnoreAlreadyRecommended( bool yesno_r) {
_pimpl->setIgnoreAlreadyRecommended( yesno_r ); }
- bool Resolver::ignoreAlreadyRecommended() { return
_pimpl->ignoreAlreadyRecommended(); }
+ bool Resolver::ignoreAlreadyRecommended() const { return
_pimpl->ignoreAlreadyRecommended(); }

void Resolver::setOnlyRequires( bool yesno_r ) {
_pimpl->setOnlyRequires( yesno_r ); }
void Resolver::resetOnlyRequires() {
_pimpl->setOnlyRequires( indeterminate ); }
- bool Resolver::onlyRequires() { return
_pimpl->onlyRequires(); }
+ bool Resolver::onlyRequires() const { return
_pimpl->onlyRequires(); }

bool Resolver::upgradeMode() const { return
_pimpl->isUpgradeMode(); }

@@ -98,6 +97,10 @@
void Resolver::setDefaultSolveSrcPackages() {
_pimpl->setSolveSrcPackages( indeterminate ); }
bool Resolver::solveSrcPackages() const { return
_pimpl->solveSrcPackages(); }

+ void Resolver::setCleandepsOnRemove( bool yesno_r ) {
_pimpl->setCleandepsOnRemove( yesno_r ); }
+ void Resolver::setDefaultCleandepsOnRemove() {
_pimpl->setCleandepsOnRemove( indeterminate ); }
+ bool Resolver::cleandepsOnRemove() const { return
_pimpl->cleandepsOnRemove(); }
+
void Resolver::addUpgradeRepo( Repository repo_r ) {
_pimpl->addUpgradeRepo( repo_r ); }
bool Resolver::upgradingRepo( Repository repo_r ) const { return
_pimpl->upgradingRepo( repo_r ); }
void Resolver::removeUpgradeRepo( Repository repo_r ) {
_pimpl->removeUpgradeRepo( repo_r ); }
@@ -108,8 +111,8 @@
void Resolver::removeRequire( const Capability & capability ) {
_pimpl->removeExtraRequire( capability ); }
void Resolver::removeConflict( const Capability & capability ){
_pimpl->removeExtraConflict( capability ); }

- CapabilitySet Resolver::getRequire() { return _pimpl->extraRequires(); }
- CapabilitySet Resolver::getConflict() { return
_pimpl->extraConflicts(); }
+ CapabilitySet Resolver::getRequire() const { return
_pimpl->extraRequires(); }
+ CapabilitySet Resolver::getConflict() const { return
_pimpl->extraConflicts(); }

std::list<PoolItem> Resolver::problematicUpdateItems() const
{ return _pimpl->problematicUpdateItems(); }
@@ -135,7 +138,8 @@
void Resolver::reset()
{ _pimpl->reset( false ); /* Do not keep extra requires/conflicts */ }

-
+ std::ostream & operator<<( std::ostream & str, const Resolver & obj )
+ { return str << *obj._pimpl; }

/////////////////////////////////////////////////////////////////
} // namespace zypp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/zypp/Resolver.h
new/libzypp-7.4.0/zypp/Resolver.h
--- old/libzypp-7.2.0/zypp/Resolver.h 2010-04-27 11:28:45.000000000 +0200
+++ new/libzypp-7.4.0/zypp/Resolver.h 2010-04-29 18:08:13.000000000 +0200
@@ -161,14 +161,14 @@
* This behaviour is favourited by ZMD.
**/
void setForceResolve( bool force );
- bool forceResolve();
+ bool forceResolve() const;

/**
* Ignore recommended packages that were already recommended by
* the installed packages
**/
void setIgnoreAlreadyRecommended( bool yesno_r );
- bool ignoreAlreadyRecommended();
+ bool ignoreAlreadyRecommended() const;

/**
* Setting whether required packages are installed ONLY
@@ -177,7 +177,7 @@
**/
void setOnlyRequires( bool yesno_r );
void resetOnlyRequires(); // set back to default (described in zypp.conf)
- bool onlyRequires();
+ bool onlyRequires() const;

/**
* Whether the \ref Resolver is in upgrade mode.
@@ -218,6 +218,14 @@
void setDefaultSolveSrcPackages();
bool solveSrcPackages() const;

+ /**
+ * Cleanup when deleting packages. Whether the solver should per default
+ * try to remove packages exclusively required by the ones he's asked to
delete.
+ */
+ void setCleandepsOnRemove( bool yesno_r );
+ void setDefaultCleandepsOnRemove(); // set back to default (in zypp.conf)
+ bool cleandepsOnRemove() const;
+
/** \name Upgrade to content of a specific repository.
* \note This is an ordinary solver request. You should simply
* \ref resolvePool to execute, and not \ref doUpgrade.
@@ -275,13 +283,13 @@
* Get all the additional requirements set by \ref addRequire(Capability).
*
*/
- CapabilitySet getRequire();
+ CapabilitySet getRequire() const;

/**
* Get all the additional conflicts set by \ref addConflict(Capability).
*
*/
- CapabilitySet getConflict();
+ CapabilitySet getConflict() const;

/**
* Generates a solver Testcase of the current state
@@ -357,12 +365,17 @@
solver::detail::ItemCapKindList installedSatisfied( const PoolItem & item
);


-
private:
- solver::detail::Resolver_Ptr _pimpl;
+ friend std::ostream & operator<<( std::ostream & str, const Resolver & obj
);
+
+ typedef solver::detail::Resolver Impl;
+ zypp::RW_pointer<Impl,rw_pointer::Intrusive<Impl> > _pimpl;
};
///////////////////////////////////////////////////////////////////

+ /** \relates Resolver Stream output */
+ std::ostream & operator<<( std::ostream & str, const Resolver & obj );
+
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/zypp/ZConfig.cc
new/libzypp-7.4.0/zypp/ZConfig.cc
--- old/libzypp-7.2.0/zypp/ZConfig.cc 2010-04-27 11:28:45.000000000 +0200
+++ new/libzypp-7.4.0/zypp/ZConfig.cc 2010-04-29 18:08:13.000000000 +0200
@@ -229,6 +229,7 @@
, commit_downloadMode ( DownloadDefault )
, solver_onlyRequires ( false )
, solver_allowVendorChange ( false )
+ , solver_cleandepsOnRemove ( false )
, solver_upgradeTestcasesToKeep ( 2 )
, solverUpgradeRemoveDroppedPackages( true )
, apply_locks_file ( true )
@@ -356,6 +357,10 @@
{
solver_allowVendorChange.set( str::strToBool( value,
solver_allowVendorChange ) );
}
+ else if ( entry == "solver.cleandepsOnRemove" )
+ {
+ solver_cleandepsOnRemove.set( str::strToBool( value,
solver_cleandepsOnRemove ) );
+ }
else if ( entry == "solver.upgradeTestcasesToKeep" )
{
solver_upgradeTestcasesToKeep.set( str::strtonum<unsigned>(
value ) );
@@ -479,6 +484,7 @@

Option<bool> solver_onlyRequires;
Option<bool> solver_allowVendorChange;
+ Option<bool> solver_cleandepsOnRemove;
Option<unsigned> solver_upgradeTestcasesToKeep;
DefaultOption<bool> solverUpgradeRemoveDroppedPackages;

@@ -702,6 +708,9 @@
bool ZConfig::solver_allowVendorChange() const
{ return _pimpl->solver_allowVendorChange; }

+ bool ZConfig::solver_cleandepsOnRemove() const
+ { return _pimpl->solver_cleandepsOnRemove; }
+
Pathname ZConfig::solver_checkSystemFile() const
{ return ( _pimpl->solver_checkSystemFile.empty()
? (configPath()/"systemCheck") : _pimpl->solver_checkSystemFile ); }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/zypp/ZConfig.h
new/libzypp-7.4.0/zypp/ZConfig.h
--- old/libzypp-7.2.0/zypp/ZConfig.h 2010-04-27 11:28:45.000000000 +0200
+++ new/libzypp-7.4.0/zypp/ZConfig.h 2010-04-29 18:08:13.000000000 +0200
@@ -254,6 +254,11 @@
bool solver_allowVendorChange() const;

/**
+ * Whether removing a package should also remove no longer needed
requirements.
+ */
+ bool solver_cleandepsOnRemove() const;
+
+ /**
* When committing a dist upgrade (e.g. <tt>zypper dup</tt>)
* a solver testcase is written. It is needed in bugreports,
* in case something went wrong. This returns the number of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/zypp/base/Easy.h
new/libzypp-7.4.0/zypp/base/Easy.h
--- old/libzypp-7.2.0/zypp/base/Easy.h 2010-04-27 11:28:45.000000000 +0200
+++ new/libzypp-7.4.0/zypp/base/Easy.h 2010-04-29 18:08:13.000000000 +0200
@@ -31,8 +31,8 @@
* \endcode
*/
#define arrayBegin(A) (&A[0])
-#define arrayEnd(A) (&A[0] + (sizeof(A)/sizeof(*A)))
-
+#define arraySize(A) (sizeof(A)/sizeof(*A))
+#define arrayEnd(A) (&A[0] + arraySize(A))

///////////////////////////////////////////////////////////////////
namespace zypp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/zypp/solver/detail/Resolver.cc
new/libzypp-7.4.0/zypp/solver/detail/Resolver.cc
--- old/libzypp-7.2.0/zypp/solver/detail/Resolver.cc 2010-04-27
11:28:45.000000000 +0200
+++ new/libzypp-7.4.0/zypp/solver/detail/Resolver.cc 2010-04-29
18:08:13.000000000 +0200
@@ -58,7 +58,19 @@

std::ostream & Resolver::dumpOn( std::ostream & os ) const
{
- return os << "<resolver/>";
+ os << "<resolver>" << endl;
+ #define OUTS(t) os << " " << #t << ":\t" << t << endl;
+ OUTS( _forceResolve );
+ OUTS( _upgradeMode );
+ OUTS( _updateMode );
+ OUTS( _verifying );
+ OUTS( _onlyRequires );
+ OUTS( _allowVendorChange );
+ OUTS( _solveSrcPackages );
+ OUTS( _cleandepsOnRemove );
+ OUTS( _ignoreAlreadyRecommended );
+ #undef OUT
+ return os << "<resolver/>";
}


@@ -75,7 +87,8 @@
, _onlyRequires ( ZConfig::instance().solver_onlyRequires() )
, _allowVendorChange (
ZConfig::instance().solver_allowVendorChange() )
, _solveSrcPackages ( false )
- , _ignoreAlreadyRecommended (false)
+ , _cleandepsOnRemove (
ZConfig::instance().solver_cleandepsOnRemove() )
+ , _ignoreAlreadyRecommended (true)

{
sat::Pool satPool( sat::Pool::instance() );
@@ -100,6 +113,11 @@
_onlyRequires = indeterminate(state_r) ?
ZConfig::instance().solver_onlyRequires() : bool(state_r);
}

+void Resolver::setCleandepsOnRemove( TriBool state_r )
+{
+ _cleandepsOnRemove = indeterminate(state_r) ?
ZConfig::instance().solver_cleandepsOnRemove() : bool(state_r);
+}
+
//---------------------------------------------------------------------------

ResPool Resolver::pool() const
@@ -272,6 +290,7 @@
_satResolver->setNoupdateprovide (false);
_satResolver->setDosplitprovides (false);
_satResolver->setSolveSrcPackages ( solveSrcPackages() );
+ _satResolver->setCleandepsOnRemove ( cleandepsOnRemove() );

if (_upgradeMode) {
// may overwrite some settings
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/zypp/solver/detail/Resolver.h
new/libzypp-7.4.0/zypp/solver/detail/Resolver.h
--- old/libzypp-7.2.0/zypp/solver/detail/Resolver.h 2010-04-27
11:28:45.000000000 +0200
+++ new/libzypp-7.4.0/zypp/solver/detail/Resolver.h 2010-04-29
18:08:13.000000000 +0200
@@ -113,6 +113,7 @@
// packages, hardware packages (modalias)
bool _allowVendorChange; // whether the solver should allow or disallow
vendor changes.
bool _solveSrcPackages; // whether to generate solver jobs for selected
source packges.
+ bool _cleandepsOnRemove; // whether removing a package should also
remove no longer needed requirements

bool _ignoreAlreadyRecommended; //ignore recommended packages that have
already been recommended by the installed packages
//@}
@@ -168,8 +169,8 @@
void removeQueueItem( SolverQueueItem_Ptr item );
void addQueueItem( SolverQueueItem_Ptr item );

- CapabilitySet extraRequires() { return _extra_requires; }
- CapabilitySet extraConflicts() { return _extra_conflicts; }
+ CapabilitySet extraRequires() const { return
_extra_requires; }
+ CapabilitySet extraConflicts() const { return _extra_conflicts; }

void addWeak( const PoolItem & item );

@@ -204,6 +205,9 @@

bool solveSrcPackages() const { return _solveSrcPackages; }
void setSolveSrcPackages( TriBool state_r ) { _solveSrcPackages =
indeterminate(state_r) ? false : bool(state_r); }
+
+ bool cleandepsOnRemove() const { return _cleandepsOnRemove; }
+ void setCleandepsOnRemove( TriBool state_r );
//@}

ResolverProblemList problems() const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/zypp/solver/detail/SATResolver.cc
new/libzypp-7.4.0/zypp/solver/detail/SATResolver.cc
--- old/libzypp-7.2.0/zypp/solver/detail/SATResolver.cc 2010-04-27
11:28:45.000000000 +0200
+++ new/libzypp-7.4.0/zypp/solver/detail/SATResolver.cc 2010-04-29
18:08:13.000000000 +0200
@@ -66,6 +66,8 @@

IMPL_PTR_TYPE(SATResolver);

+#define MAYBE_CLEANDEPS (cleandepsOnRemove()?SOLVER_CLEANDEPS:0)
+
//---------------------------------------------------------------------------
// Callbacks for SAT policies
//---------------------------------------------------------------------------
@@ -121,6 +123,7 @@
os << " distupgrade = " << _distupgrade << endl;
os << " distupgrade_removeunsupported = " <<
_distupgrade_removeunsupported << endl;
os << " solveSrcPackages = " << _solveSrcPackages << endl;
+ os << " cleandepsOnRemove = " << _cleandepsOnRemove << endl;
} else {
os << "<NULL>";
}
@@ -136,16 +139,17 @@
, _fixsystem(false)
, _allowdowngrade(false)
, _allowarchchange(false)
- , _allowvendorchange(false)
+ , _allowvendorchange(ZConfig::instance().solver_allowVendorChange())
, _allowuninstall(false)
, _updatesystem(false)
, _noupdateprovide(false)
, _dosplitprovides(false)
, _onlyRequires(ZConfig::instance().solver_onlyRequires())
- , _ignorealreadyrecommended(false)
+ , _ignorealreadyrecommended(true)
, _distupgrade(false)
, _distupgrade_removeunsupported(false)
-
+ , _solveSrcPackages(false)
+ , _cleandepsOnRemove(ZConfig::instance().solver_cleandepsOnRemove())
{
}

@@ -694,7 +698,7 @@
ERR << "Delete: " << *iter << " not found" << endl;
} else {
MIL << "Delete " << *iter << endl;
- queue_push( &(_jobQueue), SOLVER_ERASE_SOLVABLE );
+ queue_push( &(_jobQueue), SOLVER_ERASE_SOLVABLE | MAYBE_CLEANDEPS );
queue_push( &(_jobQueue), id);
}
}
@@ -713,7 +717,7 @@
}

for (CapabilitySet::const_iterator iter = conflict_caps.begin(); iter !=
conflict_caps.end(); iter++) {
- queue_push( &(_jobQueue), SOLVER_ERASE_SOLVABLE_PROVIDES);
+ queue_push( &(_jobQueue), SOLVER_ERASE_SOLVABLE_PROVIDES |
MAYBE_CLEANDEPS );
queue_push( &(_jobQueue), iter->id() );
MIL << "Conflicts " << *iter << endl;
}
@@ -763,7 +767,7 @@
for (PoolItemList::const_iterator iter = _items_to_remove.begin(); iter !=
_items_to_remove.end(); iter++) {
sat::detail::IdType ident( (*iter)->satSolvable().ident().id() );
MIL << "Delete " << *iter << ident << endl;
- queue_push( &(_jobQueue), SOLVER_ERASE_SOLVABLE_NAME );
+ queue_push( &(_jobQueue), SOLVER_ERASE_SOLVABLE_NAME | MAYBE_CLEANDEPS
);
queue_push( &(_jobQueue), ident);
}

@@ -807,7 +811,7 @@
_solv->allowuninstall = _allowuninstall;
_solv->allowarchchange = _allowarchchange;
_solv->allowvendorchange = _allowvendorchange;
- _solv->dosplitprovides = _dosplitprovides;
+ _solv->dosplitprovides = true;
_solv->noupdateprovide = _noupdateprovide;
_solv->dontinstallrecommended = true; // #FIXME dontinstallrecommended
maybe set to false if it works correctly
_solv->distupgrade = _distupgrade;
@@ -941,59 +945,64 @@

ignoreId = 0;
probr = solver_findproblemrule(_solv, problem);
- switch (solver_problemruleinfo(_solv, &(_jobQueue), probr, &dep, &source,
&target))
+ switch (solver_ruleinfo(_solv, probr, &source, &target, &dep))
{
- case SOLVER_PROBLEM_DISTUPGRADE_RULE:
+ case SOLVER_RULE_DISTUPGRADE:
s = mapSolvable (source);
ret = str::form (_("%s does not belong to a distupgrade repository"),
s.asString().c_str());
break;
- case SOLVER_PROBLEM_INFARCH_RULE:
+ case SOLVER_RULE_INFARCH:
s = mapSolvable (source);
ret = str::form (_("%s has inferior architecture"),
s.asString().c_str());
break;
- case SOLVER_PROBLEM_UPDATE_RULE:
+ case SOLVER_RULE_UPDATE:
s = mapSolvable (source);
ret = str::form (_("problem with installed package %s"),
s.asString().c_str());
break;
- case SOLVER_PROBLEM_JOB_RULE:
+ case SOLVER_RULE_JOB:
ret = _("conflicting requests");
break;
- case SOLVER_PROBLEM_RPM_RULE:
+ case SOLVER_RULE_RPM:
ret = _("some dependency problem");
break;
- case SOLVER_PROBLEM_JOB_NOTHING_PROVIDES_DEP:
+ case SOLVER_RULE_JOB_NOTHING_PROVIDES_DEP:
ret = str::form (_("nothing provides requested %s"), dep2str(pool,
dep));
detail += _("Have you enabled all requested repositories?");
break;
- case SOLVER_PROBLEM_NOT_INSTALLABLE:
+ case SOLVER_RULE_RPM_NOT_INSTALLABLE:
s = mapSolvable (source);
ret = str::form (_("%s is not installable"), s.asString().c_str());
break;
- case SOLVER_PROBLEM_NOTHING_PROVIDES_DEP:
+ case SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP:
ignoreId = source; // for setting weak dependencies
s = mapSolvable (source);
ret = str::form (_("nothing provides %s needed by %s"), dep2str(pool,
dep), s.asString().c_str());
break;
- case SOLVER_PROBLEM_SAME_NAME:
+ case SOLVER_RULE_RPM_SAME_NAME:
s = mapSolvable (source);
s2 = mapSolvable (target);
ret = str::form (_("cannot install both %s and %s"),
s.asString().c_str(), s2.asString().c_str());
break;
- case SOLVER_PROBLEM_PACKAGE_CONFLICT:
+ case SOLVER_RULE_RPM_PACKAGE_CONFLICT:
s = mapSolvable (source);
s2 = mapSolvable (target);
ret = str::form (_("%s conflicts with %s provided by %s"),
s.asString().c_str(), dep2str(pool, dep), s2.asString().c_str());
break;
- case SOLVER_PROBLEM_PACKAGE_OBSOLETES:
+ case SOLVER_RULE_RPM_PACKAGE_OBSOLETES:
s = mapSolvable (source);
s2 = mapSolvable (target);
ret = str::form (_("%s obsoletes %s provided by %s"),
s.asString().c_str(), dep2str(pool, dep), s2.asString().c_str());
break;
- case SOLVER_PROBLEM_SELF_CONFLICT:
+ case SOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES:
+ s = mapSolvable (source);
+ s2 = mapSolvable (target);
+ ret = str::form (_("installed %s obsoletes %s provided by %s"),
s.asString().c_str(), dep2str(pool, dep), s2.asString().c_str());
+ break;
+ case SOLVER_RULE_RPM_SELF_CONFLICT:
s = mapSolvable (source);
ret = str::form (_("solvable %s conflicts with %s provided by
itself"), s.asString().c_str(), dep2str(pool, dep));
break;
- case SOLVER_PROBLEM_DEP_PROVIDERS_NOT_INSTALLABLE:
+ case SOLVER_RULE_RPM_PACKAGE_REQUIRES:
ignoreId = source; // for setting weak dependencies
s = mapSolvable (source);
Capability cap(dep);
@@ -1374,7 +1383,7 @@
queue_push( &(_jobQueue), ident );
} else {
MIL << "Lock NOT installed item " << *iter << endl;
- queue_push( &(_jobQueue), SOLVER_ERASE_SOLVABLE );
+ queue_push( &(_jobQueue), SOLVER_ERASE_SOLVABLE | MAYBE_CLEANDEPS );
queue_push( &(_jobQueue), ident );
}
}
@@ -1387,7 +1396,7 @@
queue_push( &(_jobQueue), ident );
} else {
MIL << "Keep NOT installed item " << *iter << ident << endl;
- queue_push( &(_jobQueue), SOLVER_ERASE_SOLVABLE | SOLVER_WEAK);
+ queue_push( &(_jobQueue), SOLVER_ERASE_SOLVABLE | SOLVER_WEAK |
MAYBE_CLEANDEPS );
queue_push( &(_jobQueue), ident );
}
}
@@ -1405,7 +1414,7 @@
}

for (CapabilitySet::const_iterator iter = system_conflicts.begin(); iter
!= system_conflicts.end(); iter++) {
- queue_push( &(_jobQueue), SOLVER_ERASE_SOLVABLE_PROVIDES);
+ queue_push( &(_jobQueue), SOLVER_ERASE_SOLVABLE_PROVIDES |
MAYBE_CLEANDEPS );
queue_push( &(_jobQueue), iter->id() );
MIL << "SYSTEM Conflicts " << *iter << endl;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/zypp/solver/detail/SATResolver.h
new/libzypp-7.4.0/zypp/solver/detail/SATResolver.h
--- old/libzypp-7.2.0/zypp/solver/detail/SATResolver.h 2010-04-27
11:28:45.000000000 +0200
+++ new/libzypp-7.4.0/zypp/solver/detail/SATResolver.h 2010-04-29
18:08:13.000000000 +0200
@@ -97,6 +97,7 @@
bool _distupgrade;
bool _distupgrade_removeunsupported;
bool _solveSrcPackages; // false: generate no job rule for
source packages selected in the pool
+ bool _cleandepsOnRemove; // whether removing a package should
also remove no longer needed requirements

// ---------------------------------- methods
std::string SATprobleminfoString (Id problem, std::string &detail, Id
&ignoreId);
@@ -201,6 +202,9 @@
bool solveSrcPackages() const { return _solveSrcPackages; }
void setSolveSrcPackages( bool state_r ) { _solveSrcPackages = state_r; }

+ bool cleandepsOnRemove() const { return _cleandepsOnRemove; }
+ void setCleandepsOnRemove( bool state_r ) { _cleandepsOnRemove = state_r;
}
+
PoolItemList problematicUpdateItems( void ) const { return _problem_items;
}

PoolItemList resultItemsToInstall () { return _result_items_to_install; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/libzypp-7.2.0/zypp/solver/detail/SolverQueueItemDelete.cc
new/libzypp-7.4.0/zypp/solver/detail/SolverQueueItemDelete.cc
--- old/libzypp-7.2.0/zypp/solver/detail/SolverQueueItemDelete.cc
2010-04-27 11:28:45.000000000 +0200
+++ new/libzypp-7.4.0/zypp/solver/detail/SolverQueueItemDelete.cc
2010-04-29 18:08:13.000000000 +0200
@@ -24,6 +24,7 @@

#include "zypp/base/Logger.h"
#include "zypp/IdString.h"
+#include "zypp/Resolver.h"
#include "zypp/solver/detail/SolverQueueItemDelete.h"

/////////////////////////////////////////////////////////////////////////
@@ -69,11 +70,13 @@

bool SolverQueueItemDelete::addRule (_Queue & q)
{
+#define MAYBE_CLEANDEPS
(pool().resolver().cleandepsOnRemove()?SOLVER_CLEANDEPS:0)
+
::Id id = IdString(_name).id();
if (_soft) {
- queue_push( &(q), SOLVER_ERASE_SOLVABLE_NAME | SOLVER_WEAK);
+ queue_push( &(q), SOLVER_ERASE_SOLVABLE_NAME | SOLVER_WEAK |
MAYBE_CLEANDEPS );
} else {
- queue_push( &(q), SOLVER_ERASE_SOLVABLE_NAME );
+ queue_push( &(q), SOLVER_ERASE_SOLVABLE_NAME | MAYBE_CLEANDEPS );
}
queue_push( &(q), id);

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/zypp/ui/Selectable.cc
new/libzypp-7.4.0/zypp/ui/Selectable.cc
--- old/libzypp-7.2.0/zypp/ui/Selectable.cc 2010-04-27 11:28:45.000000000
+0200
+++ new/libzypp-7.4.0/zypp/ui/Selectable.cc 2010-04-29 18:08:13.000000000
+0200
@@ -182,7 +182,12 @@

bool Selectable::isNeeded() const
{
- return fate() == TO_INSTALL || isBroken() ;
+ return fate() == TO_INSTALL || ( ! locked() && isBroken() );
+ }
+
+ bool Selectable::isUnwanted() const
+ {
+ return locked() && isBroken() ;
}

ResStatus::TransactByValue Selectable::modifiedBy() const
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/zypp/ui/Selectable.h
new/libzypp-7.4.0/zypp/ui/Selectable.h
--- old/libzypp-7.2.0/zypp/ui/Selectable.h 2010-04-27 11:28:45.000000000
+0200
+++ new/libzypp-7.4.0/zypp/ui/Selectable.h 2010-04-29 18:08:13.000000000
+0200
@@ -363,7 +363,7 @@
//@{
/** Returns true for packages, because packages are not
* classified by the solver.
- */
+ */
bool isUndetermined() const;

/** Returns true if the patch is relevant which means that at least
@@ -377,17 +377,20 @@
/** Whether a relevant patchs requirements are broken. */
bool isBroken() const;

- /** This includes still broken patches, as well as those already
- * selected to be installed.
- * This is because already selected patches will be classified as
- * \c satisfied.
+ /** This includes \c unlocked broken patches, as well as those already
+ * selected to be installed. This is because already selected
+ * patches will be classified as \c satisfied. \c Locked but broken
+ * patches will be classified as \ref isUnwanted.
*/
bool isNeeded() const;
+
+ /** Broken (needed) but locked patches. */
+ bool isUnwanted() const;
//@}

public:
/** \name Query and maip objects fate in case of commit.
- */
+ */
//@{
enum Fate {
TO_DELETE = -1,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libzypp-7.2.0/zypp.conf new/libzypp-7.4.0/zypp.conf
--- old/libzypp-7.2.0/zypp.conf 2010-04-27 11:28:45.000000000 +0200
+++ new/libzypp-7.4.0/zypp.conf 2010-04-29 18:08:13.000000000 +0200
@@ -264,6 +264,15 @@
# solver.allowVendorChange = false

##
+## Cleanup when deleting packages. Whether the solver should per default
+## try to remove packages exclusively required by the ones he's asked to
delete.
+##
+## Valid values: boolean
+## Default value: false
+##
+# solver.cleandepsOnRemove = false
+
+##
## This file contains requirements/conflicts which fulfill the
## needs of a running system.
## For example the system would be broken if not glibc or kernel is


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >