- Susetags:Package: Parse and provide ins/delnotify texts.
authorMichael Andres <ma@suse.de>
Tue, 11 Apr 2006 12:14:43 +0000 (12:14 +0000)
committerMichael Andres <ma@suse.de>
Tue, 11 Apr 2006 12:14:43 +0000 (12:14 +0000)
34 files changed:
devel/devel.ma/Main.cc
devel/devel.ma/Printing.h
devel/devel.ma/Test.cc
package/libzypp.changes
zypp/ResObject.cc
zypp/Selection.cc
zypp/Selection.h
zypp/detail/ResObjectImplIf.cc
zypp/detail/ResObjectImplIf.h
zypp/detail/SelectionImplIf.cc
zypp/detail/SelectionImplIf.h
zypp/source/susetags/PackagesLangParser.cc
zypp/source/susetags/SuseTagsPackageImpl.cc
zypp/source/susetags/SuseTagsPackageImpl.h
zypp/source/susetags/SuseTagsPatternImpl.h
zypp/source/susetags/SuseTagsSelectionImpl.h
zypp/source/yum/YUMGroupImpl.cc
zypp/source/yum/YUMGroupImpl.h
zypp/source/yum/YUMMessageImpl.cc
zypp/source/yum/YUMMessageImpl.h
zypp/source/yum/YUMPackageImpl.cc
zypp/source/yum/YUMPackageImpl.h
zypp/source/yum/YUMPatchImpl.cc
zypp/source/yum/YUMPatchImpl.h
zypp/source/yum/YUMPatternImpl.cc
zypp/source/yum/YUMPatternImpl.h
zypp/source/yum/YUMProductImpl.cc
zypp/source/yum/YUMProductImpl.h
zypp/source/yum/YUMScriptImpl.cc
zypp/source/yum/YUMScriptImpl.h
zypp/target/rpm/RpmPackageImpl.cc
zypp/target/rpm/RpmPackageImpl.h
zypp/target/store/xml/XMLPatternImpl.cc
zypp/target/store/xml/XMLPatternImpl.h

index ec86332..12bc3e6 100644 (file)
@@ -1,15 +1,61 @@
 #include <iostream>
-#include <list>
-#include <set>
 
 #include "Tools.h"
 
-#include <zypp/base/LogControl.h>
-#include <zypp/ResStatus.h>
+#include "zypp/Bit.h"
 
 using namespace std;
 using namespace zypp;
 
