Author: mlandres
Date: Fri Dec 5 14:28:47 2008
New Revision: 11892
URL: http://svn.opensuse.org/viewcvs/zypp?rev=11892&view=rev
Log:
- Fix solvers inappropriate selection as byUSER (bnc 455965)
Modified:
trunk/libzypp/VERSION.cmake
trunk/libzypp/devel/devel.ma/Test.cc
trunk/libzypp/package/libzypp.changes
trunk/libzypp/zypp/HistoryLog.cc
trunk/libzypp/zypp/solver/detail/SATResolver.cc
Modified: trunk/libzypp/VERSION.cmake
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/VERSION.cmake?rev=11892&r1=11891&r2=11892&view=diff
==============================================================================
--- trunk/libzypp/VERSION.cmake (original)
+++ trunk/libzypp/VERSION.cmake Fri Dec 5 14:28:47 2008
@@ -61,8 +61,8 @@
SET(LIBZYPP_MAJOR "5")
SET(LIBZYPP_COMPATMINOR "23")
SET(LIBZYPP_MINOR "24")
-SET(LIBZYPP_PATCH "5")
+SET(LIBZYPP_PATCH "6")
#
-# LAST RELEASED: 5.24.5 (23)
+# LAST RELEASED: 5.24.6 (23)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
Modified: trunk/libzypp/devel/devel.ma/Test.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/Test.cc?rev=11892&r1=11891&r2=11892&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/Test.cc (original)
+++ trunk/libzypp/devel/devel.ma/Test.cc Fri Dec 5 14:28:47 2008
@@ -3,6 +3,22 @@
#include
+ static std::string pidAndAppname()
+ {
+ static std::string _val;
+ if ( _val.empty() )
+ {
+ pid_t mypid = getpid();
+ Pathname p( "/proc/"+str::numstring(mypid)+"/exe" );
+ Pathname myname( filesystem::readlink( p ) );
+
+ _val += str::numstring(mypid);
+ _val += ":";
+ _val += myname.basename();
+ }
+ return _val;
+ }
+
/******************************************************************
**
** FUNCTION NAME : main
@@ -12,6 +28,11 @@
{
INT << "===[START]==========================================" << endl;
+ SEC << pidAndAppname() << endl;
+
+
+ INT << "===[END]============================================" << endl << endl;
+ return 0;
Pathname mroot( "/tmp/Bb" );
TestSetup test( mroot, Arch_x86_64 );
test.loadRepo( "/Local/ROOT/cache/raw/11.1-update" );
@@ -36,6 +57,8 @@
MIL << it << endl;
}
+
+
INT << "===[END]============================================" << endl << endl;
return 0;
}
Modified: trunk/libzypp/package/libzypp.changes
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=11892&r1=11891&r2=11892&view=diff
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Fri Dec 5 14:28:47 2008
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Fri Dec 5 14:22:11 CET 2008 - ma@suse.de
+
+- Fix solvers inappropriate selection as byUSER (bnc 455965)
+- revision 11891
+- version 5.24.6 (23)
+
+-------------------------------------------------------------------
Thu Dec 4 11:10:35 CET 2008 - coolo@suse.de
- fix %post script to not warn on fresh install
Modified: trunk/libzypp/zypp/HistoryLog.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/HistoryLog.cc?rev=11892&r1=11891&r2=11892&view=diff
==============================================================================
--- trunk/libzypp/zypp/HistoryLog.cc (original)
+++ trunk/libzypp/zypp/HistoryLog.cc Fri Dec 5 14:28:47 2008
@@ -47,6 +47,22 @@
}
return result;
}
+
+ static std::string pidAndAppname()
+ {
+ static std::string _val;
+ if ( _val.empty() )
+ {
+ pid_t mypid = getpid();
+ zypp::Pathname p( "/proc/"+zypp::str::numstring(mypid)+"/exe" );
+ zypp::Pathname myname( zypp::filesystem::readlink( p ) );
+
+ _val += zypp::str::numstring(mypid);
+ _val += ":";
+ _val += myname.basename();
+ }
+ return _val;
+ }
}
namespace zypp
@@ -239,10 +255,11 @@
<< _sep << p->edition() // 4 evr
<< _sep << p->arch(); // 5 arch
- if (pi.status().isByUser())
+ // ApplLow is what the solver selected on behalf of the user.
+ if (pi.status().isByUser() || pi.status().isByApplLow() )
_log << _sep << userAtHostname(); // 6 reqested by
- //else if (pi.status().isByApplHigh() || pi.status().isByApplLow())
- // _log << _sep << "appl";
+ else if (pi.status().isByApplHigh())
+ _log << _sep << pidAndAppname();
else
_log << _sep;
@@ -269,10 +286,11 @@
<< _sep << p->edition() // 4 evr
<< _sep << p->arch(); // 5 arch
- if (pi.status().isByUser())
+ // ApplLow is what the solver selected on behalf of the user.
+ if ( pi.status().isByUser() || pi.status().isByApplLow() )
_log << _sep << userAtHostname(); // 6 reqested by
- //else if (pi.status().isByApplHigh() || pi.status().isByApplLow())
- // _log << _sep << "appl";
+ else if (pi.status().isByApplHigh())
+ _log << _sep << pidAndAppname();
else
_log << _sep;
Modified: trunk/libzypp/zypp/solver/detail/SATResolver.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/SATResolver.cc?rev=11892&r1=11891&r2=11892&view=diff
==============================================================================
--- trunk/libzypp/zypp/solver/detail/SATResolver.cc (original)
+++ trunk/libzypp/zypp/solver/detail/SATResolver.cc Fri Dec 5 14:28:47 2008
@@ -584,17 +584,15 @@
}
// Solvables which were selected due requirements which have been made by the user will
- // be selected by USER.
- // FIXME: The request queue should contains the TransactBy field
- // ma: this is also deadly for the UI as it converts the requirement into a fix selection,
- // which will serve as user input on the next solver run.
+ // be selected by APPL_LOW. We can't use any higher level, because this setting must
+ // not serve as a request for the next solver run. APPL_LOW is reset before solving.
for (CapabilitySet::const_iterator iter = requires_caps.begin(); iter != requires_caps.end(); iter++) {
sat::WhatProvides rpmProviders(*iter);
for_( iter2, rpmProviders.begin(), rpmProviders.end() ) {
PoolItem poolItem(*iter2);
if (poolItem.status().isToBeInstalled()) {
MIL << "User requirement " << *iter << " sets " << poolItem << endl;
- poolItem.status().setTransactByValue (ResStatus::USER);
+ poolItem.status().setTransactByValue (ResStatus::APPL_LOW);
}
}
}
@@ -604,7 +602,7 @@
PoolItem poolItem(*iter2);
if (poolItem.status().isToBeUninstalled()) {
MIL << "User conflict " << *iter << " sets " << poolItem << endl;
- poolItem.status().setTransactByValue (ResStatus::USER);
+ poolItem.status().setTransactByValue (ResStatus::APPL_LOW);
}
}
}
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org