import zypp
Z = zypp.ZYppFactory_instance().getZYpp()
-
Z.initializeTarget( zypp.Pathname("/") )
Z.target().load();
repoManager.buildCache( repo )
repoManager.loadFromCache( repo );
-
print "Items: %d" % ( Z.pool().size() )
for item in Z.pool():
t = "i"
else:
t = "*"
- print "%s %s" % ( t , item.resolvable())
- #print "%s %s:%s-%s.%s\t(%s)" % ( t,
- # item.resolvable().kind(),
- ## item.resolvable().edition(),
- # item.resolvable().arch(),
- # item.resolvable().repository().info().alias() )
+ print "%s %s:%s-%s.%s\t(%s)" % ( t,
+ item.kind(),
+ item.name(),
+ item.edition(),
+ item.arch(),
+ item.repoInfo().alias() )
Group: Development/Sources
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: cmake gcc-c++ python-devel ruby-devel swig
-BuildRequires: libzypp-devel >= 5.2.1
+BuildRequires: libzypp-devel >= 5.8.0
Source: %{name}-%{version}.tar.bz2
%description
-------------------------------------------------------------------
+Fri Sep 5 18:41:31 CEST 2008 - ma@suse.de
+
+- Fix basic resolvabe attributes as needed by list_resolvables.py
+ example.
+- revision 10952
+
+-------------------------------------------------------------------
Thu Sep 4 11:42:50 CEST 2008 - ma@suse.de
- Added lost RepoInfo and ServiceInfo.
// Ignore static versions shadowed by member functions
%ignore zypp::Arch::compare(const Arch &, const Arch &);
+%ignore zypp::Arch::asString( const CompatSet & cset );
template<class A, class B> class std::unary_function {};
%template(ArchCompatFun) std::unary_function<zypp::Arch, bool>;
{
int __cmp__(intrusive_ptr<const ResObject>& other)
{
- return compareByNVRA(*self, other);
+ return *self == other;
}
}
-
typedef KindOf<Resolvable> KindType;
};*/
-/** ResTraits. Defines common types and the Kind value. */
-template<typename _Res>
+namespace zypp
+{
+ /** ResTraits. Defines common types and the Kind value. */
+ template<typename _Res>
struct ResTraits
{
- typedef intrusive_ptr<_Res> PtrType;
- typedef intrusive_ptr<const _Res> constPtrType;
+ typedef zypp::intrusive_ptr<_Res> PtrType;
+ typedef zypp::intrusive_ptr<const _Res> constPtrType;
};
-%template(ResTraitsResolvable) ResTraits<Resolvable>;
+ typedef intrusive_ptr<const ResObject> ResObject_constPtr;
+ typedef intrusive_ptr<ResObject> ResObject_Ptr;
+ %template(ResObject_constPtr) intrusive_ptr<const zypp::ResObject>;
+ %template(ResObject_Ptr) intrusive_ptr<zypp::ResObject>;
+
+}
-%template(ResObject_constPtr) intrusive_ptr<const ResObject>;
-%template(ResObject_Ptr) intrusive_ptr<ResObject>;
+%template(ResTraitsResolvable) zypp::ResTraits<zypp::Resolvable>;
+%template(ResTraitsResObject) zypp::ResTraits<zypp::ResObject>;
// Common definitions for all Resolvable types
// - *_Ptr and *_constPtr
typedef intrusive_ptr<const X> X##_constPtr;
typedef intrusive_ptr<X> X##_Ptr;
-%template(X##_constPtr) intrusive_ptr<const X>;
-%template(X##_Ptr) intrusive_ptr<X>;
+%template(X##_constPtr) zypp::intrusive_ptr<const X>;
+%template(X##_Ptr) zypp::intrusive_ptr<X>;
bool isKind##X( const Resolvable::constPtr & p );
bool isKind##X( const PoolItem & p );
%}
%nodefault ByKind;
-%define DEFINE_PTR_TYPE(name)
-%enddef
%rename("+") "operator+";
%rename("<<") "operator<<";
%rename("!") "operator!";
%rename("==") "operator==";
-template < typename T >
-class intrusive_ptr {
- public:
- T *operator->();
-};
-
namespace zypp {
namespace base {
// silence 'Nothing known about class..' warning
%include "perl5/perl.i"
#endif
+%import <boost/scoped_ptr.hpp>
+%import <boost/shared_ptr.hpp>
+%import <boost/weak_ptr.hpp>
+%import <boost/intrusive_ptr.hpp>
+%import <zypp/base/PtrTypes.h>
+
%include "IdStringType.i"
%include "Pathname.i"
%include "ByteCount.i"
%include "Capability.i"
%include "Capabilities.i"
%include "CapMatch.i"
+%include "RepoType.i"
+%include "RepoInfo.i"
+%include "ServiceInfo.i"
%include "ResTraits.i"
%include "ResStatus.i"
%include "Resolvable.i"
%include "Pattern.i"
%include "Product.i"
%include "SrcPackage.i"
-%include "RepoType.i"
-%include "RepoInfo.i"
-%include "ServiceInfo.i"
%include "Repository.i"
%include "RepoStatus.i"
%include "RepoManager.i"