+namespace zypp 
+{
+  
+  struct RpmFlagsBase
+  {
+    typedef uint16_t                 FieldType;
+    typedef bit::BitField<FieldType> BitFieldType;
+    
+    enum FlagType
+      {
+        ignore,
+        install,
+        erase
+      };
+    enum FlagValue
+      {
+        none
+        //
+        --test
+        --justdb
+        --nodeps
+        --noscripts
+        --notriggers
+        --repackage
+        --force
+        //
+        // install
+        // upgrade
+        -nodigest
+        -nosignature
+        -nosuggest
+        -noorder
+        -replacefiles
+        -replacepkgs
+        -oldpackage
+        -excludedocs
+        -ignoresize
+        -ignorearch
+        -ignoreos
+        //
+        
+        
+      };
+
+    
+  };
+  
+  
+}
 
 /******************************************************************
 **
@@ -23,20 +69,6 @@ int main( int argc, char * argv[] )
   ResStatus stat;
   MIL << stat << endl;
 
-  DBG << stat.setSoftTransact( true, ResStatus::SOLVER, ResStatus::APPL_LOW )
-      << ' ' << stat << endl;
-
-  DBG << stat.setTransact( false, ResStatus::APPL_LOW )
-      << ' ' << stat << endl;
-
-  DBG << stat.setSoftTransact( true, ResStatus::SOLVER, ResStatus::APPL_LOW )
-      << ' ' << stat << endl;
-
-  DBG << stat.setTransact( false, ResStatus::APPL_HIGH )
-      << ' ' << stat << endl;
-
-  DBG << stat.setSoftTransact( true, ResStatus::SOLVER, ResStatus::APPL_LOW )
-      << ' ' << stat << endl;
 
 
   INT << "===[END]============================================" << endl << endl;
index 4738caf..8ae48cb 100644 (file)
@@ -2,17 +2,57 @@
 #define MA_PRINTING_H
 
 #include <iostream>
-#include <string>
 
 #include "zypp/base/LogControl.h"
 #include "zypp/base/LogTools.h"
-#include "zypp/base/PtrTypes.h"
+#include <zypp/base/Logger.h>
+
 #include <zypp/base/String.h>
 #include <zypp/base/Iterator.h>
 #include <zypp/base/Algorithm.h>
 #include <zypp/base/Functional.h>
 
 ///////////////////////////////////////////////////////////////////
+#if 0
+///////////////////////////////////////////////////////////////////
+struct FormatStream
+{
+  explicit
+  FormatStream( std::ostream & stream_r )
+  : _stream( stream_r )
+  {}
+
+  FormatStream & operator<<( std::ostream & (*fnc)( std::ostream & ) )
+  { _stream << fnc; return *this; }
+
+  template<class _Tp>
+    FormatStream & operator<<( const _Tp & obj )
+    { _stream << "@(" << obj << ")@"; return *this; }
+
+  std::ostream & _stream;
+};
+///////////////////////////////////////////////////////////////////
+#undef XXX
+#undef DBG
+#undef MIL
+#undef WAR
+#undef ERR
+#undef SEC
+#undef INT
+#undef USR
+
+#define XXX FormatStream(_XXX( ZYPP_BASE_LOGGER_LOGGROUP ))
+#define DBG FormatStream(_DBG( ZYPP_BASE_LOGGER_LOGGROUP ))
+#define MIL FormatStream(_MIL( ZYPP_BASE_LOGGER_LOGGROUP ))
+#define WAR FormatStream(_WAR( ZYPP_BASE_LOGGER_LOGGROUP ))
+#define ERR FormatStream(_ERR( ZYPP_BASE_LOGGER_LOGGROUP ))
+#define SEC FormatStream(_SEC( ZYPP_BASE_LOGGER_LOGGROUP ))
+#define INT FormatStream(_INT( ZYPP_BASE_LOGGER_LOGGROUP ))
+#define USR FormatStream(_USR( ZYPP_BASE_LOGGER_LOGGROUP ))
+///////////////////////////////////////////////////////////////////
+#endif
+///////////////////////////////////////////////////////////////////
+
 
 template<class _Tp>
   struct PrintOn : public std::unary_function<_Tp, bool>
@@ -31,75 +71,11 @@ template<class _Tp>
     , _prfx( prfx )
     , _leadNL( leadNL )
     {}
+
     std::ostream & _str;
     std::string _prfx;
     bool _leadNL;
   };
 
-template<class _Tp>
-  struct Print : public std::unary_function<_Tp, bool>
-  {
-    bool operator()( const _Tp & obj )
-    {
-      USR << obj << std::endl;
-      return true;
-    }
-  };
-
-template<class _Tp>
-  struct PrintPtr : public std::unary_function<_Tp, bool>
-  {
-    bool operator()( const _Tp & obj )
-    {
-      if ( obj )
-        USR << *obj << std::endl;
-      else
-        USR << "(NULL)" << std::endl;
-      return true;
-    }
-  };
-
-template<class _Container>
-  void print( const _Container & c )
-  {
-    INT << c.size() << " " << __PRETTY_FUNCTION__ << std::endl;
-    std::for_each( c.begin(), c.end(),
-                   Print<typename _Container::value_type>() );
-  }
-
-template<class _Container>
-  void printPtr( const _Container & c )
-  {
-    INT << c.size() << " " << __PRETTY_FUNCTION__ << std::endl;
-    std::for_each( c.begin(), c.end(),
-                   PrintPtr<typename _Container::value_type>() );
-  }
-
-template<class _Container>
-  void printMK( const _Container & c )
-  {
-    for ( typename _Container::const_iterator it = c.begin(); it != c.end(); ++it )
-      {
-        USR << it->first << std::endl;
-      }
-  }
-template<class _Container>
-  void printMV( const _Container & c )
-  {
-    for ( typename _Container::const_iterator it = c.begin(); it != c.end(); ++it )
-      {
-        USR << it->second << std::endl;
-      }
-  }
-
-template<class _Container>
-  void printMKV( const _Container & c )
-  {
-    for ( typename _Container::const_iterator it = c.begin(); it != c.end(); ++it )
-      {
-        USR << it->first << '\t' << it->second << std::endl;
-      }
-  }
-
 ///////////////////////////////////////////////////////////////////
 #endif // MA_PRINTING_H
index 0a81c8c..9d51b93 100644 (file)
@@ -9,8 +9,6 @@
 #include "Printing.h"
 #include "Tools.h"
 
-#include <zypp/base/Logger.h>
-#include <zypp/base/LogControl.h>
 #include <zypp/base/String.h>
 #include <zypp/base/Exception.h>
 #include <zypp/base/PtrTypes.h>
 #include <zypp/base/Algorithm.h>
 #include <zypp/base/Functional.h>
 #include <zypp/base/ProvideNumericId.h>
-#include <zypp/base/Debug.h>
+#include <zypp/base/ProvideNumericId.h>
 
 #include "zypp/NVRAD.h"
 #include "zypp/ResPool.h"
 #include "zypp/ResFilters.h"
 #include "zypp/CapFilters.h"
-#include "zypp/CapFactory.h"
 #include "zypp/Package.h"
 #include "zypp/Language.h"
-#include "zypp/VendorAttr.h"
+#include "zypp/NameKindProxy.h"
 
 #include <zypp/SourceManager.h>
 #include <zypp/SourceFactory.h>
 #include "zypp/ZYppFactory.h"
 #include "zypp/ResPoolProxy.h"
 #include "zypp/ResPoolProxy.h"
-#include <zypp/target/rpm/RpmDb.h>
+#include "zypp/target/rpm/RpmDb.h"
 
 using namespace std;
 using namespace zypp;
-using namespace zypp::base;
+using namespace zypp::ui;
+using namespace zypp::functor;
 
 ///////////////////////////////////////////////////////////////////
+
+static const Pathname sysRoot( "/Local/ROOT" );
 static const Url      instSrc( "dir:/Local/SLES10" );
+//static const Url      instSrc( "dir:/Local/FACTORY" );
+
+///////////////////////////////////////////////////////////////////
+
+namespace container
+{
+  template<class _Tp>
+    bool isIn( const std::set<_Tp> & cont, const typename std::set<_Tp>::value_type & val )
+    { return cont.find( val ) != cont.end(); }
+}
+
 ///////////////////////////////////////////////////////////////////
 
+template<class _Condition>
+  struct SetTrue
+  {
+    SetTrue( _Condition cond_r )
+    : _cond( cond_r )
+    {}
+
+    template<class _Tp>
+      bool operator()( _Tp t ) const
+      {
+        _cond( t );
+        return true;
+      }
+
+    _Condition _cond;
+  };
+
+template<class _Condition>
+  inline SetTrue<_Condition> setTrue_c( _Condition cond_r )
+  {
+    return SetTrue<_Condition>( cond_r );
+  }
+
+template <class _Iterator, class _Filter, class _Function>
+  inline _Function for_each_if( _Iterator begin_r, _Iterator end_r,
+                                _Filter filter_r,
+                                _Function fnc_r )
+  {
+    for ( _Iterator it = begin_r; it != end_r; ++it )
+      {
+        if ( filter_r( *it ) )
+          {
+            fnc_r( *it );
+          }
+      }
+    return fnc_r;
+  }
+
+///////////////////////////////////////////////////////////////////
+
+template <class _Iterator>
+  std::ostream & vdumpPoolStats( std::ostream & str,
+                                 _Iterator begin_r, _Iterator end_r )
+  {
+    pool::PoolStats stats;
+   // std::for_each( begin_r, end_r,
+//
+    //               functor::chain( setTrue_c(PrintPoolItem()),
+    //                               setTrue_c(functor::functorRef<void,ResObject::constPtr>(stats)) )
+
+     //            );
+    return str << stats;
+  }
+
+struct PoolItemSelect
+{
+  void operator()( const PoolItem & pi ) const
+  {
+    if ( pi->source().numericId() == 2 )
+      pi.status().setTransact( true, ResStatus::USER );
+  }
+};
+
 /******************************************************************
 **
 **      FUNCTION NAME : main
@@ -53,13 +127,62 @@ static const Url      instSrc( "dir:/Local/SLES10" );
 */
 int main( int argc, char * argv[] )
 {
-  Measure x;
-  Source_Ref src( SourceFactory().createFrom( Url("dir:/Local/SLES10"),
-                                              "/",
-                                              Date::now().asSeconds() ) );
-  src.resolvables();
-  MIL << src.resolvables() << endl;
-  MIL << CapFactory() << endl;
+  //zypp::base::LogControl::instance().logfile( "xxx" );
+  INT << "===[START]==========================================" << endl;
+
+  ResPool pool( getZYpp()->pool() );
+
+  if ( 0 )
+    {
+      Measure x( "initTarget " + sysRoot.asString() );
+      getZYpp()->initTarget( sysRoot );
+      getZYpp()->addResolvables( getZYpp()->target()->resolvables(), true );
+      INT << "Added target: " << pool << endl;
+    }
+
+  if ( 0 ) {
+    SourceManager::sourceManager()->restore( sysRoot );
+    if ( SourceManager::sourceManager()->allSources().empty() )
+      {
+        Source_Ref src( createSource( instSrc ) );
+        SourceManager::sourceManager()->addSource( src );
+        SourceManager::sourceManager()->store( sysRoot, true );
+      }
+
+    Source_Ref src( *SourceManager::sourceManager()->Source_begin() );
+    getZYpp()->addResolvables( src.resolvables() );
+    INT << "Added source: " << pool << endl;
+  }
+
+  Source_Ref src1( createSource( "dir:/Local/SUSE-Linux-10.1-Build_830-Addon-BiArch/CD1" ) );
+  Source_Ref src2( createSource( "dir:/Local/SUSE-Linux-10.1-Build_830-i386/CD1" ) );
+  INT << "Pool: " << pool << endl;
+  getZYpp()->addResolvables( src1.resolvables() );
+  INT << "Added source1: " << pool << endl;
+  getZYpp()->addResolvables( src2.resolvables() );
+  INT << "Added source2: " << pool << endl;
+
+
+
+
+#if 0
+  Source_Ref src( *SourceManager::sourceManager()->Source_begin() );
+  const std::list<Pathname> srcKeys( src.publicKeys() );
+  MIL << src << endl;
+  DBG << srcKeys << endl;
+
+  target::rpm::RpmDb rpm;
+  rpm.initDatabase( sysRoot );
+  std::set<Edition> rpmKeys( rpm.pubkeys() );
+  MIL << rpm << endl;
+  DBG << rpmKeys << endl;
+
+  ResPool pool( getZYpp()->pool() );
+  getZYpp()->addResolvables( src.resolvables() );
+  SEC << pool << endl;
+
+  rpm.closeDatabase();
+#endif
 
   INT << "===[END]============================================" << endl << endl;
   return 0;
index 1083ebf..88f081d 100644 (file)
@@ -1,4 +1,9 @@
 -------------------------------------------------------------------
+Tue Apr 11 14:17:00 CEST 2006 - ma@suse.de
+
+- Susetags:Package: Parse and provide ins/delnotify texts.
+
+-------------------------------------------------------------------
 Tue Apr 11 13:01:31 CEST 2006 - kkaempf@suse.de
 
 - when checking freshens/supplements at install, only consider
@@ -22,7 +27,7 @@ Tue Apr 11 10:23:14 CEST 2006 - schubi@suse.de
 Tue Apr 11 09:30:14 CEST 2006 - visnov@suse.cz
 
 - ask user if a file exists but does not have a checksum (#162797)
-- rev 3044 
+- rev 3044
 
 -------------------------------------------------------------------
 Mon Apr 10 22:39:34 CEST 2006 - jsrain@suse.de
@@ -70,7 +75,7 @@ Mon Apr 10 11:10:37 CEST 2006 - kkaempf@suse.de
 Mon Apr 10 10:56:24 CEST 2006 - visnov@suse.cz
 
 - fix callback receiver signature to match the callback for removing
-  package 
+  package
 
 -------------------------------------------------------------------
 Mon Apr 10 10:32:22 CEST 2006 - mvidner@suse.cz
@@ -82,7 +87,7 @@ Mon Apr 10 10:32:22 CEST 2006 - mvidner@suse.cz
 Sat Apr  8 12:03:37 CEST 2006 - schubi@suse.de
 
 - Bug 164440; Taking wrong architecture while updating obsoletes
-  splitted packages 
+  splitted packages
 - rev 3022
 
 -------------------------------------------------------------------
@@ -116,7 +121,7 @@ Fri Apr  7 19:57:41 CEST 2006 - kkaempf@suse.de
 Fri Apr  7 17:35:07 CEST 2006 - visnov@suse.cz
 
 - report package download progress (#160966)
-- rev 3007 
+- rev 3007
 
 -------------------------------------------------------------------
 Fri Apr  7 16:27:35 CEST 2006 - kkaempf@suse.de
index 2be1b2e..5b7c962 100644 (file)
@@ -50,10 +50,10 @@ namespace zypp
   { return pimpl().description().text(); }
 
   Text ResObject::insnotify() const
-  { return pimpl().insnotify(); }
+  { return pimpl().insnotify().text(); }
 
   Text ResObject::delnotify() const
-  { return pimpl().delnotify(); }
+  { return pimpl().delnotify().text(); }
 
   ByteCount ResObject::size() const
   { return pimpl().size(); }
index 9a6186b..6e0e950 100644 (file)
@@ -21,7 +21,7 @@ namespace zypp
 { /////////////////////////////////////////////////////////////////
 
   IMPL_PTR_TYPE(Selection);
-  
+
   ///////////////////////////////////////////////////////////////////
   //
   //   METHOD NAME : Selection::Selection
@@ -45,34 +45,22 @@ namespace zypp
   //
   ///////////////////////////////////////////////////////////////////
 
-    /** selection summary (FIXME: localized) */
-    Label Selection::summary() const
-    {
-       return pimpl().summary().text();    
-    }
-
-    /** */
-    Text Selection::description() const
-    {
-       return pimpl().description().text();    
-    }
-
     /** selection category */
     Label Selection::category() const
     {
-       return pimpl().category();    
+       return pimpl().category();
     }
 
     /** selection visibility (for hidden selections) */
     bool Selection::visible() const
     {
-       return pimpl().visible();    
+       return pimpl().visible();
     }
 
     /** selection presentation order */
     Label Selection::order() const
     {
-       return pimpl().order();    
+       return pimpl().order();
     }
 
     const std::set<std::string> Selection::install_packages( const Locale & lang) const
index e15fc22..787d1b7 100644 (file)
@@ -20,7 +20,7 @@ namespace zypp
 { /////////////////////////////////////////////////////////////////
 
   DEFINE_PTR_TYPE(Selection);
-  
+
   ///////////////////////////////////////////////////////////////////
   //
   //   CLASS NAME : Selection
@@ -37,14 +37,6 @@ namespace zypp
     typedef TraitsType::constPtrType constPtr;
 
   public:
-    // data access:
-
-    /** selection summary (FIXME: localized) */
-    Label summary() const;
-
-    /** */
-    Text description() const;
-
     /** selection category */
     Label category() const;
     inline bool isBase() const
index 155e969..801ff2f 100644 (file)
@@ -31,11 +31,11 @@ namespace zypp
       TranslatedText ResObjectImplIf::description() const
       { return TranslatedText::notext; }
 
-      Text ResObjectImplIf::insnotify() const
-      { return Text(); }
+      TranslatedText ResObjectImplIf::insnotify() const
+      { return TranslatedText::notext; }
 
-      Text ResObjectImplIf::delnotify() const
-      { return Text(); }
+      TranslatedText ResObjectImplIf::delnotify() const
+      { return TranslatedText::notext; }
 
       ByteCount ResObjectImplIf::size() const
       { return 0; }
index 1805837..a0506e6 100644 (file)
@@ -72,10 +72,10 @@ namespace zypp
       virtual TranslatedText description() const PURE_VIRTUAL;
 
       /** \todo well define! */
-      virtual Text insnotify() const PURE_VIRTUAL;
+      virtual TranslatedText insnotify() const PURE_VIRTUAL;
 
       /** \todo well define! */
-      virtual Text delnotify() const PURE_VIRTUAL;
+      virtual TranslatedText delnotify() const PURE_VIRTUAL;
 
       /** Size.  \todo well define which size. */
       virtual ByteCount size() const PURE_VIRTUAL;
index 1d97e59..610d192 100644 (file)
@@ -27,12 +27,6 @@ namespace zypp
     // as far as resonable.
     /////////////////////////////////////////////////////////////////
 
-    TranslatedText SelectionImplIf::summary() const
-    { return TranslatedText::notext; }
-
-    TranslatedText SelectionImplIf::description() const
-    { return TranslatedText::notext; }
-
     Label SelectionImplIf::category() const
     { return Label(); }
 
index 30b8e26..79f28df 100644 (file)
@@ -39,12 +39,6 @@ namespace zypp
     public:
 
         /** */
-        virtual TranslatedText summary() const PURE_VIRTUAL;
-
-        /** */
-        virtual TranslatedText description() const PURE_VIRTUAL;
-
-        /** */
        virtual Label category() const PURE_VIRTUAL;
 
         /** */
@@ -53,12 +47,10 @@ namespace zypp
         /** */
        virtual Label order() const PURE_VIRTUAL;
 
-  virtual const std::set<std::string> install_packages( const Locale & lang = Locale("") ) const;
-      
+        virtual const std::set<std::string> install_packages( const Locale & lang = Locale("") ) const;
+
 #if 0
         // NOTE LangCode id zypp:Locale
-      virtual std::list<std::string> insnotify( const LangCode & lang = LangCode("") ) const;
-      virtual std::list<std::string> delnotify( const LangCode & lang = LangCode("") ) const;
       virtual ByteCount size() const;
       virtual bool providesSources() const;
       virtual std::string instSrcLabel() const;
index 6ce85ef..6e3e432 100644 (file)
@@ -100,6 +100,15 @@ namespace zypp
            if ( _current != NULL )
              _current->_description = TranslatedText (mtag_r.values, _lang);
           }
+          else if ( mtag_r.name == "Ins" )
+            {
+              _current->_insnotify = TranslatedText (mtag_r.values, _lang);
+            }
+          else if ( mtag_r.name == "Del" )
+            {
+              _current->_delnotify = TranslatedText (mtag_r.values, _lang);
+            }
+
           else if ( mtag_r.name == "Eul" )
           {
             if ( _current != NULL )
@@ -129,7 +138,7 @@ namespace zypp
           ERR << "Packages Lang " << file_r << " is broken." << std::endl;
           return;
         }
-        
+
         MIL << "Ending after " << p._count << " langs with " << content_r.size() << " packages and " << p._notfound.size() << " not founds." <<endl;
         WAR << "Not found packages:" << std::endl;
         for ( std::set<NVRAD>::const_iterator it = p._notfound.begin(); it != p._notfound.end(); ++it)
index 54cabc9..883320c 100644 (file)
@@ -21,7 +21,7 @@ namespace zypp
   { /////////////////////////////////////////////////////////////////
     namespace susetags
     { /////////////////////////////////////////////////////////////////
-  
+
       ///////////////////////////////////////////////////////////////////
       //
       //       METHOD NAME : PackageImpl::PackageImpl
@@ -30,7 +30,7 @@ namespace zypp
       SuseTagsPackageImpl::SuseTagsPackageImpl(Source_Ref source_r) :
         _source( source_r )
       {}
-  
+
       ///////////////////////////////////////////////////////////////////
       //
       //       METHOD NAME : PackageImpl::~PackageImpl
@@ -41,13 +41,19 @@ namespace zypp
 
       CheckSum SuseTagsPackageImpl::checksum() const
       { return _checksum; }
-          
+
       TranslatedText SuseTagsPackageImpl::summary() const
       { return _summary; }
 
       TranslatedText SuseTagsPackageImpl::description() const
       { return _description; }
 
+      TranslatedText SuseTagsPackageImpl::insnotify() const
+      { return _insnotify; }
+
+      TranslatedText SuseTagsPackageImpl::delnotify() const
+      { return _delnotify; }
+
       Date SuseTagsPackageImpl::buildtime() const
       { return _buildtime; }
 
@@ -74,7 +80,7 @@ namespace zypp
 
       Changelog SuseTagsPackageImpl::changelog() const
       { return Changelog(); }
-      
+
       Pathname SuseTagsPackageImpl::location() const
       { return _location; }
 
@@ -139,7 +145,7 @@ namespace zypp
     } // namespace susetags
     ///////////////////////////////////////////////////////////////////
     /////////////////////////////////////////////////////////////////
-  } // namespace 
+  } // namespace
   ///////////////////////////////////////////////////////////////////
 
   /////////////////////////////////////////////////////////////////
index 9710af0..f386c5b 100644 (file)
@@ -25,7 +25,7 @@ namespace zypp
   { /////////////////////////////////////////////////////////////////
     namespace susetags
     { /////////////////////////////////////////////////////////////////
-  
+
       ///////////////////////////////////////////////////////////////////
       //
       //       CLASS NAME : PackageImpl
@@ -41,6 +41,9 @@ namespace zypp
         //@{
        virtual TranslatedText summary() const;
        virtual TranslatedText description() const;
+        virtual TranslatedText insnotify() const;
+        virtual TranslatedText delnotify() const;
+
         virtual CheckSum checksum() const;
         /** */
         virtual Date buildtime() const;
@@ -95,11 +98,13 @@ namespace zypp
         virtual bool installOnly() const;
 
         virtual License licenseToConfirm() const;
-       
+
        virtual unsigned mediaId() const;
 
        TranslatedText _summary;
        TranslatedText _description;
+       TranslatedText _insnotify;
+       TranslatedText _delnotify;
         PackageGroup _group;
         std::list<std::string> _authors;
         std::list<std::string> _keywords;
index 8fbee9c..37b3871 100644 (file)
@@ -43,7 +43,7 @@ namespace zypp
       virtual Label order() const;
       virtual Pathname icon() const;
       virtual Source_Ref source() const;
-      
+
       TranslatedText _summary;
       TranslatedText _description;
       Pathname _icon;
@@ -54,7 +54,7 @@ namespace zypp
       std::string _arch;
       std::string _order;
       TranslatedText _category;
-      
+
       bool _visible;
 
       std::list<std::string> _suggests;
@@ -68,9 +68,6 @@ namespace zypp
       std::list<std::string> _pkgsuggests;
       std::list<std::string> _pkgrecommends;
       std::list<std::string> _pkgrequires;
-      std::list<std::string> _supported_locales;
-      std::map< Locale, std::list<std::string> > _insnotify;
-      std::map< Locale, std::list<std::string> > _delnotify;
 
       Source_Ref _source;
     };
index 9ffc55e..38e0284 100644 (file)
@@ -46,7 +46,7 @@ namespace zypp
       virtual const std::set<std::string> recommends() const PURE_VIRTUAL;
       virtual const std::set<std::string> install_packages( const Locale & lang = Locale("") ) const;
       virtual Source_Ref source() const;
-      
+
       TranslatedText _summary;
       TranslatedText _description;
       std::string _parser_version;
@@ -64,9 +64,6 @@ namespace zypp
       std::set<std::string> _conflicts;
       std::set<std::string> _provides;
       std::set<std::string> _obsoletes;
-      std::set<std::string> _supported_locales;
-      std::map< Locale, std::set<std::string> > _insnotify;
-      std::map< Locale, std::set<std::string> > _delnotify;
       std::map< Locale, std::set<std::string> > _inspacks;
       std::map< Locale, std::set<std::string> > _delpacks;
 
index 5003933..2875e79 100644 (file)
@@ -46,7 +46,7 @@ namespace zypp
 // as _summary        std::list<multilang> name;
 // _description
       }
-      
+
       YUMGroupImpl::~YUMGroupImpl()
       {}
 
@@ -61,24 +61,6 @@ namespace zypp
       TranslatedText YUMGroupImpl::description() const
       { return _description; }
 
-      Text YUMGroupImpl::insnotify() const
-      { return ResObjectImplIf::insnotify(); }
-
-      Text YUMGroupImpl::delnotify() const
-      { return ResObjectImplIf::delnotify(); }
-
-      bool YUMGroupImpl::providesSources() const
-      { return ResObjectImplIf::providesSources(); }
-
-      Label YUMGroupImpl::instSrcLabel() const
-      { return ResObjectImplIf::instSrcLabel(); }
-
-      Vendor YUMGroupImpl::instSrcVendor() const
-      { return ResObjectImplIf::instSrcVendor(); }
-
-      ByteCount YUMGroupImpl::size() const
-      { return ResObjectImplIf::size(); }
-
       Label YUMGroupImpl::order() const {
 #warning Ordering support in YUM?
        return Label("0");
@@ -92,7 +74,7 @@ namespace zypp
       Source_Ref YUMGroupImpl::source() const
       { return _source; }
 
+
     } // namespace yum
     /////////////////////////////////////////////////////////////////
   } // namespace source
index dbffb3c..295fcaa 100644 (file)
@@ -40,25 +40,13 @@ namespace zypp
          Source_Ref source_r,
          const zypp::parser::yum::YUMGroupData & parsed
        );
-       
+
        virtual ~YUMGroupImpl();
 
        /** */
        virtual TranslatedText summary() const;
        /** */
        virtual TranslatedText description() const;
-       /** */
-       virtual Text insnotify() const;
-       /** */
-       virtual Text delnotify() const;
-       /** */
-       virtual bool providesSources() const;
-       /** */
-       virtual Label instSrcLabel() const;
-       /** */
-       virtual Vendor instSrcVendor() const;
-        /** */
-        virtual ByteCount size() const;        
         /** */
        virtual Label category() const;
         /** */
index 0467a30..df6cb57 100644 (file)
@@ -45,26 +45,6 @@ namespace zypp
       TranslatedText YUMMessageImpl::text() const {
        return _text;
       }
-      TranslatedText YUMMessageImpl::summary() const
-      { return ResObjectImplIf::summary(); }
-
-      TranslatedText YUMMessageImpl::description() const
-      { return ResObjectImplIf::description(); }
-
-      Text YUMMessageImpl::insnotify() const
-      { return ResObjectImplIf::insnotify(); }
-
-      Text YUMMessageImpl::delnotify() const
-      { return ResObjectImplIf::delnotify(); }
-
-      bool YUMMessageImpl::providesSources() const
-      { return ResObjectImplIf::providesSources(); }
-
-      Label YUMMessageImpl::instSrcLabel() const
-      { return ResObjectImplIf::instSrcLabel(); }
-
-      Vendor YUMMessageImpl::instSrcVendor() const
-      { return ResObjectImplIf::instSrcVendor(); }
 
       Source_Ref YUMMessageImpl::source() const
       { return _source; }
index 04e9f74..730ca89 100644 (file)
@@ -42,20 +42,6 @@ namespace zypp
        );
        /** Get the text of the message */
        virtual TranslatedText text() const;
