Hello community,

here is the log from the commit of package libzypp for openSUSE:Factory checked 
in at 2014-05-02 20:51:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libzypp (Old)
 and      /work/SRC/openSUSE:Factory/.libzypp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libzypp"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes  2014-04-17 
14:43:50.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libzypp.new/libzypp.changes     2014-05-02 
20:51:24.000000000 +0200
@@ -1,0 +2,7 @@
+Mon Apr 28 15:34:44 CEST 2014 - [email protected]
+
+- Derive initial AutoInstalled file from history
+- Target: maintain AutoInstalled database file
+- version 14.18.0 (17)
+
+-------------------------------------------------------------------

Old:
----
  libzypp-14.17.5.tar.bz2

New:
----
  libzypp-14.18.0.tar.bz2

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

Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.OfkATo/_old  2014-05-02 20:51:25.000000000 +0200
+++ /var/tmp/diff_new_pack.OfkATo/_new  2014-05-02 20:51:25.000000000 +0200
@@ -23,7 +23,7 @@
 Summary:        Package, Patch, Pattern, and Product Management
 License:        GPL-2.0+
 Group:          System/Packages
-Version:        14.17.5
+Version:        14.18.0
 Release:        0
 Source:         %{name}-%{version}.tar.bz2
 Source1:        %{name}-rpmlintrc

++++++ libzypp-14.17.5.tar.bz2 -> libzypp-14.18.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/VERSION.cmake 
new/libzypp-14.18.0/VERSION.cmake
--- old/libzypp-14.17.5/VERSION.cmake   2014-04-15 17:04:45.000000000 +0200
+++ new/libzypp-14.18.0/VERSION.cmake   2014-04-28 15:36:46.000000000 +0200
@@ -60,9 +60,9 @@
 #
 SET(LIBZYPP_MAJOR "14")
 SET(LIBZYPP_COMPATMINOR "17")
-SET(LIBZYPP_MINOR "17")
-SET(LIBZYPP_PATCH "5")
+SET(LIBZYPP_MINOR "18")
+SET(LIBZYPP_PATCH "0")
 #
