Imported Upstream version 15.18.0 82/94682/1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 1 Nov 2016 02:06:17 +0000 (11:06 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 1 Nov 2016 02:06:18 +0000 (11:06 +0900)
Change-Id: I732f70144894fd57fc04b9ed2c3c6b6d09f43c4a
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
VERSION.cmake
mkChangelog
package/libzypp.changes
zypp/ZYppCommitResult.cc
zypp/ZYppCommitResult.h
zypp/base/DefaultIntegral.h
zypp/sat/detail/PoolImpl.cc
zypp/solver/detail/SATResolver.cc
zypp/target/TargetImpl.cc
zypp/ui/SelectableImpl.h

index 32e7afc..cdfd9b3 100644 (file)
@@ -60,9 +60,9 @@
 #
 SET(LIBZYPP_MAJOR "15")
 SET(LIBZYPP_COMPATMINOR "14")
-SET(LIBZYPP_MINOR "17")
-SET(LIBZYPP_PATCH "2")
+SET(LIBZYPP_MINOR "18")
+SET(LIBZYPP_PATCH "0")
 #
-# LAST RELEASED: 15.17.2 (14)
+# LAST RELEASED: 15.18.0 (14)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
index 82ba368..27ad6c7 100755 (executable)
@@ -48,7 +48,13 @@ esac
 
 export LC_ALL=""
 export LANG="en"
-EDITOR=${EDITOR:-vi}
+
+function Edit()
+{
+  local FILE="$1"
+  vi "$FILE"
+  sed -i 's/ \+$//' "$FILE"
+}
 
 EMAIL="$(git config --get user.email)"
 
@@ -165,7 +171,7 @@ while true; do
     echo
     case "${RES:-e}" in
       [eE]*)
-       $EDITOR $VERSIONFILE
+       Edit $VERSIONFILE
        eval $(getversion)
        continue
        ;;
@@ -207,7 +213,7 @@ trap " [ -f \"$TMPFILE\" ] && /bin/rm -f -- \"$TMPFILE\" " 0 1 2 3 13 15
 
 RES=e
 while [ "$RES" == "e" ]; do
-  $EDITOR $TMPFILE
+  Edit $TMPFILE
   echo
   awk '{print}/^----------/{n=n+1; if ( n == 2 ) exit 0; }' $TMPFILE
   read -n 1 -p "$(Gecho "(a)bort, (c)ontinue, (s)ubmitt, (e)dit [e]: ")" RES
index b9ba18d..f8d0826 100644 (file)
@@ -1,4 +1,13 @@
 -------------------------------------------------------------------