-       /** */
-       virtual TranslatedText summary() const;
-       /** */
-       virtual TranslatedText description() const;
-       /** */
-       virtual Text insnotify() const;
-       /** */
-       virtual Text delnotify() const;
-       /** */
-       virtual bool providesSources() const;
-       /** */
-       virtual Label instSrcLabel() const;
-       /** */
-       virtual Vendor instSrcVendor() const;
         /** Patch the message belongs to - if any */
         Patch::constPtr patch() const;
 
index e6a0095..b2e222a 100644 (file)
@@ -160,7 +160,7 @@ namespace zypp
                         base_versions
          );
          _patch_rpms.push_back(patch);
-         
+
        }
        for (std::list<zypp::parser::yum::YUMDeltaRpm>::const_iterator it
                = parsed.deltaRpms.begin();
@@ -203,27 +203,10 @@ namespace zypp
       TranslatedText YUMPackageImpl::description() const
       { return _description; }
 
-      Text YUMPackageImpl::insnotify() const
-      // metadata doesn't priovide this attribute
-      { return ResObjectImplIf::insnotify(); }
-
-      Text YUMPackageImpl::delnotify() const
-      // metadata doesn't priovide this attribute
-      { return ResObjectImplIf::delnotify(); }
-
       ByteCount YUMPackageImpl::size() const
 #warning fixme
       { return 0; }
 
-      bool YUMPackageImpl::providesSources() const
-      { return ResObjectImplIf::providesSources(); }
-
-      Label YUMPackageImpl::instSrcLabel() const
-      { return ResObjectImplIf::instSrcLabel(); }
-      
-      Vendor YUMPackageImpl::instSrcVendor() const
-      { return ResObjectImplIf::instSrcVendor(); }
-      
       /** */
       Date YUMPackageImpl::buildtime() const
       { return _buildtime; }
@@ -344,12 +327,6 @@ namespace zypp
 
 #if 0
       /** */
-      std::list<std::string> YUMPackageImpl::insnotify() const
-      { return std::list<std::string>(); }
-      /** */
-      std::list<std::string> YUMPackageImpl::delnotify() const
-      { return std::list<std::string>(); }
-      /** */
       unsigned YUMPackageImpl::packageSize() const
       { return _size_package; }
       /** */
index 4a5a40b..18ac92b 100644 (file)
@@ -55,12 +55,7 @@ namespace zypp
        virtual TranslatedText summary() const;
        /** Package description */
        virtual TranslatedText description() const;
-       virtual Text insnotify() const;
-       virtual Text delnotify() const;
        virtual ByteCount size() const;
-       virtual bool providesSources() const;
-       virtual Label instSrcLabel() const;
-       virtual Vendor instSrcVendor() const;
        /** */
        virtual Date buildtime() const;
        /** */
@@ -121,10 +116,6 @@ namespace zypp
 
 #if 0
         /** */
-        virtual std::list<std::string> insnotify() const;
-        /** */
-        virtual std::list<std::string> delnotify() const;
-        /** */
         virtual unsigned packageSize() const;
         /** */
         virtual unsigned installedSize() const;
index aca9919..68ef976 100644 (file)
@@ -123,23 +123,6 @@ namespace zypp
       TranslatedText YUMPatchImpl::description() const
       { return _description; }
 
-      Text YUMPatchImpl::insnotify() const
-      { return ResObjectImplIf::insnotify(); }
-
-      Text YUMPatchImpl::delnotify() const
-      { return ResObjectImplIf::delnotify(); }
-
-      ByteCount YUMPatchImpl::size() const
-      { return ResObjectImplIf::size(); }
-
-      bool YUMPatchImpl::providesSources() const
-      { return ResObjectImplIf::providesSources(); }
-
-      Label YUMPatchImpl::instSrcLabel() const
-      { return ResObjectImplIf::instSrcLabel(); }
-
-      Vendor YUMPatchImpl::instSrcVendor() const
-      { return ResObjectImplIf::instSrcVendor(); }
 
       std::string YUMPatchImpl::category() const
       {
index c81d14f..3f532e8 100644 (file)
@@ -62,12 +62,6 @@ namespace zypp
        virtual TranslatedText summary() const;
        /** Patch description */
        virtual TranslatedText description() const;
-       virtual Text insnotify() const;
-       virtual Text delnotify() const;
-       virtual ByteCount size() const;
-       virtual bool providesSources() const;
-       virtual Label instSrcLabel() const;
-       virtual Vendor instSrcVendor() const;
 
 // TODO check necessarity of functions below
        bool any_atom_selected() const;
index ff9a1bb..d9132e7 100644 (file)
@@ -58,24 +58,6 @@ namespace zypp
       TranslatedText YUMPatternImpl::description() const
       { return _description; }
 
-      Text YUMPatternImpl::insnotify() const
-      { return ResObjectImplIf::insnotify(); }
-
-      Text YUMPatternImpl::delnotify() const
-      { return ResObjectImplIf::delnotify(); }
-
-      bool YUMPatternImpl::providesSources() const
-      { return ResObjectImplIf::providesSources(); }
-
-      Label YUMPatternImpl::instSrcLabel() const
-      { return ResObjectImplIf::instSrcLabel(); }
-
-      Vendor YUMPatternImpl::instSrcVendor() const
-      { return ResObjectImplIf::instSrcVendor(); }
-
-      ByteCount YUMPatternImpl::size() const
-      { return ResObjectImplIf::size(); }
-
       Source_Ref YUMPatternImpl::source() const
       { return _source; }
 
index bcf8bb6..c071f2b 100644 (file)
@@ -46,18 +46,6 @@ namespace zypp
        virtual TranslatedText summary() const;
        /** */
        virtual TranslatedText description() const;
-       /** */
-       virtual Text insnotify() const;
-       /** */
-       virtual Text delnotify() const;
-       /** */
-       virtual bool providesSources() const;
-       /** */
-       virtual Label instSrcLabel() const;
-       /** */
-       virtual Vendor instSrcVendor() const;
-        /** */
-        virtual ByteCount size() const;
         /** */
        virtual bool isDefault() const;
         /** */
@@ -69,8 +57,6 @@ namespace zypp
 
 
       protected:
-// _summary
-// _description;
         bool _user_visible;
        TranslatedText _summary;
        TranslatedText _description;
index b00b8f6..1a4382e 100644 (file)
@@ -48,8 +48,6 @@ namespace zypp
       )
       :        _category(parsed.type),
        _vendor(parsed.vendor),
-//     _displayname(parsed.displayname),
-//     _description(parsed.description)
        _source(source_r),
        _short_name(parsed.short_name)
       {}
@@ -66,24 +64,6 @@ namespace zypp
       TranslatedText YUMProductImpl::description() const
       { return _description; }
 
-      Text YUMProductImpl::insnotify() const
-      { return ResObjectImplIf::insnotify(); }
-
-      Text YUMProductImpl::delnotify() const
-      { return ResObjectImplIf::delnotify(); }
-
-      ByteCount YUMProductImpl::size() const
-      { return ResObjectImplIf::size(); }
-
-      bool YUMProductImpl::providesSources() const
-      { return ResObjectImplIf::providesSources(); }
-
-      Label YUMProductImpl::instSrcLabel() const
-      { return ResObjectImplIf::instSrcLabel(); }
-
-      Vendor YUMProductImpl::instSrcVendor() const
-      { return ResObjectImplIf::instSrcVendor(); }
-
       Source_Ref YUMProductImpl::source() const
       { return _source; }
 
@@ -93,7 +73,7 @@ namespace zypp
 
       TranslatedText YUMProductImpl::shortName() const
       { return _short_name; }
+
     } // namespace yum
     /////////////////////////////////////////////////////////////////
   } // namespace source