-# LAST RELEASED: 14.17.5 (17)
+# LAST RELEASED: 14.18.0 (17)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/package/libzypp.changes 
new/libzypp-14.18.0/package/libzypp.changes
--- old/libzypp-14.17.5/package/libzypp.changes 2014-04-15 17:04:45.000000000 
+0200
+++ new/libzypp-14.18.0/package/libzypp.changes 2014-04-28 15:36:46.000000000 
+0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Mon Apr 28 15:34:44 CEST 2014 - [email protected]
+
+- Derive initial AutoInstalled file from history
+- Target: maintain AutoInstalled database file
+- version 14.18.0 (17)
+
+-------------------------------------------------------------------
 Tue Apr 15 17:03:30 CEST 2014 - [email protected]
 
 - Factor out CommitPackageCache for standalone usage. (Fate#317077)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/CMakeLists.txt 
new/libzypp-14.18.0/zypp/CMakeLists.txt
--- old/libzypp-14.17.5/zypp/CMakeLists.txt     2014-04-03 19:24:12.000000000 
+0200
+++ new/libzypp-14.18.0/zypp/CMakeLists.txt     2014-04-28 15:36:46.000000000 
+0200
@@ -571,7 +571,7 @@
 SET( zypp_target_SRCS
   target/RpmPostTransCollector.cc
   target/RequestedLocalesFile.cc
-  target/SoftLocksFile.cc
+  target/SolvIdentFile.cc
   target/HardLocksFile.cc
   target/CommitPackageCache.cc
   target/CommitPackageCacheImpl.cc
@@ -586,7 +586,7 @@
 SET( zypp_target_HEADERS
   target/RpmPostTransCollector.h
   target/RequestedLocalesFile.h
-  target/SoftLocksFile.h
+  target/SolvIdentFile.h
   target/HardLocksFile.h
   target/CommitPackageCache.h
   target/CommitPackageCacheImpl.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/ResPool.cc 
new/libzypp-14.18.0/zypp/ResPool.cc
--- old/libzypp-14.17.5/zypp/ResPool.cc 2014-02-11 23:52:52.000000000 +0100
+++ new/libzypp-14.18.0/zypp/ResPool.cc 2014-04-28 15:36:46.000000000 +0200
@@ -83,26 +83,6 @@
   Repository ResPool::reposFind( const std::string & alias_r ) const
   { return _pimpl->reposFind( alias_r ); }
 
-#ifdef WITHSOFTLOCKS
-  bool ResPool::autoSoftLocksEmpty() const
-  { return _pimpl->autoSoftLocks().empty(); }
-
-  ResPool::size_type ResPool::autoSoftLocksSize() const
-  { return _pimpl->autoSoftLocks().size(); }
-
-  ResPool::autoSoftLocks_iterator ResPool::autoSoftLocksBegin() const
-  { return _pimpl->autoSoftLocks().begin(); }
-
-  ResPool::autoSoftLocks_iterator ResPool::autoSoftLocksEnd() const
-  { return _pimpl->autoSoftLocks().end(); }
-
-  void ResPool::setAutoSoftLocks( const AutoSoftLocks & newLocks_r )
-  { _pimpl->setAutoSoftLocks( newLocks_r ); }
-
-  void ResPool::getActiveSoftLocks( AutoSoftLocks & activeLocks_r )
-  { _pimpl->getActiveSoftLocks( activeLocks_r ); }
-#endif
-
   bool ResPool::hardLockQueriesEmpty() const
   { return _pimpl->hardLockQueries().empty(); }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/ResPool.h 
new/libzypp-14.18.0/zypp/ResPool.h
--- old/libzypp-14.17.5/zypp/ResPool.h  2014-02-11 23:52:52.000000000 +0100
+++ new/libzypp-14.18.0/zypp/ResPool.h  2014-04-28 15:36:46.000000000 +0200
@@ -320,42 +320,6 @@
       bool isAvailableLocale( const Locale & locale_r ) const;
       //@}
 
-#ifdef WITHSOFTLOCKS
-    public:
-      /** \name Handle automatic soft-locks.
-       *
-       * Solvables with and ident listed here are per default created with
-       * a setSoftLock applied. I.e. the \ref Resolver should not automatically
-       * select them, if they are just recommended.
-       *
-       * This list is considered when adding new repos to the pool. It is
-       * \b not the list of currently softLocked items.
-       *
-       * Mainly used to re-apply soft-locks remembered during the last commit.
-       */
-      //@{
-      typedef pool::PoolTraits::AutoSoftLocks          AutoSoftLocks;
-      typedef pool::PoolTraits::autoSoftLocks_iterator autoSoftLocks_iterator;
-
-      bool autoSoftLocksEmpty() const;
-      size_type autoSoftLocksSize() const;
-      autoSoftLocks_iterator autoSoftLocksBegin() const;
-      autoSoftLocks_iterator autoSoftLocksEnd() const;
-
-      /** Set a new soft-lock list.
-       * The soft-locks of existing PoolItems are adjusted according
-       * to the list. (usually called on target load)
-      */
-      void setAutoSoftLocks( const AutoSoftLocks & newLocks_r );
-
-      /** Suggest a new soft-lock list based on the current selection.
-       * Based on the the current soft-lock list. Items tagged to be
-       * installed are removed, and those tagged to be deleted are added.
-       * (usually remembered on commit).
-      */
-      void getActiveSoftLocks( AutoSoftLocks & activeLocks_r );
-      //@}
-#endif
     public:
       /** \name Handle hard locks (e.g set from /etc/zypp/locks).
        *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/pool/PoolImpl.h 
new/libzypp-14.18.0/zypp/pool/PoolImpl.h
--- old/libzypp-14.17.5/zypp/pool/PoolImpl.h    2014-02-11 23:52:52.000000000 
+0100
+++ new/libzypp-14.18.0/zypp/pool/PoolImpl.h    2014-04-28 15:36:46.000000000 
+0200
@@ -298,72 +298,6 @@
           return setChanged;
        }
 
-#ifdef WITHSOFTLOCKS
-      public:
-        typedef PoolTraits::AutoSoftLocks          AutoSoftLocks;
-        typedef PoolTraits::autoSoftLocks_iterator autoSoftLocks_iterator;
-
-        const AutoSoftLocks & autoSoftLocks() const
-        { return _autoSoftLocks; }
-
-        bool autoSoftLockAppliesTo( sat::Solvable solv_r ) const
-        { return( _autoSoftLocks.find( solv_r.ident() ) != 
_autoSoftLocks.end() ); }
-
-        void setAutoSoftLocks( const AutoSoftLocks & newLocks_r )
-        {
-          MIL << "Apply " << newLocks_r.size() << " AutoSoftLocks: " << 
newLocks_r << endl;
-          _autoSoftLocks = newLocks_r;
-          // now adjust the pool status
-          for_( it, begin(), end() )
-          {
-            if ( ! it->status().isKept() )
-              continue;
-
-            if ( autoSoftLockAppliesTo( it->satSolvable() ) )
-              it->status().setSoftLock( ResStatus::USER );
-            else
-              it->status().resetTransact( ResStatus::USER );
-          }
-        }
-
-        void getActiveSoftLocks( AutoSoftLocks & activeLocks_r )
-        {
-          activeLocks_r = _autoSoftLocks; // current soft-locks
-          AutoSoftLocks todel;            // + names to be deleted
-          AutoSoftLocks toins;            // - names to be installed
-
-          for_( it, begin(), end() )
-          {
-            ResStatus & status( it->status() );
-            if ( ! ( status.isByUser() || status.isByApplLow() ) )
-              continue; // ignore non-user requests; ApplLow means selected
-                        // by solver, but on behalf of a user request.
-
-            switch ( status.getTransactValue() )
-            {
-              case ResStatus::KEEP_STATE:
-                // Filter only items included in the last recommended set.
-                if ( status.isRecommended() )
-                  activeLocks_r.insert( it->satSolvable().ident() );
-                break;
-              case ResStatus::LOCKED:
-                //  NOOP
-                break;
-              case ResStatus::TRANSACT:
-                (status.isInstalled() ? todel : toins).insert( 
it->satSolvable().ident() );
-                break;
-            }
-          }
-          for_( it, todel.begin(), todel.end() )
-          {
-            activeLocks_r.insert( *it );
-          }
-          for_( it, toins.begin(), toins.end() )
-          {
-            activeLocks_r.erase( *it );
-          }
-        }
-#endif
       public:
         const ContainerT & store() const
         {
@@ -394,13 +328,6 @@
                   // remember products for buddy processing (requires clean 
store)
                   if ( s.isKind( ResKind::product ) )
                     addedProducts.push_back( pi );
-#ifdef WITHSOFTLOCKS
-                  // and on the fly check for weak locks...
-                  if ( autoSoftLockAppliesTo( s ) )
-                  {
-                    pi.status().setSoftLock( ResStatus::USER );
-                  }
-#endif
                   if ( !addedItems )
                     addedItems = true;
                 }
@@ -480,10 +407,6 @@
         mutable shared_ptr<ResPoolProxy>      _poolProxy;
 
       private:
-#ifdef WITHSOFTLOCKS
-        /** Set of solvable idents that should be soft locked per default. */
-        AutoSoftLocks                         _autoSoftLocks;
-#endif
         /** Set of queries that define hardlocks. */
         HardLockQueries                       _hardLockQueries;
     };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/pool/PoolTraits.h 
new/libzypp-14.18.0/zypp/pool/PoolTraits.h
--- old/libzypp-14.17.5/zypp/pool/PoolTraits.h  2014-02-11 23:52:52.000000000 
+0100
+++ new/libzypp-14.18.0/zypp/pool/PoolTraits.h  2014-04-28 15:36:46.000000000 
+0200
@@ -84,12 +84,6 @@
       /** list of known Repositories */
       typedef sat::Pool::RepositoryIterator            repository_iterator;
 
-#ifdef WITHSOFTLOCKS
-      /** soft locks */
-      typedef std::tr1::unordered_set<IdString>                AutoSoftLocks;
-      typedef AutoSoftLocks::const_iterator             autoSoftLocks_iterator;
-#endif
-
       /** hard locks from etc/zypp/locks */
       typedef std::list<PoolQuery>                     HardLockQueries;
       typedef HardLockQueries::const_iterator          
hardLockQueries_iterator;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/sat/Pool.cc 
new/libzypp-14.18.0/zypp/sat/Pool.cc
--- old/libzypp-14.17.5/zypp/sat/Pool.cc        2013-03-20 09:29:30.000000000 
+0100
+++ new/libzypp-14.18.0/zypp/sat/Pool.cc        2014-04-28 15:36:46.000000000 
+0200
@@ -220,11 +220,8 @@
     Pool::MultiversionIterator Pool::multiversionEnd() const   { return 
myPool().multiversionList().end(); }
     bool Pool::isMultiversion( IdString ident_r ) const                { 
return myPool().isMultiversion( ident_r ); }
 
-    bool Pool::onSystemByUserEmpty() const                     { return 
myPool().onSystemByUserList().empty(); }
-    size_t Pool::onSystemByUserSize() const                    { return 
myPool().onSystemByUserList().size(); }
-    Pool::OnSystemByUserIterator Pool::onSystemByUserBegin() const     { 
return myPool().onSystemByUserList().begin(); }
-    Pool::OnSystemByUserIterator Pool::onSystemByUserEnd() const       { 
return myPool().onSystemByUserList().end(); }
-    bool Pool::isOnSystemByUser( IdString ident_r ) const      { return 
myPool().isOnSystemByUser( ident_r ); }
+    Queue Pool::autoInstalled() const                          { return 
myPool().autoInstalled(); }
+    void Pool::setAutoInstalled( const Queue & autoInstalled_r ){ 
myPool().setAutoInstalled( autoInstalled_r ); }
 
    /******************************************************************
     **
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/sat/Pool.h 
new/libzypp-14.18.0/zypp/sat/Pool.h
--- old/libzypp-14.17.5/zypp/sat/Pool.h 2013-10-25 15:21:46.000000000 +0200
+++ new/libzypp-14.18.0/zypp/sat/Pool.h 2014-04-28 15:36:46.000000000 +0200
@@ -19,6 +19,7 @@
 #include "zypp/sat/detail/PoolMember.h"
 #include "zypp/Repository.h"
 #include "zypp/sat/WhatProvides.h"
+#include "zypp/sat/Queue.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -226,18 +227,12 @@
         //@}
 
       public:
-        /** \name Installed on behalf of a user request hint.
-        * This is a hint guessed by evaluating an available install history.
-         */
+        /** \name Autoinstalled */
         //@{
-        typedef IdStringSet::const_iterator OnSystemByUserIterator;
-
-        bool onSystemByUserEmpty() const;
-        size_t onSystemByUserSize() const;
-        OnSystemByUserIterator onSystemByUserBegin() const;
-        OnSystemByUserIterator onSystemByUserEnd() const;
-
-        bool isOnSystemByUser( IdString ident_r ) const;
+        /** Get ident list of all autoinstalled solvables. */
+       Queue autoInstalled() const;
+       /** Set ident list of all autoinstalled solvables. */
+       void setAutoInstalled( const Queue & autoInstalled_r );
         //@}
 
       public:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/sat/Queue.h 
new/libzypp-14.18.0/zypp/sat/Queue.h
--- old/libzypp-14.17.5/zypp/sat/Queue.h        2013-12-18 12:36:52.000000000 
+0100
+++ new/libzypp-14.18.0/zypp/sat/Queue.h        2014-04-28 15:36:46.000000000 
+0200
@@ -26,9 +26,14 @@
   ///////////////////////////////////////////////////////////////////
   namespace sat
   {
+    class Queue;
+    typedef Queue SolvableQueue;       ///< Queue with Solvable ids
+    typedef Queue StringQueue;         ///< Queue with String ids
+
     ///////////////////////////////////////////////////////////////////
     /// \class Queue
     /// \brief Libsolv Id queue wrapper.
+    /// \todo template value_type to work with IString and other Id based types
     ///////////////////////////////////////////////////////////////////
     class Queue
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/sat/Transaction.cc 
new/libzypp-14.18.0/zypp/sat/Transaction.cc
--- old/libzypp-14.17.5/zypp/sat/Transaction.cc 2014-01-24 08:44:53.000000000 
+0100
+++ new/libzypp-14.18.0/zypp/sat/Transaction.cc 2014-04-28 15:36:46.000000000 
+0200
@@ -189,6 +189,12 @@
        int installedResult( Queue & result_r ) const
        { return ::transaction_installedresult( _trans, result_r ); }
 
+       StringQueue autoInstalled() const
+       { return _autoInstalled; }
+
+       void autoInstalled( const StringQueue & queue_r )
+       { _autoInstalled = queue_r; }
+
       public:
        StepType stepType( Solvable solv_r ) const
        {
@@ -281,6 +287,8 @@
        set_type        _systemErase;   // @System packages to be eased 
(otherse are TRANSACTION_IGNORE)
        pmmap_type      _pmMap;         // Post mortem data of deleted @System 
solvables
 
+       StringQueue     _autoInstalled; // ident strings of all packages that 
would be auto-installed after the transaction is run.
+
       public:
         /** Offer default Impl. */
         static shared_ptr<Impl> nullimpl()
@@ -346,6 +354,11 @@
     int Transaction::installedResult( Queue & result_r ) const
     { return _pimpl->installedResult( result_r ); }
 
+    StringQueue Transaction::autoInstalled() const
+    { return _pimpl->autoInstalled(); }
+
+    void Transaction::autoInstalled( const StringQueue & queue_r )
+    { _pimpl->autoInstalled( queue_r ); }
 
     std::ostream & operator<<( std::ostream & str, const Transaction & obj )
     { return str << *obj._pimpl; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/sat/Transaction.h 
new/libzypp-14.18.0/zypp/sat/Transaction.h
--- old/libzypp-14.17.5/zypp/sat/Transaction.h  2014-01-24 08:44:53.000000000 
+0100
+++ new/libzypp-14.18.0/zypp/sat/Transaction.h  2014-04-28 15:36:46.000000000 
+0200
@@ -24,6 +24,7 @@
 
 #include "zypp/sat/SolvIterMixin.h"
 #include "zypp/sat/Solvable.h"
+#include "zypp/sat/Queue.h"
 
 #include "zypp/PoolItem.h"
 
@@ -34,8 +35,6 @@
   namespace sat
   { /////////////////////////////////////////////////////////////////
 
-    class Queue;
-
     namespace detail
     {
       /** Needs to be outside \ref Transaction in order to be usable in 
SolvIterMixin. */
@@ -178,6 +177,12 @@
         * packages is returned. (wraps libsolv::transaction_installedresult) */
        int installedResult( Queue & result_r ) const;
 
+       /** Return the ident strings of all packages that would be 
auto-installed after the transaction is run. */
+       StringQueue autoInstalled() const;
+
+       /** Set the ident strings of all packages that would be auto-installed 
after the transaction is run. */
+       void autoInstalled( const StringQueue & queue_r );
+
       public:
         /** Implementation  */
         class Impl;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/sat/detail/PoolImpl.cc 
new/libzypp-14.18.0/zypp/sat/detail/PoolImpl.cc
--- old/libzypp-14.17.5/zypp/sat/detail/PoolImpl.cc     2014-04-04 
19:00:12.000000000 +0200
+++ new/libzypp-14.18.0/zypp/sat/detail/PoolImpl.cc     2014-04-28 
15:36:46.000000000 +0200
@@ -293,13 +293,10 @@
       void PoolImpl::_deleteRepo( ::_Repo * repo_r )
       {
         setDirty(__FUNCTION__, repo_r->name );
-        ::repo_free( repo_r, /*reuseids*/false );
-        eraseRepoInfo( repo_r );
        if ( isSystemRepo( repo_r ) )
-       {
-         // systemRepo added
-         _onSystemByUserListPtr.reset(); // re-evaluate
-       }
+         _autoinstalled.clear();
+        eraseRepoInfo( repo_r );
+        ::repo_free( repo_r, /*reuseids*/false );
       }
 
       int PoolImpl::_addSolv( ::_Repo * repo_r, FILE * file_r )
@@ -362,11 +359,6 @@
               blockBegin = blockSize = 0;
           }
         }
-        else
-       {
-         // systemRepo added
-         _onSystemByUserListPtr.reset(); // re-evaluate
-       }
       }
 
       detail::SolvableIdType PoolImpl::_addSolvables( ::_Repo * repo_r, 
unsigned count_r )
@@ -555,74 +547,6 @@
         }
       }
 
-      void PoolImpl::onSystemByUserListInit() const
-      {
-       _onSystemByUserListPtr.reset( new OnSystemByUserList );
-       OnSystemByUserList & onSystemByUserList( *_onSystemByUserListPtr );
-
-       Pathname root( ZConfig::instance().systemRoot() );
-       if ( root.empty() )
-       {
-         MIL << "Target not initialized." << endl;
-         return;
-       }
-       PathInfo pi( root / ZConfig::instance().historyLogFile() );
-       MIL << "onSystemByUserList from history: " << pi << endl;
-       if ( ! pi.isFile() )
-         return;
-
-       // go and parse it: 'who' must constain an '@', then it was installed 
by user request.
-       // 2009-09-29 
07:25:19|install|lirc-remotes|0.8.5-3.2|x86_64|root@opensuse|InstallationImage|a204211eb0...
-       std::ifstream infile( pi.path().c_str() );
-       for( iostr::EachLine in( infile ); in; in.next() )
-       {
-         const char * ch( (*in).c_str() );
-         // start with year
-         if ( *ch < '1' || '9' < *ch )
-           continue;
-         const char * sep1 = ::strchr( ch, '|' );      // | after date
-         if ( !sep1 )
-           continue;
-         ++sep1;
-         // if logs an install or delete
-         bool installs = true;
-         if ( ::strncmp( sep1, "install|", 8 ) )
-         {
-           if ( ::strncmp( sep1, "remove |", 8 ) )
-             continue; // no install and no remove
-             else
-               installs = false; // remove
-         }
-         sep1 += 8;                                    // | after what
-         // get the package name
-         const char * sep2 = ::strchr( sep1, '|' );    // | after name
-         if ( !sep2 || sep1 == sep2 )
-           continue;
-         (*in)[sep2-ch] = '\0';
-         IdString pkg( sep1 );
-         // we're done, if a delete
-         if ( !installs )
-         {
-           onSystemByUserList.erase( pkg );
-           continue;
-         }
-         // now guess whether user installed or not (3rd next field contains 
'user@host')
-         if ( (sep1 = ::strchr( sep2+1, '|' ))         // | after version
-           && (sep1 = ::strchr( sep1+1, '|' ))         // | after arch
-           && (sep2 = ::strchr( sep1+1, '|' )) )       // | after who
-         {
-           (*in)[sep2-ch] = '\0';
-           if ( ::strchr( sep1+1, '@' ) )
-           {
-             // by user
-             onSystemByUserList.insert( pkg );
-             continue;
-           }
-         }
-       }
-       MIL << "onSystemByUserList found: " << onSystemByUserList.size() << 
endl;
-      }
-
       const std::set<std::string> & PoolImpl::requiredFilesystems() const
       {
        if ( ! _requiredFilesystemsPtr )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/sat/detail/PoolImpl.h 
new/libzypp-14.18.0/zypp/sat/detail/PoolImpl.h
--- old/libzypp-14.17.5/zypp/sat/detail/PoolImpl.h      2013-03-20 
09:29:30.000000000 +0100
+++ new/libzypp-14.18.0/zypp/sat/detail/PoolImpl.h      2014-04-28 
15:36:46.000000000 +0200
@@ -25,6 +25,7 @@
 #include "zypp/base/NonCopyable.h"
 #include "zypp/base/SerialNumber.h"
 #include "zypp/sat/detail/PoolMember.h"
+#include "zypp/sat/Queue.h"
 #include "zypp/RepoInfo.h"
 #include "zypp/Locale.h"
 #include "zypp/Capability.h"
@@ -247,20 +248,16 @@
         public:
           /** \name Installed on behalf of a user request hint. */
           //@{
-          typedef IdStringSet OnSystemByUserList;
-
-          const OnSystemByUserList & onSystemByUserList() const
-          {
-            if ( ! _onSystemByUserListPtr )
-             onSystemByUserListInit();
-           return *_onSystemByUserListPtr;
-          }
+          /** Get ident list of all autoinstalled solvables. */
+         StringQueue autoInstalled() const
+         { return _autoinstalled; }
+
+         /** Set ident list of all autoinstalled solvables. */
+         void setAutoInstalled( const StringQueue & autoInstalled_r )
+         { _autoinstalled = autoInstalled_r; }
 
           bool isOnSystemByUser( IdString ident_r ) const
-          {
-            const OnSystemByUserList & l( onSystemByUserList() );
-            return l.find( ident_r ) != l.end();
-          }
+          { return !_autoinstalled.contains( ident_r.id() ); }
           //@}
 
        public:
@@ -287,8 +284,7 @@
           mutable scoped_ptr<MultiversionList> _multiversionListPtr;
 
           /**  */
-          void onSystemByUserListInit() const;
-          mutable scoped_ptr<OnSystemByUserList> _onSystemByUserListPtr;
+         sat::StringQueue _autoinstalled;
 
          /** filesystems mentioned in /etc/sysconfig/storage */
          mutable scoped_ptr<std::set<std::string> > _requiredFilesystemsPtr;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/solver/detail/Resolver.cc 
new/libzypp-14.18.0/zypp/solver/detail/Resolver.cc
--- old/libzypp-14.17.5/zypp/solver/detail/Resolver.cc  2014-02-13 
10:24:52.000000000 +0100
+++ new/libzypp-14.18.0/zypp/solver/detail/Resolver.cc  2014-04-28 
15:36:46.000000000 +0200
@@ -361,7 +361,10 @@
 
 sat::Transaction Resolver::getTransaction()
 {
-  return sat::Transaction( sat::Transaction::loadFromPool );
+  // FIXME: That's an ugly way of pushing autoInstalled into the transaction.
+  sat::Transaction ret( sat::Transaction::loadFromPool );
+  ret.autoInstalled( _satResolver->autoInstalled() );
+  return ret;
 }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/solver/detail/SATResolver.cc 
new/libzypp-14.18.0/zypp/solver/detail/SATResolver.cc
--- old/libzypp-14.17.5/zypp/solver/detail/SATResolver.cc       2014-02-13 
10:24:52.000000000 +0100
+++ new/libzypp-14.18.0/zypp/solver/detail/SATResolver.cc       2014-04-28 
15:36:46.000000000 +0200
@@ -663,15 +663,7 @@
       queue_push( &(_jobQueue), it->id() );
     }
 
-    if ( cleandepsOnRemove() )
-    {
-      // Add all items known to be installed by user request (not solver 
selected).
-      for_( it, sat::Pool::instance().onSystemByUserBegin(), 
sat::Pool::instance().onSystemByUserEnd() )
-      {
-       queue_push( &(_jobQueue), SOLVER_USERINSTALLED | SOLVER_SOLVABLE_NAME );
-       queue_push( &(_jobQueue), it->id() );
-      }
-    }
+    ::pool_add_userinstalled_jobs(_SATPool, 
sat::Pool::instance().autoInstalled(), &(_jobQueue), 
GET_USERINSTALLED_NAMES|GET_USERINSTALLED_INVERTED);
 
     if ( _distupgrade )
     {
@@ -1491,6 +1483,22 @@
     }
 }
 
