Imported Upstream version 16.4.0 upstream/16.4.0
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 2 Sep 2019 07:11:45 +0000 (16:11 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 2 Sep 2019 07:11:45 +0000 (16:11 +0900)
18 files changed:
VERSION.cmake
package/libzypp.changes
po/fa.po
po/fr.po
po/it.po
zypp/CpeId.cc
zypp/RepoManager.cc
zypp/Target.cc
zypp/Target.h
zypp/base/StrMatcher.cc
zypp/media/MediaCD.cc
zypp/sat/Solvable.cc
zypp/sat/Solvable.h
zypp/sat/SolvableType.h
zypp/sat/detail/PoolImpl.h
zypp/target/SolvIdentFile.cc
zypp/target/TargetImpl.cc
zypp/target/TargetImpl.h

index 1f657cb..7164303 100644 (file)
@@ -60,9 +60,9 @@
 #
 SET(LIBZYPP_MAJOR "16")
 SET(LIBZYPP_COMPATMINOR "0")
-SET(LIBZYPP_MINOR "3")
-SET(LIBZYPP_PATCH "2")
+SET(LIBZYPP_MINOR "4")
+SET(LIBZYPP_PATCH "0")
 #
-# LAST RELEASED: 16.3.2 (0)
+# LAST RELEASED: 16.4.0 (0)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
index a801277..499e256 100644 (file)
@@ -1,4 +1,14 @@
 -------------------------------------------------------------------
+Thu Jan 26 13:03:37 CET 2017 - ma@suse.de
+
+- Add API for updating the AutoInstalled db
+- MediaCD: Fix mountpoint creation after failing udf mount (bsc#1022046)
+- fix misleading indentation (fixes #65)
+- Fix compilation error reported by GCC7 (#63).
+- Prefer calling "repo2solv" rather than "repo2solv.sh"
+- version 16.4.0 (0)
+
+-------------------------------------------------------------------
 Wed Dec 14 12:24:23 CET 2016 - ma@suse.de
 
 - Don't raise FileCheckException if user accepted a package with wrong
index c28de56..c56a7bb 100644 (file)
--- a/po/fa.po
+++ b/po/fa.po
@@ -5,10 +5,10 @@ msgstr ""
 "Project-Id-Version: opensuse-i 18n\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2016-11-21 15:07+0100\n"
-"PO-Revision-Date: 2016-11-01 20:29+0000\n"
+"PO-Revision-Date: 2016-12-15 09:15+0000\n"
 "Last-Translator: hayyan rostami <hayyan71@yahoo.com>\n"
-"Language-Team: Persian <https://l10n.opensuse.org/projects/libzypp/master/fa/"
-">\n"
+"Language-Team: Persian "
+"<https://l10n.opensuse.org/projects/libzypp/master/fa/>\n"
 "Language: fa\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -4549,6 +4549,7 @@ msgid ""
 "Create attach point: Can't find a writable directory to create an attach "
 "point"
 msgstr ""
+"ساخت نقطه ی اتصال: نمیتوان یک فهرست قابل نوشتن را برای ساخت نقطه ی اتصال یافت"
 
 #. !\todo add comma to the message for the next release
 #: zypp/media/MediaCIFS.cc:427 zypp/media/MediaCurl.cc:1687
index 2290571..49b8dbb 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -20,10 +20,10 @@ msgstr ""
 "Project-Id-Version: zypp.fr\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2016-11-21 15:07+0100\n"
-"PO-Revision-Date: 2016-07-13 08:38+0000\n"
-"Last-Translator: Christine Gabriel <christine@stoquart.com>\n"
-"Language-Team: French <https://l10n.opensuse.org/projects/libzypp/master/fr/"
-">\n"
+"PO-Revision-Date: 2016-12-29 17:31+0000\n"
+"Last-Translator: Benoît Monin <benoit.monin@gmx.fr>\n"
+"Language-Team: French <https://l10n.opensuse.org/projects/libzypp/master/fr/>"
+"\n"
 "Language: fr\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -4595,6 +4595,8 @@ msgid ""
 "Create attach point: Can't find a writable directory to create an attach "
 "point"
 msgstr ""
+"Création d'un point d'attache : Impossible de trouver un répertoire pour "
+"créer un point d'attache"
 
 #. !\todo add comma to the message for the next release
 #: zypp/media/MediaCIFS.cc:427 zypp/media/MediaCurl.cc:1687
index ac5c450..a181043 100644 (file)
--- a/po/it.po
+++ b/po/it.po
@@ -15,10 +15,10 @@ msgstr ""
 "Project-Id-Version: zypp\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2016-11-21 15:07+0100\n"
-"PO-Revision-Date: 2016-07-08 13:22+0000\n"
-"Last-Translator: Sabrina D'Alessandro <sabda23@gmail.com>\n"
-"Language-Team: Italian <https://l10n.opensuse.org/projects/libzypp/master/it/"
-">\n"
+"PO-Revision-Date: 2016-12-30 21:16+0000\n"
+"Last-Translator: Alessio Adamo <alessio.adamo@gmail.com>\n"
+"Language-Team: Italian "
+"<https://l10n.opensuse.org/projects/libzypp/master/it/>\n"
 "Language: it\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -4573,6 +4573,8 @@ msgid ""
 "Create attach point: Can't find a writable directory to create an attach "
 "point"
 msgstr ""
+"Creazione del punto di collegamento: impossibile trovare una directory "
+"scrivibile per creare un punto di collegamento"
 
 #. !\todo add comma to the message for the next release
 #: zypp/media/MediaCIFS.cc:427 zypp/media/MediaCurl.cc:1687
index e8b3015..acce8b2 100644 (file)
@@ -845,9 +845,9 @@ namespace zypp
        case '*':
          if ( src.size() == 1 )
            return true;        // "*" matches always: superset
-         else
-           prefx = std::string::npos;
-           src.erase( 0, 1 );
+         // else
+         prefx = std::string::npos;
+         src.erase( 0, 1 );
          break;
        case '?':
          ++prefx;
@@ -855,8 +855,8 @@ namespace zypp
          { if ( *it == '?' ) ++prefx; else break; }
          if ( src.size() == prefx )
            return( trg.size() <= prefx );      // "??..?": superset if at most #prefx chars
-         else
-           src.erase( 0, prefx );
+         // else
+         src.erase( 0, prefx );
          break;
        default:
          break;
index 3225ad8..d34a792 100644 (file)
@@ -1336,7 +1336,7 @@ namespace zypp
         scoped_ptr<MediaMounter> forPlainDirs;
 
         ExternalProgram::Arguments cmd;
-        cmd.push_back( "repo2solv.sh" );
+        cmd.push_back( PathInfo( "/usr/bin/repo2solv" ).isFile() ? "repo2solv" : "repo2solv.sh" );
         // repo2solv expects -o as 1st arg!
         cmd.push_back( "-o" );
         cmd.push_back( solvfile.asString() );
index 2bee5ea..b9d35ec 100644 (file)
@@ -99,6 +99,9 @@ namespace zypp
   LocaleSet Target::requestedLocales( const Pathname & root_r )
   { return target::TargetImpl::requestedLocales( root_r ); }
 
+  void Target::updateAutoInstalled()
+  { return _pimpl->updateAutoInstalled(); }
+
   std::string Target::targetDistribution() const
   { return _pimpl->targetDistribution(); }
   std::string Target::targetDistribution( const Pathname & root_r )
index 5d42b6e..c13f449 100644 (file)
@@ -127,6 +127,11 @@ namespace zypp
      */
     static LocaleSet requestedLocales( const Pathname & root_r );
 
+    /** Update the database of autoinstalled packages.
+     * This is done on commit, so you usually don't need to call this explicitly.
+     */
+    void updateAutoInstalled();
+
   public:
     /** \name Base product and registration.
      *
index 95ab089..6042324 100644 (file)
@@ -207,7 +207,7 @@ namespace zypp
 
       if ( ! string_r )
        return false; // NULL never matches
-       return ::datamatcher_match( _matcher.get(), string_r );
+      return ::datamatcher_match( _matcher.get(), string_r );
     }
 
     /** The current searchstring. */
index 8452736..9328c9b 100644 (file)
@@ -409,12 +409,6 @@ namespace zypp
     // This also fills the _devices list on demand
     DeviceList detected( detectDevices( _url.getScheme() == "dvd" ? true : false ) );
 
-    if( !isUseableAttachPoint( attachPoint() ) )
-    {
-      setAttachPoint( createAttachPoint(), true );
-    }
-    std::string mountpoint( attachPoint().asString() );
-
     Mount mount;
     MediaMountException merr;
 
@@ -435,6 +429,7 @@ namespace zypp
 
     // try all devices in sequence
     int count = 0;
+    std::string mountpoint( attachPoint().asString() );
     bool mountsucceeded = false;
     for ( DeviceList::iterator it = _devices.begin() ; ! mountsucceeded && it != _devices.end() ; ++it, ++count )
     {
@@ -531,6 +526,12 @@ namespace zypp
       {
         try
         {
+         if( !isUseableAttachPoint( attachPoint() ) )
+         {
+           setAttachPoint( createAttachPoint(), true );
+           mountpoint = attachPoint().asString();
+         }
+
           mount.mount(it->name, mountpoint, *fsit, options);
 
           setMediaSource(media);
index b5f0ede..5e6f051 100644 (file)
@@ -141,10 +141,12 @@ namespace zypp
       else
       {
        for ( Locale l( lang_r ); l; l = l.fallback() )
+       {
          if ( (s = ::solvable_lookup_str_lang( _solvable, attr.id(), l.c_str(), 0 )) )
            return s;
-         // here: no matching locale, so use default
-         s = ::solvable_lookup_str_lang( _solvable, attr.id(), 0, 0 );
+       }
+       // here: no matching locale, so use default
+       s = ::solvable_lookup_str_lang( _solvable, attr.id(), 0, 0 );
       }
       return s ? s : std::string();
    }
@@ -375,6 +377,16 @@ namespace zypp
       return isSystem() && myPool().isOnSystemByUser( ident() );
     }
 
+    bool Solvable::onSystemByAuto() const
+    {
+      return isSystem() && myPool().isOnSystemByAuto( ident() );
+    }
+
+    bool Solvable::identIsAutoInstalled() const
+    {
+      return myPool().isOnSystemByAuto( ident() );
+    }
+
     bool Solvable::multiversionInstall() const
     {
       NO_SOLVABLE_RETURN( false );
index 2702333..b6d4f98 100644 (file)
@@ -121,12 +121,18 @@ namespace zypp
       bool isSystem() const;
 
       /** Whether this is known to be installed on behalf of a user request.
-       * \note This is a hint guessed by evaluating an available install history.
-       * Returns \c false for non-system (uninstalled) solvables, or if no history
-       * is available.
+       * \note Returns \c false for non-system (uninstalled) solvables.
        */
       bool onSystemByUser() const;
 
+      /** Whether this is known to be automatically installed (as dependency of a user request package).
+       * \note Returns \c false for non-system (uninstalled) solvables.
+       */
+      bool onSystemByAuto() const;
+
+      /** Whether an installed solvable with the same ident is flagged as AutoInstalled. */
+      bool identIsAutoInstalled() const;
+
       /** Whether different versions of this package can be installed at the same time.
        * Per default \c false. \see also \ref ZConfig::multiversion.
        */
index 4c087f2..e666195 100644 (file)
@@ -63,7 +63,7 @@ namespace zypp
       ResKind          kind() const                            { return satSolvable().kind(); }
       bool             isKind( const ResKind & kind_r ) const  { return satSolvable().isKind( kind_r ); }
       template<class TRes>
-      bool             isKind() const                          { return satSolvable().isKind<TRes>(); }
+      bool             isKind() const                          { return satSolvable().template isKind<TRes>(); }
       template<class TIterator>
       bool isKind( TIterator begin, TIterator end ) const      { return satSolvable().isKind( begin, end ); }
 
@@ -77,6 +77,8 @@ namespace zypp
 
       bool             isSystem() const                        { return satSolvable().isSystem(); }
       bool             onSystemByUser() const                  { return satSolvable().onSystemByUser(); }
+      bool             onSystemByAuto() const                  { return satSolvable().onSystemByAuto(); }
+      bool             identIsAutoInstalled() const            { return satSolvable().identIsAutoInstalled(); }
       bool             multiversionInstall() const             { return satSolvable().multiversionInstall(); }
 
       Date             buildtime() const                       { return satSolvable().buildtime(); }
index 77ced71..92a81a4 100644 (file)
@@ -299,6 +299,9 @@ namespace zypp
 
           bool isOnSystemByUser( IdString ident_r ) const
           { return !_autoinstalled.contains( ident_r.id() ); }
+
+          bool isOnSystemByAuto( IdString ident_r ) const
+          { return _autoinstalled.contains( ident_r.id() ); }
           //@}
 
        public:
index f09074a..bd738d2 100644 (file)
@@ -58,7 +58,15 @@ namespace zypp
 
       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" );
+      if ( true )
+      {
+       std::set<IdString> sorted( data_r.begin(), data_r.end() );
+       dumpRange( outs, sorted.begin(), sorted.end(), "#", "\n", "\n", "\n", "#\n" );
+      }
+      else
+      {
+       dumpRange( outs, data_r.begin(), data_r.end(), "#", "\n", "\n", "\n", "#\n" );
+      }
       outs.close();
 
       if ( outs.good() )
index baffb9b..74f7644 100644 (file)
@@ -1733,6 +1733,15 @@ namespace zypp
       return RequestedLocalesFile( home(needroot) / "RequestedLocales" ).locales();
     }
 
+    void TargetImpl::updateAutoInstalled()
+    {
+      MIL << "updateAutoInstalled if changed..." << endl;
+      SolvIdentFile::Data newdata;
+      for ( auto id : sat::Pool::instance().autoInstalled() )
+       newdata.insert( IdString(id) ); // explicit ctor!
+      _autoInstalledFile.setData( std::move(newdata) );
+    }
+
     std::string TargetImpl::targetDistribution() const
     { return baseproductdata( _root ).registerTarget(); }
     // static version:
index 21f4b04..6658900 100644 (file)
@@ -162,6 +162,9 @@ namespace zypp
       /** \overload */
       static LocaleSet requestedLocales( const Pathname & root_r );
 
+      /** \copydoc Target::updateAutoInstalled */
+      void updateAutoInstalled();
+
       /** \copydoc Target::targetDistribution() */
       std::string targetDistribution() const;
       /** \overload */