index cb7b171..2684223 100644 (file)
@@ -44,12 +44,6 @@ namespace zypp
        Label vendor() const;
        TranslatedText summary() const;
        TranslatedText description() const;
-       Text insnotify() const;
-       Text delnotify() const;
-       ByteCount size() const;
-       bool providesSources() const;
-       Label instSrcLabel() const;
-       Vendor instSrcVendor() const;
        std::list<std::string> flags() const;
        TranslatedText shortName() const;
       protected:
@@ -59,7 +53,6 @@ namespace zypp
        TranslatedText _description;
        TranslatedText _short_name;
 
-
       private:
        Source_Ref _source;
       public:
index 1689cf8..b7089e3 100644 (file)
@@ -110,26 +110,6 @@ namespace zypp
        return _undo_script != ""
          || (_undo_location != "" && _undo_location != "/");
       }
-      TranslatedText YUMScriptImpl::summary() const
-      { return ResObjectImplIf::summary(); }
-
-      TranslatedText YUMScriptImpl::description() const
-      { return ResObjectImplIf::description(); }
-
-      Text YUMScriptImpl::insnotify() const
-      { return ResObjectImplIf::insnotify(); }
-
-      Text YUMScriptImpl::delnotify() const
-      { return ResObjectImplIf::delnotify(); }
-
-      bool YUMScriptImpl::providesSources() const
-      { return ResObjectImplIf::providesSources(); }
-
-      Label YUMScriptImpl::instSrcLabel() const
-      { return ResObjectImplIf::instSrcLabel(); }
-
-      Vendor YUMScriptImpl::instSrcVendor() const
-      { return ResObjectImplIf::instSrcVendor(); }
 
       Source_Ref YUMScriptImpl::source() const
       { return _source; }