+sat::StringQueue SATResolver::autoInstalled() const
+{
+  sat::StringQueue ret;
+  if ( _solv )
+    ::solver_get_userinstalled( _solv, ret, 
GET_USERINSTALLED_NAMES|GET_USERINSTALLED_INVERTED );
+  return ret;
+}
+
+sat::StringQueue SATResolver::userInstalled() const
+{
+  sat::StringQueue ret;
+  if ( _solv )
+    ::solver_get_userinstalled( _solv, ret, GET_USERINSTALLED_NAMES );
+  return ret;
+}
+
 
 ///////////////////////////////////////////////////////////////////
 };// namespace detail
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/solver/detail/SATResolver.h 
new/libzypp-14.18.0/zypp/solver/detail/SATResolver.h
--- old/libzypp-14.17.5/zypp/solver/detail/SATResolver.h        2013-03-20 
09:29:30.000000000 +0100
+++ new/libzypp-14.18.0/zypp/solver/detail/SATResolver.h        2014-04-28 
15:36:46.000000000 +0200
@@ -216,6 +216,8 @@
     PoolItemList resultItemsToRemove () { return _result_items_to_remove; }
     PoolItemList problematicUpdateItems() { return _problem_items; }
 
+    sat::StringQueue autoInstalled() const;
+    sat::StringQueue userInstalled() const;
 };
 
 ///////////////////////////////////////////////////////////////////
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/target/SoftLocksFile.cc 
new/libzypp-14.18.0/zypp/target/SoftLocksFile.cc
--- old/libzypp-14.17.5/zypp/target/SoftLocksFile.cc    2013-03-20 
09:29:30.000000000 +0100
+++ new/libzypp-14.18.0/zypp/target/SoftLocksFile.cc    1970-01-01 
01:00:00.000000000 +0100
@@ -1,95 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/target/SoftLocksFile.cc
- *
-*/
-#include <iostream>
-#include <fstream>
-
-#include "zypp/base/LogTools.h"
-#include "zypp/base/IOStream.h"
-#include "zypp/base/String.h"
-
-#include "zypp/PathInfo.h"
-#include "zypp/TmpPath.h"
-#include "zypp/Date.h"
-
-#include "zypp/target/SoftLocksFile.h"
-
-using std::endl;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace target
-  { /////////////////////////////////////////////////////////////////
-
-    void SoftLocksFile::load( const Pathname & file_r, Data & data_r )
-    {
-      PathInfo pi( file_r );
-      if ( ! pi.isFile() )
-      {
-        WAR << "Can't read " << pi << endl;
-        return;
-      }
-      std::ifstream infile( file_r.c_str() );
-      for( iostr::EachLine in( infile ); in; in.next() )
-      {
-        std::string l( str::trim(*in) );
-        if ( ! l.empty() && l[0] != '#' )
-        {
-          data_r.insert( IdString(l) );
-        }
-      }
-      MIL << "Read " << pi << endl;
-    }
-
-    void SoftLocksFile::store( const Pathname & file_r, const Data & data_r )
-    {
-      filesystem::TmpFile tmp( filesystem::TmpFile::makeSibling( file_r ) );
-      filesystem::chmod( tmp.path(), 0644 );
-
-      std::ofstream outs( tmp.path().c_str() );
-      outs << "# zypp::SoftLocksFile generated " << Date::now() << endl;
-      dumpRange( outs, data_r.begin(), data_r.end(), "#", "\n", "\n", "\n", 
"#\n" );
-      outs.close();
-
-      if ( outs.good() )
-      {
-        filesystem::rename( tmp.path(), file_r );
-        MIL << "Wrote " << PathInfo(file_r) << endl;
-      }
-      else
-      {
-        ERR << "Can't write " << PathInfo(tmp.path()) << endl;
-      }
-    }
-
-    /******************************************************************
-    **
-    ** FUNCTION NAME : operator<<
-    ** FUNCTION TYPE : std::ostream &
-    */
-    std::ostream & operator<<( std::ostream & str, const SoftLocksFile & obj )
-    {
-      str << obj.file() << ' ';
-      if ( obj._dataPtr )
-        str << obj.data();
-      else
-        str << "(unloaded)";
-      return str;
-    }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace target
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/target/SoftLocksFile.h 
new/libzypp-14.18.0/zypp/target/SoftLocksFile.h
--- old/libzypp-14.17.5/zypp/target/SoftLocksFile.h     2013-03-20 
09:29:30.000000000 +0100
+++ new/libzypp-14.18.0/zypp/target/SoftLocksFile.h     1970-01-01 
01:00:00.000000000 +0100
@@ -1,117 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/target/SoftLocksFile.h
- *
-*/
-#ifndef ZYPP_TARGET_SOFTLOCKSFILE_H
-#define ZYPP_TARGET_SOFTLOCKSFILE_H
-
-#include <iosfwd>
-
-#include "zypp/base/PtrTypes.h"
-
-#include "zypp/IdString.h"
-#include "zypp/Pathname.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace target
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : SoftLocksFile
-    //
-    /** Save and restore soft locks.
-     */
-    class SoftLocksFile
-    {
-      friend std::ostream & operator<<( std::ostream & str, const 
SoftLocksFile & obj );
-      public:
-        typedef std::tr1::unordered_set<IdString> Data;
-
-      public:
-        /** Ctor taking the file to read/write. */
-        SoftLocksFile( const Pathname & file_r )
-        : _file( file_r )
-        {}
-
-        /** Return the file path. */
-        const Pathname & file() const
-        { return _file; }
-
-        /** Return the data.
-         * The file is read once on demand. Returns empty \ref Data if
-         * the file does not exist or is not readable.
-        */
-        const Data & data() const
-        {
-          if ( !_dataPtr )
-          {
-            _dataPtr.reset( new Data );
-            Data & mydata( *_dataPtr );
-            load( _file, mydata );
-          }
-          return *_dataPtr;
-        }
-
-        /** Store new \ref Data.
-         * Write the new \ref Data to file, unless we know it
-         * did not change. The directory containing file must
-         * exist.
-        */
-        void setData( const Data & data_r )
-        {
-          if ( !_dataPtr )
-            _dataPtr.reset( new Data );
-
-          if ( differs( *_dataPtr, data_r ) )
-          {
-            store( _file, data_r );
-            *_dataPtr = data_r;
-          }
-        }
-
-      private:
-        /** Helper testing whether two \ref Data differ. */
-        bool differs( const Data & lhs, const Data & rhs ) const
-        {
-
-          if ( lhs.size() != rhs.size() )
-            return true;
-          for_( it, lhs.begin(), lhs.end() )
-          {
-            if ( rhs.find( *it ) == rhs.end() )
-              return true;
-          }
-          return false;
-        }
-        /** Read \ref Data from \c file_r. */
-        static void load( const Pathname & file_r, Data & data_r );
-        /** Write \ref Data to \c file_r. */
-        static void store( const Pathname & file_r, const Data & data_r );
-
-      private:
-        Pathname                 _file;
-        mutable scoped_ptr<Data> _dataPtr;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /** \relates SoftLocksFile Stream output */
-    std::ostream & operator<<( std::ostream & str, const SoftLocksFile & obj );
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace target
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_TARGET_SOFTLOCKSFILE_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/target/SolvIdentFile.cc 
new/libzypp-14.18.0/zypp/target/SolvIdentFile.cc
--- old/libzypp-14.17.5/zypp/target/SolvIdentFile.cc    1970-01-01 
01:00:00.000000000 +0100
+++ new/libzypp-14.18.0/zypp/target/SolvIdentFile.cc    2014-04-28 
15:36:46.000000000 +0200
@@ -0,0 +1,95 @@
+/*---------------------------------------------------------------------\
+|                          ____ _   __ __ ___                          |
+|                         |__  / \ / / . \ . \                         |
+|                           / / \ V /|  _/  _/                         |
+|                          / /__ | | | | | |                           |
+|                         /_____||_| |_| |_|                           |
+|                                                                      |
+\---------------------------------------------------------------------*/
+/** \file      zypp/target/SolvIdentFile.cc
+ *
+*/
+#include <iostream>
+#include <fstream>
+
+#include "zypp/base/LogTools.h"
+#include "zypp/base/IOStream.h"
+#include "zypp/base/String.h"
+
+#include "zypp/PathInfo.h"
+#include "zypp/TmpPath.h"
+#include "zypp/Date.h"
+
+#include "zypp/target/SolvIdentFile.h"
+
+using std::endl;
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+  ///////////////////////////////////////////////////////////////////
+  namespace target
+  { /////////////////////////////////////////////////////////////////
+
+    void SolvIdentFile::load( const Pathname & file_r, Data & data_r )
+    {
+      PathInfo pi( file_r );
+      if ( ! pi.isFile() )
+      {
+        WAR << "Can't read " << pi << endl;
+        return;
+      }
+      std::ifstream infile( file_r.c_str() );
+      for( iostr::EachLine in( infile ); in; in.next() )
+      {
+        std::string l( str::trim(*in) );
+        if ( ! l.empty() && l[0] != '#' )
+        {
+          data_r.insert( IdString(l) );
+        }
+      }
+      MIL << "Read " << pi << endl;
+    }
+
+    void SolvIdentFile::store( const Pathname & file_r, const Data & data_r )
+    {
+      filesystem::TmpFile tmp( filesystem::TmpFile::makeSibling( file_r ) );
+      filesystem::chmod( tmp.path(), 0644 );
+
+      std::ofstream outs( tmp.path().c_str() );
+      outs << "# " << file_r.basename() << " generated " << Date::now() << 
endl;
+      dumpRange( outs, data_r.begin(), data_r.end(), "#", "\n", "\n", "\n", 
"#\n" );
+      outs.close();
+
+      if ( outs.good() )
+      {
+        filesystem::rename( tmp.path(), file_r );
+        MIL << "Wrote " << PathInfo(file_r) << endl;
+      }
+      else
+      {
+        ERR << "Can't write " << PathInfo(tmp.path()) << endl;
+      }
+    }
+
+    /******************************************************************
+    **
+    ** FUNCTION NAME : operator<<
+    ** FUNCTION TYPE : std::ostream &
+    */
+    std::ostream & operator<<( std::ostream & str, const SolvIdentFile & obj )
+    {
+      str << obj.file() << ' ';
+      if ( obj._dataPtr )
+        str << obj.data();
+      else
+        str << "(unloaded)";
+      return str;
+    }
+
+    /////////////////////////////////////////////////////////////////
+  } // namespace target
+  ///////////////////////////////////////////////////////////////////
+  /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/target/SolvIdentFile.h 
new/libzypp-14.18.0/zypp/target/SolvIdentFile.h
--- old/libzypp-14.17.5/zypp/target/SolvIdentFile.h     1970-01-01 
01:00:00.000000000 +0100
+++ new/libzypp-14.18.0/zypp/target/SolvIdentFile.h     2014-04-28 
15:36:46.000000000 +0200
@@ -0,0 +1,115 @@
+/*---------------------------------------------------------------------\
+|                          ____ _   __ __ ___                          |
+|                         |__  / \ / / . \ . \                         |
+|                           / / \ V /|  _/  _/                         |
+|                          / /__ | | | | | |                           |
+|                         /_____||_| |_| |_|                           |
+|                                                                      |
+\---------------------------------------------------------------------*/
+/** \file      zypp/target/SolvIdentFile.h
+ *
+*/
+#ifndef ZYPP_TARGET_SOLVIDENTFILE_H
+#define ZYPP_TARGET_SOLVIDENTFILE_H
+
+#include <iosfwd>
+
+#include "zypp/base/PtrTypes.h"
+
+#include "zypp/IdString.h"
+#include "zypp/Pathname.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+  ///////////////////////////////////////////////////////////////////
+  namespace target
+  { /////////////////////////////////////////////////////////////////
+
+    ///////////////////////////////////////////////////////////////////
+    /// \class SolvIdentFile
+    /// \short Save and restore a list of solvable names (ident IdString)
+    ///////////////////////////////////////////////////////////////////
+    class SolvIdentFile
+    {
+      friend std::ostream & operator<<( std::ostream & str, const 
SolvIdentFile & obj );
+      public:
+        typedef std::tr1::unordered_set<IdString> Data;
+
+      public:
+        /** Ctor taking the file to read/write. */
+        SolvIdentFile( const Pathname & file_r )
+        : _file( file_r )
+        {}
+
+        /** Return the file path. */
+        const Pathname & file() const
+        { return _file; }
+
+        /** Return the data.
+         * The file is read once on demand. Returns empty \ref Data if
+         * the file does not exist or is not readable.
+        */
+        const Data & data() const
+        {
+          if ( !_dataPtr )
+          {
+            _dataPtr.reset( new Data );
+            Data & mydata( *_dataPtr );
+            load( _file, mydata );
+          }
+          return *_dataPtr;
+        }
+
+        /** Store new \ref Data.
+         * Write the new \ref Data to file, unless we know it
+         * did not change. The directory containing file must
+         * exist.
+        */
+        void setData( const Data & data_r )
+        {
+          if ( !_dataPtr )
+            _dataPtr.reset( new Data );
+
+          if ( differs( *_dataPtr, data_r ) )
+          {
+            store( _file, data_r );
+            *_dataPtr = data_r;
+          }
+        }
+
+      private:
+        /** Helper testing whether two \ref Data differ. */
+        bool differs( const Data & lhs, const Data & rhs ) const
+        {
+
+          if ( lhs.size() != rhs.size() )
+            return true;
+          for_( it, lhs.begin(), lhs.end() )
+          {
+            if ( rhs.find( *it ) == rhs.end() )
+              return true;
+          }
+          return false;
+        }
+        /** Read \ref Data from \c file_r. */
+        static void load( const Pathname & file_r, Data & data_r );
+        /** Write \ref Data to \c file_r. */
+        static void store( const Pathname & file_r, const Data & data_r );
+
+      private:
+        Pathname                 _file;
+        mutable scoped_ptr<Data> _dataPtr;
+    };
+    ///////////////////////////////////////////////////////////////////
+
+    /** \relates SolvIdentFile Stream output */
+    std::ostream & operator<<( std::ostream & str, const SolvIdentFile & obj );
+
+    /////////////////////////////////////////////////////////////////
+  } // namespace target
+  ///////////////////////////////////////////////////////////////////
+  /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_TARGET_SOLVIDENTFILE_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/target/TargetImpl.cc 
new/libzypp-14.18.0/zypp/target/TargetImpl.cc
--- old/libzypp-14.17.5/zypp/target/TargetImpl.cc       2014-04-15 
17:04:45.000000000 +0200
+++ new/libzypp-14.18.0/zypp/target/TargetImpl.cc       2014-04-28 
15:36:46.000000000 +0200
@@ -155,9 +155,70 @@
     }
   } // namespace json
   ///////////////////////////////////////////////////////////////////