+Tue Sep 29 17:51:48 CEST 2015 - ma@suse.de
+
+- solver verify: multiversion property needs to be assigned to
+  installed items too.
+- ZYppCommitResult: add attemptToModify to indicate an attempt to
+  actually install/remove was made (bsc#946750, FATE#319467)
+- version 15.18.0 (14)
+
+-------------------------------------------------------------------
 Mon Sep 28 12:19:26 CEST 2015 - ma@suse.de
 
 - SetTracker: fix computation of change sets (bsc#946898)
@@ -91,8 +100,8 @@ Sun Aug 16 01:13:23 CEST 2015 - ma@suse.de
 -------------------------------------------------------------------
 Thu Aug 13 18:16:52 CEST 2015 - ma@suse.de
 
-- Support caching of service metadata. A TTL for the service 
-  metadata may be provided in the repoindex.xml itself. The 
+- Support caching of service metadata. A TTL for the service
+  metadata may be provided in the repoindex.xml itself. The
   default is 'no caching'. (FATE#318136)
 - Fix setting dup_allow* solver options (bnc#941463)
 - Don't make zypper encode {} around repo vars (bnc#941453)
@@ -108,7 +117,7 @@ Tue Aug 11 18:48:57 CEST 2015 - ma@suse.de
 
 - History: Add 'command' tag showing who triggered the commit.
   The corresponding HistoryLogData class for parsing is
-  HistoryLogDataStampCommand. Available data are the commandline 
+  HistoryLogDataStampCommand. Available data are the commandline
   executed, user@hostname and userdata/transactionID. (FATE#312298)
 - Add convenience comparison PoolItem<>ResObject::constPtr
 - Fixes for SWIG 2.x
@@ -135,7 +144,7 @@ Sun Aug  2 01:13:27 CEST 2015 - ma@suse.de
 -------------------------------------------------------------------
 Thu Jul 30 16:13:49 CEST 2015 - ma@suse.de
 
-- Resolver: Track changed requested locales and adjust installed 
+- Resolver: Track changed requested locales and adjust installed
   packages accordingly. (part of FATE#318099)
 - Testcase: Store autoinstalled packages
 - Locale: Make it IdString based
@@ -233,7 +242,7 @@ Thu Jun  4 01:13:22 CEST 2015 - ma@suse.de
 Wed Jun  3 13:00:59 CEST 2015 - ma@suse.de
 
 - Enhance solv.idx file handling to support zypper bash completion
-- Fix SSL client certificate authentication via URL option 
+- Fix SSL client certificate authentication via URL option
   ssl_clientcert/ssl_clientkey (bnc#932393)
 - version 15.4.0 (3)
 
@@ -258,15 +267,15 @@ Sun May 24 01:13:19 CEST 2015 - ma@suse.de
 -------------------------------------------------------------------
 Mon May 18 10:46:10 CEST 2015 - ma@suse.de
 
-- zypp.conf: Add config values for gpgcheck, repo_gpgcheck 
+- zypp.conf: Add config values for gpgcheck, repo_gpgcheck
   and pkg_gpgcheck. The default behavior 'gpgcheck=On' will
-  automatically turn on the gpg signature check for packages 
+  automatically turn on the gpg signature check for packages
   downloaded from repository with unsigned metadata. If the
   repo metadata are signed, a faster comparison via checksums
   is done. By explicitly setting repo_gpgcheck or pkg_gpgcheck
   you can enforce the signature check of repository metadata
-  or downloaded packages to be always performed. Those defaults 
-  can be overwritten per repository. (FATE#314603) 
+  or downloaded packages to be always performed. Those defaults
+  can be overwritten per repository. (FATE#314603)
 - version 15.2.0 (2)
 
 -------------------------------------------------------------------
@@ -297,7 +306,7 @@ Thu Apr 23 01:13:15 CEST 2015 - ma@suse.de
 -------------------------------------------------------------------
 Wed Apr 22 10:50:00 CEST 2015 - ma@suse.de
 
-- ZYpp: Changed ZYpp::Ptr to be a shared_ptr; 
+- ZYpp: Changed ZYpp::Ptr to be a shared_ptr;
   a precondition for fixing bnc-899755
 - rpmmd: support 'metalink=' in .repo (for zypper#63)
 - RepoMirrorList: ignore comments and malformed urls in mirrorlist
@@ -336,13 +345,13 @@ Mon Mar 16 14:05:28 CET 2015 - ma@suse.de
 -------------------------------------------------------------------
 Wed Mar 11 09:22:46 CET 2015 - ma@suse.de
 
-- New RepoVarExpand: Functor expanding repo variables in a 
+- New RepoVarExpand: Functor expanding repo variables in a
   string . Supports bash style default ${v:-w}' and alternate ${v:+w}
   values (FATE#318354)
 - Easy.h: Use __typeof__ rather than typeof in header
 - Support repo variable replacement in service url
 - Support repo variable replacement in gpg url
-- Gettext.h: Fallback to ::gettext if accidentally included 
+- Gettext.h: Fallback to ::gettext if accidentally included
   outside libzypp
 - version 14.37.0 (30)
 
@@ -369,10 +378,10 @@ Thu Feb 12 01:13:34 CET 2015 - ma@suse.de
 -------------------------------------------------------------------
 Mon Feb  9 16:05:38 CET 2015 - ma@suse.de
 
-- Don't execute scripts in /tmp or /var/tmp, as they could be 
+- Don't execute scripts in /tmp or /var/tmp, as they could be
   mounted noexec for security reasons (bnc#915928)
 - zypp/PublicKey.cc: Use GPG_BINARY from KeyRing
-- Support $releasever_major/$releasever_minor repo variables 
+- Support $releasever_major/$releasever_minor repo variables
   (FATE#318354)
 - version 14.36.0 (30)
 
@@ -422,7 +431,7 @@ Thu Jan 15 01:13:12 CET 2015 - ma@suse.de
 Mon Jan 12 15:04:17 CET 2015 - ma@suse.de
 
 - Properly propagate repo variables in service refresh.
-- Let $ZYPP_REPO_RELEASEVER overwrite $releasever in .repo files 
+- Let $ZYPP_REPO_RELEASEVER overwrite $releasever in .repo files
   (bnc#911658)
 - Call pool_set_rootdir to properly check for file conflicts.
 - Use xgettext --boost to support boost-format (%N%)
index 4834760..ae4eb43 100644 (file)
@@ -33,6 +33,7 @@ namespace zypp
 
     public:
       Pathname                 _root;
+      FalseBool                        _attemptToModify;
       sat::Transaction          _transaction;
       TransactionStepList       _transactionStepList;
       UpdateNotifications      _updateMessages;
@@ -67,6 +68,12 @@ namespace zypp
   const Pathname & ZYppCommitResult::root() const
   { return _pimpl->_root; }
 
+  bool ZYppCommitResult::attemptToModify() const
+  { return _pimpl->_attemptToModify; }
+
+  void ZYppCommitResult::attemptToModify( bool yesno_r )
+  { _pimpl->_attemptToModify = yesno_r; }
+
   const sat::Transaction & ZYppCommitResult::transaction() const
   { return _pimpl->_transaction; }
 
index 1769cab..c6e86cf 100644 (file)
@@ -77,6 +77,16 @@ namespace zypp
       */
       const Pathname & root() const;
 
+      /** \c True if at least one attempt to actually install/remove packages was made.
+       * While this is false there should have been no serious modifications to the system.
+       * Mainly used to detect whether commit failed while preloading the caches or within
+       * the real action.
+       */
+      bool attemptToModify() const;
+
+      /** Set \ref attemptToModify */
+      void attemptToModify( bool yesno_r );
+
       /** The full transaction list.
        * The complete list including transaction steps that do not require
        * any action (like obsoletes or non-package actions). Depending on
index fc0a0b8..39688f1 100644 (file)
@@ -81,6 +81,16 @@ namespace zypp
       _Tp _val;
     };
 
+    /** \relates DefaultIntegral \c true initialized \c bool  */
+    typedef DefaultIntegral<bool,true>  TrueBool;
+
+    /** \relates DefaultIntegral \c false initialized \c bool */
+    typedef DefaultIntegral<bool,false> FalseBool;
+
+    /** \relates DefaultIntegral \c zero initialized \c integral */
+    template<typename TIntegral>
+    using ZeroInit = DefaultIntegral<TIntegral,TIntegral(0)>;
+
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
index 33d5de2..04db2e1 100644 (file)
@@ -576,8 +576,6 @@ namespace zypp
 
          for ( Solvable solv : WhatProvides( Capability( provides ? spec.c_str() + prefix.size() : spec.c_str() ) ) )
          {
-           if ( solv.isSystem() )
-             continue;
            if ( provides || solv.ident() == spec )
              multiversionList.insert( solv );
          }
index 95bab11..77ba113 100644 (file)
@@ -418,22 +418,20 @@ class CheckIfUpdate : public resfilter::PoolItemFilterFunctor
 {
   public:
     bool is_updated;
-    bool multiversion;
     sat::Solvable _installed;
 
-    CheckIfUpdate( sat::Solvable installed_r )
-       : is_updated( false )
-        , multiversion( installed_r.multiversionInstall() )
-        , _installed( installed_r )
+    CheckIfUpdate( const sat::Solvable & installed_r )
+    : is_updated( false )
+    , _installed( installed_r )
     {}
 
     // check this item will be updated
 
-    bool operator()( PoolItem item )
+    bool operator()( const PoolItem & item )
     {
        if ( item.status().isToBeInstalled() )
         {
-          if ( ! multiversion || sameNVRA( _installed, item ) )
+          if ( ! item.multiversionInstall() || sameNVRA( _installed, item ) )
           {
             is_updated = true;
             return false;
index e86d017..ff1b264 100644 (file)
@@ -1515,6 +1515,20 @@ namespace zypp
     // COMMIT internal
     //
     ///////////////////////////////////////////////////////////////////
+    namespace
+    {
+      struct NotifyAttemptToModify
+      {
+       NotifyAttemptToModify( ZYppCommitResult & result_r ) : _result( result_r ) {}
+
+       void operator()()
+       { if ( _guard ) { _result.attemptToModify( true ); _guard = false; } }
+
+       TrueBool           _guard;
+       ZYppCommitResult & _result;
+      };
+    } // namespace
+
     void TargetImpl::commit( const ZYppCommitPolicy & policy_r,
                             CommitPackageCache & packageCache_r,
                             ZYppCommitResult & result_r )
@@ -1525,7 +1539,11 @@ namespace zypp
 
       HistoryLog().stampCommand();
 
+      // Send notification once upon 1st call to rpm
+      NotifyAttemptToModify attemptToModify( result_r );
+
       bool abort = false;
+
       RpmPostTransCollector postTransCollector( _root );
       std::vector<sat::Solvable> successfullyInstalledPackages;
       TargetImpl::PoolItemList remaining;
@@ -1600,6 +1618,7 @@ namespace zypp
             if (policy_r.rpmExcludeDocs()) flags |= rpm::RPMINST_EXCLUDEDOCS;
             if (policy_r.rpmNoSignature()) flags |= rpm::RPMINST_NOSIGNATURE;
 
+           attemptToModify();
             try
             {
               progress.tryLevel( target::rpm::InstallResolvableReport::RPM_NODEPS_FORCE );
@@ -1663,6 +1682,8 @@ namespace zypp
             rpm::RpmInstFlags flags( policy_r.rpmInstFlags() & rpm::RPMINST_JUSTDB );
             flags |= rpm::RPMINST_NODEPS;
             if (policy_r.dryRun()) flags |= rpm::RPMINST_TEST;
+
+           attemptToModify();
             try
             {
              rpm().removePackage( p, flags );
index b37322a..4577469 100644 (file)
@@ -299,7 +299,7 @@ namespace zypp
 
       bool multiversionInstall() const
       {
-       for ( const PoolItem & pi : available() )
+       for ( const PoolItem & pi : picklist() )
        {
          if ( pi.multiversionInstall() )
            return true;