index 7a71110..ea6fd59 100644 (file)
@@ -47,15 +47,6 @@ namespace zypp
        /** Check whether script to undo the change is available */
        virtual bool undo_available() const;
 
-       virtual TranslatedText summary() const;
-       virtual TranslatedText description() const;
-       virtual Text insnotify() const;
-       virtual Text delnotify() const;
-       virtual bool providesSources() const;
-       virtual Label instSrcLabel() const;
-       virtual Vendor instSrcVendor() const;
-
-
       protected:
        /** The script to perform the change */
        std::string _do_script;
@@ -70,7 +61,7 @@ namespace zypp
        /** Media number of the undo script */
        unsigned _undo_media;
        mutable filesystem::TmpFile _tmp_file;
-       
+
        CheckSum _do_checksum;
        CheckSum _undo_checksum;
       private:
index e4509f4..cff6d93 100644 (file)
@@ -74,14 +74,6 @@ namespace zypp
       TranslatedText RPMPackageImpl::description() const
       { return _description; }
 
-      Text RPMPackageImpl::insnotify() const
-      // metadata doesn't priovide this attribute
-      { return ResObjectImplIf::insnotify(); }
-
-      Text RPMPackageImpl::delnotify() const
-      // metadata doesn't priovide this attribute
-      { return ResObjectImplIf::delnotify(); }
-
       ByteCount RPMPackageImpl::size() const
       { return _size; }
 