+
   ///////////////////////////////////////////////////////////////////
   namespace target
-  { /////////////////////////////////////////////////////////////////
+  {
+    ///////////////////////////////////////////////////////////////////
+    namespace
+    {
+      SolvIdentFile::Data getUserInstalledFromHistory( const Pathname & 
historyFile_r )
+      {
+       SolvIdentFile::Data onSystemByUserList;
+       // go and parse it: 'who' must constain an '@', then it was installed 
by user request.
+       // 2009-09-29 
07:25:19|install|lirc-remotes|0.8.5-3.2|x86_64|root@opensuse|InstallationImage|a204211eb0...
+       std::ifstream infile( historyFile_r.c_str() );
+       for( iostr::EachLine in( infile ); in; in.next() )
+       {
+         const char * ch( (*in).c_str() );
+         // start with year
+         if ( *ch < '1' || '9' < *ch )
+           continue;
+         const char * sep1 = ::strchr( ch, '|' );      // | after date
+         if ( !sep1 )
+           continue;
+         ++sep1;
+         // if logs an install or delete
+         bool installs = true;
+         if ( ::strncmp( sep1, "install|", 8 ) )
+         {
+           if ( ::strncmp( sep1, "remove |", 8 ) )
+             continue; // no install and no remove
+             else
+               installs = false; // remove
+         }
+         sep1 += 8;                                    // | after what
+         // get the package name
+         const char * sep2 = ::strchr( sep1, '|' );    // | after name
+         if ( !sep2 || sep1 == sep2 )
+           continue;
+         (*in)[sep2-ch] = '\0';
+         IdString pkg( sep1 );
+         // we're done, if a delete
+         if ( !installs )
+         {
+           onSystemByUserList.erase( pkg );
+           continue;
+         }
+         // now guess whether user installed or not (3rd next field contains 
'user@host')
+         if ( (sep1 = ::strchr( sep2+1, '|' ))         // | after version
+           && (sep1 = ::strchr( sep1+1, '|' ))         // | after arch
+           && (sep2 = ::strchr( sep1+1, '|' )) )       // | after who
+         {
+           (*in)[sep2-ch] = '\0';
+           if ( ::strchr( sep1+1, '@' ) )
+           {
+             // by user
+             onSystemByUserList.insert( pkg );
+             continue;
+           }
+         }
+       }
+       MIL << "onSystemByUserList found: " << onSystemByUserList.size() << 
endl;
+       return onSystemByUserList;
+      }
+    } // namespace
+    ///////////////////////////////////////////////////////////////////
 
     /** Helper for commit plugin execution.
      * \ingroup g_RAII
@@ -764,7 +825,7 @@
     TargetImpl::TargetImpl( const Pathname & root_r, bool doRebuild_r )
     : _root( root_r )
     , _requestedLocalesFile( home() / "RequestedLocales" )
-    , _softLocksFile( home() / "SoftLocks" )
+    , _autoInstalledFile( home() / "AutoInstalled" )
     , _hardLocksFile( Pathname::assertprefix( _root, 
ZConfig::instance().locksFile() ) )
     {
       _rpm.initDatabase( root_r, Pathname(), doRebuild_r );
@@ -1122,20 +1183,32 @@
           satpool.setRequestedLocales( requestedLocales );
         }
       }
-#ifdef WITHSOFTLOCKS
       {
-        SoftLocksFile::Data softLocks( _softLocksFile.data() );
-        if ( ! softLocks.empty() )
-        {
-          // Don't soft lock any installed item.
-          for_( it, system.solvablesBegin(), system.solvablesEnd() )
-          {
-            softLocks.erase( it->ident() );
-          }
-          ResPool::instance().setAutoSoftLocks( softLocks );
-        }
+       if ( ! PathInfo( _autoInstalledFile.file() ).isExist() )
+       {
+         // Initialize from history, if it does not exist
+         Pathname historyFile( Pathname::assertprefix( _root, 
ZConfig::instance().historyLogFile() ) );
+         if ( PathInfo( historyFile ).isExist() )
+         {
+           SolvIdentFile::Data onSystemByUser( getUserInstalledFromHistory( 
historyFile ) );
+           SolvIdentFile::Data onSystemByAuto;
+           for_( it, system.solvablesBegin(), system.solvablesEnd() )
+           {
+             IdString ident( (*it).ident() );
+             if ( onSystemByUser.find( ident ) == onSystemByUser.end() )
+               onSystemByAuto.insert( ident );
+           }
+           _autoInstalledFile.setData( onSystemByAuto );
+         }
+         // on the fly removed any obsolete SoftLocks file
+         filesystem::unlink( home() / "SoftLocks" );
+       }
+       // read from AutoInstalled file
+       sat::StringQueue q;
+       for ( const auto & idstr : _autoInstalledFile.data() )
+         q.push( idstr.id() );
+       satpool.setAutoInstalled( q );
       }
-#endif
       if ( ZConfig::instance().apply_locks_file() )
       {
         const HardLocksFile::Data & hardLocks( _hardLocksFile.data() );
@@ -1240,14 +1313,13 @@
         filesystem::assert_dir( home() );
         // requested locales
         _requestedLocalesFile.setLocales( pool_r.getRequestedLocales() );
-#ifdef WITHSOFTLOCKS
-       // weak locks
+       // autoinstalled
         {
-          SoftLocksFile::Data newdata;
-          pool_r.getActiveSoftLocks( newdata );
-          _softLocksFile.setData( newdata );
+         SolvIdentFile::Data newdata;
+         for ( sat::Queue::value_type id : 
result.rTransaction().autoInstalled() )
+           newdata.insert( IdString(id) );
+         _autoInstalledFile.setData( newdata );
         }
-#endif
         // hard locks
         if ( ZConfig::instance().apply_locks_file() )
         {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.17.5/zypp/target/TargetImpl.h 
new/libzypp-14.18.0/zypp/target/TargetImpl.h
--- old/libzypp-14.17.5/zypp/target/TargetImpl.h        2014-01-24 
08:44:53.000000000 +0100
+++ new/libzypp-14.18.0/zypp/target/TargetImpl.h        2014-04-28 
15:36:46.000000000 +0200
@@ -27,7 +27,7 @@
 #include "zypp/target/rpm/RpmDb.h"
 #include "zypp/target/TargetException.h"
 #include "zypp/target/RequestedLocalesFile.h"
-#include "zypp/target/SoftLocksFile.h"
+#include "zypp/target/SolvIdentFile.h"
 #include "zypp/target/HardLocksFile.h"
 #include "zypp/ManagedFile.h"
 
@@ -210,8 +210,8 @@
       rpm::RpmDb _rpm;
       /** Requested Locales database */
       RequestedLocalesFile _requestedLocalesFile;
-      /** Soft-locks database */
-      SoftLocksFile _softLocksFile;
+      /** user/auto installed database */
+      SolvIdentFile _autoInstalledFile;
       /** Hard-Locks database */
       HardLocksFile _hardLocksFile;
       /** Cache distributionVersion */

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to