@@ -90,10 +82,10 @@ namespace zypp
 
       Label RPMPackageImpl::instSrcLabel() const
       { return ResObjectImplIf::instSrcLabel(); }
-      
+
       Vendor RPMPackageImpl::instSrcVendor() const
       { return ResObjectImplIf::instSrcVendor(); }
-      
+
       /** */
       Date RPMPackageImpl::buildtime() const
       { return _buildtime; }
@@ -202,12 +194,6 @@ namespace zypp
       { return _source; }
 #if 0
       /** */
-      std::list<std::string> RPMPackageImpl::insnotify() const
-      { return std::list<std::string>(); }
-      /** */
-      std::list<std::string> RPMPackageImpl::delnotify() const
-      { return std::list<std::string>(); }
-      /** */
       unsigned RPMPackageImpl::packageSize() const
       { return _size_package; }
       /** */
index 0d119e5..116d83c 100644 (file)
@@ -45,8 +45,6 @@ namespace zypp
        virtual TranslatedText summary() const;
        /** Package description */
        virtual TranslatedText description() const;
-       virtual Text insnotify() const;
-       virtual Text delnotify() const;
        virtual ByteCount size() const;
        virtual bool providesSources() const;
        virtual Label instSrcLabel() const;
index 1d649c7..09e4cf2 100644 (file)
@@ -46,24 +46,6 @@ namespace zypp
       TranslatedText XMLPatternImpl::description() const
       { return _description; }
 
-      Text XMLPatternImpl::insnotify() const
-      { return ResObjectImplIf::insnotify(); }
-
-      Text XMLPatternImpl::delnotify() const
-      { return ResObjectImplIf::delnotify(); }
-
-      bool XMLPatternImpl::providesSources() const
-      { return ResObjectImplIf::providesSources(); }
-
-      Label XMLPatternImpl::instSrcLabel() const
-      { return ResObjectImplIf::instSrcLabel(); }
-
-      Vendor XMLPatternImpl::instSrcVendor() const
-      { return ResObjectImplIf::instSrcVendor(); }
-
-      ByteCount XMLPatternImpl::size() const
-      { return ResObjectImplIf::size(); }
-
       /** */
       bool XMLPatternImpl::isDefault() const
       { return _default; }
index 01a4044..d535d71 100644 (file)
@@ -36,12 +36,6 @@ namespace zypp
       virtual bool userVisible() const;
       virtual TranslatedText summary() const;
       virtual TranslatedText description() const;
-      virtual Text insnotify() const;
-      virtual Text delnotify() const;
-      virtual bool providesSources() const;
-      virtual Label instSrcLabel() const;
-      virtual Vendor instSrcVendor() const;
-      virtual ByteCount size() const;
       virtual bool isDefault() const;
       virtual TranslatedText category() const;
       virtual Pathname icon() const;