Author: mlandres
Date: Mon Jan 21 18:03:03 2008
New Revision: 8338
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8338&view=rev
Log:
Removed obsolete files and classes.
Added:
branches/tmp/ma/jump_sat/libzypp/zypp/Capabilities.h
branches/tmp/ma/jump_sat/libzypp/zypp/Capability.h
Removed:
branches/tmp/ma/jump_sat/libzypp/zypp/CapFactory.cc
branches/tmp/ma/jump_sat/libzypp/zypp/CapFactory.h
branches/tmp/ma/jump_sat/libzypp/zypp/CapSet.cc
branches/tmp/ma/jump_sat/libzypp/zypp/CapSet.h
branches/tmp/ma/jump_sat/libzypp/zypp/CapSetFwd.h
branches/tmp/ma/jump_sat/libzypp/zypp/Capability.cc
branches/tmp/ma/jump_sat/libzypp/zypp/SystemResObject.cc
branches/tmp/ma/jump_sat/libzypp/zypp/SystemResObject.h
branches/tmp/ma/jump_sat/libzypp/zypp/capability/
branches/tmp/ma/jump_sat/libzypp/zypp/detail/
branches/tmp/ma/jump_sat/libzypp/zypp/pool/Res2Sat.cc
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/AtomImpl.cc
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/AtomImpl.h
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/MessageImpl.cc
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/MessageImpl.h
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/PackageImpl.cc
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/PackageImpl.h
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/PatchImpl.cc
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/PatchImpl.h
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/PatternImpl.cc
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/PatternImpl.h
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/ProductImpl.cc
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/ProductImpl.h
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/ScriptImpl.cc
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/ScriptImpl.h
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/SrcPackageImpl.cc
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/SrcPackageImpl.h
branches/tmp/ma/jump_sat/libzypp/zypp/repo/memory/
branches/tmp/ma/jump_sat/libzypp/zypp/target/rpm/RpmPackageImpl.cc
branches/tmp/ma/jump_sat/libzypp/zypp/target/rpm/RpmPackageImpl.h
branches/tmp/ma/jump_sat/libzypp/zypp/target/store/xml/
Modified:
branches/tmp/ma/jump_sat/libzypp/zypp/Arch.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Arch.h
branches/tmp/ma/jump_sat/libzypp/zypp/Atom.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Atom.h
branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt
branches/tmp/ma/jump_sat/libzypp/zypp/CapFilters.h
branches/tmp/ma/jump_sat/libzypp/zypp/CapMatch.h
branches/tmp/ma/jump_sat/libzypp/zypp/CapMatchHelper.h
branches/tmp/ma/jump_sat/libzypp/zypp/Dependencies.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Dependencies.h
branches/tmp/ma/jump_sat/libzypp/zypp/Edition.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Edition.h
branches/tmp/ma/jump_sat/libzypp/zypp/Language.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Language.h
branches/tmp/ma/jump_sat/libzypp/zypp/Locks.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Message.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Message.h
branches/tmp/ma/jump_sat/libzypp/zypp/NVRAD.h
branches/tmp/ma/jump_sat/libzypp/zypp/NeedAType.h
branches/tmp/ma/jump_sat/libzypp/zypp/Package.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Package.h
branches/tmp/ma/jump_sat/libzypp/zypp/Patch.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Patch.h
branches/tmp/ma/jump_sat/libzypp/zypp/Pattern.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Pattern.h
branches/tmp/ma/jump_sat/libzypp/zypp/PoolItem.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Product.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Product.h
branches/tmp/ma/jump_sat/libzypp/zypp/Rel.h
branches/tmp/ma/jump_sat/libzypp/zypp/RepoManager.cc
branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.cc
branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.h
branches/tmp/ma/jump_sat/libzypp/zypp/ResObject.cc
branches/tmp/ma/jump_sat/libzypp/zypp/ResObject.h
branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.cc
branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.h
branches/tmp/ma/jump_sat/libzypp/zypp/ResTraits.h
branches/tmp/ma/jump_sat/libzypp/zypp/Resolvable.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Resolvable.h
branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.h
branches/tmp/ma/jump_sat/libzypp/zypp/Script.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Script.h
branches/tmp/ma/jump_sat/libzypp/zypp/Selection.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Selection.h
branches/tmp/ma/jump_sat/libzypp/zypp/SrcPackage.cc
branches/tmp/ma/jump_sat/libzypp/zypp/SrcPackage.h
branches/tmp/ma/jump_sat/libzypp/zypp/base/KindOf.h
branches/tmp/ma/jump_sat/libzypp/zypp/base/Regex.cc
branches/tmp/ma/jump_sat/libzypp/zypp/base/Regex.h
branches/tmp/ma/jump_sat/libzypp/zypp/base/String.h
branches/tmp/ma/jump_sat/libzypp/zypp/cache/ResolvableQuery.cc
branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.cc
branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.h
branches/tmp/ma/jump_sat/libzypp/zypp/data/ResolvableData.h
branches/tmp/ma/jump_sat/libzypp/zypp/parser/plaindir/RepoParser.cc
branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/ContentFileReader.cc
branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/FileReaderBaseImpl.h
branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PackagesDuFileReader.cc
branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PackagesFileReader.cc
branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PackagesLangFileReader.cc
branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PatternFileReader.cc
branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/FileReaderBaseImpl.cc
branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/FileReaderBaseImpl.h
branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/FilelistsFileReader.cc
branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/OtherFileReader.cc
branches/tmp/ma/jump_sat/libzypp/zypp/pool/GetResolvablesToInsDel.cc
branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolImpl.cc
branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolImpl.h
branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolTraits.h
branches/tmp/ma/jump_sat/libzypp/zypp/repo/PackageProvider.cc
branches/tmp/ma/jump_sat/libzypp/zypp/repo/PackageProvider.h
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/RepoImpl.cc
branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/RepoImpl.h
branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capabilities.cc
branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capabilities.h
branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capability.cc
branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capability.h
branches/tmp/ma/jump_sat/libzypp/zypp/sat/IdString.cc
branches/tmp/ma/jump_sat/libzypp/zypp/sat/IdString.h
branches/tmp/ma/jump_sat/libzypp/zypp/sat/IdStringType.h
branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.cc
branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.cc
branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.h
branches/tmp/ma/jump_sat/libzypp/zypp/sat/detail/PoolImpl.cc
branches/tmp/ma/jump_sat/libzypp/zypp/sat/detail/PoolMember.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemConflict.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemEstablish.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemEstablish.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemInstall.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemInstall.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemRequire.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemUninstall.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.h
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverContext.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverQueue.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverUpgrade.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/SolutionAction.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.cc
branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.h
branches/tmp/ma/jump_sat/libzypp/zypp/target/rpm/RpmDb.cc
branches/tmp/ma/jump_sat/libzypp/zypp/target/rpm/RpmHeader.cc
branches/tmp/ma/jump_sat/libzypp/zypp/target/rpm/RpmHeader.h
branches/tmp/ma/jump_sat/libzypp/zypp/target/store/PersistentStorage.cc
branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.cc
branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.h
branches/tmp/ma/jump_sat/libzypp/zypp/target/store/serialize.cc
branches/tmp/ma/jump_sat/libzypp/zypp/target/store/serialize.h
branches/tmp/ma/jump_sat/libzypp/zypp/ui/PatternExpander.cc
branches/tmp/ma/jump_sat/libzypp/zypp/ui/UserWantedPackages.cc
branches/tmp/ma/jump_sat/libzypp/zypp/zypp_detail/ZYppImpl.cc
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Arch.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Arch.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Arch.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Arch.cc Mon Jan 21 18:03:03 2008
@@ -17,7 +17,7 @@
#include "zypp/Arch.h"
#include "zypp/Bit.h"
-using namespace std;
+using std::endl;
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -374,7 +374,6 @@
return ret;
}
-
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Arch.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Arch.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Arch.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Arch.h Mon Jan 21 18:03:03 2008
@@ -43,6 +43,9 @@
public:
/** String representation of Arch. */
const std::string & asString() const;
+ /** \overload */
+ const std::string & string() const
+ { return asString(); }
/** Test for an empty Arch (this is "", not Arch_noarch). */
bool empty() const
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Atom.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Atom.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Atom.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Atom.cc Mon Jan 21 18:03:03 2008
@@ -11,8 +11,6 @@
*/
#include "zypp/Atom.h"
-using namespace std;
-
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
@@ -24,8 +22,8 @@
// METHOD NAME : Atom::Atom
// METHOD TYPE : Ctor
//
- Atom::Atom( const NVRAD & nvrad_r )
- : ResObject( TraitsType::kind, nvrad_r )
+ Atom::Atom( const sat::Solvable & solvable_r )
+ : ResObject( solvable_r )
{}
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Atom.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Atom.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Atom.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Atom.h Mon Jan 21 18:03:03 2008
@@ -13,7 +13,6 @@
#define ZYPP_ATOM_H
#include "zypp/ResObject.h"
-#include "zypp/detail/AtomImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -26,22 +25,15 @@
class Atom : public ResObject
{
public:
- typedef detail::AtomImplIf Impl;
typedef Atom Self;
typedef ResTraits<Self> TraitsType;
typedef TraitsType::PtrType Ptr;
typedef TraitsType::constPtrType constPtr;
protected:
- Atom( const NVRAD & nvrad_r );
+ Atom( const sat::Solvable & solvable_r );
/** Dtor */
virtual ~Atom();
-
- private:
- /** Access implementation */
- virtual Impl & pimpl() = 0;
- /** Access implementation */
- virtual const Impl & pimpl() const = 0;
};
/////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt Mon Jan 21 18:03:03 2008
@@ -13,10 +13,7 @@
SET( zypp_SRCS
Atom.cc
ByteCount.cc
- Capability.cc
- CapFactory.cc
CapMatch.cc
- CapSet.cc
CheckSum.cc
Date.cc
Dep.cc
@@ -29,7 +26,6 @@
Range.cc
Rel.cc
ResObject.cc
- SystemResObject.cc
Resolvable.cc
ResStatus.cc
ResStore.cc
@@ -99,13 +95,11 @@
ByteCount.h
Callback.h
CapAndItem.h
- CapFactory.h
CapFilters.h
CapMatch.h
CapMatchHelper.h
- CapSet.h
- CapSetFwd.h
Capability.h
+ Capabilities.h
Changelog.h
CheckSum.h
CountryCode.h
@@ -166,7 +160,6 @@
SilentCallbacks.h
SrcPackage.h
SysContent.h
- SystemResObject.h
Target.h
TmpPath.h
TranslatedText.h
@@ -261,40 +254,6 @@
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/base
)
-SET( zypp_capability_SRCS
- capability/CapTraits.cc
- capability/CapabilityImpl.cc
- capability/FileCap.cc
- capability/HalCap.cc
- capability/ModaliasCap.cc
- capability/FilesystemCap.cc
- capability/NamedCap.cc
- capability/NullCap.cc
- capability/SplitCap.cc
- capability/VersionedCap.cc
-)
-
-SET( zypp_capability_HEADERS
- capability/CapTraits.h
- capability/Capabilities.h
- capability/CapabilityImpl.h
- capability/ConditionalCap.h
- capability/FileCap.h
- capability/HalCap.h
- capability/ModaliasCap.h
- capability/FilesystemCap.h
- capability/NamedCap.h
- capability/NullCap.h
- capability/OrCap.h
- capability/SplitCap.h
- capability/VersionedCap.h
-)
-
-INSTALL( FILES
- ${zypp_capability_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/capability
-)
-
SET( zypp_data_SRCS
data/ResolvableData.cc
data/RecordId.cc
@@ -312,60 +271,6 @@
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/data
)
-SET( zypp_detail_SRCS
- detail/AtomImpl.cc
- detail/AtomImplIf.cc
- detail/MessageImpl.cc
- detail/MessageImplIf.cc
- detail/PackageImpl.cc
- detail/PackageImplIf.cc
- detail/PatchImpl.cc
- detail/PatchImplIf.cc
- detail/PatternImpl.cc
- detail/PatternImplIf.cc
- detail/ProductImpl.cc
- detail/ProductImplIf.cc
- detail/ResObjectImplIf.cc
- detail/ResolvableImpl.cc
- detail/ScriptImpl.cc
- detail/ScriptImplIf.cc
- detail/SelectionImpl.cc
- detail/SelectionImplIf.cc
- detail/SrcPackageImpl.cc
- detail/SrcPackageImplIf.cc
-)
-
-SET( zypp_detail_HEADERS
- detail/AtomImpl.h
- detail/AtomImplIf.h
- detail/ImplConnect.h
- detail/MessageImpl.h
- detail/MessageImplIf.h
- detail/PackageImpl.h
- detail/PackageImplIf.h
- detail/PatchImpl.h
- detail/PatchImplIf.h
- detail/PatternImpl.h
- detail/PatternImplIf.h
- detail/ProductImpl.h
- detail/ProductImplIf.h
- detail/ResImplTraits.h
- detail/ResObjectFactory.h
- detail/ResObjectImplIf.h
- detail/ResolvableImpl.h
- detail/ScriptImpl.h
- detail/ScriptImplIf.h
- detail/SelectionImpl.h
- detail/SelectionImplIf.h
- detail/SrcPackageImpl.h
- detail/SrcPackageImplIf.h
-)
-
-INSTALL( FILES
- ${zypp_detail_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/detail
-)
-
SET( zypp_media_SRCS
media/MediaException.cc
media/MediaAccess.cc
@@ -580,7 +485,6 @@
pool/GetResolvablesToInsDel.cc
pool/PoolImpl.cc
pool/PoolStats.cc
- pool/Res2Sat.cc
)
SET( zypp_pool_HEADERS
@@ -768,7 +672,6 @@
target/rpm/RpmDb.cc
target/rpm/RpmException.cc
target/rpm/RpmHeader.cc
- target/rpm/RpmPackageImpl.cc
target/rpm/librpmDb.cc
target/rpm/librpmDb.cv3.cc
)
@@ -779,7 +682,6 @@
target/rpm/RpmDb.h
target/rpm/RpmException.h
target/rpm/RpmHeader.h
- target/rpm/RpmPackageImpl.h
target/rpm/librpm.h
target/rpm/librpmDb.h
)
@@ -811,31 +713,6 @@
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/target/store
)
-SET( zypp_target_store_xml_SRCS
- target/store/xml/XMLAtomImpl.cc
- target/store/xml/XMLMessageImpl.cc
- target/store/xml/XMLPatchImpl.cc
- target/store/xml/XMLPatternImpl.cc
- target/store/xml/XMLProductImpl.cc
- target/store/xml/XMLScriptImpl.cc
- target/store/xml/XMLSelectionImpl.cc
-)
-
-SET( zypp_target_store_xml_HEADERS
- target/store/xml/XMLAtomImpl.h
- target/store/xml/XMLMessageImpl.h
- target/store/xml/XMLPatchImpl.h
- target/store/xml/XMLPatternImpl.h
- target/store/xml/XMLProductImpl.h
- target/store/xml/XMLScriptImpl.h
- target/store/xml/XMLSelectionImpl.h
-)
-
-INSTALL( FILES
- ${zypp_target_store_xml_HEADERS}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/target/store/xml
-)
-
SET( zypp_thread_SRCS
thread/Mutex.cc
)
@@ -1003,26 +880,10 @@
SET( zypp_repo_cached_SRCS
repo/cached/RepoImpl.cc
- repo/cached/PackageImpl.cc
- repo/cached/SrcPackageImpl.cc
- repo/cached/PatchImpl.cc
- repo/cached/PatternImpl.cc
- repo/cached/ProductImpl.cc
- repo/cached/MessageImpl.cc
- repo/cached/ScriptImpl.cc
- repo/cached/AtomImpl.cc
)
SET( zypp_repo_cached_HEADERS
repo/cached/RepoImpl.h
- repo/cached/PackageImpl.h
- repo/cached/SrcPackageImpl.h
- repo/cached/PatchImpl.h
- repo/cached/PatternImpl.h
- repo/cached/ProductImpl.h
- repo/cached/MessageImpl.h
- repo/cached/ScriptImpl.h
- repo/cached/AtomImpl.h
)
SET( zypp_repo_yum_SRCS
@@ -1043,32 +904,7 @@
repo/susetags/Downloader.h
)
-
-SET( zypp_repo_data_SRCS
- repo/memory/ScriptImpl.cc
- repo/memory/MessageImpl.cc
- repo/memory/PackageImpl.cc
- repo/memory/PatternImpl.cc
- repo/memory/ProductImpl.cc
- repo/memory/PatchImpl.cc
- repo/memory/RepoImpl.cc
- repo/memory/AtomImpl.cc
- repo/memory/SrcPackageImpl.cc
-)
-
-SET( zypp_repo_data_HEADERS
- repo/memory/PackageImpl.h
- repo/memory/PatternImpl.h
- repo/memory/ProductImpl.h
- repo/memory/PatchImpl.h
- repo/memory/RepoImpl.h
- repo/memory/AtomImpl.h
- repo/memory/SrcPackageImpl.h
-)
-
SET( zypp_lib_SRCS
-${zypp_detail_SRCS}
-${zypp_capability_SRCS}
${zypp_cache_SRCS}
${zypp_cache_sqlite3x_SRCS}
${zypp_pool_SRCS}
@@ -1078,7 +914,6 @@
${zypp_parser_yum_SRCS}
${zypp_parser_plaindir_SRCS}
${zypp_parser_SRCS}
-${zypp_data_SRCS}
${zypp_media_proxyinfo_SRCS}
${zypp_media_SRCS}
${zypp_url_SRCS}
@@ -1087,13 +922,12 @@
${zypp_repo_yum_SRCS}
${zypp_repo_susetags_SRCS}
${zypp_repo_data_SRCS}
-${zypp_target_store_xml_SRCS}
${zypp_target_store_SRCS}
${zypp_target_rpm_SRCS}
${zypp_target_hal_SRCS}
${zypp_target_modalias_SRCS}
${zypp_target_SRCS}
-${zypp_solver_detail_SRCS}
+#${zypp_solver_detail_SRCS}
${zypp_ui_SRCS}
${zypp_thread_SRCS}
${zypp_SRCS}
@@ -1103,7 +937,6 @@
)
SET( zypp_lib_HEADERS
-${zypp_target_store_xml_HEADERS}
${zypp_target_rpm_HEADERS}
${zypp_parser_tagfile_HEADERS}
${zypp_parser_susetags_HEADERS}
@@ -1111,12 +944,10 @@
${zypp_parser_plaindir_HEADERS}
${zypp_parser_xml_HEADERS}
${zypp_parser_HEADERS}
-${zypp_capability_HEADERS}
${zypp_cache_HEADERS}
${zypp_cache_sqlite3x_HEADERS}
${zypp_ui_HEADERS}
${zypp_parser_xmlstore_HEADERS}
-${zypp_data_HEADERS}
${zypp_media_HEADERS}
${zypp_target_hal_HEADERS}
${zypp_media_proxyinfo_HEADERS}
@@ -1132,7 +963,6 @@
${zypp_source_susetags_HEADERS}
${zypp_target_modalias_HEADERS}
${zypp_target_HEADERS}
-${zypp_detail_HEADERS}
${zypp_pool_HEADERS}
)
@@ -1151,7 +981,6 @@
SET_LOGGROUP( "zypp" ${zypp_lib_SRCS} )
# override some defaults
-SET_LOGGROUP( "xmlstore" ${zypp_target_store_xml_SRCS} )
SET_LOGGROUP( "satsolver" ${zypp_sat_SRCS} )
#SET_LOGGROUP( "group" ${zypp_target_rpm_SRCS} )
#SET_LOGGROUP( "group" ${zypp_parser_yum2_SRCS} )
@@ -1178,7 +1007,6 @@
#SET_LOGGROUP( "group" ${zypp_target_modalias_SRCS} )
#SET_LOGGROUP( "group" ${zypp_target_SRCS} )
#SET_LOGGROUP( "group" ${zypp_parser_yum_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_detail_SRCS} )
#SET_LOGGROUP( "group" ${zypp_pool_SRCS} )
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/CapFilters.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/CapFilters.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/CapFilters.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/CapFilters.h Mon Jan 21 18:03:03 2008
@@ -12,6 +12,7 @@
#ifndef ZYPP_CAPFILTERS_H
#define ZYPP_CAPFILTERS_H
+#include "zypp/base/Deprecated.h"
#include "zypp/base/Functional.h"
#include "zypp/Capability.h"
#include "zypp/ResObject.h"
@@ -32,38 +33,38 @@
typedef std::unary_function CapabilityFilterFunctor;
/** */
- struct ByRefers : public CapabilityFilterFunctor
+ struct ZYPP_DEPRECATED ByRefers : public CapabilityFilterFunctor
{
- bool operator()( const Capability & c ) const
+ ZYPP_DEPRECATED bool operator()( const Capability & c ) const
{
- return c.refers() == _refers;
+ return false; //c.refers() == _refers;
}
- ByRefers( Resolvable::Kind refers_r )
+ ZYPP_DEPRECATED ByRefers( Resolvable::Kind refers_r )
: _refers( refers_r )
{}
- ByRefers( ResObject::constPtr p )
+ ZYPP_DEPRECATED ByRefers( ResObject::constPtr p )
: _refers( p->kind() )
{}
- ByRefers( const Capability & cap_r )
- : _refers( cap_r.refers() )
+ ZYPP_DEPRECATED ByRefers( const Capability & cap_r )
+ //: _refers( cap_r.refers() )
{}
Resolvable::Kind _refers;
};
/** */
- struct ByIndex : public CapabilityFilterFunctor
+ struct ZYPP_DEPRECATED ByIndex : public CapabilityFilterFunctor
{
- bool operator()( const Capability & c ) const
+ ZYPP_DEPRECATED bool operator()( const Capability & c ) const
{
- return c.index() == _index;
+ return false; //c.index() == _index;
}
- ByIndex( const std::string & index_r )
+ ZYPP_DEPRECATED ByIndex( const std::string & index_r )
: _index( index_r )
{}
- ByIndex( const Capability & cap_r )
- : _index( cap_r.index() )
+ ZYPP_DEPRECATED ByIndex( const Capability & cap_r )
+ //: _index( cap_r.index() )
{}
std::string _index;
};
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/CapMatch.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/CapMatch.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/CapMatch.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/CapMatch.h Mon Jan 21 18:03:03 2008
@@ -13,7 +13,7 @@
#define ZYPP_CAPMATCH_H
#include <iosfwd>
-
+#include "zypp/base/Deprecated.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
@@ -32,9 +32,9 @@
* ( !CapMatch::irrelevant ) == CapMatch::irrelevant // true
* \endcode
*/
- class CapMatch
+ class ZYPP_DEPRECATED CapMatch
{
- enum Result { NOMATCH, MATCH, IRRELEVANT };
+ enum ZYPP_DEPRECATED Result { NOMATCH, MATCH, IRRELEVANT };
public:
@@ -42,9 +42,9 @@
: _result( val_r ? MATCH : NOMATCH )
{}
- static const CapMatch yes;
- static const CapMatch no;
- static const CapMatch irrelevant;
+ static ZYPP_DEPRECATED const CapMatch yes;
+ static ZYPP_DEPRECATED const CapMatch no;
+ static ZYPP_DEPRECATED const CapMatch irrelevant;
friend bool operator==( const CapMatch & lhs, const CapMatch & rhs )
{ return lhs._result == rhs._result; }
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/CapMatchHelper.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/CapMatchHelper.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/CapMatchHelper.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/CapMatchHelper.h Mon Jan 21 18:03:03 2008
@@ -46,24 +46,23 @@
*/
//@{
- /** Algorithm invoking \c action_r on each \ref CapSet entry
+ /** Algorithm invoking \c action_r on each \ref Capabilities entry
* that matches a given \ref Capability.
*/
- inline int forEachMatchIn( CapSet::const_iterator begin_r,
- CapSet::const_iterator end_r,
+ inline int forEachMatchIn( Capabilities::const_iterator begin_r,
+ Capabilities::const_iterator end_r,
const Capability & lhs_r,
function action_r )
{
- std::string index( lhs_r.index() );
return invokeOnEach( begin_r, end_r,
MatchesCapability( lhs_r ), // filter
action_r );
}
- /** Algorithm invoking \c action_r on each \ref CapSet entry
+ /** Algorithm invoking \c action_r on each \ref Capabilities entry
* that matches a given \ref Capability.
*/
- inline int forEachMatchIn( const CapSet & capset_r,
+ inline int forEachMatchIn( const Capabilities & capset_r,
const Capability & lhs_r,
function action_r )
{
@@ -92,29 +91,33 @@
const Capability & lhs_r,
function action_r )
{
+#warning FIX BROKEN BROKEN POOL byCapabilityIndex
+ return -1;
+#if 0
std::string index( lhs_r.index() );
return invokeOnEach( pool_r.byCapabilityIndexBegin( index, dep_r ),
pool_r.byCapabilityIndexEnd( index, dep_r ),
MatchesCapability( lhs_r ), // filter
action_r );
+#endif
}
///////////////////////////////////////////////////////////////////
/** Functor invoking \c action_r on each matching \ref Capability
- * in a \ref CapSet.
+ * in a \ref Capabilities.
*
* Functor is provided to ease using \ref forEachMatchIn as action
- * in other algorithms (nested loop over two CapSets).
+ * in other algorithms (nested loop over two Capabilitiess).
*/
- class ForEachMatchInCapSet
+ class ForEachMatchInCapabilities
{
public:
typedef function Action;
public:
- ForEachMatchInCapSet( const CapSet & set_r, const Action & action_r )
+ ForEachMatchInCapabilities( const Capabilities & set_r, const Action & action_r )
: _set( set_r )
, _action( action_r )
{}
@@ -126,18 +129,18 @@
}
private:
- const CapSet & _set;
+ const Capabilities & _set;
Action _action;
};
/** Invoke \c action_r on each matching pair of Capabilities within
- * two CapSets. */
- inline int forEachMatchIn( const CapSet & lhs_r,
- const CapSet & rhs_r,
+ * two Capabilitiess. */
+ inline int forEachMatchIn( const Capabilities & lhs_r,
+ const Capabilities & rhs_r,
function action_r )
{
return invokeOnEach( lhs_r.begin(), lhs_r.end(),
- ForEachMatchInCapSet( rhs_r, action_r ) );
+ ForEachMatchInCapabilities( rhs_r, action_r ) );
}
///////////////////////////////////////////////////////////////////
@@ -151,18 +154,18 @@
};
}
- /** Return \c true if the CapSet contains at least one Capabilitiy
+ /** Return \c true if the Capabilities contains at least one Capabilitiy
* that matches.
*/
- inline bool hasMatches( const CapSet & lhs_r, const Capability & rhs_r )
+ inline bool hasMatches( const Capabilities & lhs_r, const Capability & rhs_r )
{
return( forEachMatchIn( lhs_r, rhs_r, capmatch_detail::AlwaysFalse() ) < 0 );
}
- /** Return \c true if the CapSets contain at least one pair of
+ /** Return \c true if the Capabilitiess contain at least one pair of
* Capabilities that match.
*/
- inline bool hasMatches( const CapSet & lhs_r, const CapSet & rhs_r )
+ inline bool hasMatches( const Capabilities & lhs_r, const Capabilities & rhs_r )
{
return( forEachMatchIn( lhs_r, rhs_r, capmatch_detail::AlwaysFalse() ) < 0 );
}
Added: branches/tmp/ma/jump_sat/libzypp/zypp/Capabilities.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Capabilities.h?rev=8338&view=auto
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Capabilities.h (added)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Capabilities.h Mon Jan 21 18:03:03 2008
@@ -0,0 +1 @@
+#include "sat/Capabilities.h"
Added: branches/tmp/ma/jump_sat/libzypp/zypp/Capability.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Capability.h?rev=8338&view=auto
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Capability.h (added)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Capability.h Mon Jan 21 18:03:03 2008
@@ -0,0 +1 @@
+#include "sat/Capability.h"
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Dependencies.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Dependencies.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Dependencies.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Dependencies.cc Mon Jan 21 18:03:03 2008
@@ -11,8 +11,9 @@
*/
#include <iostream>
+#include "zypp/base/LogTools.h"
+
#include "zypp/Dependencies.h"
-#include "zypp/CapSet.h"
using std::endl;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Dependencies.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Dependencies.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Dependencies.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Dependencies.h Mon Jan 21 18:03:03 2008
@@ -16,7 +16,7 @@
#include <map>
#include "zypp/Dep.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capability.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -26,18 +26,18 @@
//
// CLASS NAME : Dependencies
//
- /** Helper keeping CapSet for all kinds of dependencies.
+ /** Helper keeping CapabilitySet for all kinds of dependencies.
*/
- struct Dependencies
+ struct ZYPP_DEPRECATED Dependencies
{
- CapSet & operator[]( Dep idx_r )
+ CapabilitySet & operator[]( Dep idx_r )
{ return _capsets[idx_r]; }
- const CapSet & operator[]( Dep idx_r ) const
- { return const_cast&>(_capsets)[idx_r]; }
+ const CapabilitySet & operator[]( Dep idx_r ) const
+ { return const_cast&>(_capsets)[idx_r]; }
private:
- std::map _capsets;
+ std::map _capsets;
};
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Edition.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Edition.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Edition.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Edition.cc Mon Jan 21 18:03:03 2008
@@ -18,8 +18,6 @@
#include "zypp/Edition.h"
#include "zypp/sat/Pool.h"
-using namespace std;
-
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
@@ -56,12 +54,24 @@
: _str( makeevrstr( version_r, release_r, epoch_r ) )
{}
+ Edition::Edition( const char * version_r,
+ const char * release_r,
+ epoch_t epoch_r )
+ : _str( makeevrstr( version_r, release_r, epoch_r ) )
+ {}
+
Edition::Edition( const std::string & version_r,
const std::string & release_r,
const std::string & epoch_r )
: _str( makeevrstr( version_r, release_r, str::strtonum( epoch_r ) ) )
{}
+ Edition::Edition( const char * version_r,
+ const char * release_r,
+ const char * epoch_r )
+ : _str( makeevrstr( version_r, release_r, str::strtonum( epoch_r ) ) )
+ {}
+
Edition::epoch_t Edition::epoch() const
{
const char * str( c_str() );
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Edition.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Edition.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Edition.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Edition.h Mon Jan 21 18:03:03 2008
@@ -86,11 +86,19 @@
Edition( const std::string & version_r,
const std::string & release_r,
epoch_t epoch_r = noepoch );
+ /** \overload */
+ Edition( const char * version_r,
+ const char * release_r,
+ epoch_t epoch_r = noepoch );
/** Ctor taking \a version_r, \a release_r and optional \a epoch_r as string. */
Edition( const std::string & version_r,
const std::string & release_r,
const std::string & epoch_r );
+ /** \overload */
+ Edition( const char * version_r,
+ const char * release_r,
+ const char * epoch_r );
public:
/** Epoch */
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Language.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Language.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Language.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Language.cc Mon Jan 21 18:03:03 2008
@@ -11,28 +11,13 @@
*/
#include "zypp/Language.h"
#include "zypp/TranslatedText.h"
-#include "zypp/CapFactory.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////
- namespace detail
- { /////////////////////////////////////////////////////////////////
-
- ///////////////////////////////////////////////////////////////////
- //
- // CLASS NAME : LanguageImpl
- //
- /** Exposition only. */
- class LanguageImpl : public LanguageImplIf
- {
- public:
- LanguageImpl( const Locale & locale_r )
- : _locale( locale_r )
- {}
-
+#warning Check overloaded attributes
+#if 0
public:
virtual TranslatedText summary() const
{ return TranslatedText( _locale.name() ); }
@@ -42,26 +27,17 @@
private:
Locale _locale;
- };
- ///////////////////////////////////////////////////////////////////
-
-
- /////////////////////////////////////////////////////////////////
- } // namespace detail
- ///////////////////////////////////////////////////////////////////
-
+#endif
IMPL_PTR_TYPE(Language);
-
-
- ///////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
//
// METHOD NAME : Language::Language
// METHOD TYPE : Ctor
//
- Language::Language( const NVRAD & nvrad_r )
- : ResObject( TraitsType::kind, nvrad_r )
+ Language::Language( const sat::Solvable & solvable_r )
+ : ResObject( solvable_r )
{}
///////////////////////////////////////////////////////////////////
@@ -74,6 +50,9 @@
Language::Ptr Language::installedInstance( const Locale & locale_r )
{
+#warning FIX CREATION OF LANGUAGE RESOLVABLES
+ return 0;
+#if 0
static std::map _ptrmap;
Ptr ret( _ptrmap[locale_r] );
if ( ! ret )
@@ -92,10 +71,14 @@
ret = _ptrmap[locale_r] = detail::makeResolvableFromImpl( dataCollect, langImpl );
}
return ret;
+#endif
}
Language::Ptr Language::availableInstance( const Locale & locale_r )
{
+#warning FIX CREATION OF LANGUAGE RESOLVABLES
+ return 0;
+#if 0
static std::map _ptrmap;
Ptr ret( _ptrmap[locale_r] );
if ( ! ret )
@@ -114,8 +97,9 @@
ret = _ptrmap[locale_r] = detail::makeResolvableFromImpl( dataCollect, langImpl );
}
return ret;
+#endif
}
/////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
+ // namespace zypp
+}///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Language.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Language.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Language.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Language.h Mon Jan 21 18:03:03 2008
@@ -22,26 +22,6 @@
DEFINE_PTR_TYPE(Language);
///////////////////////////////////////////////////////////////////
- namespace detail
- { /////////////////////////////////////////////////////////////////
-
- ///////////////////////////////////////////////////////////////////
- //
- // CLASS NAME : LanguageImplIf
- //
- /** Exposition only. */
- class LanguageImplIf : public ResObjectImplIf
- {
- public:
- typedef Language ResType;
- };
- ///////////////////////////////////////////////////////////////////
-
- /////////////////////////////////////////////////////////////////
- } // namespace detail
- ///////////////////////////////////////////////////////////////////
-
- ///////////////////////////////////////////////////////////////////
//
// CLASS NAME : Language
//
@@ -50,7 +30,6 @@
class Language : public ResObject
{
public:
- typedef detail::LanguageImplIf Impl;
typedef Language Self;
typedef ResTraits<Self> TraitsType;
typedef TraitsType::PtrType Ptr;
@@ -63,15 +42,9 @@
protected:
/** Ctor */
- Language( const NVRAD & nvrad_r );
+ Language( const sat::Solvable & solvable_r );
/** Dtor */
virtual ~Language();
-
- private:
- /** Access implementation */
- virtual Impl & pimpl() = 0;
- /** Access implementation */
- virtual const Impl & pimpl() const = 0;
};
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Locks.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Locks.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Locks.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Locks.cc Mon Jan 21 18:03:03 2008
@@ -16,9 +16,7 @@
#include "zypp/base/Logger.h"
#include "zypp/base/IOStream.h"
#include "zypp/PoolItem.h"
-#include "zypp/CapFactory.h"
#include "zypp/CapMatchHelper.h"
-#include "zypp/capability/Capabilities.h"
#undef ZYPP_BASE_LOGGER_LOGGROUP
#define ZYPP_BASE_LOGGER_LOGGROUP "locks"
@@ -120,20 +118,25 @@
: _pool(pool)
, _count(0)
{
-
+
}
-
+
bool operator()( const std::string & str_r )
{
+#warning MUST FIX LOCK IMPLEMENTATION
+ // - make Capability's parse 'Name [Op edition]' available so it can be used here
+ // - provide new, or extend Capability::Matches, functor to allow pattern (glob/rx) matching
+ return false;
+#if 0
CapFactory cap_factory;
-
+
std::string line( str::trim( str_r ) );
-
+
if ( line.empty() || line[0] == '#')
return true;
-
+
MIL << "Applying locks from pattern '" << str_r << "'" << endl;
-
+
// zypp does not provide wildcard or regex support in the Capability matching helpers
// but it still parses the index if it contains wildcards.
// so we decompose the capability, and keep the op and edition, while, the name
@@ -149,7 +152,7 @@
try
{
Capability capability = cap_factory.parse( ResTraitszypp::Package::kind, line );
-
+
capability::NamedCap::constPtr named = capability::asKindcapability::NamedCap(capability);
if ( named )
{
@@ -221,8 +224,9 @@
++_count;
}
return true;
+#endif
} // end operator()()
-
+
ResPool _pool;
int _count;
};
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Message.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Message.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Message.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Message.cc Mon Jan 21 18:03:03 2008
@@ -10,8 +10,7 @@
*
*/
#include "zypp/Message.h"
-
-using namespace std;
+#include "zypp/Message.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -24,8 +23,8 @@
// METHOD NAME : Message::Message
// METHOD TYPE : Ctor
//
- Message::Message( const NVRAD & nvrad_r )
- : ResObject( TraitsType::kind, nvrad_r )
+ Message::Message( const sat::Solvable & solvable_r )
+ : ResObject( solvable_r )
{}
///////////////////////////////////////////////////////////////////
@@ -43,11 +42,12 @@
///////////////////////////////////////////////////////////////////
TranslatedText Message::text() const
- { return pimpl().text(); }
+ { return TranslatedText(); }
/** Patch the message belongs to - if any */
- Patch::constPtr Message::patch() const
- { return pimpl().patch(); }
+ ResTraits<Patch>::constPtrType Message::patch() const
+ { return ResTraits<Patch>::constPtrType(); }
+
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Message.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Message.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Message.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Message.h Mon Jan 21 18:03:03 2008
@@ -13,7 +13,6 @@
#define ZYPP_MESSAGE_H
#include "zypp/ResObject.h"
-#include "zypp/detail/MessageImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -28,7 +27,6 @@
class Message : public ResObject
{
public:
- typedef detail::MessageImplIf Impl;
typedef Message Self;
typedef ResTraits<Self> TraitsType;
typedef TraitsType::PtrType Ptr;
@@ -38,18 +36,12 @@
/** Get the text of the message */
TranslatedText text() const;
/** Patch the message belongs to - if any */
- Patch::constPtr patch() const;
+ ResTraits<Patch>::constPtrType patch() const;
protected:
- Message( const NVRAD & nvrad_r );
+ Message( const sat::Solvable & solvable_r );
/** Dtor */
virtual ~Message();
-
- private:
- /** Access implementation */
- virtual Impl & pimpl() = 0;
- /** Access implementation */
- virtual const Impl & pimpl() const = 0;
};
/////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/NVRAD.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/NVRAD.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/NVRAD.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/NVRAD.h Mon Jan 21 18:03:03 2008
@@ -14,6 +14,7 @@
#include "zypp/NVRA.h"
#include "zypp/Dependencies.h"
+#include "zypp/Resolvable.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -69,7 +70,7 @@
/** \relates NVRAD Stream output */
std::ostream & operator<<( std::ostream & str, const NVRAD & obj );
-
+
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/NeedAType.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/NeedAType.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/NeedAType.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/NeedAType.h Mon Jan 21 18:03:03 2008
@@ -58,7 +58,7 @@
/** Offer a License text and methods to remember confirmation. */
typedef std::string License;
-
+
/** An rpm package group value. Also provide access to a
* (singleton) tree like group hierarchy which contains
* all existing groups. No more need to fiddle with YStringTreeItem
@@ -73,15 +73,6 @@
/** Vendor. Worth a typedef. Maybe a class unifying the strings. */
typedef std::string Vendor;
- /** Id used inside ZMD */
- typedef long ZmdId;
-
- /** Handle data depending on a locale. Translated strings, maybe
- other too. */
- template<class _Val>
- struct MultiLocale : public std::map
- {};
-
//@}
/////////////////////////////////////////////////////////////////
} // namespace zypp
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Package.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Package.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Package.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Package.cc Mon Jan 21 18:03:03 2008
@@ -10,9 +10,6 @@
*
*/
#include "zypp/Package.h"
-#include "zypp/base/Exception.h"
-
-using namespace std;
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -25,8 +22,8 @@
// METHOD NAME : Package::Package
// METHOD TYPE : Ctor
//
- Package::Package( const NVRAD & nvrad_r )
- : ResObject( TraitsType::kind, nvrad_r )
+ Package::Package( const sat::Solvable & solvable_r )
+ : ResObject( solvable_r )
{}
///////////////////////////////////////////////////////////////////
@@ -44,76 +41,76 @@
///////////////////////////////////////////////////////////////////
Changelog Package::changelog() const
- { return pimpl().changelog(); }
+ { return Changelog(); }
/** */
std::string Package::buildhost() const
- { return pimpl().buildhost(); }
+ { return std::string(); }
/** */
std::string Package::distribution() const
- { return pimpl().distribution(); }
+ { return std::string(); }
/** */
Label Package::license() const
- { return pimpl().license(); }
+ { return Label(); }
/** */
std::string Package::packager() const
- { return pimpl().packager(); }
+ { return std::string(); }
/** */
PackageGroup Package::group() const
- { return pimpl().group(); }
+ { return PackageGroup(); }
Package::Keywords Package::keywords() const
- { return pimpl().keywords(); }
+ { return Keywords(); }
/** Don't ship it as class Url, because it might be
* in fact anything but a legal Url. */
std::string Package::url() const
- { return pimpl().url(); }
+ { return std::string(); }
/** */
std::string Package::os() const
- { return pimpl().os(); }
+ { return std::string(); }
/** */
Text Package::prein() const
- { return pimpl().prein(); }
+ { return Text(); }
/** */
Text Package::postin() const
- { return pimpl().postin(); }
+ { return Text(); }
/** */
Text Package::preun() const
- { return pimpl().preun(); }
+ { return Text(); }
/** */
Text Package::postun() const
- { return pimpl().postun(); }
+ { return Text(); }
/** */
ByteCount Package::sourcesize() const
- { return pimpl().sourcesize(); }
+ { return ByteCount(); }
/** */
std::liststd::string Package::authors() const
- { return pimpl().authors(); }
+ { return std::liststd::string(); }
/** */
std::liststd::string Package::filenames() const
- { return pimpl().filenames(); }
+ { return std::liststd::string(); }
OnMediaLocation Package::location() const
- { return pimpl().location(); }
+ { return OnMediaLocation(); }
std::string Package::sourcePkgName() const
- { return pimpl().sourcePkgName(); }
+ { return std::string(); }
Edition Package::sourcePkgEdition() const
- { return pimpl().sourcePkgEdition(); }
+ { return Edition(); }
/////////////////////////////////////////////////////////////////
} // namespace zypp
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Package.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Package.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Package.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Package.h Mon Jan 21 18:03:03 2008
@@ -13,7 +13,8 @@
#define ZYPP_PACKAGE_H
#include "zypp/ResObject.h"
-#include "zypp/detail/PackageImplIf.h"
+#include "zypp/PackageKeyword.h"
+#include "zypp/Changelog.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -30,7 +31,6 @@
class Package : public ResObject
{
public:
- typedef detail::PackageImplIf Impl;
typedef Package Self;
typedef ResTraits<Self> TraitsType;
typedef TraitsType::PtrType Ptr;
@@ -98,15 +98,9 @@
OnMediaLocation location() const;
protected:
- Package( const NVRAD & nvrad_r );
+ Package( const sat::Solvable & solvable_r );
/** Dtor */
virtual ~Package();
-
- private:
- /** Access implementation */
- virtual Impl & pimpl() = 0;
- /** Access implementation */
- virtual const Impl & pimpl() const = 0;
};
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Patch.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Patch.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Patch.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Patch.cc Mon Jan 21 18:03:03 2008
@@ -11,8 +11,6 @@
*/
#include "zypp/Patch.h"
-using namespace std;
-
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
@@ -24,8 +22,8 @@
// METHOD NAME : Patch::Patch
// METHOD TYPE : Ctor
//
- Patch::Patch( const NVRAD & nvrad_r )
- : ResObject( TraitsType::kind, nvrad_r )
+ Patch::Patch( const sat::Solvable & solvable_r )
+ : ResObject( solvable_r )
{}
///////////////////////////////////////////////////////////////////
@@ -43,34 +41,89 @@
///////////////////////////////////////////////////////////////////
std::string Patch::id() const
- { return pimpl().id(); }
+ { return std::string(); }
Date Patch::timestamp() const
- { return pimpl().timestamp(); }
+ { return Date(); }
std::string Patch::category() const
- { return pimpl().category(); }
+ { return std::string(); }
bool Patch::reboot_needed() const
- { return pimpl().reboot_needed(); }
+ { return false; }
bool Patch::affects_pkg_manager() const
- { return pimpl().affects_pkg_manager(); }
+ { return false; }
Patch::AtomList Patch::atoms() const
- { return pimpl().all_atoms(); }
+ {
+#warning Implement PATCH::ATOMS
+#if 0
+ if ( ! _atomlist )
+ {
+ if ( ! hasBackRef() )
+ {
+ // We are not jet connected to the Resolvable that
+ // contains our dependencies.
+ return AtomList();
+ }
+
+ // lazy init
+ _atomlist.reset( new AtomList );
+
+ // Build the list using the repositories resolvables.
+ // Installed Patches (no repository) have this method overloaded.
+ if ( repository() )
+ {
+ const CapSet & requires( self()->dep( Dep::REQUIRES ) );
+ const ResStore & store( repository().resolvables() );
+
+ for_( req, requires.begin(), requires.end() )
+ {
+ // lookup Patch requirements that refer to an Atom, Script or Message.
+ if ( refersTo<Atom>( *req ) || refersTo<Script>( *req ) || refersTo<Message>( *req ) )
+ {
+ for_( res, store.begin(), store.end() )
+ {
+ // Collect ALL matches in the store.
+ if ( hasMatches( (*res)->dep( Dep::PROVIDES ), (*req) ) )
+ {
+ _atomlist->push_back( *res );
+ }
+ }
+ }
+ }
+ }
+ }
+ return *_atomlist;
+#endif
+ return AtomList();
+ }
bool Patch::interactive() const
- { return pimpl().interactive(); }
-
-
- // DEPRECATED:
- void Patch::mark_atoms_to_freshen(bool freshen)
- { ; }
- bool Patch::any_atom_selected()
- { return false; }
- void Patch::select()
- { ; }
+ {
+#warning Implement PATCH::INTERACTIVE
+#if 0
+ if ( reboot_needed()
+ || ! licenseToConfirm().empty() )
+ {
+ return true;
+ }
+
+ AtomList atoms = all_atoms();
+ for ( AtomList::const_iterator it = atoms.begin(); it != atoms.end(); it++)
+ {
+ if ( isKind<Message>( *it )
+ || ! licenseToConfirm().empty() )
+ {
+ return true;
+ }
+ }
+
+ return false;
+#endif
+ return false;
+ }
/////////////////////////////////////////////////////////////////
} // namespace zypp
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Patch.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Patch.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Patch.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Patch.h Mon Jan 21 18:03:03 2008
@@ -13,7 +13,6 @@
#define ZYPP_PATCH_H
#include "zypp/ResObject.h"
-#include "zypp/detail/PatchImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -32,14 +31,13 @@
class Patch : public ResObject
{
public:
- typedef detail::PatchImplIf Impl;
typedef Patch Self;
typedef ResTraits<Self> TraitsType;
typedef TraitsType::PtrType Ptr;
typedef TraitsType::constPtrType constPtr;
public:
- typedef Impl::AtomList AtomList;
+ typedef std::listResObject::Ptr AtomList;
public:
/** Patch ID */
@@ -57,22 +55,11 @@
/** Is the patch installation interactive? (does it need user input?) */
bool interactive() const;
-
- void mark_atoms_to_freshen(bool freshen) ZYPP_DEPRECATED;
- bool any_atom_selected() ZYPP_DEPRECATED;
- void select() ZYPP_DEPRECATED;
-
protected:
/** Ctor */
- Patch( const NVRAD & nvrad_r );
+ Patch( const sat::Solvable & solvable_r );
/** Dtor */
virtual ~Patch();
-
- private:
- /** Access implementation */
- virtual Impl & pimpl() = 0;
- /** Access implementation */
- virtual const Impl & pimpl() const = 0;
};
/////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Pattern.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Pattern.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Pattern.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Pattern.cc Mon Jan 21 18:03:03 2008
@@ -13,8 +13,6 @@
#include "zypp/Pattern.h"
-using namespace std;
-
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
@@ -26,8 +24,8 @@
// METHOD NAME : Pattern::Pattern
// METHOD TYPE : Ctor
//
- Pattern::Pattern( const NVRAD & nvrad_r )
- : ResObject( TraitsType::kind, nvrad_r )
+ Pattern::Pattern( const sat::Solvable & solvable_r )
+ : ResObject( solvable_r )
{}
///////////////////////////////////////////////////////////////////
@@ -45,31 +43,59 @@
///////////////////////////////////////////////////////////////////
/** */
bool Pattern::isDefault() const
- { return pimpl().isDefault(); }
+ { return false; }
/** */
bool Pattern::userVisible() const
- { return pimpl().userVisible(); }
+ { return true; }
/** */
std::string Pattern::category() const
- { return pimpl().category().text(); }
+ { return std::string(); }
/** */
Pathname Pattern::icon() const
- { return pimpl().icon(); }
+ { return Pathname(); }
/** */
Pathname Pattern::script() const
- { return pimpl().script(); }
+ { return Pathname(); }
Label Pattern::order() const
- { return pimpl().order(); }
+ { return Label(); }
std::setstd::string Pattern::install_packages( const Locale & lang ) const
- { return pimpl().install_packages(); }
+ {
+#warning implement PATTERN::INSTALL_PACKAGES
+#if 0
+- static void copycaps( std::setstd::string & out, const CapSet & in)
+- {
+- for (CapSet::const_iterator it = in.begin(); it != in.end(); ++it) {
+- if (isKindcapability::NamedCap( *it )
+- && it->refers() == ResTraitszypp::Package::kind )
+- {
+- out.insert( it->index() );
+- }
+- }
+- }
+-
+- std::setstd::string PatternImplIf::install_packages( const Locale & lang) const
+- {
+- std::setstd::string result;
+-
+- copycaps( result, self()->dep( Dep::REQUIRES ) );
+- copycaps( result, self()->dep( Dep::RECOMMENDS) );
+- copycaps( result, self()->dep( Dep::SUGGESTS) );
+-
+- return result;
+- }
+-
+-
+#endif
+ return std::setstd::string();
+ }
- const CapSet & Pattern::includes() const
- { return pimpl().includes(); }
+ const Capabilities & Pattern::includes() const
+ { return Capabilities(); }
- const CapSet & Pattern::extends() const
- { return pimpl().extends(); }
+ const Capabilities & Pattern::extends() const
+ { return Capabilities(); }
/////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Pattern.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Pattern.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Pattern.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Pattern.h Mon Jan 21 18:03:03 2008
@@ -13,7 +13,6 @@
#define ZYPP_PATTERN_H
#include "zypp/ResObject.h"
-#include "zypp/detail/PatternImplIf.h"
#include "zypp/Pathname.h"
///////////////////////////////////////////////////////////////////
@@ -31,8 +30,7 @@
class Pattern : public ResObject
{
public:
- typedef detail::PatternImplIf Impl;
- typedef Pattern Self;
+ typedef Pattern Self;
typedef ResTraits<Self> TraitsType;
typedef TraitsType::PtrType Ptr;
typedef TraitsType::constPtrType constPtr;
@@ -55,21 +53,15 @@
std::setstd::string install_packages( const Locale & lang = Locale("") ) const ZYPP_DEPRECATED;
/** Ui hint. */
- const CapSet & includes() const;
+ const Capabilities & includes() const;
/** Ui hint. */
- const CapSet & extends() const;
+ const Capabilities & extends() const;
protected:
/** Ctor */
- Pattern( const NVRAD & nvrad_r );
+ Pattern( const sat::Solvable & solvable_r );
/** Dtor */
virtual ~Pattern();
-
- private:
- /** Access implementation */
- virtual Impl & pimpl() = 0;
- /** Access implementation */
- virtual const Impl & pimpl() const = 0;
};
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/PoolItem.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/PoolItem.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/PoolItem.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/PoolItem.cc Mon Jan 21 18:03:03 2008
@@ -14,7 +14,6 @@
#include "zypp/PoolItem.h"
#include "zypp/Package.h"
-#include "zypp/SystemResObject.h"
#include "zypp/VendorAttr.h"
#include "zypp/sat/Solvable.h"
@@ -117,13 +116,6 @@
inline bool PoolItem_Ref::Impl::autoprotect() const
{
- // always lock System resolvable
- if ( isKind<SystemResObject>( _resolvable ) )
- {
- _status.setLock( true, zypp::ResStatus::USER );
- return true;
- }
-
if ( _status.isInstalled()
&& isKind<Package>( _resolvable )
&& VendorAttr::instance().autoProtect( _resolvable->vendor() ) )
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Product.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Product.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Product.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Product.cc Mon Jan 21 18:03:03 2008
@@ -9,12 +9,8 @@
/** \file zypp/Product.cc
*
*/
-#include <iostream>
-
#include "zypp/Product.h"
-using namespace std;
-
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
@@ -26,8 +22,8 @@
// METHOD NAME : Product::Product
// METHOD TYPE : Ctor
//
- Product::Product( const NVRAD & nvrad_r )
- : ResObject( TraitsType::kind, nvrad_r )
+ Product::Product( const sat::Solvable & solvable_r )
+ : ResObject( solvable_r )
{}
///////////////////////////////////////////////////////////////////
@@ -45,39 +41,39 @@
///////////////////////////////////////////////////////////////////
std::string Product::type() const
- { return pimpl().type(); }
+ { return std::string(); }
Label Product::vendor() const
- { return pimpl().vendor(); }
+ { return Label(); }
Url Product::releaseNotesUrl() const
- { return pimpl().releaseNotesUrl(); }
+ { return Url(); }
std::list<Url> Product::updateUrls() const
- { return pimpl().updateUrls(); }
+ { return std::list<Url>(); }
std::list<Url> Product::extraUrls() const
- { return pimpl().extraUrls(); }
+ { return std::list<Url>(); }
std::list<Url> Product::optionalUrls() const
- { return pimpl().optionalUrls(); }
+ { return std::list<Url>(); }
std::liststd::string Product::flags() const
- { return pimpl().flags(); }
+ { return std::liststd::string(); }
/** */
Label Product::shortName() const
- { return pimpl().shortName().text(); }
+ { return Label(); }
/** */
Label Product::longName() const
{ return summary(); }
std::string Product::distributionName() const
- { return pimpl().distributionName(); }
+ { return std::string(); }
Edition Product::distributionEdition() const
- { return pimpl().distributionEdition(); }
+ { return Edition(); }
/////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Product.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Product.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Product.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Product.h Mon Jan 21 18:03:03 2008
@@ -16,7 +16,6 @@
#include <string>
#include "zypp/ResObject.h"
-#include "zypp/detail/ProductImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -33,7 +32,6 @@
class Product : public ResObject
{
public:
- typedef detail::ProductImplIf Impl;
typedef Product Self;
typedef ResTraits<Self> TraitsType;
typedef TraitsType::PtrType Ptr;
@@ -42,9 +40,6 @@
public:
/** Get the product type (base, add-on) */
std::string type() const;
- /** \deprecated Use \ref type. */
- std::string category() const ZYPP_DEPRECATED
- { return type(); }
/** Get the vendor of the product */
Label vendor() const;
@@ -88,15 +83,9 @@
protected:
/** Ctor */
- Product( const NVRAD & nvrad_r );
+ Product( const sat::Solvable & solvable_r );
/** Dtor */
virtual ~Product();
-
- private:
- /** Access implementation */
- virtual Impl & pimpl() = 0;
- /** Access implementation */
- virtual const Impl & pimpl() const = 0;
};
/////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Rel.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Rel.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Rel.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Rel.h Mon Jan 21 18:03:03 2008
@@ -102,10 +102,17 @@
: _op( for_use_in_switch(bits_r & ANY_e) )
{}
+ /** Test whether \a bits_r is a valid \ref Rel (no extra bits set). */
+ static bool isRel( unsigned bits_r )
+ { return (bits_r & ANY_e) == bits_r; }
+
/** String representation of relational operator.
* \return "==", "!=", "<", "<=", ">", ">=", "ANY" or "NONE"
*/
const std::string & asString() const;
+ /** \overload */
+ const char * c_str() const
+ { return asString().c_str(); }
/** Enumarator provided for use in \c switch statement.
* The sole reason for providing enum \ref for_use_in_switch is,
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/RepoManager.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/RepoManager.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/RepoManager.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/RepoManager.cc Mon Jan 21 18:03:03 2008
@@ -28,7 +28,7 @@
#include "zypp/RepoManager.h"
#include "zypp/cache/SolvStore.h"
-#include "zypp/repo/cached/RepoImpl.h"
+//#include "zypp/repo/cached/RepoImpl.h"
#include "zypp/media/MediaManager.h"
#include "zypp/MediaSetAccess.h"
@@ -123,17 +123,17 @@
if ( !store.isCached(info.alias()) )
return;
-
+
MIL << info.alias() << " cleaning cache..." << endl;
data::RecordId id = store.lookupRepository(info.alias());
-
+
CombinedProgressData subprogrcv(progress);
-
+
store.cleanRepository(id, subprogrcv);
}
-
+
////////////////////////////////////////////////////////////////////////////
-
+
/**
* Reads RepoInfo's from a repo file.
*
@@ -319,7 +319,7 @@
}
////////////////////////////////////////////////////////////////////////////
-
+
RepoStatus RepoManager::metadataStatus( const RepoInfo &info ) const
{
Pathname rawpath = rawcache_path_for_repoinfo( _pimpl->options, info );
@@ -528,7 +528,7 @@
ERR << "refresh check failed for " << url << endl;
ZYPP_RETHROW(e);
}
-
+
return true; // default
}
@@ -635,7 +635,7 @@
{
ZYPP_CAUGHT(e);
ERR << "Trying another url..." << endl;
-
+
// remember the exception caught for the *first URL*
// if all other URLs fail, the rexception will be thrown with the
// cause of the problem of the first URL remembered
@@ -694,7 +694,7 @@
MIL << info.alias() << " cache rebuild is forced" << endl;
}
}
-
+
needs_cleaning = true;
}
@@ -732,7 +732,7 @@
break;
}
-
+
switch ( repokind.toEnum() )
{
case RepoType::RPMMD_e :
@@ -813,7 +813,7 @@
return repo::RepoType::RPMMD;
if ( access.doesFileExist("/content") )
return repo::RepoType::YAST2;
-
+
// if it is a local url of type dir
if ( (! media::MediaManager::downloads(url)) && ( url.getScheme() == "dir" ) )
{
@@ -842,9 +842,9 @@
return repo::RepoType::NONE;
}
-
+
////////////////////////////////////////////////////////////////////////////
-
+
void RepoManager::cleanCache( const RepoInfo &info,
const ProgressData::ReceiverFnc & progressrcv )
{
@@ -911,7 +911,7 @@
progress.sendTo(ProgressReportAdaptor( progressrcv, report ));
//progress.sendTo( progressrcv );
progress.name(str::form(_("Reading repository '%s' cache"), info.name().c_str()));
-
+
//_pimpl->options.repoCachePath
if ( ! isCached( info ) )
ZYPP_THROW(RepoNotCachedException());
@@ -921,24 +921,24 @@
//sat::Pool satpool( sat::Pool::instance() );
//Pathname name = _pimpl->options.repoCachePath + Pathname(info.alias()).extend(".solv");
-
+
try
{
//satpool.addRepoSolv(name);
}
catch ( const Exception &e )
{
-
+
}
-
+
CombinedProgressData subprogrcv(progress);
-
+
// repo::cached::RepoOptions opts( info, _pimpl->options.repoCachePath, id );
// opts.readingResolvablesProgress = subprogrcv;
// //opts.repo = repo;
// repo::cached::RepoImpl::Ptr repoimpl =
// new repo::cached::RepoImpl( opts );
-//
+//
// repoimpl->resolvables();
// read the resolvables from cache
return Repository::noRepository;
@@ -1120,7 +1120,7 @@
callback::SendReport<ProgressReport> report;
progress.sendTo( ProgressReportAdaptor( progressrcv, report ) );
progress.name(str::form(_("Removing repository '%s'"), info.name().c_str()));
-
+
MIL << "Going to delete repo " << info.alias() << endl;
std::list<RepoInfo> repos = knownRepositories();
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.cc Mon Jan 21 18:03:03 2008
@@ -11,6 +11,8 @@
*/
#include <iostream>
+#include "zypp/base/String.h"
+
#include "zypp/ResKind.h"
#include "zypp/ResTraits.h"
@@ -30,7 +32,6 @@
const ResKind ResKind::script ( "script" );
const ResKind ResKind::selection ( "selection" );
const ResKind ResKind::srcpackage( "srcpackage" );
- const ResKind ResKind::system ( "system" );
template<>
const ResKind ResTraits<Atom> ::kind( ResKind::atom );
@@ -52,8 +53,13 @@
const ResKind ResTraits<Selection> ::kind( ResKind::selection );
template<>
const ResKind ResTraits<SrcPackage>::kind( ResKind::srcpackage );
- template<>
- const ResKind ResTraits<SystemResObject>::kind( ResKind::system );
+
+ std::string ResKind::satIdent( const ResKind & refers_r, const std::string & name_r )
+ {
+ if ( ! refers_r || refers_r == package || refers_r == srcpackage )
+ return name_r;
+ return str::form( "%s:%s", refers_r.c_str(), name_r.c_str() );
+ }
/////////////////////////////////////////////////////////////////
} // namespace zypp
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ResKind.h Mon Jan 21 18:03:03 2008
@@ -49,7 +49,6 @@
static const ResKind script;
static const ResKind selection;
static const ResKind srcpackage;
- static const ResKind system;
//@}
public:
@@ -62,6 +61,17 @@
explicit ResKind( const std::string & str_r ) : _str( str::toLower(str_r) ) {}
explicit ResKind( const char * cstr_r ) : _str( str::toLower(cstr_r) ) {}
+ public:
+ /** Return the satsolver identifier for name.
+ * Libsatsolver combines the objects kind and name in a single
+ * identifier \c "pattern:kde_multimedia", \b except for packages
+ * and source packes. They are not prefixed by any kind string.
+ */
+ static std::string satIdent( const ResKind & refers_r, const std::string & name_r );
+ /** \overload */
+ std::string satIdent( const std::string & name_r ) const
+ { return satIdent( *this, name_r ); }
+
private:
static int _doCompare( const char * lhs, const char * rhs )
{
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ResObject.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ResObject.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ResObject.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ResObject.cc Mon Jan 21 18:03:03 2008
@@ -11,9 +11,6 @@
*/
#include "zypp/ResObject.h"
#include "zypp/Repository.h"
-#include "zypp/detail/ResObjectImplIf.h"
-
-using namespace std;
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -26,9 +23,8 @@
// METHOD NAME : ResObject::ResObject
// METHOD TYPE : Ctor
//
- ResObject::ResObject( const Kind & kind_r,
- const NVRAD & nvrad_r )
- : Resolvable( kind_r, nvrad_r )
+ ResObject::ResObject( const sat::Solvable & solvable_r )
+ : Resolvable( solvable_r )
{}
///////////////////////////////////////////////////////////////////
@@ -57,46 +53,49 @@
///////////////////////////////////////////////////////////////////
Text ResObject::summary() const
- { return pimpl().summary().text(); }
+ { return Text(); }
Text ResObject::description() const
- { return pimpl().description().text(); }
+ { return Text(); }
Text ResObject::insnotify() const
- { return pimpl().insnotify().text(); }
+ { return Text(); }
Text ResObject::delnotify() const
- { return pimpl().delnotify().text(); }
+ { return Text(); }
License ResObject::licenseToConfirm() const
- { return pimpl().licenseToConfirm().text(); }
+ { return License(); }
Vendor ResObject::vendor() const
- { return pimpl().vendor(); }
+ { return Vendor(); }
ByteCount ResObject::size() const
- { return pimpl().size(); }
+ { return ByteCount(); }
Repository ResObject::repository() const
- { return pimpl().repository(); }
+ { return Repository(); }
ByteCount ResObject::downloadSize() const
- { return pimpl().downloadSize(); }
+ { return ByteCount(); }
unsigned ResObject::mediaNr() const
- { return pimpl().mediaNr(); }
+ { return 0; }
bool ResObject::installOnly() const
- { return pimpl().installOnly(); }
+ { return false; }
Date ResObject::buildtime() const
- { return pimpl().buildtime(); }
+ { return Date(); }
Date ResObject::installtime() const
- { return pimpl().installtime(); }
+ { return Date(); }
const DiskUsage & ResObject::diskusage() const
- { return pimpl().diskusage(); }
+ {
+ static DiskUsage _du;
+ return _du;
+ }
/////////////////////////////////////////////////////////////////
} // namespace zypp
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ResObject.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ResObject.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ResObject.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ResObject.h Mon Jan 21 18:03:03 2008
@@ -14,23 +14,18 @@
#include "zypp/base/Deprecated.h"
-#include "zypp/detail/ResObjectImplIf.h"
#include "zypp/Resolvable.h"
-#include "zypp/TranslatedText.h"
#include "zypp/NeedAType.h"
#include "zypp/Date.h"
+#include "zypp/ByteCount.h"
+#include "zypp/DiskUsage.h"
+#include "zypp/Repository.h"
+#include "zypp/TranslatedText.h"
#include "zypp/OnMediaLocation.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- namespace detail {
- class ImplConnect;
- class ResObjectImplIf;
- }
-
- class Repository;
- class ByteCount;
///////////////////////////////////////////////////////////////////
//
@@ -40,11 +35,12 @@
* Interface base for resolvable objects (common data).
* That is, all data not needed for solving, but common
* across all Resolvable kinds.
+ *
+ * \see \ref makeResObject for how to construct ResObjects.
*/
class ResObject : public Resolvable
{
public:
- typedef detail::ResObjectImplIf Impl;
typedef ResObject Self;
typedef ResTraits<Self> TraitsType;
typedef TraitsType::PtrType Ptr;
@@ -143,23 +139,34 @@
protected:
/** Ctor */
- ResObject( const Kind & kind_r,
- const NVRAD & nvrad_r );
+ ResObject( const sat::Solvable & solvable_r );
/** Dtor */
virtual ~ResObject();
-
/** Helper for stream output */
virtual std::ostream & dumpOn( std::ostream & str ) const;
-
- private:
- friend class detail::ImplConnect;
- /** Access implementation */
- virtual Impl & pimpl() = 0;
- /** Access implementation */
- virtual const Impl & pimpl() const = 0;
};
///////////////////////////////////////////////////////////////////
+ /** Create \ref ResObject from \ref sat::Solvable.
+ *
+ * This function creates the apropriate kind of ResObject
+ * depending on the sat::Solvables kind, and returns a smart
+ * pointer to it.
+ *
+ * If the sat::Solvables kind is not convertible, a NULL
+ * pointer is returned.
+ *
+ * \code
+ * sat::Solvable s;
+ * ResObject::Ptr p( makeResObject( s ) );
+ * if ( p )
+ * {
+ *
+ * }
+ * \endcode
+ */
+ inline ResObject::Ptr makeResObject( const sat::Solvable & solvable_r ) { return 0; }
+
/** Convert ResObject::Ptr into Ptr of a certain Kind.
* \return \c NULL iff \a p is \c NULL or points to a Resolvable
* not of the specified Kind.
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.cc Mon Jan 21 18:03:03 2008
@@ -64,12 +64,6 @@
//
///////////////////////////////////////////////////////////////////
- bool ResPool::satSynced() const
- { return _pimpl->satSynced(); }
-
- void ResPool::satSync() const
- { return _pimpl->satSync(); }
-
bool ResPool::empty() const
{ return _pimpl->empty(); }
@@ -106,19 +100,19 @@
ResPool::repository_iterator ResPool::knownRepositoriesEnd() const
{ return _pimpl->knownRepositories().end(); }
- void ResPool::setAdditionalRequire( const AdditionalCapSet & capset ) const
+ void ResPool::setAdditionalRequire( const AdditionalCapabilities & capset ) const
{ _pimpl->setAdditionalRequire( capset ); }
- ResPool::AdditionalCapSet & ResPool::additionalRequire() const
+ ResPool::AdditionalCapabilities & ResPool::additionalRequire() const
{ return _pimpl->additionalRequire(); }
- void ResPool::setAdditionalConflict( const AdditionalCapSet & capset ) const
+ void ResPool::setAdditionalConflict( const AdditionalCapabilities & capset ) const
{ _pimpl->setAdditionalConflict( capset ); }
- ResPool::AdditionalCapSet & ResPool::additionaConflict() const
+ ResPool::AdditionalCapabilities & ResPool::additionaConflict() const
{ return _pimpl->additionaConflict(); }
- void ResPool::setAdditionalProvide( const AdditionalCapSet & capset ) const
+ void ResPool::setAdditionalProvide( const AdditionalCapabilities & capset ) const
{ _pimpl->setAdditionalProvide( capset ); }
- ResPool::AdditionalCapSet & ResPool::additionaProvide() const
+ ResPool::AdditionalCapabilities & ResPool::additionaProvide() const
{ return _pimpl->additionaProvide(); }
const SerialNumber & ResPool::serial() const
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ResPool.h Mon Jan 21 18:03:03 2008
@@ -54,7 +54,7 @@
typedef pool::PoolTraits::const_iterator const_iterator;
typedef pool::PoolTraits::byName_iterator byName_iterator;
typedef pool::PoolTraits::byCapabilityIndex_iterator byCapabilityIndex_iterator;
- typedef pool::PoolTraits::AdditionalCapSet AdditionalCapSet;
+ typedef pool::PoolTraits::AdditionalCapabilities AdditionalCapabilities;
typedef pool::PoolTraits::repository_iterator repository_iterator;
public:
@@ -70,12 +70,6 @@
*/
const SerialNumber & serial() const;
- /** Wheter in sync with sat-pool. */
- bool satSynced() const;
-
- /** Sync with sat-pool. */
- void satSync() const;
-
/** Return the corresponding \ref PoolItem.
* Pool and sat pool should be in sync. Returns an empty
* \ref PoolItem if there is no corresponding \ref PoolItem.
@@ -162,54 +156,54 @@
* "foo1" which has a greater version than 1.0:
*
* \code
- * CapSet capset;
+ * Capabilities capset;
* capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo"));
* capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo1 > 1.0"));
*
* // The user is setting this capablility
- * ResPool::AdditionalCapSet aCapSet;
- * aCapSet[ResStatus::USER] = capset;
+ * ResPool::AdditionalCapabilities aCapabilities;
+ * aCapabilities[ResStatus::USER] = capset;
*
- * setAdditionalRequire( aCapSet );
+ * setAdditionalRequire( aCapabilities );
* \endcode
*/
- void setAdditionalRequire( const AdditionalCapSet & capset ) const;
- AdditionalCapSet & additionalRequire() const;
+ void setAdditionalRequire( const AdditionalCapabilities & capset ) const;
+ AdditionalCapabilities & additionalRequire() const;
/**
* Handling additional conflicts. E.G. do not install anything which provides "foo":
*
* \code75
- * CapSet capset;
+ * Capabilities capset;
* capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo"));
*
* // The user is setting this capablility
- * ResPool::AdditionalCapSet aCapSet;
- * aCapSet[ResStatus::USER] = capset;
+ * ResPool::AdditionalCapabilities aCapabilities;
+ * aCapabilities[ResStatus::USER] = capset;
*
- * setAdditionalConflict( aCapSet );
+ * setAdditionalConflict( aCapabilities );
* \endcode
*/
- void setAdditionalConflict( const AdditionalCapSet & capset ) const;
- AdditionalCapSet & additionaConflict() const;
+ void setAdditionalConflict( const AdditionalCapabilities & capset ) const;
+ AdditionalCapabilities & additionaConflict() const;
/**
* Handling additional provides. This is used for ignoring a requirement.
* e.G. Do ignore the requirement "foo":
*
* \code
- * CapSet capset;
+ * Capabilities capset;
* capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo"));
*
* // The user is setting this capablility
- * ResPool::AdditionalCapSet aCapSet;
- * aCapSet[ResStatus::USER] = capset;
+ * ResPool::AdditionalCapabilities aCapabilities;
+ * aCapabilities[ResStatus::USER] = capset;
*
- * setAdditionalProvide( aCapSet );
+ * setAdditionalProvide( aCapabilities );
* \endcode
*/
- void setAdditionalProvide( const AdditionalCapSet & capset ) const;
- AdditionalCapSet & additionaProvide() const;
+ void setAdditionalProvide( const AdditionalCapabilities & capset ) const;
+ AdditionalCapabilities & additionaProvide() const;
private:
/** */
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ResTraits.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ResTraits.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ResTraits.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ResTraits.h Mon Jan 21 18:03:03 2008
@@ -60,8 +60,6 @@
DEFINE_PTR_TYPE( Script );
DEFINE_PTR_TYPE( Message );
DEFINE_PTR_TYPE( Language );
-
- DEFINE_PTR_TYPE( SystemResObject );
//@}
/** ResTraits. Defines common types and the ResKind value. */
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Resolvable.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Resolvable.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Resolvable.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Resolvable.cc Mon Jan 21 18:03:03 2008
@@ -9,15 +9,9 @@
/** \file zypp/Resolvable.cc
*
*/
-#include <iostream>
-
#include "zypp/Resolvable.h"
-#include "zypp/detail/ResolvableImpl.h"
-
#include "zypp/ResObject.h"
-using namespace std;
-
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
@@ -29,9 +23,8 @@
// METHOD NAME : Resolvable::Resolvable
// METHOD TYPE : Ctor
//
- Resolvable::Resolvable( const Kind & kind_r,
- const NVRAD & nvrad_r )
- : _pimpl( new Impl( kind_r, nvrad_r ) )
+ Resolvable::Resolvable( const sat::Solvable & solvable_r )
+ : sat::Solvable( solvable_r )
{}
///////////////////////////////////////////////////////////////////
@@ -42,40 +35,6 @@
Resolvable::~Resolvable()
{}
- ///////////////////////////////////////////////////////////////////
- //
- // Resolvable interface forwarded to implementation
- //
- ///////////////////////////////////////////////////////////////////
-
- std::ostream & Resolvable::dumpOn( std::ostream & str ) const
- { return _pimpl->dumpOn( str ); }
-
- const Resolvable::Kind & Resolvable::kind() const
- { return _pimpl->kind(); }
-
- const std::string & Resolvable::name() const
- { return _pimpl->name(); }
-
- const Edition & Resolvable::edition() const
- { return _pimpl->edition(); }
-
- const Arch & Resolvable::arch() const
- { return _pimpl->arch(); }
-
- const CapSet & Resolvable::dep( Dep which_r ) const
- { return _pimpl->deps()[which_r]; }
-
- const Dependencies & Resolvable::deps() const
- { return _pimpl->deps(); }
-
-
- void Resolvable::injectProvides( const Capability & cap_r )
- { return _pimpl->injectProvides( cap_r ); }
-
- void Resolvable::injectRequires( const Capability & cap_r )
- { return _pimpl->injectRequires( cap_r ); }
-
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Resolvable.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Resolvable.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Resolvable.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Resolvable.h Mon Jan 21 18:03:03 2008
@@ -15,33 +15,34 @@
#include <iosfwd>
#include <string>
+#include "zypp/base/Deprecated.h"
+
#include "zypp/base/ReferenceCounted.h"
#include "zypp/base/NonCopyable.h"
#include "zypp/base/PtrTypes.h"
-#include "zypp/ResTraits.h"
-#include "zypp/Edition.h"
-#include "zypp/Arch.h"
-#include "zypp/CapSetFwd.h"
-#include "zypp/Dep.h"
+#include "zypp/sat/Solvable.h"
+
+#include "zypp/Dependencies.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
struct NVRAD;
- class Dependencies;
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : Resolvable
//
/** Interface base for resolvable objects (identification and dependencies).
- * \invariant \c provides <tt>name = edition</tt>
- * \invariant \c prerequires is a subset of \c requires
+ * \todo Merge with ResObject
*/
- class Resolvable : public base::ReferenceCounted, private base::NonCopyable
+ class Resolvable : protected sat::Solvable,
+ public base::ReferenceCounted, private base::NonCopyable
{
+ friend std::ostream & operator<<( std::ostream & str, const Resolvable & obj );
+
public:
typedef Resolvable Self;
typedef ResTraits<Self> TraitsType;
@@ -50,45 +51,59 @@
typedef TraitsType::constPtrType constPtr;
public:
- /** */
- const Kind & kind() const;
- /** */
- const std::string & name() const;
- /** */
- const Edition & edition() const;
- /** */
- const Arch & arch() const;
+ /** Whether this represents a valid- or no-solvable. */
+ using sat::Solvable::operator bool_type;
+
+ using sat::Solvable::ident;
+
+ using sat::Solvable::kind;
+ using sat::Solvable::name;
+ using sat::Solvable::edition;
+ using sat::Solvable::arch;
/** \name Dependencies. */
//@{
/** Select by Dep. */
- const CapSet & dep( Dep which_r ) const;
- /** All dependencies. */
- const Dependencies & deps() const;
+ Capabilities dep( Dep which_r ) const
+ { return operator[]( which_r ); }
+ using sat::Solvable::operator[];
+ using sat::Solvable::provides;
+ using sat::Solvable::requires;
+ using sat::Solvable::conflicts;
+ using sat::Solvable::obsoletes;
+ using sat::Solvable::recommends;
+ using sat::Solvable::suggests;
+ using sat::Solvable::freshens;
+ using sat::Solvable::enhances;
+ using sat::Solvable::supplements;
+ using sat::Solvable::prerequires;
//@}
- /** \name Deprecated. */
- //@{
- void injectProvides( const Capability & cap_r );
- void injectRequires( const Capability & cap_r );
- //@}
+ ZYPP_DEPRECATED const Dependencies & deps() const
+ { static Dependencies _x; return _x; }
+ ZYPP_DEPRECATED void injectProvides( const Capability & cap_r ) {}
+ ZYPP_DEPRECATED void injectRequires( const Capability & cap_r ) {}
+
+ public:
+ const sat::Solvable & satSolvable() const { return *this; }
protected:
/** Ctor */
- Resolvable( const Kind & kind_r,
- const NVRAD & nvrad_r );
+ Resolvable( const sat::Solvable & solvable_r );
/** Dtor */
virtual ~Resolvable();
/** Helper for stream output */
virtual std::ostream & dumpOn( std::ostream & str ) const;
+ };
+ ///////////////////////////////////////////////////////////////////
- private:
- /** Implementation */
- struct Impl;
- /** Pointer to implementation */
- RW_pointer<Impl> _pimpl;
- };
- ///////////////////////////////////////////////////////////////////
+ /** \relates Resolvable Stream output */
+ inline std::ostream & operator<<( std::ostream & str, const Resolvable & obj )
+ { return obj.dumpOn( str ); }
+
+ /** \relates Resolvable More verbose stream output including dependencies */
+ inline std::ostream & dumpOn( std::ostream & str, const Resolvable & obj )
+ { return dumpOn( str, obj.satSolvable() ); }
/** Test whether a Resolvable::Ptr is of a certain Kind.
* \return \c Ture iff \a p is not \c NULL and points to a Resolvable
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.cc Mon Jan 21 18:03:03 2008
@@ -108,9 +108,9 @@
{ _pimpl->removeExtraCapability( capability ); }
void Resolver::removeConflict (const Capability & capability)
{ _pimpl->removeExtraConflict( capability ); }
- const CapSet Resolver::getRequire ()
+ const Capabilities Resolver::getRequire ()
{ return _pimpl->extraCapability();}
- const CapSet Resolver::getConflict ()
+ const Capabilities Resolver::getConflict ()
{ return _pimpl->extraConflicts();}
std::list Resolver::problematicUpdateItems( void ) const
{ return _pimpl->problematicUpdateItems(); }
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Resolver.h Mon Jan 21 18:03:03 2008
@@ -269,13 +269,13 @@
* Get all the additional requirements set by \ref addRequire(Capability).
*
*/
- const CapSet getRequire ();
+ const Capabilities getRequire ();
/**
* Get all the additional conflicts set by \ref addConflict(Capability).
*
*/
- const CapSet getConflict();
+ const Capabilities getConflict();
/**
* Setting solver timeout
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Script.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Script.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Script.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Script.cc Mon Jan 21 18:03:03 2008
@@ -11,8 +11,6 @@
*/
#include "zypp/Script.h"
-using namespace std;
-
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
@@ -24,8 +22,8 @@
// METHOD NAME : Script::Script
// METHOD TYPE : Ctor
//
- Script::Script( const NVRAD & nvrad_r )
- : ResObject( TraitsType::kind, nvrad_r )
+ Script::Script( const sat::Solvable & solvable_r )
+ : ResObject( solvable_r )
{}
///////////////////////////////////////////////////////////////////
@@ -43,22 +41,22 @@
///////////////////////////////////////////////////////////////////
bool Script::doAvailable() const
- { return pimpl().doAvailable(); }
+ { return false; }
std::string Script::doScriptInlined() const
- { return pimpl().doScriptInlined(); }
+ { return std::string(); }
OnMediaLocation Script::doScriptLocation() const
- { return pimpl().doScriptLocation(); }
+ { return OnMediaLocation(); }
bool Script::undoAvailable() const
- { return pimpl().undoAvailable(); }
+ { return false; }
std::string Script::undoScriptInlined() const
- { return pimpl().undoScriptInlined(); }
+ { return std::string(); }
OnMediaLocation Script::undoScriptLocation() const
- { return pimpl().undoScriptLocation(); }
+ { return OnMediaLocation(); }
/////////////////////////////////////////////////////////////////
} // namespace zypp
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Script.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Script.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Script.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Script.h Mon Jan 21 18:03:03 2008
@@ -13,7 +13,6 @@
#define ZYPP_SCRIPT_H
#include "zypp/ResObject.h"
-#include "zypp/detail/ScriptImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -28,7 +27,6 @@
class Script : public ResObject
{
public:
- typedef detail::ScriptImplIf Impl;
typedef Script Self;
typedef ResTraits<Self> TraitsType;
typedef TraitsType::PtrType Ptr;
@@ -63,15 +61,9 @@
protected:
/** Ctor */
- Script( const NVRAD & nvrad_r );
+ Script( const sat::Solvable & solvable_r );
/** Dtor */
virtual ~Script();
-
- private:
- /** Access implementation */
- virtual Impl & pimpl() = 0;
- /** Access implementation */
- virtual const Impl & pimpl() const = 0;
};
/////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Selection.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Selection.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Selection.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Selection.cc Mon Jan 21 18:03:03 2008
@@ -9,13 +9,9 @@
/** \file zypp/Selection.cc
*
*/
-#include <iostream>
-
#include "zypp/Selection.h"
#include "zypp/TranslatedText.h"
-using namespace std;
-
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
@@ -27,8 +23,8 @@
// METHOD NAME : Selection::Selection
// METHOD TYPE : Ctor
//
- Selection::Selection( const NVRAD & nvrad_r )
- : ResObject( TraitsType::kind, nvrad_r )
+ Selection::Selection( const sat::Solvable & solvable_r )
+ : ResObject( solvable_r )
{}
///////////////////////////////////////////////////////////////////
@@ -47,26 +43,18 @@
/** selection category */
Label Selection::category() const
- {
- return pimpl().category();
- }
+ { return Label(); }
/** selection visibility (for hidden selections) */
bool Selection::visible() const
- {
- return pimpl().visible();
- }
+ { return true; }
/** selection presentation order */
Label Selection::order() const
- {
- return pimpl().order();
- }
+ { return Label(); }
const std::setstd::string Selection::install_packages( const Locale & lang) const
- {
- return pimpl().install_packages();
- }
+ { return std::setstd::string(); }
/////////////////////////////////////////////////////////////////
} // namespace zypp
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Selection.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Selection.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Selection.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Selection.h Mon Jan 21 18:03:03 2008
@@ -13,7 +13,6 @@
#define ZYPP_SELECTION_H
#include "zypp/ResObject.h"
-#include "zypp/detail/SelectionImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -30,7 +29,6 @@
class Selection : public ResObject
{
public:
- typedef detail::SelectionImplIf Impl;
typedef Selection Self;
typedef ResTraits<Self> TraitsType;
typedef TraitsType::PtrType Ptr;
@@ -52,15 +50,9 @@
protected:
/** Ctor */
- Selection( const NVRAD & nvrad_r );
+ Selection( const sat::Solvable & solvable_r );
/** Dtor */
virtual ~Selection();
-
- private:
- /** Access implementation */
- virtual Impl & pimpl() = 0;
- /** Access implementation */
- virtual const Impl & pimpl() const = 0;
};
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/SrcPackage.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/SrcPackage.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/SrcPackage.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/SrcPackage.cc Mon Jan 21 18:03:03 2008
@@ -10,9 +10,6 @@
*
*/
#include "zypp/SrcPackage.h"
-#include "zypp/base/Exception.h"
-
-using namespace std;
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -25,8 +22,8 @@
// METHOD NAME : SrcPackage::SrcPackage
// METHOD TYPE : Ctor
//
- SrcPackage::SrcPackage( const NVRAD & nvrad_r )
- : ResObject( TraitsType::kind, nvrad_r )
+ SrcPackage::SrcPackage( const sat::Solvable & solvable_r )
+ : ResObject( solvable_r )
{}
///////////////////////////////////////////////////////////////////
@@ -44,7 +41,7 @@
///////////////////////////////////////////////////////////////////
OnMediaLocation SrcPackage::location() const
- { return pimpl().location(); }
+ { return OnMediaLocation(); }
/////////////////////////////////////////////////////////////////
} // namespace zypp
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/SrcPackage.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/SrcPackage.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/SrcPackage.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/SrcPackage.h Mon Jan 21 18:03:03 2008
@@ -13,7 +13,6 @@
#define ZYPP_SRCPACKAGE_H
#include "zypp/ResObject.h"
-#include "zypp/detail/SrcPackageImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -31,8 +30,7 @@
{
public:
- typedef detail::SrcPackageImplIf Impl;
- typedef SrcPackage Self;
+ typedef SrcPackage Self;
typedef ResTraits<Self> TraitsType;
typedef TraitsType::PtrType Ptr;
typedef TraitsType::constPtrType constPtr;
@@ -42,15 +40,9 @@
OnMediaLocation location() const;
protected:
- SrcPackage( const NVRAD & nvrad_r );
+ SrcPackage( const sat::Solvable & solvable_r );
/** Dtor */
virtual ~SrcPackage();
-
- private:
- /** Access implementation */
- virtual Impl & pimpl() = 0;
- /** Access implementation */
- virtual const Impl & pimpl() const = 0;
};
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/base/KindOf.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/base/KindOf.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/base/KindOf.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/base/KindOf.h Mon Jan 21 18:03:03 2008
@@ -57,7 +57,6 @@
IdString::empty;
IdString::size;
IdString::c_str;
- IdString::string;
IdString::asString;
public:
/** Fast compare equal. */
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/base/Regex.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/base/Regex.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/base/Regex.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/base/Regex.cc Mon Jan 21 18:03:03 2008
@@ -34,7 +34,7 @@
flags |= match_extended;
flags &= ~(normal);
}
-
+
if ((err = regcomp(&m_preg, str.c_str(), flags))) {
m_valid = false;
regerror(err, &m_preg, errbuff, sizeof(errbuff));
@@ -53,17 +53,17 @@
regfree(&m_preg);
}
-bool zypp::str::regex_match(const std::string& s, smatch& matches, const regex& regex)
+bool zypp::str::regex_match(const char * s, smatch& matches, const regex& regex)
{
- bool r = regex.m_valid && !regexec(®ex.m_preg, s.c_str(), 12, &matches.pmatch[0], 0);
+ bool r = s && regex.m_valid && !regexec(®ex.m_preg, s, 12, &matches.pmatch[0], 0);
if (r)
matches.match_str = s;
return r;
}
-bool zypp::str::regex_match(const std::string& s, const regex& regex)
+bool zypp::str::regex_match(const char * s, const regex& regex)
{
- return !regexec(®ex.m_preg, s.c_str(), 0, NULL, 0);
+ return s && !regexec(®ex.m_preg, s, 0, NULL, 0);
}
smatch::smatch()
@@ -71,7 +71,7 @@
memset(&pmatch, -1, sizeof(pmatch));
}
-std::string smatch::operator[](unsigned i) const
+std::string smatch::operator[](unsigned i) const
{
if (i < sizeof(pmatch)/sizeof(*pmatch) && pmatch[i].rm_so != -1)
return match_str.substr(pmatch[i].rm_so, pmatch[i].rm_eo-pmatch[i].rm_so);
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/base/Regex.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/base/Regex.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/base/Regex.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/base/Regex.h Mon Jan 21 18:03:03 2008
@@ -29,14 +29,37 @@
namespace str
{ /////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
+ /** \defgroup ZYPP_STR_REGEX Regular expressions
+ *
+ * Namespace zypp::str regular expressions \b using the
+ * boost regex library
+ * \url http://www.boost.org/libs/regex/doc/index.html.
+ *
+ * \li \c regex
+ * \li \c regex_match
+ * \li \c regex_search
+ * \li \c regex_replace
+ * \li \c match_results
+ * \li \c cmatch
+ * \li \c wcmatch
+ * \li \c smatch
+ * \li \c wsmatch
+ */
+
typedef Exception regex_error;
-
+
class smatch;
class regex;
-
- bool regex_match(const std::string& s, str::smatch& matches, const regex& regex);
- bool regex_match(const std::string& s, const regex& regex);
-
+
+ bool regex_match(const char * s, str::smatch& matches, const regex& regex);
+ inline bool regex_match(const std::string& s, str::smatch& matches, const regex& regex)
+ { return regex_match( s.c_str(), matches, regex ); }
+
+ bool regex_match(const char * s, const regex& regex);
+ inline bool regex_match(const std::string& s, const regex& regex)
+ { return regex_match( s.c_str(), regex ); }
+
class regex {
public:
@@ -48,17 +71,17 @@
match_extended = REG_EXTENDED,
normal = 1<<16
};
-
+
regex();
regex(const std::string& s,int flags = match_extended);
~regex() throw();
void assign(const std::string& s,int flags = match_extended);
-
+
private:
friend class smatch;
- friend bool regex_match(const std::string& s, str::smatch& matches, const regex& regex);
- friend bool regex_match(const std::string& s, const regex& regex);
+ friend bool regex_match(const char * s, str::smatch& matches, const regex& regex);
+ friend bool regex_match(const char * s, const regex& regex);
regex_t m_preg;
bool m_valid;
};
@@ -75,7 +98,7 @@
regmatch_t pmatch[12];
};
-
+
/////////////////////////////////////////////////////////////////
} // namespace str
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/base/String.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/base/String.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/base/String.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/base/String.h Mon Jan 21 18:03:03 2008
@@ -81,24 +81,6 @@
};
///////////////////////////////////////////////////////////////////
- /** \defgroup ZYPP_STR_REGEX Regular expressions
- *
- * Namespace zypp::str regular expressions \b using the
- * boost regex library
- * \url http://www.boost.org/libs/regex/doc/index.html.
- *
- * \li \c regex
- * \li \c regex_match
- * \li \c regex_search
- * \li \c regex_replace
- * \li \c match_results
- * \li \c cmatch
- * \li \c wcmatch
- * \li \c smatch
- * \li \c wsmatch
- */
-
- ///////////////////////////////////////////////////////////////////
/** \name String representation of number.
*
* Optional second argument sets the minimal string width (' ' padded).
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/cache/ResolvableQuery.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/cache/ResolvableQuery.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/cache/ResolvableQuery.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/cache/ResolvableQuery.cc Mon Jan 21 18:03:03 2008
@@ -44,7 +44,7 @@
_cmd_attr_num.reset( new sqlite3_command( _con, "select a.value from numeric_attributes a,types t where a.weak_resolvable_id=:rid and a.attr_id=t.id and t.class=:tclass and t.name=:tname;"));
_cmd_disk_usage.reset( new sqlite3_command( _con, "select d.name,du.size,du.files from resolvable_disk_usage du,dir_names d where du.resolvable_id=:rid and du.dir_name_id=d.id;"));
-
+
MIL << "Creating Resolvable query impl" << endl;
// 0 1 2 3 4 5 6 7 8 9 10 11 12
_fields = "id, name, version, release, epoch, arch, kind, installed_size, archive_size, install_only, build_time, install_time, repository_id";
@@ -78,8 +78,8 @@
// see _fields definition above for the getXXX() numbers
ptr->name = reader.getstring(1);
- //ptr->edition = reader.getstring(2) reader.getstring(3), );
- ptr->arch = _type_cache.archFor(reader.getint(5)).asString();
+ ptr->edition = Edition( reader.getstring(2), reader.getstring(3), reader.getint(4) );
+ ptr->arch = _type_cache.archFor(reader.getint(5));
ptr->kind = _type_cache.kindFor( reader.getint(6) );
ptr->repository = reader.getint( 12 );
@@ -88,7 +88,7 @@
return ptr;
}
-
+
void query( const data::RecordId &id,
ProcessResolvable fnc )
{
@@ -104,8 +104,8 @@
void query( const std::string &s,
ProcessResolvable fnc )
- {
-
+ {
+
sqlite3_command cmd( _con, "select " + _fields + " from resolvables where name like :name;");
cmd.bind( ":name", regex2sql( s ) );
sqlite3_reader reader = cmd.executereader();
@@ -152,7 +152,7 @@
{
return ( queryNumericAttributeInternal( _con, record_id, klass, name, default_value) > 0 );
}
-
+
int queryNumericAttribute( const data::RecordId &record_id,
const std::string &klass,
const std::string &name,
@@ -188,7 +188,7 @@
}
return alias;
}
-
+
data::RecordId queryRepositoryId( const std::string &repo_alias )
{
long long id = 0;
@@ -202,7 +202,7 @@
}
return id;
}
-
+
void iterateResolvablesByKindsAndStringsAndRepos( const std::vectorzypp::Resolvable::Kind & kinds,
const std::vectorstd::string &strings, int flags, const std::vectorstd::string repos, ProcessResolvable fnc )
{
@@ -340,7 +340,7 @@
return default_value;
}
-
+
TranslatedText queryTranslatedStringAttributeInternal( sqlite3_connection &con,
const data::RecordId &record_id,
const std::string &klass,
@@ -358,7 +358,7 @@
TranslatedText result;
sqlite3_reader reader = _cmd_attr_tstr->executereader();
-
+
int c = 0;
while(reader.read())
{
@@ -412,7 +412,7 @@
_cmd_attr_str->bind(":tname", name);
sqlite3_reader reader = _cmd_attr_str->executereader();
-
+
if ( reader.read() )
return reader.getstring(0);
else
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.cc Mon Jan 21 18:03:03 2008
@@ -16,7 +16,6 @@
using namespace std;
using namespace zypp;
-using namespace zypp::capability;
using namespace zypp::cache;
using zypp::data::RecordId;
@@ -147,7 +146,7 @@
const data::Package_Ptr & package )
{
RecordId id = appendResolvable( repository_id, ResTraits<Package>::kind,
- _NVRA( package->name, package->edition, package->arch ), package->deps, package->shareDataWith );
+ NVRA( package->name, package->edition, package->arch ), package->deps, package->shareDataWith );
appendResObjectAttributes( id, package );
appendPackageBaseAttributes( id, package );
@@ -164,7 +163,7 @@
const data::SrcPackage_Ptr & package )
{
RecordId id = appendResolvable( repository_id, ResTraits<SrcPackage>::kind,
- _NVRA( package->name, package->edition, package->arch ), package->deps, package->shareDataWith );
+ NVRA( package->name, package->edition, package->arch ), package->deps, package->shareDataWith );
appendResObjectAttributes( id, package );
appendOnMediaLocation( id, attrSrcPackageLocation, package->repositoryLocation );
@@ -176,7 +175,7 @@
{
RecordId id = appendResolvable(
repository_id, ResTraits<Patch>::kind,
- _NVRA( patch->name, patch->edition, patch->arch ), patch->deps );
+ NVRA( patch->name, patch->edition, patch->arch ), patch->deps );
appendResObjectAttributes( id, patch );
@@ -230,7 +229,7 @@
const data::PackageAtom_Ptr & atom )
{
RecordId id = appendResolvable( repository_id, ResTraits<Atom>::kind,
- _NVRA( atom->name, atom->edition, atom->arch ), atom->deps );
+ NVRA( atom->name, atom->edition, atom->arch ), atom->deps );
appendResObjectAttributes( id, atom );
appendPackageBaseAttributes( id, atom );
@@ -248,7 +247,7 @@
const data::Message_Ptr & message )
{
RecordId id = appendResolvable( repository_id, ResTraits<Message>::kind,
- _NVRA( message->name, message->edition, message->arch ), message->deps );
+ NVRA( message->name, message->edition, message->arch ), message->deps );
appendResObjectAttributes( id, message );
appendTranslatedStringAttribute( id, attrMessageText(), message->text );
@@ -259,7 +258,7 @@
const data::Script_Ptr & script )
{
RecordId id = appendResolvable( repository_id, ResTraits<Script>::kind,
- _NVRA( script->name, script->edition, script->arch ), script->deps );
+ NVRA( script->name, script->edition, script->arch ), script->deps );
appendResObjectAttributes( id, script );
appendStringAttribute( id, attrScriptDoScript(), script->doScript );
@@ -273,7 +272,7 @@
const data::Pattern_Ptr & pattern )
{
RecordId id = appendResolvable( repository_id, ResTraits<Pattern>::kind,
- _NVRA( pattern->name, pattern->edition, pattern->arch ), pattern->deps );
+ NVRA( pattern->name, pattern->edition, pattern->arch ), pattern->deps );
appendResObjectAttributes( id, pattern );
appendBooleanAttribute( id, attrPatternIsDefault(), pattern->isDefault );
@@ -294,7 +293,7 @@
const data::Product_Ptr & product )
{
RecordId id = appendResolvable( repository_id, ResTraits<Product>::kind,
- _NVRA( product->name, product->edition, product->arch ), product->deps );
+ NVRA( product->name, product->edition, product->arch ), product->deps );
appendResObjectAttributes( id, product );
appendStringAttribute( id, attrProductType(), product->type );
@@ -363,11 +362,11 @@
Solvable *s = pool_id2solvable(_pimpl->_pool, repo_add_solvable(repo));
s->evr = str2id(_pimpl->_pool, res->edition.c_str(), 1);
// s->provides = adddep(pool, pd, s->provides, atts, 0);
-//
+//
// s->name = str2id(pool, nvra.name.c_str(), 1);
// s->arch = str2id(pool, nvra.arch.c_str(), 1);
// s->vendor = str2id(pool, nvra.vendor.c_str(), 1);
-//
+//
// if (!s->arch)
// s->arch = ARCH_NOARCH;
@@ -377,7 +376,7 @@
RecordId SolvStore::appendResolvable( const RecordId &repository_id,
const Resolvable::Kind &kind,
- const _NVRA &nvra,
+ const NVRA &nvra,
const data::Dependencies &deps )
{
return appendResolvable( repository_id,
@@ -390,7 +389,7 @@
data::RecordId
SolvStore::appendResolvable( const data::RecordId &repository_id,
const Resolvable::Kind &kind,
- const _NVRA &nvra,
+ const NVRA &nvra,
const data::Dependencies &deps,
const data::RecordId &shared_id )
{
@@ -398,28 +397,28 @@
// Solvable *s = pool_id2solvable(pool, repo_add_solvable(pd->repo));
// s->evr = makeevr_atts(pool, pd, atts);
// s->provides = adddep(pool, pd, s->provides, atts, 0);
-//
+//
// s->name = str2id(pool, nvra.name.c_str(), 1);
// s->arch = str2id(pool, nvra.arch.c_str(), 1);
// s->vendor = str2id(pool, nvra.vendor.c_str(), 1);
-//
+//
// if (!s->arch)
// s->arch = ARCH_NOARCH;
-//
+//
// if (s->arch != ARCH_SRC && s->arch != ARCH_NOSRC)
// s->provides = repo_addid_dep(pd->repo, s->provides, rel2id(pool, s->name, s->evr, REL_EQ, 1), 0);
-//
+//
// s->supplements = repo_fix_legacy(pd->repo, s->provides, s->supplements);
// file
//id = str2id(pool, pd->content, 1);
//s->provides = repo_addid(pd->repo, s->provides, id);
-
+
// long long id = _pimpl->con.insertid();
-//
+//
// appendDependencies( id, deps );
-
+
return 0;
}
@@ -431,7 +430,7 @@
}
}
-void SolvStore::appendDependencyList( const RecordId &resolvable_id, zypp::Dep deptype, const data::DependencyList &caps )
+void SolvStore::appendDependencyList( const RecordId &resolvable_id, Dep deptype, const data::DependencyList &caps )
{
for ( data::DependencyList::const_iterator it = caps.begin(); it != caps.end(); ++it )
{
@@ -439,100 +438,10 @@
}
}
-void SolvStore::appendDependency( const RecordId &resolvable_id, zypp::Dep deptype, capability::CapabilityImpl::Ptr cap )
-{
- if ( cap == 0 )
- {
- DBG << "invalid capability" << endl;
- return;
- }
-
- if ( capability::isKind<NamedCap>(cap) )
- {
- appendNamedDependency( resolvable_id, deptype, capability::asKind<NamedCap>(cap) );
- }
- else if ( capability::isKind<FileCap>(cap) )
- {
- appendFileDependency( resolvable_id, deptype, capability::asKind<FileCap>(cap) );
- return;
- }
- else if ( capability::isKind<ModaliasCap>(cap) )
- {
- appendModaliasDependency( resolvable_id, deptype, capability::asKind<ModaliasCap>(cap) );
- }
- else if ( capability::isKind<HalCap>(cap) )
- {
- appendHalDependency( resolvable_id, deptype, capability::asKind<HalCap>(cap) );
- }
- else if ( capability::isKind<FilesystemCap>(cap) )
- {
- appendFilesystemDependency( resolvable_id, deptype, capability::asKind<FilesystemCap>(cap) );
- }
- else if ( capability::isKind<SplitCap>(cap) )
- {
- appendSplitDependency( resolvable_id, deptype, capability::asKind<SplitCap>(cap) );
- }
- else
- {
- appendUnknownDependency( resolvable_id, deptype, cap );
- }
-}
-
-
-void SolvStore::appendNamedDependency( const RecordId &resolvable_id, zypp::Dep deptype, capability::NamedCap::Ptr cap )
-{
- if ( !cap )
- ZYPP_THROW(Exception("bad versioned dep"));
-
-}
-
-void SolvStore::appendModaliasDependency( const RecordId &resolvable_id,
- zypp::Dep deptype,
- capability::ModaliasCap::Ptr cap )
-{
- if ( !cap )
- ZYPP_THROW(Exception("Null modalias capability"));
-}
-
-void SolvStore::appendHalDependency( const RecordId &resolvable_id,
- zypp::Dep deptype,
- capability::HalCap::Ptr cap )
-{
- if ( !cap )
- ZYPP_THROW(Exception("Null HAL capability"));
-}
-
-void SolvStore::appendFileDependency( const RecordId &resolvable_id, zypp::Dep deptype,
- capability::FileCap::Ptr cap )
-{
- if ( !cap )
- ZYPP_THROW(Exception("Null file capability"));
-}
-
-void SolvStore::appendFilesystemDependency( const data::RecordId &resolvable_id,
- zypp::Dep deptype,
- capability::FilesystemCap::Ptr cap )
-{
- if ( !cap )
- ZYPP_THROW(Exception("bad versioned dep"));
-}
-
-
-void SolvStore::appendSplitDependency( const data::RecordId &resolvable_id,
- zypp::Dep deptype,
- capability::SplitCap::Ptr cap )
-{
- if ( !cap )
- ZYPP_THROW(Exception("bad versioned dep"));
- //DBG << "versioned : " << cap << endl;
-}
-
-void SolvStore::appendUnknownDependency( const RecordId &resolvable_id,
- zypp::Dep deptype,
- capability::CapabilityImpl::Ptr cap )
+void SolvStore::appendDependency( const RecordId &resolvable_id, Dep deptype, Capability cap )
{
- if ( !cap )
- ZYPP_THROW(Exception("Null unknown capability"));
+#warning MIGRATE TO SAT
+ // create capability from data
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.h Mon Jan 21 18:03:03 2008
@@ -13,24 +13,18 @@
#include <iosfwd>
#include <string>
-#include "zypp/base/ReferenceCounted.h"
-#include "zypp/base/NonCopyable.h"
#include "zypp/base/PtrTypes.h"
#include "zypp/Pathname.h"
#include "zypp/ZConfig.h"
-#include "zypp/capability/CapabilityImpl.h"
-#include "zypp/capability/Capabilities.h"
#include "zypp/data/ResolvableDataConsumer.h"
#include "zypp/data/RecordId.h"
-#include "zypp/base/PtrTypes.h"
+#include "zypp/NVRA.h"
#include "zypp/RepoStatus.h"
#include "zypp/ProgressData.h"
#include "zypp/cache/Attribute.h"
-#include "satsolver/solvable.h"
-
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
@@ -38,20 +32,6 @@
namespace cache
{ /////////////////////////////////////////////////////////////////
- struct _NVRA
- {
- _NVRA( const std::string p_name = std::string(),
- const std::string p_version = std::string(),
- const std::string p_release = std::string(),
- const std::string p_arch = std::string() )
- : name(p_name), version(p_version), release(p_release), arch(p_arch)
- {}
- std::string name;
- std::string version;
- std::string release;
- std::string arch;
- };
-
/**
* The cache store caches resolvable data.
*
@@ -198,7 +178,7 @@
*/
virtual data::RecordId consumeFilelist( const data::RecordId & resolvable_id,
const data::Filenames & filenames );
-
+
/**
* Implementation of the \ref ResolvableDataConsumer interface
*
@@ -232,7 +212,7 @@
* Appends a resolvable to the store.
*
* You have to specify with \a kind of resolvable are you inserting
- * and its \c _NVRA (name version release and architecture ).
+ * and its \c NVRA (name version release and architecture ).
* Optionaly you can pass a list of \c CapabilityImpl::Ptr
* as dependencies for the resolvable.
*
@@ -254,7 +234,7 @@
*/
data::RecordId appendResolvable( const data::RecordId &repository_id,
const Resolvable::Kind &kind,
- const _NVRA &nvra,
+ const NVRA &nvra,
const data::Dependencies &deps );
/**
@@ -269,7 +249,7 @@
*/
data::RecordId appendResolvable( const data::RecordId &repository_id,
const Resolvable::Kind &kind,
- const _NVRA &nvra,
+ const NVRA &nvra,
const data::Dependencies &deps,
const data::RecordId &shared_id );
/**
@@ -299,9 +279,8 @@
* FIXME should it \throw if the resolvable does not exist?
*/
void appendDependencyList( const data::RecordId &resolvable_id,
- zypp::Dep deptype,
+ Dep deptype,
const data::DependencyList &dlist );
-
/**
* Adds a dependency to the store.
*
@@ -315,139 +294,8 @@
* FIXME should it \throw if the resolvable does not exist?
*/
void appendDependency( const data::RecordId &resolvable_id,
- zypp::Dep deptype,
- capability::CapabilityImpl::Ptr cap );
-
- /**
- * Adds a Named dependency to the store.
- *
- * A \ref NamedCap::Ptr \a dlist to be specified. Among
- * which type of dependency \ref zypp::Dep it is as
- * the \a deptype argument.
- *
- * \a resolvable_id is the resolvable Id in the SolvStore
- * that will own the capability
- *
- * You can create the named capability using either
- * \ref capability::parse or \ref capability::buildNamed
- *
- * FIXME should it \throw if the resolvable does not exist?
- */
- void appendNamedDependency( const data::RecordId &, zypp::Dep,
- capability::NamedCap::Ptr);
-
- /**
- * Adds a file dependency to the store.
- *
- * A \ref FileCap::Ptr \a dlist to be specified. Among
- * which type of dependency \ref zypp::Dep it is as
- * the \a deptype argument.
- *
- * \a resolvable_id is the resolvable Id in the SolvStore
- * that will own the capability
- *
- * You can create the file capability using either
- * \ref capability::parse or \ref capability::buildFile
- *
- * FIXME should it \throw if the resolvable does not exist?
- */
- void appendFileDependency( const data::RecordId &, zypp::Dep,
- capability::FileCap::Ptr);
-
- /**
- * Adds a Modalias dependency to the store.
- *
- * A \ref ModaliasCap::Ptr \a cap to be specified. Among
- * which type of dependency \ref zypp::Dep it is as
- * the \a deptype argument.
- *
- * \a resolvable_id is the resolvable Id in the SolvStore
- * that will own the capability
- *
- * You can create the modalias capability using either
- * \ref capability::parse or \ref capability::buildModalias
- *
- * FIXME should it \throw if the resolvable does not exist?
- */
- void appendModaliasDependency( const data::RecordId &resolvable_id,
- zypp::Dep deptype,
- capability::ModaliasCap::Ptr cap);
-
- /**
- * Adds a Hal dependency to the store.
- *
- * A \ref HalCap::Ptr \a cap to be specified. Among
- * which type of dependency \ref zypp::Dep it is as
- * the \a deptype argument.
- *
- * \a resolvable_id is the resolvable Id in the SolvStore
- * that will own the capability
- *
- * You can create the modalias capability using either
- * \ref capability::parse or \ref capability::buildHal
- *
- * FIXME should it \throw if the resolvable does not exist?
- */
- void appendHalDependency( const data::RecordId &resolvable_id,
- zypp::Dep deptype,
- capability::HalCap::Ptr cap );
-
- /**
- * Adds a Filesystem dependency to the store.
- *
- * A \ref FilesystemCap::Ptr \a cap to be specified. Among
- * which type of dependency \ref zypp::Dep it is as
- * the \a deptype argument.
- *
- * \a resolvable_id is the resolvable Id in the SolvStore
- * that will own the capability
- *
- * You can create the filesystem capability using either
- * \ref capability::parse or \ref capability::buildFilesystem
- *
- * FIXME should it \throw if the resolvable does not exist?
- */
- void appendFilesystemDependency( const data::RecordId &resolvable_id,
- zypp::Dep deptype,
- capability::FilesystemCap::Ptr cap );
-
- /**
- * Adds a split dependency to the store.
- *
- * A \ref SplitCap::Ptr \a cap to be specified. Among
- * which type of dependency \ref zypp::Dep it is as
- * the \a deptype argument.
- *
- * \a resolvable_id is the resolvable Id in the SolvStore
- * that will own the capability
- *
- * You can create the filesystem capability using either
- * \ref capability::parse or \ref capability::buildSplit
- *
- * FIXME should it \throw if the resolvable does not exist?
- */
- void appendSplitDependency( const data::RecordId &resolvable_id,
- zypp::Dep deptype,
- capability::SplitCap::Ptr cap );
-
- /**
- * Adds a unknown dependency to the store.
- *
- * A \ref Capability::Ptr \a cap to be specified. Among
- * which type of dependency \ref zypp::Dep it is as
- * the \a deptype argument.
- *
- * \a resolvable_id is the resolvable Id in the SolvStore
- * that will own the capability
- *
- * You can create the capability using either
- * \ref capability::parse
- *
- * FIXME should it \throw if the resolvable does not exist?
- */
- void appendUnknownDependency( const data::RecordId &resolvable_id,
- zypp::Dep deptype,
- capability::CapabilityImpl::Ptr cap );
+ Dep deptype,
+ Capability cap );
/**
* Insert patch RPM data into <tt>patch_packages</tt> table.
@@ -766,7 +614,7 @@
* Appends a solvable to the store.
*
* You have to specify with \a kind of resolvable are you inserting
- * and its \c _NVRA (name version release and architecture ).
+ * and its \c NVRA (name version release and architecture ).
* Optionaly you can pass a list of \c CapabilityImpl::Ptr
* as dependencies for the resolvable.
*
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/data/ResolvableData.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/data/ResolvableData.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/data/ResolvableData.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/data/ResolvableData.h Mon Jan 21 18:03:03 2008
@@ -20,7 +20,6 @@
#include "zypp/base/NonCopyable.h"
#include "zypp/data/RecordId.h"
-#include "zypp/capability/CapabilityImpl.h"
#include "zypp/Pathname.h"
#include "zypp/Resolvable.h"
#include "zypp/NVR.h"
@@ -39,8 +38,7 @@
{
namespace data
{
- /** ::data dependencies are CapabilityImpl. */
- typedef std::setcapability::CapabilityImpl::Ptr DependencyList;
+ typedef CapabilitySet DependencyList;
typedef std::map Dependencies;
typedef DefaultIntegral MediaNr;
@@ -60,13 +58,13 @@
{};
/** Kind */
- zypp::Resolvable::Kind kind;
+ ResKind kind;
/** Name */
std::string name;
/** Edition */
- std::string edition;
+ Edition edition;
/** Architecture */
- std::string arch;
+ Arch arch;
/** Dependencies */
Dependencies deps;
};
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/parser/plaindir/RepoParser.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/parser/plaindir/RepoParser.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/parser/plaindir/RepoParser.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/parser/plaindir/RepoParser.cc Mon Jan 21 18:03:03 2008
@@ -8,6 +8,7 @@
\---------------------------------------------------------------------*/
#include <iostream>
+#include "zypp/base/Easy.h"
#include "zypp/base/Logger.h"
#include "zypp/base/Iterator.h"
#include "zypp/base/String.h"
@@ -18,7 +19,6 @@
#include "zypp/parser/plaindir/RepoParser.h"
#include "zypp/parser/ParseException.h"
-#include "zypp/capability/CapabilityImpl.h"
#include "zypp/PathInfo.h"
#include "zypp/ResStore.h"
#include "zypp/ZConfig.h"
@@ -84,36 +84,19 @@
data::Package_Ptr pkg = new data::Package;
- pkg->name = header->tag_name();
+ pkg->name = header->tag_name();
+ pkg->edition = header->tag_edition();
+ pkg->arch = header->tag_arch();
+
+ header->tag_requires( filerequires ).swap( pkg->deps[Dep::REQUIRES] );
+ header->tag_prerequires( filerequires ).swap( pkg->deps[Dep::PREREQUIRES] );
+ header->tag_conflicts( filerequires ).swap( pkg->deps[Dep::CONFLICTS] );
+ header->tag_obsoletes( filerequires ).swap( pkg->deps[Dep::OBSOLETES] );
+ header->tag_enhances( filerequires ).swap( pkg->deps[Dep::ENHANCES] );
+ header->tag_suggests( filerequires ).swap( pkg->deps[Dep::SUGGESTS] );
+ header->tag_freshens( filerequires ).swap( pkg->deps[Dep::FRESHENS] );
+ header->tag_supplements( filerequires ).swap( pkg->deps[Dep::SUPPLEMENTS] );
- try {
- pkg->edition = header->tag_epoch() + ":" + header->tag_version() + "-" + header->tag_release();
- }
- catch (Exception & excpt_r) {
- ZYPP_CAUGHT( excpt_r );
- WAR << "Package " << pkg->name << " has bad edition '"
- << (header->tag_epoch()==0?"":(header->tag_epoch()+":"))
- << header->tag_version()
- << (header->tag_release().empty()?"":(string("-") + header->tag_release())) << "'";
- return 0;
- }
-
- Arch arch;
- try {
- pkg->arch = header->tag_arch();
- }
- catch (Exception & excpt_r) {
- ZYPP_CAUGHT( excpt_r );
- WAR << "Package " << pkg->name << " has bad architecture '" << header->tag_arch() << "'";
- return 0;
- }
-
- pkg->deps[Dep::REQUIRES] = header->tag_requires( filerequires );
- pkg->deps[Dep::PREREQUIRES] = header->tag_prerequires( filerequires );
- pkg->deps[Dep::CONFLICTS] = header->tag_conflicts( filerequires );
- pkg->deps[Dep::OBSOLETES] = header->tag_obsoletes( filerequires );
- pkg->deps[Dep::ENHANCES] = header->tag_enhances( filerequires );
- pkg->deps[Dep::SUPPLEMENTS] = header->tag_supplements( filerequires );
pkg->vendor = header->tag_vendor();
pkg->installedSize = header->tag_size();
pkg->buildTime = header->tag_buildtime();
@@ -131,16 +114,9 @@
filename != filenames.end();
++filename)
{
- if ( capability::isInterestingFileSpec( *filename ) )
+ if ( Capability::isInterestingFileSpec( *filename ) )
{
- try {
- pkg->deps[Dep::PROVIDES].insert(capability::buildFile( ResTraits<Package>::kind, *filename ));
- }
- catch (Exception & excpt_r)
- {
- ZYPP_CAUGHT( excpt_r );
- WAR << "Ignoring invalid capability: " << *filename << endl;
- }
+ pkg->deps[Dep::PROVIDES].insert( Capability( *filename, Capability::PARSED ) );
}
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/ContentFileReader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/ContentFileReader.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/ContentFileReader.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/ContentFileReader.cc Mon Jan 21 18:03:03 2008
@@ -21,7 +21,6 @@
#include "zypp/parser/susetags/ContentFileReader.h"
#include "zypp/parser/susetags/RepoIndex.h"
#include "zypp/data/ResolvableData.h"
-#include "zypp/CapFactory.h"
#include "zypp/ZConfig.h"
@@ -131,48 +130,25 @@
for ( std::liststd::string::const_iterator it = words.begin();
it != words.end(); ++it )
{
- Resolvable::Kind kind( ResTraits<Package>::kind );
+ std::string name( *it );
- std::string name = *it;
- std::string::size_type colon = name.find( ":" );
- if ( colon != std::string::npos )
- {
- std::string skind( name, 0, colon );
- name.erase( 0, colon+1 );
-
- if ( skind == ResTraits<Pattern>::kind )
- kind = ResTraits<Pattern>::kind;
- else if ( skind == ResTraits<Patch>::kind )
- kind = ResTraits<Patch>::kind;
- else if ( skind == ResTraits<Product>::kind )
- kind = ResTraits<Product>::kind;
- else if ( skind == ResTraits<Selection>::kind )
- kind = ResTraits<Selection>::kind;
- else if ( skind != ResTraits<Package>::kind )
- {
- // colon but no kind ==> colon in a name
- name = skind + ":" + name;
- }
- }
-
- // check for Rel:
- std::liststd::string::const_iterator next = it;
- if ( ++next != words.end()
- && (*next).find_first_of( "<>=" ) != std::string::npos )
- {
- std::string op = *next;
- if ( ++next != words.end() )
- {
- name += " ";
- name += op;
- name += " ";
- name += *next;
- it = next;
- }
- }
+ // check for '[op edition]':
+ std::liststd::string::const_iterator next = it;
+ if ( ++next != words.end()
+ && (*next).find_first_of( "<>=" ) != std::string::npos )
+ {
+ std::string op = *next;
+ if ( ++next != words.end() )
+ {
+ // Add the 'name op edition' dependency
+ deplist_r.insert( Capability( name, op, *next ) );
+ it = next;
+ continue;
+ }
+ }
- // Add the dependency
- deplist_r.insert( capability::parse( kind, name ) );
+ // Add the 'name' dependency
+ deplist_r.insert( Capability( name, Capability::PARSED ) );
}
}
@@ -338,7 +314,7 @@
}
else if ( key == "VERSION" )
{
- _pimpl->product().edition = value;
+ _pimpl->product().edition = Edition( value );
}
else if ( key == "ARCH" )
{
@@ -349,7 +325,7 @@
if ( Arch::compare( Arch(_pimpl->product().arch), carch ) < 0
&& carch.compatibleWith( sysarch ) )
{
- _pimpl->product().arch = modifier;
+ _pimpl->product().arch = Arch( modifier );
}
}
else if ( key == "DISTPRODUCT" )
@@ -524,10 +500,10 @@
if ( ! _pimpl->product().distributionName.empty() )
{
_pimpl->product().deps[Dep::PROVIDES].insert(
- capability::parse( ResTraits<Product>::kind,
- _pimpl->product().distributionName,
- Rel::EQ,
- _pimpl->product().distributionEdition ) );
+ Capability( _pimpl->product().distributionName,
+ Rel::EQ,
+ _pimpl->product().distributionEdition,
+ ResKind::product ) );
}
}
if ( ! ticks.toMax() )
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/FileReaderBaseImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/FileReaderBaseImpl.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/FileReaderBaseImpl.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/FileReaderBaseImpl.h Mon Jan 21 18:03:03 2008
@@ -36,16 +36,16 @@
inline std::string makeSharedIdent( ResKind kind_r,
const std::string & name_r,
- const std::string & edition_r,
- const std::string & arch_r )
+ Edition edition_r,
+ Arch arch_r )
{
std::string ret( kind_r.asString() );
ret += ":";
ret += name_r;
ret += "-";
- ret += edition_r;
+ ret += edition_r.asString();
ret += ".";
- ret += arch_r;
+ ret += arch_r.asString();
return ret;
}
@@ -64,34 +64,6 @@
{}
public:
- /** Parsing Capabilities from string is quite expensive. So we
- * maintain a little chache to check whether we already parsed some
- * raw string. If so, we can reuse the result.
- */
- struct CapImplCache
- {
- template<class _Res>
- capability::CapabilityImpl::Ptr get( const std::string & line_r )
- {
- return get( line_r, ResTraits<_Res>::kind );
- }
-
- capability::CapabilityImpl::Ptr get( const std::string & line_r,
- ResKind refers_r )
- {
- capability::CapabilityImpl::Ptr & ret( _cache[refers_r][line_r] );
- if ( ! ret )
- {
- ret = capability::parse( refers_r, line_r );
- }
- return ret;
- }
-
- private:
- std::map > _cache;
- };
-
- public:
template<class _Res>
void depAddLine( const std::string & line_r,
@@ -104,7 +76,7 @@
ResKind refers_r,
data::DependencyList & deps_r )
{
- deps_r.insert( _depcache.get( line_r, refers_r ) );
+ deps_r.insert( Capability( line_r, refers_r ) );
}
@@ -135,7 +107,6 @@
private:
const FileReaderBase & _parent;
- CapImplCache _depcache;
};
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PackagesDuFileReader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PackagesDuFileReader.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PackagesDuFileReader.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PackagesDuFileReader.cc Mon Jan 21 18:03:03 2008
@@ -109,10 +109,10 @@
++_c_pkg;
_data = _pkgData = new data::Package;
_srcpkgData = 0;
- _data->arch = words[3];
+ _data->arch = Arch( words[3] );
}
_data->name = words[0];
- _data->edition = words[1] + "-" + words[2];
+ _data->edition = Edition( words[1], words[2] );
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PackagesFileReader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PackagesFileReader.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PackagesFileReader.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PackagesFileReader.cc Mon Jan 21 18:03:03 2008
@@ -102,10 +102,10 @@
++_c_pkg;
_data = _pkgData = new data::Package;
_srcpkgData = 0;
- _data->arch = words[3];
+ _data->arch = Arch( words[3] );
}
_data->name = words[0];
- _data->edition = words[1] + "-" + words[2];
+ _data->edition = Edition( words[1], words[2] );
}
/** Consume =Cks:. */
@@ -167,7 +167,7 @@
switch ( str::split( tag_r->value, std::back_inserter(words) ) )
{
case 2: // [medianr filename]
- _data->repositoryLocation.setLocation( Pathname(_data->arch) / words[1],
+ _data->repositoryLocation.setLocation( Pathname(_data->arch.string()) / words[1],
str::strtonum<unsigned>(words[0]) );
break;
@@ -210,15 +210,15 @@
{
_data->sharedDataTag = makeSharedIdent( ResTraits<SrcPackage>::kind,
words[0],
- words[1] + "-" + words[2],
- "" );
+ Edition( words[1], words[2] ),
+ Arch_noarch );
}
else
{
_data->sharedDataTag = makeSharedIdent( ResTraits<Package>::kind,
words[0],
- words[1] + "-" + words[2],
- words[3] );
+ Edition( words[1], words[2] ),
+ Arch( words[3] ) );
}
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PackagesLangFileReader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PackagesLangFileReader.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PackagesLangFileReader.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PackagesLangFileReader.cc Mon Jan 21 18:03:03 2008
@@ -96,10 +96,10 @@
++_c_pkg;
_data = _pkgData = new data::Package;
_srcpkgData = 0;
- _data->arch = words[3];
+ _data->arch = Arch( words[3] );
}
_data->name = words[0];
- _data->edition = words[1] + "-" + words[2];
+ _data->edition = Edition( words[1], words[2] );
}
/** Consume =Sum:. */
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PatternFileReader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PatternFileReader.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PatternFileReader.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/parser/susetags/PatternFileReader.cc Mon Jan 21 18:03:03 2008
@@ -70,8 +70,8 @@
_data = new data::Pattern;
_data->name = words[0];
- _data->edition = words[1] + "-" + words[2];
- _data->arch = words[3];
+ _data->edition = Edition( words[1], words[2] );
+ _data->arch = Arch( words[3] );
}
/** Consume =Sum:. */
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/FileReaderBaseImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/FileReaderBaseImpl.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/FileReaderBaseImpl.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/FileReaderBaseImpl.cc Mon Jan 21 18:03:03 2008
@@ -81,17 +81,16 @@
// package_ptr will point to a SrcPackage from now on
package_ptr.swap(srcpkg);
}
- package_ptr->arch.swap(arch);
+ package_ptr->arch = Arch( arch );
return true;
}
// xpath: //package/version
if (reader_r->name() == "version")
{
- if (reader_r->getAttribute("epoch").asString().empty());
- package_ptr->edition += (reader_r->getAttribute("epoch").asString()+":");
-
- package_ptr->edition += ( reader_r->getAttribute("ver").asString() + "-" + reader_r->getAttribute("rel").asString() );
+ package_ptr->edition = Edition( reader_r->getAttribute("ver").asString(),
+ reader_r->getAttribute("rel").asString(),
+ reader_r->getAttribute("epoch").asString() );
return true;
}
@@ -189,18 +188,6 @@
return true;
}
- bool FileReaderBase::BaseImpl::editionStringFromAttrs( xml::Reader & reader_r, string &edition )
- {
- string result;
- if ( ! reader_r->getAttribute("epoch").asString().empty() )
- result += (reader_r->getAttribute("epoch").asString() + ":");
-
- result += reader_r->getAttribute("ver").asString();
- result += ( "-" + reader_r->getAttribute("ver").asString());
- result.swap(edition);
- return true;
- }
-
// --------------( consume <format> tag )------------------------------------
bool FileReaderBase::BaseImpl::consumeFormatNode(
@@ -264,10 +251,7 @@
if (reader_r->name() == "file")
{
// insert file dependency into the list
- package_ptr->deps[Dep::PROVIDES].insert(
- zypp::capability::parse(
- ResTraits<Package>::kind,
- reader_r.nodeText().asString()));
+ package_ptr->deps[Dep::PROVIDES].insert( Capability( reader_r.nodeText().asString(), Capability::PARSED ) );
return true;
}
@@ -333,12 +317,9 @@
ZYPP_THROW(ParseException("rpm:entry found when not expected"));
// read kind of resolvable this entry refers, default to Package
- string kind_str = reader_r->getAttribute("kind").asString();
- Resolvable::Kind kind;
- if (kind_str.empty())
- kind = ResTraits<Package>::kind;
- else
- kind = Resolvable::Kind(kind_str);
+ ResKind kind( reader_r->getAttribute("kind").asString() );
+ if ( ! kind )
+ kind = ResKind::package;
// Check whether this is actually a prerequires dependency.
// If so, it will be stored in deps_r as Dep::PREREQUIRES
@@ -351,11 +332,6 @@
ZYPP_THROW(ParseException("pre=\"1\" found for non-requires dependency"));
pre = true;
}
-/*
- DBG << "got rpm:entry for " << _dtype << ": "
- << reader_r->getAttribute("name").asString()
- << " " << edition << " (" << kind << ")" << endl;
-*/
string version = reader_r->getAttribute("ver").asString();
@@ -363,9 +339,7 @@
{
// insert unversion dependency into the list
deps_r[pre ? Dep::PREREQUIRES : _dtype].insert(
- zypp::capability::parse(
- kind, reader_r->getAttribute("name").asString()
- )
+ Capability( reader_r->getAttribute("name").asString(), kind, Capability::PARSED )
);
}
else
@@ -378,12 +352,10 @@
// insert versioned dependency into the list
deps_r[pre ? Dep::PREREQUIRES : _dtype].insert(
- zypp::capability::parse(
- kind,
- reader_r->getAttribute("name").asString(),
- Rel(reader_r->getAttribute("flags").asString()),
- edition
- )
+ Capability( reader_r->getAttribute("name").asString(),
+ Rel( reader_r->getAttribute("flags").asString() ),
+ edition,
+ kind )
);
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/FileReaderBaseImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/FileReaderBaseImpl.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/FileReaderBaseImpl.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/FileReaderBaseImpl.h Mon Jan 21 18:03:03 2008
@@ -50,24 +50,24 @@
/**
* Lightweight object for remembering currently processed tag.
- *
+ *
* Usage:
- *
+ *
* - call \ref append() on opening tag
* - use \ref contains() to check if the given tag is being processed
* - call \ref remove() on closing tag
- *
+ *
* \note the above works only if the path elements are unique. To support
* also non-unique elements, an equals() method will need to be implemented
* and used instead of \ref contains().
- *
+ *
* \note tags you want to use with TagPath must be enumerated in \ref Tag
* enum.
*/
struct TagPath
{
typedef std::list<Tag> TagList;
-
+
void append(const Tag tag) { path.push_back(tag); }
void remove() { if (!path.empty()) path.pop_back(); }
unsigned depth() const { return path.size(); }
@@ -105,7 +105,7 @@
/**
* Function for processing all <code>format</code> tag subtree nodes.
- *
+ *
* \return true if the package node or current subnode has been consumed
* (no further processing is required), false otherwise.
*/
@@ -113,14 +113,16 @@
/**
* Processes RPM dependency tags (rpm:entry, rpm:requires, ...).
- *
+ *
* \return true if a dependency tag has been encountered, false otherwise.
* \throws ParseException if a serious error is encountered while parsing
*/
bool consumeDependency(xml::Reader & reader_r, data::Dependencies & deps_r);
-
- bool editionStringFromAttrs( xml::Reader & reader_r, std::string &edition );
+ void editionStringFromAttrs( xml::Reader & reader_r, Edition & edition ) const
+ { edition = Edition( reader_r->getAttribute("ver").asString(),
+ reader_r->getAttribute("rel").asString(),
+ reader_r->getAttribute("epoch").asString() ); }
public:
/** Appends \a tag to \ref _tagpath. */
@@ -137,7 +139,7 @@
private:
- /** Used to remember the tag beeing currently processed. */
+ /** Used to remember the tag beeing currently processed. */
TagPath _tagpath;
/**
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/FilelistsFileReader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/FilelistsFileReader.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/FilelistsFileReader.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/FilelistsFileReader.cc Mon Jan 21 18:03:03 2008
@@ -131,7 +131,7 @@
_filenames.clear();
_resolvable->name = reader_r->getAttribute("name").asString();
- _resolvable->arch = reader_r->getAttribute("arch").asString();
+ _resolvable->arch = Arch( reader_r->getAttribute("arch").asString() );
return true;
}
@@ -139,7 +139,7 @@
// xpath: /filelists/package/version
if (reader_r->name() == "version")
{
- editionStringFromAttrs( reader_r, _resolvable->edition );
+ editionStringFromAttrs( reader_r, _resolvable->edition );
return true;
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/OtherFileReader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/OtherFileReader.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/OtherFileReader.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/parser/yum/OtherFileReader.cc Mon Jan 21 18:03:03 2008
@@ -132,7 +132,7 @@
_changelog.clear();
_resolvable->name = reader_r->getAttribute("name").asString();
- _resolvable->arch = reader_r->getAttribute("arch").asString();
+ _resolvable->arch = Arch( reader_r->getAttribute("arch").asString() );
return true;
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/pool/GetResolvablesToInsDel.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/pool/GetResolvablesToInsDel.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/pool/GetResolvablesToInsDel.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/pool/GetResolvablesToInsDel.cc Mon Jan 21 18:03:03 2008
@@ -50,7 +50,7 @@
return; // ---> nothing to do
// build obsoletes from instlist_r
- CapSet obsoletes;
+ std::set<Capability> obsoletes;
for ( GetResolvablesToInsDel::PoolItemList::const_iterator it = instlist_r.begin();
it != instlist_r.end(); ++it )
{
@@ -69,11 +69,11 @@
PoolItem_Ref ipkg( *it );
bool delayPkg = false;
// ...check whether an obsoletes....
- for ( CapSet::iterator obs = obsoletes.begin();
+ for ( std::set<Capability>::iterator obs = obsoletes.begin();
! delayPkg && obs != obsoletes.end(); ++obs )
{
// ...matches anything provided by the package?
- for ( CapSet::const_iterator prov = ipkg->dep(Dep::PROVIDES).begin();
+ for ( Capabilities::const_iterator prov = ipkg->dep(Dep::PROVIDES).begin();
prov != ipkg->dep(Dep::PROVIDES).end(); ++prov )
{
if ( obs->matches( *prov ) == CapMatch::yes )
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolImpl.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolImpl.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolImpl.cc Mon Jan 21 18:03:03 2008
@@ -11,12 +11,9 @@
*/
#include <iostream>
#include "zypp/base/LogTools.h"
-#include "zypp/capability/FilesystemCap.h"
-#include "zypp/base/Measure.h"
#include "zypp/pool/PoolImpl.h"
#include "zypp/pool/PoolStats.h"
-#include "zypp/CapSet.h"
#include "zypp/Package.h"
#include "zypp/VendorAttr.h"
@@ -114,8 +111,8 @@
static void
storeInsert( CapHash::ContainerT & store_r, const PoolItem & item_r, Dep cap_r )
{
- CapSet caps = item_r->dep( cap_r );
- for (CapSet::iterator ic = caps.begin(); ic != caps.end(); ++ic) {
+ Capabilities caps = item_r->dep( cap_r );
+ for (Capabilities::const_iterator ic = caps.begin(); ic != caps.end(); ++ic) {
store_r[cap_r][ic->index()].push_back( CapAndItem( *ic, item_r ) );
}
}
@@ -136,9 +133,9 @@
static void
storeDelete( PoolTraits::DepCapItemContainerT & store_r, const PoolItem & item_r, Dep cap_r )
{
- CapSet caps = item_r->dep( cap_r );
+ Capabilities caps = item_r->dep( cap_r );
//XXX << "storeDelete(" << item_r << ")" << endl;
- for ( CapSet::iterator ic = caps.begin(); ic != caps.end(); ++ic )
+ for ( Capabilities::const_iterator ic = caps.begin(); ic != caps.end(); ++ic )
{
PoolTraits::CapItemContainerT & capitems = store_r[cap_r][ic->index()];
for ( PoolTraits::CapItemContainerT::iterator pos = capitems.begin(); pos != capitems.end(); /**/ )
@@ -201,7 +198,6 @@
// METHOD TYPE : Ctor
//
PoolImpl::PoolImpl()
- : _watchFilesystemSysconfigStorage( capability::FilesystemCap::sysconfigStorageSerial() )
{}
///////////////////////////////////////////////////////////////////
@@ -214,76 +210,6 @@
///////////////////////////////////////////////////////////////////
//
- // METHOD NAME : PoolImpl::serial
- // METHOD TYPE : SerialNumber
- //
- const SerialNumber & PoolImpl::serial() const
- {
- if ( _watchFilesystemSysconfigStorage.remember( capability::FilesystemCap::sysconfigStorageSerial() ) )
- {
- const_cast(this)->_serial.setDirty(); // propagate changed /etc/sysconfig/storage
- }
- return _serial;
- }
-
- ///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : PoolImpl::satSync
- // METHOD TYPE : void
- //
- void PoolImpl::satSync() const
- {
- if ( satSynced() )
- {
- MIL << "Pool: " << _serial << ": In sync with sat-pool " << _satSyncRequired << endl;
- return;
- }
-
- debug::Measure mnf( "Sync changes to sat-pool..." );
- MIL << "Pool: " << _serial << ": Sync changes to sat-pool... " << _satSyncRequired << endl;
-
- // collect unsynced PoolItems per repository.
- std::map todo;
- const std::string & systemRepoName( sat::Pool::instance().systemRepoName() );
- for_( it, begin(), end() )
- {
- if ( ! (*it).satSolvable() )
- {
- if ( (*it).status().isInstalled() )
- todo[systemRepoName].push_back( *it );
- else
- todo[(*it)->repository().info().alias()].push_back( *it );
- }
- }
-
- // add the missing PoolItems.
- DBG << "Update missing repos... " << todo.size() << endl;
- void res2sat( const ResObject::constPtr & res_r, sat::Solvable & slv_r );
-
- for_( it, todo.begin(), todo.end() )
- {
- DBG << "Update repo " << it->first << ": " << it->second.size() << endl;
- sat::Repo repo( sat::Pool::instance().reposInsert( it->first.empty() ? "@Builtin" : it->first ) );
- sat::Solvable first( repo.addSolvables( it->second.size() ) );
- DBG << " starting at " << first << endl;
-
- sat::Solvable cur( first );
- for_( pit, it->second.begin(), it->second.end() )
- {
- res2sat( *pit, cur );
- (*pit).rememberSatSolvable( cur );
- cur = cur.nextInRepo();
- }
- }
-
- _satSyncRequired.remember( _serial );
- sat::Pool::instance().prepare();
- MIL << "Pool: " << _serial << ": In sync with sat-pool " << _satSyncRequired << endl;
- MIL << "sat::Pool: " << sat::Pool::instance() << endl;
- }
-
- ///////////////////////////////////////////////////////////////////
- //
// METHOD NAME : PoolImpl::find
// METHOD TYPE : PoolItem
//
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolImpl.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolImpl.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolImpl.h Mon Jan 21 18:03:03 2008
@@ -17,6 +17,8 @@
#include "zypp/base/Easy.h"
#include "zypp/base/SerialNumber.h"
+#include "zypp/base/Deprecated.h"
+
#include "zypp/pool/PoolTraits.h"
#include "zypp/ResPoolProxy.h"
#include "zypp/ZYppFactory.h"
@@ -33,11 +35,11 @@
// CLASS NAME : NameHash
//
/** */
- class NameHash
+ class ZYPP_DEPRECATED NameHash
{
public:
/** Default ctor */
- NameHash();
+ NameHash() ZYPP_DEPRECATED;
/** Dtor */
~NameHash();
@@ -105,7 +107,7 @@
{
public:
/** Default ctor */
- CapHash();
+ CapHash() ZYPP_DEPRECATED;
/** Dtor */
~CapHash();
@@ -192,7 +194,7 @@
typedef PoolTraits::size_type size_type;
typedef PoolTraits::Inserter Inserter;
typedef PoolTraits::Deleter Deleter;
- typedef PoolTraits::AdditionalCapSet AdditionalCapSet;
+ typedef PoolTraits::AdditionalCapabilities AdditionalCapabilities;
typedef PoolTraits::RepoContainerT KnownRepositories;
public:
@@ -244,9 +246,9 @@
*
* setAdditionalRequire( capset );
*/
- void setAdditionalRequire( const AdditionalCapSet & capset ) const
+ void setAdditionalRequire( const AdditionalCapabilities & capset ) const
{ _additionalRequire = capset; }
- AdditionalCapSet & additionalRequire() const
+ AdditionalCapabilities & additionalRequire() const
{ return _additionalRequire; }
/**
@@ -257,9 +259,9 @@
*
* setAdditionalConflict( capset );
*/
- void setAdditionalConflict( const AdditionalCapSet & capset ) const
+ void setAdditionalConflict( const AdditionalCapabilities & capset ) const
{ _additionaConflict = capset; }
- AdditionalCapSet & additionaConflict() const
+ AdditionalCapabilities & additionaConflict() const
{ return _additionaConflict; }
/**
@@ -271,9 +273,9 @@
*
* setAdditionalProvide( cap );
*/
- void setAdditionalProvide( const AdditionalCapSet & capset ) const
+ void setAdditionalProvide( const AdditionalCapabilities & capset ) const
{ _additionaProvide = capset; }
- AdditionalCapSet & additionaProvide() const
+ AdditionalCapabilities & additionaProvide() const
{ return _additionaProvide; }
/** */
@@ -325,14 +327,8 @@
public:
/** Serial number changing whenever the content
* (Resolvables or Dependencies) changes. */
- const SerialNumber & serial() const;
-
- /** Wheter in sync with sat-pool. */
- bool satSynced() const
- { return _satSyncRequired.isClean( _serial ); }
-
- /** Sync with sat-pool. */
- void satSync() const;
+ const SerialNumber & serial() const
+ { return _serial; }
/** Return the corresponding \ref PoolItem.
* Pool and sat pool should be in sync. Returns an empty
@@ -343,19 +339,15 @@
private:
/** Serial number. */
- SerialNumber _serial;
- /** Watch for changes in /etc/sysconfig/storage. */
- SerialNumberWatcher _watchFilesystemSysconfigStorage;
- /** Watch for changes \c _serial. */
- SerialNumberWatcher _satSyncRequired;
+ SerialNumber _serial;
public:
ContainerT _store;
NameHash _namehash;
CapHash _caphash;
- mutable AdditionalCapSet _additionalRequire;
- mutable AdditionalCapSet _additionaConflict;
- mutable AdditionalCapSet _additionaProvide;
+ mutable AdditionalCapabilities _additionalRequire;
+ mutable AdditionalCapabilities _additionaConflict;
+ mutable AdditionalCapabilities _additionaProvide;
public:
ResPoolProxy proxy( ResPool self ) const
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolTraits.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolTraits.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolTraits.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/pool/PoolTraits.h Mon Jan 21 18:03:03 2008
@@ -100,8 +100,8 @@
typedef PoolImplInserter Inserter;
typedef PoolImplDeleter Deleter;
- /** Map of CapSet and "who" has set it*/
- typedef std::mapResStatus::TransactByValue,CapSet AdditionalCapSet;
+ /** Map of Capabilities and "who" has set it*/
+ typedef std::mapResStatus::TransactByValue,Capabilities AdditionalCapabilities;
};
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/repo/PackageProvider.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/repo/PackageProvider.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/repo/PackageProvider.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/repo/PackageProvider.cc Mon Jan 21 18:03:03 2008
@@ -20,7 +20,6 @@
#include "zypp/repo/RepoProvideFile.h"
#include "zypp/repo/Applydeltarpm.h"
#include "zypp/repo/PackageDelta.h"
-#include "zypp/detail/ImplConnect.h"
#include "zypp/ZConfig.h"
#include "zypp/RepoInfo.h"
@@ -78,7 +77,6 @@
const PackageProviderPolicy & policy_r )
: _policy( policy_r )
, _package( package )
- , _implPtr( detail::ImplConnect::resimpl( _package ) )
, _deltas(deltas)
, _access(access)
{}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/repo/PackageProvider.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/repo/PackageProvider.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/repo/PackageProvider.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/repo/PackageProvider.h Mon Jan 21 18:03:03 2008
@@ -67,7 +67,6 @@
typedef shared_ptr<void> ScopedGuard;
typedef callback::SendReportrepo::DownloadResolvableReport Report;
- typedef detail::ResImplTraitsPackage::Impl::constPtr PackageImpl_constPtr;
typedef packagedelta::DeltaRpm DeltaRpm;
typedef packagedelta::PatchRpm PatchRpm;
@@ -104,11 +103,10 @@
private:
PackageProviderPolicy _policy;
Package::constPtr _package;
- PackageImpl_constPtr _implPtr;
mutable bool _retry;
mutable shared_ptr<Report> _report;
- DeltaCandidates _deltas;
- RepoMediaAccess &_access;
+ DeltaCandidates _deltas;
+ RepoMediaAccess & _access;
};
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/RepoImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/RepoImpl.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/RepoImpl.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/RepoImpl.cc Mon Jan 21 18:03:03 2008
@@ -13,32 +13,11 @@
#include "zypp/base/Gettext.h"
#include "zypp/base/Logger.h"
#include "zypp/base/Measure.h"
-#include "zypp/capability/Capabilities.h"
-#include "zypp/cache/ResolvableQuery.h"
-#include "zypp/detail/ResImplTraits.h"
-#include "zypp/CapFactory.h"
-
-#include "zypp/Package.h"
-#include "zypp/SrcPackage.h"
-#include "zypp/Product.h"
-#include "zypp/Pattern.h"
-#include "zypp/Patch.h"
-#include "zypp/Message.h"
-#include "zypp/Script.h"
-#include "zypp/Atom.h"
-
#include "zypp/repo/cached/RepoImpl.h"
-#include "zypp/repo/cached/PackageImpl.h"
-#include "zypp/repo/cached/SrcPackageImpl.h"
-#include "zypp/repo/cached/ProductImpl.h"
-#include "zypp/repo/cached/PatternImpl.h"
-#include "zypp/repo/cached/PatchImpl.h"
-#include "zypp/repo/cached/MessageImpl.h"
-#include "zypp/repo/cached/ScriptImpl.h"
-#include "zypp/repo/cached/AtomImpl.h"
+#include "zypp/cache/ResolvableQuery.h"
#include "zypp/cache/CacheAttributes.h"
+#include "zypp/cache/sqlite3x/sqlite3x.hpp"
-using namespace zypp::detail;
using namespace zypp::cache;
using namespace std;
using namespace sqlite3x;
@@ -68,6 +47,8 @@
void RepoImpl::createResolvables()
{
+#warning IMPLEMENT REPOIMPL::CREATERESOLVABLES
+#if 0
ProgressData ticks;
ticks.sendTo(_options.readingResolvablesProgress);
ticks.name(str::form(_( "Reading '%s' repository cache"), info().alias().c_str()));
@@ -172,6 +153,7 @@
cerr << "Exception Occured: " << ex.what() << endl;
}
//extract_packages_from_directory( _store, thePath, selfRepositoryRef(), true );
+#endif
}
void RepoImpl::createPatchAndDeltas()
@@ -311,233 +293,12 @@
return _rquery;
}
-void RepoImpl::read_capabilities( sqlite3_connection &con,
- data::RecordId repo_id,
- map > &nvras,
- ProgressData &ticks )
-{
- CapFactory capfactory;
-
-
- // precompile statements
-
-
-
-// map named_caps;
-// sqlite3_command select_named_cmd( con, "select v.id, c.refers_kind, n.name, v.version, v.release, v.epoch, v.relation named_capabilities v, capabilities c, names n where v.name_id=n.id and c.id=ncc.capability_id and ncc.named_capability_id=v.id;");
-// {
-// debug::Measure mnc("read named capabilities");
-// sqlite3_reader reader = select_named_cmd.executereader();
-// while ( reader.read() )
-// {
-//
-// }
-// }
- sqlite3_command select_named_cmd( con, "select v.refers_kind, v.name_id, v.version, v.release, v.epoch, v.relation, v.dependency_type, v.resolvable_id from named_capabilities v, resolvables res where res.repository_id=:repo_id and v.resolvable_id=res.id;");
-
- sqlite3_command select_file_cmd( con, "select fc.refers_kind, dn.name, fn.name, fc.dependency_type, fc.resolvable_id from file_capabilities fc, files f, dir_names dn, file_names fn, resolvables res where f.id=fc.file_id and f.dir_name_id=dn.id and f.file_name_id=fn.id and fc.resolvable_id=res.id and res.repository_id=:repo_id;");
-
- sqlite3_command select_hal_cmd( con, "select hc.refers_kind, hc.name, hc.value, hc.relation, hc.dependency_type, hc.resolvable_id from hal_capabilities hc, resolvables res where hc.resolvable_id=res.id and res.repository_id=:repo_id;");
-
- sqlite3_command select_modalias_cmd( con, "select mc.refers_kind, mc.name, mc.pkgname, mc.value, mc.relation, mc.dependency_type, mc.resolvable_id from modalias_capabilities mc, resolvables res where mc.resolvable_id=res.id and res.repository_id=:repo_id;");
-
- sqlite3_command select_filesystem_cmd( con, "select v.refers_kind, n.name, v.dependency_type, v.resolvable_id from filesystem_capabilities v, names n, resolvables res where v.name_id=n.id and v.resolvable_id=res.id and res.repository_id=:repo_id;");
-
- sqlite3_command select_split_cmd( con, "select v.refers_kind, n.name, dn.name, fn.name, v.dependency_type, v.resolvable_id from split_capabilities v, names n, resolvables res, files f, dir_names dn, file_names fn where v.name_id=n.id and v.resolvable_id=res.id and f.id=v.file_id and f.dir_name_id=dn.id and f.file_name_id=fn.id and res.repository_id=:repo_id;");
-
- sqlite3_command select_other_cmd( con, "select oc.refers_kind, oc.value, oc.dependency_type, oc.resolvable_id from other_capabilities oc, resolvables res where oc.resolvable_id=res.id and res.repository_id=:repo_id;");
-
-
- std::map namemap;
- sqlite3_command get_names_cmd( con, "select id,name from names;" );
- {
- sqlite3_reader reader = get_names_cmd.executereader();
- while ( reader.read() )
- {
- namemap[reader.getint(0)] = reader.getstring(1);
- }
- }
-
- {
- debug::Measure mnc("read named capabilities");
- select_named_cmd.bind(":repo_id", repo_id);
- sqlite3_reader reader = select_named_cmd.executereader();
-
- // FIXME Move this logic to tick()?
- Date start(Date::now());
- Capability oldcap;
- Resolvable::Kind oldrefer;
- Rel oldrel;
- //std::string oldname;
- int oldname = -1;
- std::string oldver, oldrelease;
- int oldepoch = 0;
-
-
- while ( reader.read() )
- {
- ticks.tick();
-
- Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
- int name = reader.getint(1);
- Rel rel = _type_cache.relationFor(reader.getint(5));
-
- if ( rel == zypp::Rel::NONE )
- {
- if (oldname != name || rel != oldrel || refer!=oldrefer)
- {
- oldrel = rel;
- oldrefer = refer;
- oldname = name;
- capability::NamedCap *ncap = new capability::NamedCap( refer, namemap[name] );
- oldcap = capfactory.fromImpl ( capability::CapabilityImpl::Ptr(ncap) );
- }
- }
- else
- {
- std::string ver = reader.getstring(2);
- std::string release = reader.getstring(3);
- int epoch = reader.getint(4);
- if (oldname != name || rel != oldrel || refer!=oldrefer
- || oldver != ver
- || oldrelease != release
- || oldepoch != epoch)
- {
- oldrel = rel;
- oldrefer = refer;
- oldname = name;
- oldver = ver;
- oldrelease = release;
- oldepoch = epoch;
-
- capability::VersionedCap *vcap = new capability::VersionedCap( refer, namemap[name], /* rel */ rel, Edition( ver, release, epoch ) );
- oldcap = capfactory.fromImpl( capability::CapabilityImpl::Ptr(vcap) );
- }
- }
-
- zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(6));
- data::RecordId rid = reader.getint64(7);
- nvras[rid].second[deptype].insert(oldcap);
- }
- }
-
- {
- debug::Measure mnf("read file capabilities");
- select_file_cmd.bind(":repo_id", repo_id);
- sqlite3_reader reader = select_file_cmd.executereader();
- while ( reader.read() )
- {
- ticks.tick();
- Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
- capability::FileCap *fcap = new capability::FileCap( refer, reader.getstring(1) + "/" + reader.getstring(2) );
- zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(3));
- data::RecordId rid = reader.getint64(4);
- nvras[rid].second[deptype].insert( capfactory.fromImpl( capability::CapabilityImpl::Ptr(fcap) ) );
- }
- }
-
- {
- debug::Measure mnf("read hal capabilities");
- select_hal_cmd.bind(":repo_id", repo_id);
- sqlite3_reader reader = select_hal_cmd.executereader();
- while ( reader.read() )
- {
- ticks.tick();
- //select hc.refers_kind, hc.name, hc.value, hc.relation, hc.dependency_type, hc.resolvable_id from hal_capabilities hc
-
- Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-
- Rel rel = _type_cache.relationFor(reader.getint(3));
- capability::HalCap *hcap = new capability::HalCap( refer, reader.getstring(1), rel, reader.getstring(2) );
- zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(4));
- data::RecordId rid = reader.getint64(5);
- nvras[rid].second[deptype].insert( capfactory.fromImpl( capability::CapabilityImpl::Ptr(hcap) ) );
- }
- }
-
- {
- debug::Measure mnf("read modalias capabilities");
- select_modalias_cmd.bind(":repo_id", repo_id);
- sqlite3_reader reader = select_modalias_cmd.executereader();
- while ( reader.read() )
- {
- ticks.tick();
- Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-
- Rel rel = _type_cache.relationFor(reader.getint(4));
- capability::ModaliasCap *mcap = new capability::ModaliasCap( refer, reader.getstring(1), rel, reader.getstring(3) );
- mcap->setPkgname(reader.getstring(2));
- zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(5));
- data::RecordId rid = reader.getint64(6);
- nvras[rid].second[deptype].insert( capfactory.fromImpl( capability::CapabilityImpl::Ptr(mcap) ) );
- }
- }
-
- {
- debug::Measure mnf("read filesystem capabilities");
- select_filesystem_cmd.bind(":repo_id", repo_id);
- sqlite3_reader reader = select_filesystem_cmd.executereader();
- while ( reader.read() )
- {
- ticks.tick();
- Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-
- capability::FilesystemCap *fscap = new capability::FilesystemCap( refer, reader.getstring(1) );
- zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(2));
- data::RecordId rid = reader.getint64(3);
- nvras[rid].second[deptype].insert( capfactory.fromImpl( capability::CapabilityImpl::Ptr(fscap) ) );
- }
- }
-
- {
- debug::Measure mnf("read split capabilities");
- select_split_cmd.bind(":repo_id", repo_id);
- sqlite3_reader reader = select_split_cmd.executereader();
- while ( reader.read() )
- {
- ticks.tick();
- Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-
- capability::SplitCap *scap = new capability::SplitCap( refer, reader.getstring(1),
- reader.getstring(2) + "/" + reader.getstring(3) );
- zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(4));
- data::RecordId rid = reader.getint64(5);
- nvras[rid].second[deptype].insert( capfactory.fromImpl( capability::CapabilityImpl::Ptr(scap) ) );
- }
- }
-
- {
- debug::Measure mnf("read other capabilities");
- select_other_cmd.bind(":repo_id", repo_id);
- sqlite3_reader reader = select_other_cmd.executereader();
- while ( reader.read() )
- {
- ticks.tick();
- //select oc.refers_kind, oc.value, oc.dependency_type, oc.resolvable_id from other_capabilities oc;
-
- Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
- capability::CapabilityImpl::Ptr cap = capability::parse( refer, reader.getstring(1));
-
- if ( !cap )
- {
- ERR << "Invalid capability " << reader.getstring(1) << endl;
- }
-
- zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(2));
- data::RecordId rid = reader.getint64(3);
- nvras[rid].second[deptype].insert( capfactory.fromImpl(cap) );
- }
- }
-
- MIL << nvras.size() << " capabilities" << endl;
-}
-
/////////////////////////////////////////////////////////////////
-} // namespace plaindir
+} // namespace cached
///////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
-} // namespace repository
+} // namespace repo
///////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
} // namespace zypp
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/RepoImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/RepoImpl.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/RepoImpl.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/repo/cached/RepoImpl.h Mon Jan 21 18:03:03 2008
@@ -20,10 +20,9 @@
#include "zypp/data/RecordId.h"
#include "zypp/repo/RepositoryImpl.h"
#include "zypp/ResStore.h"
-#include "zypp/cache/sqlite3x/sqlite3x.hpp"
+#include "zypp/RepoInfo.h"
#include "zypp/cache/CacheTypes.h"
#include "zypp/cache/ResolvableQuery.h"
-#include "zypp/RepoInfo.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -77,14 +76,9 @@
cache::ResolvableQuery resolvableQuery();
private:
- void read_capabilities( sqlite3x::sqlite3_connection &con,
- data::RecordId repo_id,
- std::map > &nvras,
- ProgressData &ticks );
cache::CacheTypes _type_cache;
cache::ResolvableQuery _rquery;
RepoOptions _options;
- public:
};
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capabilities.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capabilities.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capabilities.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capabilities.cc Mon Jan 21 18:03:03 2008
@@ -12,67 +12,61 @@
#include <iostream>
#include "zypp/base/LogTools.h"
-#include "zypp/sat/Capabilities.h"
+#include "zypp/Capabilities.h"
using std::endl;
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////
- namespace sat
- { /////////////////////////////////////////////////////////////////
-
- Capabilities:: Capabilities( const detail::IdType * base_r, detail::IdType skip_r )
- : _begin( base_r )
- {
- if ( ! _begin )
- return;
- if ( skip_r )
+ Capabilities:: Capabilities( const sat::detail::IdType * base_r, sat::detail::IdType skip_r )
+ : _begin( base_r )
+ {
+ if ( ! _begin )
+ return;
+
+ if ( skip_r )
+ {
+ for ( const sat::detail::IdType * end = _begin; *end; ++end )
{
- for ( const detail::IdType * end = _begin; *end; ++end )
- {
- if ( *end == skip_r )
- {
- _begin = end+1;
- return;
- }
+ if ( *end == skip_r )
+ {
+ _begin = end+1;
+ return;
}
}
- // skipp all ==> empty
- _begin = 0;
}
+ // skipp all ==> empty
+ _begin = 0;
+ }
- Capabilities::size_type Capabilities::size() const
+ Capabilities::size_type Capabilities::size() const
+ {
+ if ( ! _begin )
+ return 0;
+
+ // jump over satsolvers internal ids.
+ Capabilities::size_type ret = 0;
+ for ( const sat::detail::IdType * end = _begin; *end; ++end )
{
- if ( ! _begin )
- return 0;
-
- // jump over satsolvers internal ids.
- Capabilities::size_type ret = 0;
- for ( const detail::IdType * end = _begin; *end; ++end )
- {
- if ( ! detail::isDepMarkerId( *end ) )
- ++ret;
- }
- return ret;
+ if ( ! sat::detail::isDepMarkerId( *end ) )
+ ++ret;
}
+ return ret;
+ }
- /******************************************************************
- **
- ** FUNCTION NAME : operator<<
- ** FUNCTION TYPE : std::ostream &
- */
- std::ostream & operator<<( std::ostream & str, const Capabilities & obj )
- {
- return dumpRange( str << "(" << obj.size() << ")", obj.begin(), obj.end() );
- }
+ /******************************************************************
+ **
+ ** FUNCTION NAME : operator<<
+ ** FUNCTION TYPE : std::ostream &
+ */
+ std::ostream & operator<<( std::ostream & str, const Capabilities & obj )
+ {
+ return dumpRange( str << "(" << obj.size() << ")", obj.begin(), obj.end() );
+ }
- /////////////////////////////////////////////////////////////////
- } // namespace sat
- ///////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capabilities.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capabilities.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capabilities.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capabilities.h Mon Jan 21 18:03:03 2008
@@ -15,135 +15,129 @@
#include <iosfwd>
#include "zypp/sat/detail/PoolMember.h"
-#include "zypp/sat/Capability.h"
+#include "zypp/Capability.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////
- namespace sat
- { /////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////
- //
- // CLASS NAME : Capabilities
- //
- /** Container of \ref Capability (currently read only).
- *
- * \note satsolver dependency lists may include internal ids
- * which must be skipped on iteration or size calculation
- * (\see \ref detail::isDepMarkerId).
- */
- class Capabilities
- {
- public:
- typedef Capability value_type;
- typedef unsigned size_type;
-
- enum Mode { SKIP_TO_INTERNAL };
-
- public:
- /** Default ctor */
- Capabilities()
- : _begin( 0 )
- {}
-
- /** Ctor from Id pointer (friend \ref Solvable). */
- explicit
- Capabilities( const detail::IdType * base_r )
- : _begin( base_r )
- {}
-
- /** Ctor from Id pointer (friend \ref Solvable).
- * Jump behind skip_r (e.g. behind prereqMarker).
- */
- Capabilities( const detail::IdType * base_r, detail::IdType skip_r );
-
- public:
- /** Whether the container is empty. */
- bool empty() const
- { return ! ( _begin && *_begin ); }
-
- /** Number of capabilities inside. */
- size_type size() const;
-
- public:
- class const_iterator;
-
- /** Iterator pointing to the first \ref Capability. */
- const_iterator begin() const;
-
- /** Iterator pointing bhind the last \ref Capability. */
- const_iterator end() const;
-
- private:
- const detail::IdType * _begin;
- };
- ///////////////////////////////////////////////////////////////////
-
- /** \relates Capabilities Stream output */
- std::ostream & operator<<( std::ostream & str, const Capabilities & obj );
-
- ///////////////////////////////////////////////////////////////////
- //
- // CLASS NAME : Capabilities::const_iterator
- //
- /** \ref Capabilities iterator.
- */
- class Capabilities::const_iterator : public boost::iterator_adaptor<
- const_iterator // Derived
- , const detail::IdType * // Base
- , const Capability // Value
- , boost::forward_traversal_tag // CategoryOrTraversal
- , const Capability & // Reference
- >
- {
- public:
- const_iterator()
- : const_iterator::iterator_adaptor_( 0 )
- {}
-
- explicit const_iterator( const detail::IdType * _idx )
- : const_iterator::iterator_adaptor_( _idx )
- { assignVal(); }
-
- private:
- friend class boost::iterator_core_access;
-
- reference dereference() const
- { return _val; }
-
- template
- bool equal( const boost::iterator_adaptor & rhs ) const
- { // NULL pointer is eqal pointer to Id 0
- return ( base() == rhs.base() // includes both NULL...
- || ( !rhs.base() && !*base() )
- || ( !base() && !*rhs.base() ) );
- }
-
- void increment()
- { // jump over satsolvers internal ids.
- if ( detail::isDepMarkerId( *(++base_reference()) ) ) ++base_reference();
- assignVal();
- }
-
- private:
- void assignVal()
- { _val = ( base() ) ? Capability( *base() ) : Capability::Null; }
-
- mutable Capability _val;
- };
- ///////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : Capabilities
+ //
+ /** Container of \ref Capability (currently read only).
+ *
+ * \note satsolver dependency lists may include internal ids
+ * which must be skipped on iteration or size calculation
+ * (\see \ref detail::isDepMarkerId).
+ */
+ class Capabilities
+ {
+ public:
+ typedef Capability value_type;
+ typedef unsigned size_type;
+
+ enum Mode { SKIP_TO_INTERNAL };
+
+ public:
+ /** Default ctor */
+ Capabilities()
+ : _begin( 0 )
+ {}
+
+ /** Ctor from Id pointer (friend \ref Solvable). */
+ explicit
+ Capabilities( const sat::detail::IdType * base_r )
+ : _begin( base_r )
+ {}
+
+ /** Ctor from Id pointer (friend \ref Solvable).
+ * Jump behind skip_r (e.g. behind prereqMarker).
+ */
+ Capabilities( const sat::detail::IdType * base_r, sat::detail::IdType skip_r );
+
+ public:
+ /** Whether the container is empty. */
+ bool empty() const
+ { return ! ( _begin && *_begin ); }
+
+ /** Number of capabilities inside. */
+ size_type size() const;
+
+ public:
+ class const_iterator;
+
+ /** Iterator pointing to the first \ref Capability. */
+ const_iterator begin() const;
+
+ /** Iterator pointing bhind the last \ref Capability. */
+ const_iterator end() const;
+
+ private:
+ const sat::detail::IdType * _begin;
+ };
+ ///////////////////////////////////////////////////////////////////
- inline Capabilities::const_iterator Capabilities::begin() const
- { return const_iterator( _begin ); }
+ /** \relates Capabilities Stream output */
+ std::ostream & operator<<( std::ostream & str, const Capabilities & obj );
- inline Capabilities::const_iterator Capabilities::end() const
- { return const_iterator( 0 ); }
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : Capabilities::const_iterator
+ //
+ /** \ref Capabilities iterator.
+ */
+ class Capabilities::const_iterator : public boost::iterator_adaptor<
+ const_iterator // Derived
+ , const sat::detail::IdType * // Base
+ , const Capability // Value
+ , boost::forward_traversal_tag // CategoryOrTraversal
+ , const Capability & // Reference
+ >
+ {
+ public:
+ const_iterator()
+ : const_iterator::iterator_adaptor_( 0 )
+ {}
+
+ explicit const_iterator( const sat::detail::IdType * _idx )
+ : const_iterator::iterator_adaptor_( _idx )
+ { assignVal(); }
+
+ private:
+ friend class boost::iterator_core_access;
+
+ reference dereference() const
+ { return _val; }
+
+ template
+ bool equal( const boost::iterator_adaptor & rhs ) const
+ { // NULL pointer is eqal pointer to Id 0
+ return ( base() == rhs.base() // includes both NULL...
+ || ( !rhs.base() && !*base() )
+ || ( !base() && !*rhs.base() ) );
+ }
+
+ void increment()
+ { // jump over satsolvers internal ids.
+ if ( sat::detail::isDepMarkerId( *(++base_reference()) ) ) ++base_reference();
+ assignVal();
+ }
+
+ private:
+ void assignVal()
+ { _val = ( base() ) ? Capability( *base() ) : Capability::Null; }
- /////////////////////////////////////////////////////////////////
- } // namespace sat
+ mutable Capability _val;
+ };
///////////////////////////////////////////////////////////////////
+
+ inline Capabilities::const_iterator Capabilities::begin() const
+ { return const_iterator( _begin ); }
+
+ inline Capabilities::const_iterator Capabilities::end() const
+ { return const_iterator( 0 ); }
+
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capability.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capability.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capability.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capability.cc Mon Jan 21 18:03:03 2008
@@ -16,11 +16,12 @@
#include "zypp/base/Regex.h"
#include "zypp/base/Gettext.h"
#include "zypp/base/Exception.h"
+
#include "zypp/Rel.h"
#include "zypp/Edition.h"
+#include "zypp/Capability.h"
#include "zypp/sat/detail/PoolImpl.h"
-#include "zypp/sat/Capability.h"
#include "zypp/sat/Pool.h"
using std::endl;
@@ -29,108 +30,182 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
- namespace sat
+ namespace
{ /////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////
- namespace
- { /////////////////////////////////////////////////////////////////
- detail::IdType relFromStr( ::_Pool * pool_r, const std::string & name_r, Rel op_r, const Edition & ed_r, const ResKind & kind_r )
+
+ sat::detail::IdType relFromStr( ::_Pool * pool_r,
+ const std::string & name_r, Rel op_r, const Edition & ed_r, const ResKind & kind_r )
+ {
+ sat::detail::IdType nid( sat::detail::noId );
+ if ( ! kind_r || kind_r == ResKind::package )
{
- detail::IdType nid( detail::noId );
- if ( ! kind_r || kind_r == ResKind::package )
- {
- nid = IdString( name_r ).id();
- }
- else
+ nid = IdString( name_r ).id();
+ }
+ else
+ {
+ // non-packages prefixed by kind
+ nid = IdString( str::form( "%s:%s",
+ kind_r.c_str(),
+ name_r.c_str() ) ).id();
+ }
+
+ if ( op_r != Rel::ANY && ed_r != Edition::noedition )
+ {
+ nid = ::rel2id( pool_r, nid, ed_r.idStr().id(), op_r.bits(), /*create*/true );
+ }
+
+ return nid;
+ }
+
+ sat::detail::IdType relFromStr( ::_Pool * pool_r,
+ const std::string & str_r, const ResKind & kind_r, Capability::CtorFlag flag_r )
+ {
+ // strval_r has at least two words which could make 'op edition'?
+ // improve regex!
+ static const str::regex rx( "(.*[^ \t])([ \t]+)([^ \t]+)([ \t]+)([^ \t]+)" );
+ static str::smatch what;
+
+ std::string name( str_r );
+ Rel op;
+ Edition ed;
+ if ( flag_r == Capability::UNPARSED
+ && str_r.find(' ') != std::string::npos
+ && str::regex_match( str_r, what, rx ) )
+ {
+ try
{
- // non-packages prefixed by kind
- nid = IdString( str::form( "%s:%s",
- kind_r.c_str(),
- name_r.c_str() ) ).id();
+ Rel cop( what[3] );
+ Edition ced( what[5] );
+ name = what[1];
+ op = cop;
+ ed = ced;
}
-
- if ( op_r != Rel::ANY && ed_r != Edition::noedition )
+ catch ( Exception & excpt )
{
-#warning glue edition
- nid = ::rel2id( pool_r, nid, IdString( ed_r.asString() ).id(), op_r.bits(), /*create*/true );
+ // So they don't make valid 'op edition'
+ ZYPP_CAUGHT( excpt );
+ DBG << "Trying named relation for: " << str_r << endl;
}
-
- return nid;
}
+ //else
+ // not a versioned relation
+
+ return relFromStr( pool_r, name, op, ed, kind_r );
+ }
- detail::IdType relFromStr( ::_Pool * pool_r, const std::string & str_r, const ResKind & kind_r )
+ // By now restrict matching to plain 'name [op edition]'
+ struct CapHelp : protected sat::detail::PoolMember
+ {
+ CapHelp( sat::detail::IdType id_r )
+ : _name( id_r )
{
- // strval_r has at least two words which could make 'op edition'?
- // improve regex!
- static const str::regex rx( "(.*[^ \t])([ \t]+)([^ \t]+)([ \t]+)([^ \t]+)" );
- static str::smatch what;
-
- std::string name( str_r );
- Rel op;
- Edition ed;
- if( str_r.find(' ') != std::string::npos
- && str::regex_match( str_r, what, rx ) )
+ if ( ISRELDEP(id_r) )
{
- try
+ ::Reldep * rd = GETRELDEP( myPool().getPool(), id_r );
+ if ( ! Rel::isRel( rd->flags ) || ISRELDEP(rd->name) || ISRELDEP(rd->evr) )
+ _op = Rel::NONE;
+ else
{
- Rel cop( what[3] );
- Edition ced( what[5] );
- name = what[1];
- op = cop;
- ed = ced;
- }
- catch ( Exception & excpt )
- {
- // So they don't make valid 'op edition'
- ZYPP_CAUGHT( excpt );
- DBG << "Trying named relation for: " << str_r << endl;
+ _name = IdString( rd->name );
+ _op = Rel( rd->flags );
+ _ed = Edition( rd->evr );
}
}
- //else
- // not a versioned relation
-
- return relFromStr( pool_r, name, op, ed, kind_r );
}
- /////////////////////////////////////////////////////////////////
- } // namespace
- ///////////////////////////////////////////////////////////////////
-
- const Capability Capability::Null( STRID_NULL );
+ IdString _name;
+ Rel _op;
+ Edition _ed;
+ };
/////////////////////////////////////////////////////////////////
+ } // namespace
+ ///////////////////////////////////////////////////////////////////
- Capability::Capability( const char * str_r, const ResKind & kind_r )
- : _id( relFromStr( myPool().getPool(), str_r, kind_r ) )
- {}
-
- Capability::Capability( const std::string & str_r, const ResKind & kind_r )
- : _id( relFromStr( myPool().getPool(), str_r.c_str(), kind_r ) )
- {}
-
- Capability::Capability( const std::string & name_r, Rel op_r, const Edition & ed_r, const ResKind & kind_r )
- : _id( relFromStr( myPool().getPool(), name_r, op_r, ed_r, kind_r ) )
- {}
-
- const char * Capability::c_str() const
- { return ::dep2str( myPool().getPool(), _id ); }
-
- std::string Capability::string() const
- { return ::dep2str( myPool().getPool(), _id ); }
-
- /******************************************************************
- **
- ** FUNCTION NAME : operator<<
- ** FUNCTION TYPE : std::ostream &
- */
- std::ostream & operator<<( std::ostream & str, const Capability & obj )
- {
- return str << obj.c_str();
- }
+ const Capability Capability::Null( STRID_NULL );
+
+ /////////////////////////////////////////////////////////////////
+
+ Capability::Capability( const char * str_r, const ResKind & prefix_r, CtorFlag flag_r )
+ : _id( relFromStr( myPool().getPool(), str_r, prefix_r, flag_r ) )
+ {}
+
+ Capability::Capability( const std::string & str_r, const ResKind & prefix_r, CtorFlag flag_r )
+ : _id( relFromStr( myPool().getPool(), str_r.c_str(), prefix_r, flag_r ) )
+ {}
+
+ Capability::Capability( const char * str_r, CtorFlag flag_r, const ResKind & prefix_r )
+ : _id( relFromStr( myPool().getPool(), str_r, prefix_r, flag_r ) )
+ {}
+
+ Capability::Capability( const std::string & str_r, CtorFlag flag_r, const ResKind & prefix_r )
+ : _id( relFromStr( myPool().getPool(), str_r, prefix_r, flag_r ) )
+ {}
+
+
+ Capability::Capability( const std::string & name_r, const std::string & op_r, const std::string & ed_r, const ResKind & prefix_r )
+ : _id( relFromStr( myPool().getPool(), name_r, Rel(op_r), Edition(ed_r), prefix_r ) )
+ {}
+
+ Capability::Capability( const std::string & name_r, Rel op_r, const std::string & ed_r, const ResKind & prefix_r )
+ : _id( relFromStr( myPool().getPool(), name_r, op_r, Edition(ed_r), prefix_r ) )
+ {}
+
+ Capability::Capability( const std::string & name_r, Rel op_r, const Edition & ed_r, const ResKind & prefix_r )
+ : _id( relFromStr( myPool().getPool(), name_r, op_r, ed_r, prefix_r ) )
+ {}
+
+ const char * Capability::c_str() const
+ { return ::dep2str( myPool().getPool(), _id ); }
+
+ std::string Capability::string() const
+ { return ::dep2str( myPool().getPool(), _id ); }
+
+ bool Capability::_doMatch( sat::detail::IdType lhs, sat::detail::IdType rhs )
+ {
+#warning MIGRATE TO SAT
+#warning TESTCASE
+ if ( lhs == rhs )
+ return true;
+
+ CapHelp l( lhs );
+ if ( l._op == Rel::NONE )
+ return false;
+
+ CapHelp r( rhs );
+ if ( r._op == Rel::NONE )
+ return false;
+
+ if ( l._name != r._name )
+ return false;
+
+ if ( l._op == Rel::ANY || r._op == Rel::ANY )
+ return true;
+
+ return overlaps( Edition::MatchRange( l._op, l._ed ),
+ Edition::MatchRange( r._op, r._ed ) );
+ }
+
+ bool Capability::isInterestingFileSpec( const char * name_r )
+ {
+ static str::smatch what;
+ static const str::regex filenameRegex(
+ "/(s?bin|lib(64)?|etc)/|^/usr/(games/|share/(dict/words|magic\\.mime)$)|^/opt/gnome/games/",
+ str::regex::optimize|str::regex::nosubs );
+
+ return str::regex_match( name_r, what, filenameRegex );
+ }
+
+ /******************************************************************
+ **
+ ** FUNCTION NAME : operator<<
+ ** FUNCTION TYPE : std::ostream &
+ */
+ std::ostream & operator<<( std::ostream & str, const Capability & obj )
+ {
+ return str << obj.c_str();
+ }
- /////////////////////////////////////////////////////////////////
- } // namespace sat
- ///////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capability.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capability.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capability.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/Capability.h Mon Jan 21 18:03:03 2008
@@ -9,113 +9,194 @@
/** \file zypp/sat/Capability.h
*
*/
-#ifndef ZYPP_SAT_IDREL_H
-#define ZYPP_SAT_IDREL_H
+#ifndef ZYPP_SAT_CAPABILITY_H
+#define ZYPP_SAT_CAPABILITY_H
#include <iosfwd>
-#include <string>
+#include <set>
#include "zypp/base/SafeBool.h"
+#include "zypp/base/Deprecated.h"
#include "zypp/sat/detail/PoolMember.h"
#include "zypp/IdString.h"
#include "zypp/ResTraits.h"
+#include "zypp/CapMatch.h"
+
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
class Rel;
class Edition;
+ class Capability;
- ///////////////////////////////////////////////////////////////////
- namespace sat
- { /////////////////////////////////////////////////////////////////
+ typedef std::set<Capability> CapabilitySet;
- ///////////////////////////////////////////////////////////////////
- //
- // CLASS NAME : Capability
- //
- /** A sat capability.
- *
- * If a certain \ref ResKind is specified upon construction, the
- * capabilities name part is prefixed accordingly:
- * \code
- * Capability( "foo" ) ==> 'foo'
- * Capability( "foo", ResKind::package ) ==> 'foo'
- * Capability( "foo", ResKind::pattern ) ==> 'pattern:foo'
- * Capability( "pattern:foo" ) ==> 'pattern:foo'
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : Capability
+ //
+ /** A sat capability.
+ *
+ * If a certain \ref ResKind is specified upon construction, the
+ * capabilities name part is prefixed accordingly:
+ * \code
+ * Capability( "foo" ) ==> 'foo'
+ * Capability( "foo", ResKind::package ) ==> 'foo'
+ * Capability( "foo", ResKind::pattern ) ==> 'pattern:foo'
+ * Capability( "pattern:foo" ) ==> 'pattern:foo'
* // avoid this:
- * Capability( "pattern:foo", ResKind::pattern ) ==> 'pattern:pattern:foo'
- * \endcode
- *
- */
- class Capability: protected detail::PoolMember,
- private base::SafeBool<Capability>
- {
- public:
- /** Default ctor, no capability. */
- Capability() : _id( Null.id() ) {}
-
- /** Ctor from id. */
- explicit Capability( detail::IdType id_r ) : _id( id_r ) {}
-
- /** Ctor from string. */
- explicit Capability( const char * str_r, const ResKind & prefix_r = ResKind() );
-
- /** Ctor from string. */
- explicit Capability( const std::string & str_r, const ResKind & prefix_r = ResKind() );
-
- /** Ctor from <tt>name op edition</tt>. */
- Capability( const std::string & name_r, Rel op_r, const Edition & ed_r, const ResKind & prefix_r = ResKind() );
-
- /** Evaluate in a boolean context (\c != \c Null). */
- using base::SafeBool<Capability>::operator bool_type;
-
- public:
- /** No or Null \ref Capability. */
- static const Capability Null;
-
- public:
- /** Conversion to <tt>const char *</tt> */
- const char * c_str() const;
-
- /** Conversion to <tt>std::string</tt> */
- std::string string() const;
-
- /** \overload */
- std::string asString() const
- { return string(); }
-
- public:
- /** Expert backdoor. */
- detail::IdType id() const
- { return _id; }
- private:
- friend base::SafeBool<Capability>::operator bool_type() const;
- bool boolTest() const { return _id; }
- private:
- detail::IdType _id;
- };
- ///////////////////////////////////////////////////////////////////
-
- /** \relates Capability Stream output */
- std::ostream & operator<<( std::ostream & str, const Capability & obj );
-
- /** \relates Capability */
- inline bool operator==( const Capability & lhs, const Capability & rhs )
- { return lhs.id() == rhs.id(); }
-
- /** \relates Capability */
- inline bool operator!=( const Capability & lhs, const Capability & rhs )
- { return lhs.id() != rhs.id(); }
+ * Capability( "pattern:foo", ResKind::pattern ) ==> 'pattern:pattern:foo'
+ * \endcode
+ *
+ */
+ class Capability: protected sat::detail::PoolMember,
+ private base::SafeBool<Capability>
+ {
+ public:
+ // legacy
+ ZYPP_DEPRECATED std::string index() const { return std::string(); }
+
+ public:
+ enum CtorFlag { PARSED, UNPARSED };
+
+ public:
+ /** Default ctor, \ref Empty capability. */
+ Capability() : _id( sat::detail::emptyId ) {}
+
+ /** Ctor from id. */
+ explicit Capability( sat::detail::IdType id_r ) : _id( id_r ) {}
+
+ /** Ctor from string.
+ * \a str_r is parsed to check whether it contains an <tt>[op edition]</tt> part,
+ * unless the \ref PARSED flag is passed to the ctor.
+ */
+ explicit Capability( const char * str_r, const ResKind & prefix_r = ResKind(), CtorFlag flag_r = UNPARSED );
+ /** \overload */
+ explicit Capability( const std::string & str_r, const ResKind & prefix_r = ResKind(), CtorFlag flag_r = UNPARSED );
+ /** \overload Convenience for parsed (name only) packages. */
+ Capability( const char * str_r, CtorFlag flag_r, const ResKind & prefix_r = ResKind() );
+ /** \overload */
+ Capability( const std::string & str_r, CtorFlag flag_r, const ResKind & prefix_r = ResKind() );
+
+ /** Ctor from <tt>name op edition</tt>. */
+ Capability( const std::string & name_r, const std::string & op_r, const std::string & ed_r, const ResKind & prefix_r = ResKind() );
+ /** \overload */
+ Capability( const std::string & name_r, Rel op_r, const std::string & ed_r, const ResKind & prefix_r = ResKind() );
+ /** \overload */
+ Capability( const std::string & name_r, Rel op_r, const Edition & ed_r, const ResKind & prefix_r = ResKind() );
+
+ public:
+ /** No or Null \ref Capability ( Id \c 0 ). */
+ static const Capability Null;
+
+ /** Empty Capability. */
+ static const Capability Empty;
+
+ public:
+ /** Evaluate in a boolean context <tt>( ! empty() )</tt>. */
+ using base::SafeBool<Capability>::operator bool_type;
+
+ /** Whether the \ref Capability is empty.
+ * This is true for \ref Null and \ref Empty.
+ */
+ bool empty() const
+ { return( _id == sat::detail::emptyId || _id == sat::detail::noId ); }
+
+ public:
+ /** Conversion to <tt>const char *</tt> */
+ const char * c_str() const;
+
+ /** Conversion to <tt>std::string</tt> */
+ std::string string() const;
+
+ /** \overload */
+ std::string asString() const
+ { return string(); }
+
+ public:
+ /** \name Match two Capabilities
+ * \todo check whether we must promote string to Capability in order to match.
+ */
+ //@{
+ static bool matches( const Capability & lhs, const Capability & rhs ) { return _doMatch( lhs.id(), rhs.id() ); }
+ static bool matches( const Capability & lhs, const IdString & rhs ) { return _doMatch( lhs.id(), rhs.id() ); }
+ static bool matches( const Capability & lhs, const std::string & rhs ) { return _doMatch( lhs.id(), Capability(rhs).id() ); }
+ static bool matches( const Capability & lhs, const char * rhs ) { return _doMatch( lhs.id(), Capability(rhs).id() );}
+
+ static bool matches( const IdString & lhs, const Capability & rhs ) { return _doMatch( lhs.id(), rhs.id() ); }
+ static bool matches( const IdString & lhs, const IdString & rhs ) { return _doMatch( lhs.id(), rhs.id() ); }
+ static bool matches( const IdString & lhs, const std::string & rhs ) { return _doMatch( lhs.id(), Capability(rhs).id() ); }
+ static bool matches( const IdString & lhs, const char * rhs ) { return _doMatch( lhs.id(), Capability(rhs).id() ); }
+
+ static bool matches( const std::string & lhs, const Capability & rhs ) { return _doMatch( Capability(lhs).id(), rhs.id() );}
+ static bool matches( const std::string & lhs, const IdString & rhs ) { return _doMatch( Capability(lhs).id(), rhs.id() ); }
+ static bool matches( const std::string & lhs, const std::string & rhs ) { return _doMatch( Capability(lhs).id(), Capability(rhs).id() ); }
+ static bool matches( const std::string & lhs, const char * rhs ) { return _doMatch( Capability(lhs).id(), Capability(rhs).id() ); }
+
+ static bool matches( const char * lhs, const Capability & rhs ) { return _doMatch( Capability(lhs).id(), rhs.id() );}
+ static bool matches( const char * lhs, const IdString & rhs ) { return _doMatch( Capability(lhs).id(), rhs.id() ); }
+ static bool matches( const char * lhs, const std::string & rhs ) { return _doMatch( Capability(lhs).id(), Capability(rhs).id() ); }
+ static bool matches( const char * lhs, const char * rhs ) { return _doMatch( Capability(lhs).id(), Capability(rhs).id() ); }
+
+ bool matches( const Capability & rhs ) const { return _doMatch( id(), rhs.id() ); }
+ bool matches( const IdString & rhs ) const { return _doMatch( id(), rhs.id() ); }
+ bool matches( const std::string & rhs ) const { return _doMatch( id(), Capability(rhs).id() ); }
+ bool matches( const char * rhs ) const { return _doMatch( id(), Capability(rhs).id() ); }
+ //@}
+
+ /** \ref matches functor.
+ */
+ struct Matches: public std::binary_function
+ {
+ bool operator()( const Capability & lhs, const Capability & rhs ) const
+ { return Capability::matches( lhs, rhs ); }
+ };
+
+ public:
+ /** Test for a filename that is likely being REQUIRED.
+ * Files below \c /bin , \c /sbin , \c /lib etc. Scanning a
+ * packages filelist, an \e interesting filename might be worth
+ * being remembered in PROVIDES.
+ */
+ static bool isInterestingFileSpec( const IdString & name_r ) { return isInterestingFileSpec( name_r.c_str() ); }
+ static bool isInterestingFileSpec( const std::string & name_r ) { return isInterestingFileSpec( name_r.c_str() ); }
+ static bool isInterestingFileSpec( const char * name_r );
+
+ public:
+ /** Expert backdoor. */
+ sat::detail::IdType id() const
+ { return _id; }
+ private:
+ /** Match two Capabilities */
+ static bool _doMatch( sat::detail::IdType lhs, sat::detail::IdType rhs );
+ private:
+ friend base::SafeBool<Capability>::operator bool_type() const;
+ bool boolTest() const { return ! empty(); }
+ private:
+ sat::detail::IdType _id;
+ };
+ ///////////////////////////////////////////////////////////////////
+ /** \relates Capability Stream output */
+ std::ostream & operator<<( std::ostream & str, const Capability & obj );
+
+ /** \relates Capability */
+ inline bool operator==( const Capability & lhs, const Capability & rhs )
+ { return lhs.id() == rhs.id(); }
+
+ /** \relates Capability */
+ inline bool operator!=( const Capability & lhs, const Capability & rhs )
+ { return lhs.id() != rhs.id(); }
+
+ /** \relates Capability Arbitrary order. */
+ inline bool operator<( const Capability & lhs, const Capability & rhs )
+ { return lhs.id() < rhs.id(); }
- /////////////////////////////////////////////////////////////////
- } // namespace sat
- ///////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
-#endif // ZYPP_SAT_IDREL_H
+#endif // ZYPP_SAT_CAPABILITY_H
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/IdString.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/IdString.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/IdString.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/IdString.cc Mon Jan 21 18:03:03 2008
@@ -23,13 +23,8 @@
namespace zypp
{ /////////////////////////////////////////////////////////////////
- // MPL checks for satlib constants we explicity use in
- // the header file.
- BOOST_MPL_ASSERT_RELATION( 0, ==, STRID_NULL );
- BOOST_MPL_ASSERT_RELATION( 1, ==, STRID_EMPTY );
-
- const IdString IdString::Null ( STRID_NULL );
- const IdString IdString::Empty( STRID_EMPTY );
+ const IdString IdString::Null ( sat::detail::noId );
+ const IdString IdString::Empty( sat::detail::emptyId );
/////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/IdString.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/IdString.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/IdString.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/IdString.h Mon Jan 21 18:03:03 2008
@@ -40,7 +40,7 @@
{
public:
/** Default ctor, empty string. */
- IdString() : _id( 1 ) {}
+ IdString() : _id( sat::detail::emptyId ) {}
/** Ctor from id. */
explicit IdString( sat::detail::IdType id_r ) : _id( id_r ) {}
@@ -66,7 +66,7 @@
* This is true for \ref Null and \ref Empty.
*/
bool empty() const
- { return( _id == 1 || _id == 0 ); }
+ { return( _id == sat::detail::emptyId || _id == sat::detail::noId ); }
/** The strings size. */
unsigned size() const;
@@ -76,10 +76,6 @@
const char * c_str() const;
/** Conversion to <tt>std::string</tt> */
- std::string string() const
- { return c_str(); }
-
- /** \overload */
std::string asString() const
{ return c_str(); }
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/IdStringType.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/IdStringType.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/IdStringType.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/IdStringType.h Mon Jan 21 18:03:03 2008
@@ -100,7 +100,6 @@
bool empty() const { return idStr().empty(); }
unsigned size() const { return idStr().size(); }
const char * c_str() const { return idStr().c_str(); }
- std::string string() const { return idStr().string(); }
std::string asString() const { return idStr().asString(); }
public:
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/SATResolver.cc Mon Jan 21 18:03:03 2008
@@ -21,7 +21,7 @@
#include "zypp/solver/detail/Helper.h"
#include "zypp/base/String.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
#include "zypp/ResStatus.h"
#include "zypp/base/Logger.h"
#include "zypp/base/String.h"
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.cc Mon Jan 21 18:03:03 2008
@@ -106,8 +106,7 @@
case 'm': OUTS( atom, 4 ); break;
case 'p': OUTS( srcpackage, 10 ); break;
case 's': OUTS( message, 7 ); break;
- case 't': OUTS( pattern, 7 );
- OUTS( system, 6 ); break;
+ case 't': OUTS( pattern, 7 ); break;
#undef OUTS
}
}
@@ -188,7 +187,7 @@
{
if ( ! obj )
return str << "sat::solvable()";
-
+#warning SWITCH TO IDENT INSTEAD OF KIND:NAME after tests
return str << "sat::solvable(" << obj.id() << "|"
<< obj.kind() << ':' << obj.name() << '-' << obj.edition() << '.' << obj.arch() << "){"
<< obj.repo().name() << "}";
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/Solvable.h Mon Jan 21 18:03:03 2008
@@ -17,14 +17,14 @@
#include "zypp/base/SafeBool.h"
#include "zypp/sat/detail/PoolMember.h"
-#include "zypp/sat/Capabilities.h"
-#include "zypp/sat/Capability.h"
#include "zypp/ResTraits.h"
#include "zypp/IdString.h"
#include "zypp/Edition.h"
#include "zypp/Arch.h"
#include "zypp/Dep.h"
+#include "zypp/Capabilities.h"
+#include "zypp/Capability.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -77,6 +77,10 @@
Repo repo() const;
public:
+ /** The identifier.
+ * This is the solvables \ref name, \b except for packages and
+ * source packes, prefixed by it's \ref kind.
+ */
IdString ident() const;
ResKind kind() const;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/detail/PoolImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/detail/PoolImpl.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/detail/PoolImpl.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/detail/PoolImpl.cc Mon Jan 21 18:03:03 2008
@@ -33,6 +33,9 @@
{ /////////////////////////////////////////////////////////////////
// MPL checks for satlib constants we redefine:
+ BOOST_MPL_ASSERT_RELATION( noId, ==, STRID_NULL );
+ BOOST_MPL_ASSERT_RELATION( emptyId, ==, STRID_EMPTY );
+
BOOST_MPL_ASSERT_RELATION( solvablePrereqMarker, ==, SOLVABLE_PREREQMARKER );
BOOST_MPL_ASSERT_RELATION( solvableFileMarker, ==, SOLVABLE_FILEMARKER );
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/sat/detail/PoolMember.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/sat/detail/PoolMember.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/sat/detail/PoolMember.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/sat/detail/PoolMember.h Mon Jan 21 18:03:03 2008
@@ -26,13 +26,13 @@
{ /////////////////////////////////////////////////////////////////
class IdString;
+ class Capability;
+ class Capabilities;
///////////////////////////////////////////////////////////////////
namespace sat
{ /////////////////////////////////////////////////////////////////
- class Capability;
- class Capabilities;
class Solvable;
class Repo;
class Pool;
@@ -70,6 +70,7 @@
/** Generic Id type. */
typedef int IdType;
static const IdType noId( 0 );
+ static const IdType emptyId( 1 );
/** Internal ids satlib includes in dependencies. */
static const IdType solvablePrereqMarker( 16 ); // MPL check in PoolImpl.cc
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.cc Mon Jan 21 18:03:03 2008
@@ -23,7 +23,7 @@
#include "zypp/solver/detail/Helper.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
#include "zypp/base/Logger.h"
#include "zypp/base/String.h"
#include "zypp/base/Gettext.h"
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Helper.h Mon Jan 21 18:03:03 2008
@@ -28,7 +28,7 @@
#include "zypp/ResPool.h"
#include "zypp/PoolItem.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
#include "zypp/solver/detail/Types.h"
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.cc Mon Jan 21 18:03:03 2008
@@ -156,8 +156,8 @@
bool
InstallOrder::doesProvide( const Capability requirement, PoolItem_Ref item ) const
{
- CapSet::const_iterator pend = item->dep( Dep::PROVIDES ).end();
- for( CapSet::const_iterator pit = item->dep( Dep::PROVIDES ).begin(); pit != pend; ++pit) {
+ Capabilities::const_iterator pend = item->dep( Dep::PROVIDES ).end();
+ for( Capabilities::const_iterator pit = item->dep( Dep::PROVIDES ).begin(); pit != pend; ++pit) {
if( pit->matches( requirement ) == CapMatch::yes ) {
return item;
}
@@ -227,7 +227,7 @@
_rdfstime++;
// items prereq
- CapSet prq( item->dep(Dep::PREREQUIRES) );
+ Capabilities prq( item->dep(Dep::PREREQUIRES) );
// an installed items prereq (in case they are reqired for uninstall scripts)
NameKindProxy nkp( _pool, item->name(), item->kind() );
if ( ! nkp.installedEmpty() )
@@ -237,7 +237,7 @@
}
// put prerequires first and requires last on list to ensure
// that prerequires are processed first
- for (CapSet::const_iterator it = prq.begin(); it != prq.end(); ++it)
+ for (Capabilities::const_iterator it = prq.begin(); it != prq.end(); ++it)
{
requires.push_back(*it);
}
@@ -246,7 +246,7 @@
// as early as possible. Some stuff depends on it (e.g. registration).
if ( ! isKind<Product>( item.resolvable() ) )
{
- for (CapSet::const_iterator it = item->dep (Dep::REQUIRES).begin(); it != item->dep (Dep::REQUIRES).end(); ++it)
+ for (Capabilities::const_iterator it = item->dep (Dep::REQUIRES).begin(); it != item->dep (Dep::REQUIRES).end(); ++it)
{
requires.push_back(*it);
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/InstallOrder.h Mon Jan 21 18:03:03 2008
@@ -37,7 +37,7 @@
#include "zypp/PoolItem.h"
#include "zypp/ResPool.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
#include "zypp/solver/detail/Types.h"
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemConflict.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemConflict.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemConflict.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemConflict.cc Mon Jan 21 18:03:03 2008
@@ -20,7 +20,7 @@
*/
#include "zypp/CapFactory.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
#include "zypp/CapMatch.h"
#include "zypp/base/Logger.h"
#include "zypp/base/String.h"
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemEstablish.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemEstablish.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemEstablish.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemEstablish.cc Mon Jan 21 18:03:03 2008
@@ -33,7 +33,7 @@
#include "zypp/solver/detail/ResolverInfoNeededBy.h"
#include "zypp/solver/detail/ResolverInfoMisc.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
#include "zypp/base/Logger.h"
#include "zypp/base/String.h"
#include "zypp/base/Gettext.h"
@@ -115,7 +115,7 @@
_item.status().setUndetermined(); // reset any previous establish state
- CapSet freshens = _item->dep(Dep::FRESHENS);
+ Capabilities freshens = _item->dep(Dep::FRESHENS);
_XDEBUG("simple establish of " << _item << " with " << freshens.size() << " freshens");
@@ -125,7 +125,7 @@
/* Loop through all freshen dependencies. If one is satisfied, queue the _item for installation. */
- CapSet::const_iterator iter;
+ Capabilities::const_iterator iter;
for (iter = freshens.begin(); iter != freshens.end(); iter++) {
const Capability cap = *iter;
bool dummy1, dummy2;
@@ -150,9 +150,9 @@
}
else { // installed or no freshens or triggered freshens
- CapSet supplements = _item->dep(Dep::SUPPLEMENTS);
+ Capabilities supplements = _item->dep(Dep::SUPPLEMENTS);
if (supplements.size() != 0) { // if we have supplements, they must _also_ trigger
- CapSet::const_iterator iter;
+ Capabilities::const_iterator iter;
for (iter = supplements.begin(); iter != supplements.end(); iter++) {
const Capability cap = *iter;
bool dummy1, dummy2;
@@ -196,7 +196,7 @@
// 'state modifier' accordingly.
- CapSet requires = _item->dep(Dep::REQUIRES); // check requirements
+ Capabilities requires = _item->dep(Dep::REQUIRES); // check requirements
Capability missing;
bool all_unneeded = true; // check if all are met because of unneeded
for (iter = requires.begin(); iter != requires.end(); iter++) {
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemEstablish.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemEstablish.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemEstablish.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemEstablish.h Mon Jan 21 18:03:03 2008
@@ -28,7 +28,7 @@
#include "zypp/solver/detail/Types.h"
#include "zypp/solver/detail/QueueItem.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
/////////////////////////////////////////////////////////////////////////
namespace zypp
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemInstall.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemInstall.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemInstall.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemInstall.cc Mon Jan 21 18:03:03 2008
@@ -20,7 +20,7 @@
*/
#include "zypp/CapFactory.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
#include "zypp/Package.h"
#include "zypp/base/Logger.h"
#include "zypp/base/String.h"
@@ -429,11 +429,11 @@
/* Construct require items for each of the item's requires that is still unsatisfied. */
- CapSet caps;
+ Capabilities caps;
caps = _item->dep (Dep::REQUIRES);
- for (CapSet::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
+ for (Capabilities::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
const Capability cap = *iter;
_XDEBUG("this requires " << cap);
@@ -451,7 +451,7 @@
caps = _item->dep (Dep::RECOMMENDS);
- for (CapSet::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
+ for (Capabilities::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
const Capability cap = *iter;
_XDEBUG("this recommends " << cap);
@@ -468,7 +468,7 @@
/* Construct conflict items for each of the item's conflicts. */
caps = _item->dep (Dep::CONFLICTS);
- for (CapSet::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
+ for (Capabilities::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
const Capability cap = *iter;
_XDEBUG("this conflicts with '" << cap << "'");
QueueItemConflict_Ptr conflict_item = new QueueItemConflict (pool(), cap, _item );
@@ -482,7 +482,7 @@
caps = _item->dep (Dep::OBSOLETES);
IgnoreMap ignoreMap = context->getIgnoreObsoletes();
- for (CapSet::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
+ for (Capabilities::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
const Capability cap = *iter;
bool found = false;
for (IgnoreMap::iterator it = ignoreMap.begin();
@@ -515,7 +515,7 @@
caps = _item->dep (Dep::PROVIDES);
bool ignored = false;
- for (CapSet::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
+ for (Capabilities::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
const Capability cap = *iter;
/* Construct establish items for each of those which
@@ -556,11 +556,11 @@
for (EstablishMap::iterator firstIt = establish.establishmap.begin(); firstIt != establish.establishmap.end(); ++firstIt) {
bool conflictFound = false;
- CapSet provides = firstIt->second.resolvable()->deps()[Dep::PROVIDES];
+ Capabilities provides = firstIt->second.resolvable()->deps()[Dep::PROVIDES];
// It is useless to establish items which are conflicting with eachother. So they will
// be filtered out. bug 243595
for (EstablishMap::iterator secondIt = firstIt; secondIt != establish.establishmap.end() && !conflictFound; ++secondIt) {
- CapSet conflicts = secondIt->second.resolvable()->deps()[Dep::CONFLICTS];
+ Capabilities conflicts = secondIt->second.resolvable()->deps()[Dep::CONFLICTS];
if (hasMatches (provides,conflicts)) {
conflictFound = true;
_XDEBUG("Do not establish " << firstIt->second << " cause it is conflicting with " << secondIt->second );
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemInstall.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemInstall.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemInstall.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemInstall.h Mon Jan 21 18:03:03 2008
@@ -28,7 +28,7 @@
#include "zypp/solver/detail/Types.h"
#include "zypp/solver/detail/QueueItem.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
/////////////////////////////////////////////////////////////////////////
namespace zypp
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemRequire.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemRequire.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemRequire.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemRequire.cc Mon Jan 21 18:03:03 2008
@@ -23,7 +23,7 @@
#include "zypp/CapFactory.h"
#include "zypp/CapMatch.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
#include "zypp/base/Logger.h"
#include "zypp/base/String.h"
#include "zypp/base/Gettext.h"
@@ -475,11 +475,11 @@
// check if we have a match for a (supplements/enhances) hint
static bool
-hint_match( const CapSet & cset, ResPool pool )
+hint_match( const Capabilities & cset, ResPool pool )
{
HintItem info;
- for (CapSet::const_iterator cit = cset.begin(); cit != cset.end(); ++cit) {
+ for (Capabilities::const_iterator cit = cset.begin(); cit != cset.end(); ++cit) {
Dep dep( Dep::PROVIDES );
invokeOnEach( pool.byCapabilityIndexBegin( cit->index(), dep ),
pool.byCapabilityIndexEnd( cit->index(), dep ),
@@ -604,11 +604,11 @@
if (item.status().staysUninstalled()) {
uninstalled++;
}
- CapSet freshens( item->dep( Dep::FRESHENS ) );
+ Capabilities freshens( item->dep( Dep::FRESHENS ) );
// try to find a match of the locale freshens with one of the requested locales
- for (CapSet::const_iterator cit = freshens.begin(); cit != freshens.end(); ++cit) {
+ for (Capabilities::const_iterator cit = freshens.begin(); cit != freshens.end(); ++cit) {
if (cit->refers() == ResTraits<Language>::kind) {
string loc = cit->index();
MIL << "Look for language fallback " << loc << ":" << item << endl;
@@ -861,8 +861,8 @@
// FIXME: should we also look at conflicts here?
if (explore_uninstall_branch) {
- CapSet requires = upgrade_item->dep (Dep::REQUIRES);
- CapSet::const_iterator iter = requires.begin();
+ Capabilities requires = upgrade_item->dep (Dep::REQUIRES);
+ Capabilities::const_iterator iter = requires.begin();
for (; iter != requires.end(); iter++) {
const Capability req = *iter;
if (! context->requirementIsMet (req, upgrade_item, Dep::REQUIRES)) {
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemUninstall.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemUninstall.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemUninstall.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/QueueItemUninstall.cc Mon Jan 21 18:03:03 2008
@@ -19,7 +19,7 @@
* 02111-1307, USA.
*/
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
#include "zypp/base/Logger.h"
#include "zypp/base/String.h"
#include "zypp/base/Gettext.h"
@@ -353,8 +353,8 @@
// look at the provides of the to-be-uninstalled resolvable and
// check if anyone (installed) needs it
- CapSet provides = _item->dep(Dep::PROVIDES);
- for (CapSet::const_iterator iter = provides.begin(); iter != provides.end() && ! info.cancel_unlink; iter++) {
+ Capabilities provides = _item->dep(Dep::PROVIDES);
+ for (Capabilities::const_iterator iter = provides.begin(); iter != provides.end() && ! info.cancel_unlink; iter++) {
//world()->foreachRequiringPoolItem (*iter, unlink_check_cb, &info);
@@ -414,9 +414,9 @@
// we're uninstalling an installed item
// loop over all its provides and check if any installed item requires
// one of these provides
- CapSet provides = _item->dep(Dep::PROVIDES);
+ Capabilities provides = _item->dep(Dep::PROVIDES);
- for (CapSet::const_iterator iter = provides.begin(); iter != provides.end(); iter++) {
+ for (Capabilities::const_iterator iter = provides.begin(); iter != provides.end(); iter++) {
UninstallProcess info ( pool(), context, _item, _upgraded_to, qil, _remove_only, _soft);
//world()->foreachRequiringPoolItem (*iter, uninstall_process_cb, &info);
@@ -474,8 +474,8 @@
goto finished;
}
- CapSet recomments = _item->dep (Dep::RECOMMENDS);
- for (CapSet::const_iterator iter = recomments.begin(); iter != recomments.end(); iter++) {
+ Capabilities recomments = _item->dep (Dep::RECOMMENDS);
+ for (Capabilities::const_iterator iter = recomments.begin(); iter != recomments.end(); iter++) {
const Capability cap = *iter;
_XDEBUG("this recommends " << cap);
ProvidesItem provides( pool(), qil, true ); // soft
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.cc Mon Jan 21 18:03:03 2008
@@ -23,7 +23,7 @@
#include "zypp/solver/detail/Resolver.h"
#include "zypp/solver/detail/Helper.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
#include "zypp/base/Logger.h"
#include "zypp/base/String.h"
#include "zypp/base/Gettext.h"
@@ -774,14 +774,14 @@
bool operator()( PoolItem_Ref item)
{
- CapSet freshens( item->dep( Dep::FRESHENS ) );
+ Capabilities freshens( item->dep( Dep::FRESHENS ) );
if (!freshens.empty()) {
addToFreshen( item, itemmap );
}
else { // if no freshens, look at supplements
// Also regarding supplements e.g. in order to recognize
// modalias dependencies. Bug #163140
- CapSet supplements( item->dep( Dep::SUPPLEMENTS ) );
+ Capabilities supplements( item->dep( Dep::SUPPLEMENTS ) );
if (!supplements.empty()) {
addToFreshen( item, itemmap );
}
@@ -944,11 +944,11 @@
// adding "external" provides, the the requirements will be ignored
IgnoreMap ignoreRequires = _ignoreRequires;
- ResPool::AdditionalCapSet additionalCapSet = pool().additionaProvide();
- for (ResPool::AdditionalCapSet::const_iterator it = additionalCapSet.begin();
- it != additionalCapSet.end(); it++) {
- CapSet cset = it->second;
- for (CapSet::const_iterator cit = cset.begin(); cit != cset.end(); ++cit) {
+ ResPool::AdditionalCapabilities additionalCapabilities = pool().additionaProvide();
+ for (ResPool::AdditionalCapabilities::const_iterator it = additionalCapabilities.begin();
+ it != additionalCapabilities.end(); it++) {
+ Capabilities cset = it->second;
+ for (Capabilities::const_iterator cit = cset.begin(); cit != cset.end(); ++cit) {
ignoreRequires.insert(make_pair(PoolItem_Ref(), *cit));
}
}
@@ -1012,30 +1012,30 @@
initial_queue->addPoolItemToEstablish (*iter);
}
- for (CapSet::const_iterator iter = _extra_caps.begin(); iter != _extra_caps.end(); iter++) {
+ for (Capabilities::const_iterator iter = _extra_caps.begin(); iter != _extra_caps.end(); iter++) {
initial_queue->addExtraCapability (*iter);
}
// adding "external" requires
- additionalCapSet = pool().additionalRequire();
- for (ResPool::AdditionalCapSet::const_iterator it = additionalCapSet.begin();
- it != additionalCapSet.end(); it++) {
- CapSet cset = it->second;
- for (CapSet::const_iterator cit = cset.begin(); cit != cset.end(); ++cit) {
+ additionalCapabilities = pool().additionalRequire();
+ for (ResPool::AdditionalCapabilities::const_iterator it = additionalCapabilities.begin();
+ it != additionalCapabilities.end(); it++) {
+ Capabilities cset = it->second;
+ for (Capabilities::const_iterator cit = cset.begin(); cit != cset.end(); ++cit) {
initial_queue->addExtraCapability (*cit);
}
}
- for (CapSet::const_iterator iter = _extra_conflicts.begin(); iter != _extra_conflicts.end(); iter++) {
+ for (Capabilities::const_iterator iter = _extra_conflicts.begin(); iter != _extra_conflicts.end(); iter++) {
initial_queue->addExtraConflict (*iter);
}
// adding "external" conflicts
- additionalCapSet = pool().additionaConflict();
- for (ResPool::AdditionalCapSet::const_iterator it = additionalCapSet.begin();
- it != additionalCapSet.end(); it++) {
- CapSet cset = it->second;
- for (CapSet::const_iterator cit = cset.begin(); cit != cset.end(); ++cit) {
+ additionalCapabilities = pool().additionaConflict();
+ for (ResPool::AdditionalCapabilities::const_iterator it = additionalCapabilities.begin();
+ it != additionalCapabilities.end(); it++) {
+ Capabilities cset = it->second;
+ for (Capabilities::const_iterator cit = cset.begin(); cit != cset.end(); ++cit) {
initial_queue->addExtraConflict (*cit);
}
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Resolver.h Mon Jan 21 18:03:03 2008
@@ -42,7 +42,7 @@
#include "zypp/ResolverProblem.h"
#include "zypp/ProblemSolution.h"
#include "zypp/UpgradeStatistics.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
/////////////////////////////////////////////////////////////////////////
@@ -126,8 +126,8 @@
ItemCapKindMap _isInstalledBy;
ItemCapKindMap _installs;
- CapSet _extra_caps;
- CapSet _extra_conflicts;
+ Capabilities _extra_caps;
+ Capabilities _extra_conflicts;
//typedef std::multimap IgnoreMap;
@@ -236,8 +236,8 @@
void addExtraConflict (const Capability & capability);
void removeExtraConflict (const Capability & capability);
- const CapSet extraCapability () { return _extra_caps; }
- const CapSet extraConflicts () { return _extra_conflicts; }
+ const Capabilities extraCapability () { return _extra_caps; }
+ const Capabilities extraConflicts () { return _extra_conflicts; }
void addIgnoreConflict (const PoolItem_Ref item,
const Capability & capability);
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverContext.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverContext.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverContext.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverContext.cc Mon Jan 21 18:03:03 2008
@@ -22,7 +22,7 @@
#include
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
#include "zypp/base/Logger.h"
#include "zypp/base/String.h"
#include "zypp/base/Gettext.h"
@@ -1685,8 +1685,8 @@
bool
ResolverContext::itemIsPossible( PoolItem_Ref item, Capability & failed )
{
- CapSet requires = item->dep (Dep::REQUIRES);
- for (CapSet::iterator iter = requires.begin(); iter != requires.end(); iter++) {
+ Capabilities requires = item->dep (Dep::REQUIRES);
+ for (Capabilities::iterator iter = requires.begin(); iter != requires.end(); iter++) {
if (! requirementIsPossible (*iter)) {
failed = *iter;
return false;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverQueue.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverQueue.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverQueue.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverQueue.cc Mon Jan 21 18:03:03 2008
@@ -31,7 +31,7 @@
#include "zypp/solver/detail/QueueItemRequire.h"
#include "zypp/solver/detail/QueueItemUninstall.h"
#include "zypp/solver/detail/ResolverContext.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
#include "zypp/base/Logger.h"
/////////////////////////////////////////////////////////////////////////
@@ -135,15 +135,15 @@
if (poolItem.status().staysInstalled()
|| poolItem.status().isToBeInstalled()) {
// regarding only items which will on the system after commit
- CapSet requires = poolItem->dep (Dep::REQUIRES);
- for (CapSet::const_iterator iter = requires.begin(); iter != requires.end(); ++iter) {
+ Capabilities requires = poolItem->dep (Dep::REQUIRES);
+ for (Capabilities::const_iterator iter = requires.begin(); iter != requires.end(); ++iter) {
QueueItemRequire_Ptr qitem = new QueueItemRequire (_context->pool(), *iter);
qitem->addPoolItem (poolItem);
addItem (qitem);
}
- CapSet conflicts = poolItem->dep (Dep::CONFLICTS);
- for (CapSet::const_iterator iter = conflicts.begin(); iter != conflicts.end(); ++iter) {
+ Capabilities conflicts = poolItem->dep (Dep::CONFLICTS);
+ for (Capabilities::const_iterator iter = conflicts.begin(); iter != conflicts.end(); ++iter) {
QueueItemConflict_Ptr qitem = new QueueItemConflict (_context->pool(), *iter, poolItem);
addItem (qitem);
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverUpgrade.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverUpgrade.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverUpgrade.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/ResolverUpgrade.cc Mon Jan 21 18:03:03 2008
@@ -35,7 +35,7 @@
/-*/
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
#include "zypp/capability/SplitCap.h"
#include "zypp/base/Logger.h"
@@ -444,8 +444,8 @@
MIL << "installed " << installed << ", candidate " << candidate << endl;
// remember any splitprovides to packages actually installed.
- CapSet caps = candidate->dep (Dep::PROVIDES);
- for (CapSet::iterator cit = caps.begin(); cit != caps.end(); ++cit ) {
+ Capabilities caps = candidate->dep (Dep::PROVIDES);
+ for (Capabilities::iterator cit = caps.begin(); cit != caps.end(); ++cit ) {
if (isKindcapability::SplitCap( *cit ) ) {
capability::CapabilityImpl::SplitInfo splitinfo = capability::CapabilityImpl::getSplitInfo( *cit );
@@ -824,10 +824,10 @@
// Checking if the selected provider depends on language, if yes try to find out the
// correct language package
bool requested_locale_match = false;
- CapSet freshens( guess->dep( Dep::FRESHENS ) );
+ Capabilities freshens( guess->dep( Dep::FRESHENS ) );
// is this a language package ?
- for (CapSet::const_iterator cit = freshens.begin(); cit != freshens.end(); ++cit) {
+ for (Capabilities::const_iterator cit = freshens.begin(); cit != freshens.end(); ++cit) {
if (cit->refers() == ResTraits<Language>::kind) {
requested_locale_match = true;
break;
@@ -856,7 +856,7 @@
// try to find a match of the locale freshens with one of the requested locales
- for (CapSet::const_iterator cit = freshens.begin(); cit != freshens.end(); ++cit) {
+ for (Capabilities::const_iterator cit = freshens.begin(); cit != freshens.end(); ++cit) {
if (cit->refers() == ResTraits<Language>::kind) {
string loc = cit->index();
MIL << "Look for language fallback " << loc << ":" << item << endl;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/SolutionAction.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/SolutionAction.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/SolutionAction.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/SolutionAction.cc Mon Jan 21 18:03:03 2008
@@ -23,7 +23,7 @@
#include "zypp/solver/detail/Resolver.h"
#include "zypp/solver/detail/SolutionAction.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
#include "zypp/base/Logger.h"
#include "zypp/Dependencies.h"
@@ -182,7 +182,7 @@
InjectSolutionAction::execute(Resolver & resolver) const
{
Dependencies dependencies;
- CapSet depList;
+ Capabilities depList;
if (_item != PoolItem_Ref()) {
dependencies = _item.resolvable()->deps();
depList = dependencies[Dep::CONFLICTS];
@@ -190,7 +190,7 @@
switch (_kind) {
case CONFLICTS:
// removing conflict in both resolvables
- for (CapSet::const_iterator iter = depList.begin(); iter != depList.end(); iter++) {
+ for (Capabilities::const_iterator iter = depList.begin(); iter != depList.end(); iter++) {
if (iter->matches (_capability) == CapMatch::yes )
{
resolver.addIgnoreConflict (_item, _capability);
@@ -198,7 +198,7 @@
}
// Obsoletes are conflicts too
depList = dependencies[Dep::OBSOLETES];
- for (CapSet::const_iterator iter = depList.begin(); iter != depList.end(); iter++) {
+ for (Capabilities::const_iterator iter = depList.begin(); iter != depList.end(); iter++) {
if (iter->matches (_capability) == CapMatch::yes )
{
resolver.addIgnoreConflict (_otherItem, _capability);
@@ -207,7 +207,7 @@
dependencies = _otherItem.resolvable()->deps();
depList = dependencies[Dep::CONFLICTS];
- for (CapSet::const_iterator iter = depList.begin(); iter != depList.end(); iter++) {
+ for (Capabilities::const_iterator iter = depList.begin(); iter != depList.end(); iter++) {
if (iter->matches (_capability) == CapMatch::yes )
{
resolver.addIgnoreConflict (_otherItem, _capability);
@@ -215,7 +215,7 @@
}
// Obsoletes are conflicts too
depList = dependencies[Dep::OBSOLETES];
- for (CapSet::const_iterator iter = depList.begin(); iter != depList.end(); iter++) {
+ for (Capabilities::const_iterator iter = depList.begin(); iter != depList.end(); iter++) {
if (iter->matches (_capability) == CapMatch::yes )
{
resolver.addIgnoreConflict (_otherItem, _capability);
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.cc Mon Jan 21 18:03:03 2008
@@ -120,10 +120,10 @@
}
template<>
-std::string helixXML( const CapSet &caps )
+std::string helixXML( const Capabilities &caps )
{
stringstream str;
- CapSet::iterator it = caps.begin();
+ Capabilities::iterator it = caps.begin();
str << endl;
for ( ; it != caps.end(); ++it)
{
@@ -432,13 +432,13 @@
<< " name=\"" << resObject->name() << "\"" << "/>" << endl;
}
-void HelixControl::addDependencies (const CapSet & capRequire, const CapSet & capConflict)
+void HelixControl::addDependencies (const Capabilities & capRequire, const Capabilities & capConflict)
{
- for (CapSet::const_iterator iter = capRequire.begin(); iter != capRequire.end(); iter++) {
+ for (Capabilities::const_iterator iter = capRequire.begin(); iter != capRequire.end(); iter++) {
*file << "kind().asString()) << "\""
<< " name=\"" << iter->asString() << "\"" << "/>" << endl;
}
- for (CapSet::const_iterator iter = capConflict.begin(); iter != capConflict.end(); iter++) {
+ for (Capabilities::const_iterator iter = capConflict.begin(); iter != capConflict.end(); iter++) {
*file << "kind().asString()) << "\""
<< " name=\"" << iter->asString() << "\"" << "/>" << endl;
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/solver/detail/Testcase.h Mon Jan 21 18:03:03 2008
@@ -19,7 +19,7 @@
#include "zypp/base/NonCopyable.h"
#include "zypp/base/PtrTypes.h"
#include "zypp/solver/detail/Resolver.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
#include "zypp/ResPool.h"
/////////////////////////////////////////////////////////////////////////
@@ -46,7 +46,7 @@
std::string helixXML( const Capability &cap );
template<>
-std::string helixXML( const CapSet &caps );
+std::string helixXML( const Capabilities &caps );
template<>
std::string helixXML( const Dependencies &dep );
@@ -105,7 +105,7 @@
void lockResolvable (const ResObject::constPtr &resObject);
void keepResolvable (const ResObject::constPtr &resObject);
void deleteResolvable (const ResObject::constPtr &resObject);
- void addDependencies (const CapSet &capRequire, const CapSet &capConflict);
+ void addDependencies (const Capabilities &capRequire, const Capabilities &capConflict);
std::string filename () { return dumpFile; }
};
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/target/rpm/RpmDb.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/target/rpm/RpmDb.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/target/rpm/RpmDb.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/target/rpm/RpmDb.cc Mon Jan 21 18:03:03 2008
@@ -38,13 +38,10 @@
#include "zypp/target/CommitLog.h"
#include "zypp/target/rpm/librpmDb.h"
-#include "zypp/target/rpm/RpmPackageImpl.h"
#include "zypp/target/rpm/RpmException.h"
-#include "zypp/CapSet.h"
-#include "zypp/CapFactory.h"
+#include "zypp/TmpPath.h"
#include "zypp/KeyRing.h"
#include "zypp/ZYppFactory.h"
-#include "zypp/TmpPath.h"
#ifndef _
#define _(X) X
@@ -1139,7 +1136,9 @@
return empty_list;
}
-inline static void insertCaps( CapSet &capset, capability::CapabilityImplPtrSet ptrset, CapFactory &factory )
+#warning FIX READING RPM DATBASE TO POOL
+#if 0 // obsolete helper
+inline static void insertCaps( Capabilities &capset, capability::CapabilityImplPtrSet ptrset, CapFactory &factory )
{
for ( capability::CapabilityImplPtrSet::const_iterator it = ptrset.begin();
it != ptrset.end();
@@ -1148,6 +1147,7 @@
capset.insert( factory.fromImpl(*it) );
}
}
+#endif
//
// make Package::Ptr from RpmHeader
@@ -1167,7 +1167,8 @@
}
Package::Ptr pptr;
-
+#warning FIX READING RPM DATBASE TO POOL
+#if 0
string name = header->tag_name();
// create dataprovider
@@ -1250,7 +1251,7 @@
ZYPP_CAUGHT( excpt_r );
ERR << "Can't create Package::Ptr" << endl;
}
-
+#endif
return pptr;
}
@@ -1274,7 +1275,6 @@
librpmDb::db_const_iterator iter;
unsigned current = 0;
- CapFactory _f;
Pathname location;
for ( iter.findAll(); *iter; ++iter, ++current, report->progress( (100*current)/expect))
@@ -1301,6 +1301,8 @@
_packages.buildIndex();
DBG << "Found installed packages: " << _packages._list.size() << endl;
+#warning FILEREQUIRES HACK SHOULD BE DONE WHEN WRITING THE RPMDB SOLV FILE
+#if 0
///////////////////////////////////////////////////////////////////
// Evaluate filerequires collected so far
///////////////////////////////////////////////////////////////////
@@ -1317,8 +1319,8 @@
}
pptr->injectProvides(_f.parse(ResTraits<Package>::kind, *it));
}
-
}
+#endif
///////////////////////////////////////////////////////////////////
// Build final packages list
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/target/rpm/RpmHeader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/target/rpm/RpmHeader.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/target/rpm/RpmHeader.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/target/rpm/RpmHeader.cc Mon Jan 21 18:03:03 2008
@@ -18,16 +18,13 @@
#include "zypp/base/Easy.h"
#include "zypp/base/Logger.h"
-#include "zypp/PathInfo.h"
+#include "zypp/base/Exception.h"
#include "zypp/target/rpm/RpmHeader.h"
-#include "zypp/CapFactory.h"
-#include "zypp/Rel.h"
#include "zypp/Package.h"
-#include "zypp/base/Exception.h"
+#include "zypp/PathInfo.h"
-using namespace std;
-using namespace zypp::capability;
+using std::endl;
namespace zypp
{
@@ -78,7 +75,7 @@
// METHOD TYPE : constRpmHeaderPtr
//
RpmHeader::constPtr RpmHeader::readPackage( const Pathname & path_r,
- VERIFICATION verification_r )
+ VERIFICATION verification_r )
{
PathInfo file( path_r );
if ( ! file.isFile() )
@@ -128,16 +125,16 @@
//
//
// METHOD NAME : RpmHeader::dumpOn
-// METHOD TYPE : ostream &
+// METHOD TYPE : std::ostream &
//
// DESCRIPTION :
//
-ostream & RpmHeader::dumpOn( ostream & str ) const
+std::ostream & RpmHeader::dumpOn( std::ostream & str ) const
{
return BinHeader::dumpOn( str ) << '{' << tag_name() << "-"
<< (tag_epoch()==0?"":(tag_epoch()+":"))
<< tag_version()
- << (tag_release().empty()?"":(string("-")+tag_release()))
+ << (tag_release().empty()?"":(std::string("-")+tag_release()))
<< ( isSrc() ? ".src}" : "}");
}
@@ -157,11 +154,11 @@
//
//
// METHOD NAME : RpmHeader::tag_name
-// METHOD TYPE : string
+// METHOD TYPE : std::string
//
// DESCRIPTION :
//
-string RpmHeader::tag_name() const
+std::string RpmHeader::tag_name() const
{
return string_val( RPMTAG_NAME );
}
@@ -170,11 +167,11 @@
//
//
// METHOD NAME : RpmHeader::tag_epoch
-// METHOD TYPE : int
+// METHOD TYPE : Edition::epoch_t
//
// DESCRIPTION :
//
-int RpmHeader::tag_epoch() const
+Edition::epoch_t RpmHeader::tag_epoch() const
{
return int_val ( RPMTAG_EPOCH );
}
@@ -183,11 +180,11 @@
//
//
// METHOD NAME : RpmHeader::tag_version
-// METHOD TYPE : string
+// METHOD TYPE : std::string
//
// DESCRIPTION :
//
-string RpmHeader::tag_version() const
+std::string RpmHeader::tag_version() const
{
return string_val ( RPMTAG_VERSION );
}
@@ -196,11 +193,11 @@
//
//
// METHOD NAME : RpmHeader::tag_release
-// METHOD TYPE : string
+// METHOD TYPE : std::string
//
// DESCRIPTION :
//
-string RpmHeader::tag_release() const
+std::string RpmHeader::tag_release() const
{
return string_val( RPMTAG_RELEASE );
}
@@ -215,29 +212,20 @@
//
Edition RpmHeader::tag_edition () const
{
- try
- {
- return Edition( tag_version(), tag_release(), tag_epoch());
- }
- catch (Exception & excpt_r)
- {
- WAR << "Package " << tag_name() << "has an invalid edition";
- ZYPP_CAUGHT (excpt_r);
- }
- return Edition();
+ return Edition( tag_version(), tag_release(), tag_epoch() );
}
///////////////////////////////////////////////////////////////////
//
//
// METHOD NAME : RpmHeader::tag_arch
-// METHOD TYPE : string
+// METHOD TYPE : Arch
//
// DESCRIPTION :
//
-string RpmHeader::tag_arch() const
+Arch RpmHeader::tag_arch() const
{
- return string_val( RPMTAG_ARCH );
+ return Arch( string_val( RPMTAG_ARCH ) );
}
///////////////////////////////////////////////////////////////////
@@ -265,18 +253,18 @@
{
return int_val( RPMTAG_BUILDTIME );
}
-
+#warning CHECK IF FILE REQUIRES HANDLING IS OBSOLETE
///////////////////////////////////////////////////////////////////
//
//
// METHOD NAME : RpmHeader::PkgRelList_val
-// METHOD TYPE : unsigned
+// METHOD TYPE : CapabilitySet
//
// DESCRIPTION :
//
-CapabilityImplPtrSet RpmHeader::PkgRelList_val( tag tag_r, bool pre, set<string> * freq_r ) const
+CapabilitySet RpmHeader::PkgRelList_val( tag tag_r, bool pre, std::setstd::string * freq_r ) const
{
- CapabilityImplPtrSet ret;
+ CapabilitySet ret;
int_32 kindFlags = 0;
int_32 kindVersion = 0;
@@ -299,19 +287,14 @@
kindFlags = RPMTAG_CONFLICTFLAGS;
kindVersion = RPMTAG_CONFLICTVERSION;
break;
-#ifdef HAVE_RPM_ENHANCES
case RPMTAG_ENHANCESNAME:
kindFlags = RPMTAG_ENHANCESFLAGS;
kindVersion = RPMTAG_ENHANCESVERSION;
break;
-#endif
-#warning NEEDS RPMTAG_SUPPLEMENTSNAME
-#if 0
- case RPMTAG_SUPPLEMENTSNAME:
- kindFlags = RPMTAG_SUPPLEMENTSFLAGS;
- kindVersion = RPMTAG_SUPPLEMENTSVERSION;
+ case RPMTAG_SUGGESTSNAME:
+ kindFlags = RPMTAG_SUGGESTSFLAGS;
+ kindVersion = RPMTAG_SUGGESTSVERSION;
break;
-#endif
default:
INT << "Illegal RPMTAG_dependencyNAME " << tag_r << endl;
return ret;
@@ -332,11 +315,11 @@
for ( unsigned i = 0; i < count; ++i )
{
- string n( names[i] );
+ std::string n( names[i] );
Rel op = Rel::ANY;
int_32 f = flags[i];
- string v = versions[i];
+ std::string v = versions[i];
if ( n[0] == '/' )
{
@@ -374,13 +357,7 @@
{
try
{
- CapabilityImpl::Ptr cap = capability::buildVersioned(
- ResTraits<Package>::kind,
- n,
- op,
- Edition(v)
- );
- ret.insert(cap);
+ ret.insert( Capability( n, op, Edition(v) ) );
}
catch (Exception & excpt_r)
{
@@ -398,11 +375,11 @@
//
//
// METHOD NAME : RpmHeader::tag_provides
-// METHOD TYPE : CapabilityImplPtrSet
+// METHOD TYPE : CapabilitySet
//
// DESCRIPTION :
//
-CapabilityImplPtrSet RpmHeader::tag_provides( set<string> * freq_r ) const
+CapabilitySet RpmHeader::tag_provides( std::setstd::string * freq_r ) const
{
return PkgRelList_val( RPMTAG_PROVIDENAME, false, freq_r );
}
@@ -411,11 +388,11 @@
//
//
// METHOD NAME : RpmHeader::tag_requires
-// METHOD TYPE : CapabilityImplPtrSet
+// METHOD TYPE : CapabilitySet
//
// DESCRIPTION :
//
-CapabilityImplPtrSet RpmHeader::tag_requires( set<string> * freq_r ) const
+CapabilitySet RpmHeader::tag_requires( std::setstd::string * freq_r ) const
{
return PkgRelList_val( RPMTAG_REQUIRENAME, false, freq_r );
}
@@ -424,11 +401,11 @@
//
//
// METHOD NAME : RpmHeader::tag_requires
-// METHOD TYPE : CapabilityImplPtrSet
+// METHOD TYPE : CapabilitySet
//
// DESCRIPTION :
//
-CapabilityImplPtrSet RpmHeader::tag_prerequires( set<string> * freq_r ) const
+CapabilitySet RpmHeader::tag_prerequires( std::setstd::string * freq_r ) const
{
return PkgRelList_val( RPMTAG_REQUIRENAME, true, freq_r );
}
@@ -437,11 +414,11 @@
//
//
// METHOD NAME : RpmHeader::tag_conflicts
-// METHOD TYPE : CapabilityImplPtrSet
+// METHOD TYPE : CapabilitySet
//
// DESCRIPTION :
//
-CapabilityImplPtrSet RpmHeader::tag_conflicts( set<string> * freq_r ) const
+CapabilitySet RpmHeader::tag_conflicts( std::setstd::string * freq_r ) const
{
return PkgRelList_val( RPMTAG_CONFLICTNAME, false, freq_r );
}
@@ -450,11 +427,11 @@
//
//
// METHOD NAME : RpmHeader::tag_obsoletes
-// METHOD TYPE : CapabilityImplPtrSet
+// METHOD TYPE : CapabilitySet
//
// DESCRIPTION :
//
-CapabilityImplPtrSet RpmHeader::tag_obsoletes( set<string> * freq_r ) const
+CapabilitySet RpmHeader::tag_obsoletes( std::setstd::string * freq_r ) const
{
return PkgRelList_val( RPMTAG_OBSOLETENAME, false, freq_r );
}
@@ -463,34 +440,26 @@
//
//
// METHOD NAME : RpmHeader::tag_enhances
-// METHOD TYPE : CapabilityImplPtrSet
+// METHOD TYPE : CapabilitySet
//
// DESCRIPTION :
//
-CapabilityImplPtrSet RpmHeader::tag_enhances( set<string> * freq_r ) const
+CapabilitySet RpmHeader::tag_enhances( std::setstd::string * freq_r ) const
{
-#ifdef HAVE_RPM_ENHANCES
return PkgRelList_val( RPMTAG_ENHANCESNAME, false, freq_r );
-#else
- return CapabilityImplPtrSet();
-#endif
}
///////////////////////////////////////////////////////////////////
//
//
-// METHOD NAME : RpmHeader::tag_supplements
-// METHOD TYPE : CapabilityImplPtrSet
+// METHOD NAME : RpmHeader::tag_suggests
+// METHOD TYPE : CapabilitySet
//
// DESCRIPTION :
//
-CapabilityImplPtrSet RpmHeader::tag_supplements( set<string> * freq_r ) const
+CapabilitySet RpmHeader::tag_suggests( std::setstd::string * freq_r ) const
{
- return CapabilityImplPtrSet();
-#warning NEEDS RPMTAG_SUPPLEMENTSNAME
-#if 0
- return PkgRelList_val( RPMTAG_SUPPLEMENTSNAME, false, freq_r );
-#endif
+ return PkgRelList_val( RPMTAG_SUGGESTSNAME, false, freq_r );
}
///////////////////////////////////////////////////////////////////
@@ -884,7 +853,7 @@
// filter out hardliks ( different name but same device and inode ).
///////////////////////////////////////////////////////////////////
filesystem::DevInoCache trace;
- vectorDiskUsage::Entry entries;
+ std::vectorDiskUsage::Entry entries;
entries.resize( dirnames.size() );
for ( unsigned i = 0; i < dirnames.size(); ++i )
{
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/target/rpm/RpmHeader.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/target/rpm/RpmHeader.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/target/rpm/RpmHeader.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/target/rpm/RpmHeader.h Mon Jan 21 18:03:03 2008
@@ -19,10 +19,8 @@
#include "zypp/Package.h"
#include "zypp/Changelog.h"
-#include "zypp/CapSetFwd.h"
#include "zypp/Pathname.h"
#include "zypp/DiskUsage.h"
-#include "zypp/capability/CapabilityImpl.h"
namespace zypp
@@ -32,20 +30,18 @@
namespace rpm
{
-
-typedef struct
+struct FileInfo
{
- Pathname filename;
- ByteCount size;
+ Pathname filename;
+ ByteCount size;
std::string md5sum;
- uid_t uid;
- gid_t gid;
- mode_t mode;
- time_t mtime;
- bool ghost;
+ uid_t uid;
+ gid_t gid;
+ mode_t mode;
+ time_t mtime;
+ bool ghost;
Pathname link_target;
-}
-FileInfo;
+};
///////////////////////////////////////////////////////////////////
//
@@ -70,7 +66,7 @@
private:
- capability::CapabilityImplPtrSet PkgRelList_val( tag tag_r, bool pre, std::setstd::string * freq_r = 0 ) const;
+ CapabilitySet PkgRelList_val( tag tag_r, bool pre, std::setstd::string * freq_r = 0 ) const;
public:
@@ -91,17 +87,12 @@
public:
- std::string tag_name() const;
- int tag_epoch() const;
- std::string tag_version() const;
- std::string tag_release() const;
- std::string tag_arch() const;
-
- /**
- * return complete edition (from tag_epoch, tag_version, tag_release)
- * returns Edition::noedition if an error occurs
- */
- Edition tag_edition() const;
+ std::string tag_name() const;
+ Edition::epoch_t tag_epoch() const;
+ std::string tag_version() const;
+ std::string tag_release() const;
+ Edition tag_edition() const;
+ Arch tag_arch() const;
Date tag_installtime() const;
Date tag_buildtime() const;
@@ -109,31 +100,41 @@
/**
* If <code>freq_r</code> is not NULL, file dependencies found are inserted.
**/
- capability::CapabilityImplPtrSet tag_provides ( std::setstd::string * freq_r = 0 ) const;
+ CapabilitySet tag_provides ( std::setstd::string * freq_r = 0 ) const;
/**
* @see #tag_provides
**/
- capability::CapabilityImplPtrSet tag_requires ( std::setstd::string * freq_r = 0 ) const;
+ CapabilitySet tag_requires ( std::setstd::string * freq_r = 0 ) const;
/**
* @see #tag_provides
**/
- capability::CapabilityImplPtrSet tag_prerequires ( std::setstd::string * freq_r = 0 ) const;
+ CapabilitySet tag_prerequires ( std::setstd::string * freq_r = 0 ) const;
/**
* @see #tag_provides
**/
- capability::CapabilityImplPtrSet tag_conflicts( std::setstd::string * freq_r = 0 ) const;
+ CapabilitySet tag_conflicts( std::setstd::string * freq_r = 0 ) const;
/**
* @see #tag_provides
**/
- capability::CapabilityImplPtrSet tag_obsoletes( std::setstd::string * freq_r = 0 ) const;
+ CapabilitySet tag_obsoletes( std::setstd::string * freq_r = 0 ) const;
/**
* @see #tag_provides
**/
- capability::CapabilityImplPtrSet tag_enhances( std::setstd::string * freq_r = 0 ) const;
+ CapabilitySet tag_enhances( std::setstd::string * freq_r = 0 ) const;
/**
* @see #tag_provides
**/
- capability::CapabilityImplPtrSet tag_supplements( std::setstd::string * freq_r = 0 ) const;
+ CapabilitySet tag_suggests( std::setstd::string * freq_r = 0 ) const;
+ /** Unsupported by rpm.
+ * @see #tag_provides
+ **/
+ CapabilitySet tag_supplements( std::setstd::string * freq_r = 0 ) const
+ { return CapabilitySet(); }
+ /** Unsupported by rpm.
+ * @see #tag_provides
+ **/
+ CapabilitySet tag_freshens( std::setstd::string * freq_r = 0 ) const
+ { return CapabilitySet(); }
ByteCount tag_size() const;
ByteCount tag_archivesize() const;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/target/store/PersistentStorage.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/target/store/PersistentStorage.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/target/store/PersistentStorage.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/target/store/PersistentStorage.cc Mon Jan 21 18:03:03 2008
@@ -14,7 +14,7 @@
#include "PersistentStorage.h"
#include "Backend.h"
-#include "XMLFilesBackend.h"
+//#include "XMLFilesBackend.h"
using std::endl;
@@ -53,7 +53,7 @@
void PersistentStorage::init(const Pathname &root)
{
- d->backend.reset( new XMLFilesBackend(root) );
+ //d->backend.reset( new XMLFilesBackend(root) );
}
bool PersistentStorage::isInitialized() const
@@ -69,38 +69,40 @@
PersistentStorage::~PersistentStorage()
{}
- ///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////
//
// METHOD NAME : PersistentStorage::~PersistentStorage
// METHOD TYPE : Dtor
//
void PersistentStorage::doTest()
{
- d->backend->doTest();
+// d->backend->doTest();
}
Date
PersistentStorage::timestamp() const
{
- return d->backend->timestamp();
+// return d->backend->timestamp();
+ return Date();
}
void
PersistentStorage::storeObject( ResObject::constPtr resolvable )
{
- d->backend->storeObject(resolvable);
+// d->backend->storeObject(resolvable);
}
void
PersistentStorage::deleteObject( ResObject::constPtr resolvable )
{
- d->backend->deleteObject(resolvable);
+// d->backend->deleteObject(resolvable);
}
std::listResObject::Ptr
PersistentStorage::storedObjects() const
{
- return d->backend->storedObjects();
+// return d->backend->storedObjects();
+ return std::listResObject::Ptr();
}
std::listResObject::Ptr
@@ -108,13 +110,15 @@
{
//listResObject::Ptr::iterator it;
//it = find(nums.begin(), nums.end(), 3); // Search the list.
- return d->backend->storedObjects(kind);
+// return d->backend->storedObjects(kind);
+ return std::listResObject::Ptr();
}
std::listResObject::Ptr
PersistentStorage::storedObjects(const Resolvable::Kind kind, const std::string & name, bool partial_match) const
{
- return d->backend->storedObjects(kind, name, partial_match);
+// return d->backend->storedObjects(kind, name, partial_match);
+ return std::listResObject::Ptr();
}
/////////////////////////////////////////////////////////
@@ -123,19 +127,29 @@
void
PersistentStorage::setObjectFlag( ResObject::constPtr resolvable, const std::string &flag )
-{ d->backend->setObjectFlag(resolvable, flag); }
+{
+// d->backend->setObjectFlag(resolvable, flag);
+}
void
PersistentStorage::removeObjectFlag( ResObject::constPtr resolvable, const std::string &flag )
-{ d->backend->removeObjectFlag(resolvable, flag); }
+{
+// d->backend->removeObjectFlag(resolvable, flag);
+}
std::setstd::string
PersistentStorage::objectFlags( ResObject::constPtr resolvable ) const
-{ return d->backend->objectFlags(resolvable); }
+{
+// return d->backend->objectFlags(resolvable);
+ return std::setstd::string();
+}
bool
PersistentStorage::doesObjectHasFlag( ResObject::constPtr resolvable, const std::string &flag ) const
-{ return d->backend->doesObjectHasFlag(resolvable, flag); }
+{
+// return d->backend->doesObjectHasFlag(resolvable, flag);
+ return false;
+}
/////////////////////////////////////////////////////////
// Named Flags API
@@ -144,25 +158,27 @@
void
PersistentStorage::setFlag( const std::string &key, const std::string &flag )
{
- d->backend->setFlag(key, flag);
+// d->backend->setFlag(key, flag);
}
void
PersistentStorage::removeFlag( const std::string &key, const std::string &flag )
{
- d->backend->removeFlag(key, flag);
+// d->backend->removeFlag(key, flag);
}
std::setstd::string
PersistentStorage::flags( const std::string &key ) const
{
- return d->backend->flags(key);
+// return d->backend->flags(key);
+ return std::setstd::string();
}
bool
PersistentStorage::hasFlag( const std::string &key, const std::string &flag ) const
{
- return d->backend->hasFlag(key, flag);
+// return d->backend->hasFlag(key, flag);
+ return false;
}
/******************************************************************
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.cc Mon Jan 21 18:03:03 2008
@@ -9,6 +9,8 @@
/** \file zypp/target/store/XMLFilesBackend.cc
*
*/
+#warning NEED XMLFilesBackend TO SolvFile fix
+#if 0
#include <iostream>
#include <ctime>
#include <cstdlib>
@@ -22,14 +24,6 @@
#include "zypp/Digest.h"
#include "zypp/ExternalProgram.h"
-#include "zypp/target/store/xml/XMLPatchImpl.h"
-#include "zypp/target/store/xml/XMLMessageImpl.h"
-#include "zypp/target/store/xml/XMLScriptImpl.h"
-#include "zypp/target/store/xml/XMLSelectionImpl.h"
-#include "zypp/target/store/xml/XMLProductImpl.h"
-#include "zypp/target/store/xml/XMLPatternImpl.h"
-#include "zypp/target/store/xml/XMLAtomImpl.h"
-
#include "zypp/parser/xmlstore/XMLProductParser.h"
#include "zypp/parser/xmlstore/XMLPatternParser.h"
#include "zypp/parser/xmlstore/XMLPatchParser.h"
@@ -1350,3 +1344,4 @@
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
+#endif
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/target/store/XMLFilesBackend.h Mon Jan 21 18:03:03 2008
@@ -11,9 +11,10 @@
*/
#ifndef DEVEL_DEVEL_DMACVICAR_XMLFILESBACKEND_H
#define DEVEL_DEVEL_DMACVICAR_XMLFILESBACKEND_H
-
+#if 0
#include <iosfwd>
+#include "zypp/NVR.h"
#include "zypp/Atom.h"
#include "zypp/Message.h"
#include "zypp/Patch.h"
@@ -65,9 +66,9 @@
* initialize the storage backend
*/
virtual void initBackend();
-
+
virtual Date timestamp() const;
-
+
/**
* Stores a Resolvable in the active backend.
*/
@@ -111,20 +112,20 @@
protected:
void writeObjectFlags( ResObject::constPtr resolvable, const std::setstd::string &pflags );
void writeFlags( const std::string &key, const std::setstd::string &pflags );
-
+
void writeFlagsInFile( const std::string &filename, const std::setstd::string &pflags );
std::setstd::string flagsFromFile( const std::string &filename ) const;
-
+
void updateTimestamp() const;
protected:
-
+
/**
* delete a path in the database, only used by deleteObject
* and workarounds
*/
void deleteFileObject( const Pathname &filename ) const;
-
+
/**
* Directory where the xml file is stored (for the given resolvable)
*/
@@ -133,19 +134,19 @@
* Directory where the flags are stored (for the given resolvable)
*/
std::string dirForResolvableFlags( ResObject::constPtr resolvable ) const;
-
+
/**
* Encoded filename for a resolvable NVR. Does not take kind into account.
*/
std::string fileNameForNVR( const zypp::NVR &nvr ) const;
-
+
/**
* Encoded filename for a resolvable. Does not take kind into account.
*/
std::string fileNameForResolvable( ResObject::constPtr resolvable ) const;
/**
* Encoded filename for resolvable flags. Does not take kind into account.
- */
+ */
std::string fullPathForResolvableFlags( ResObject::constPtr resolvable ) const;
/**
* dir for named flags
@@ -184,11 +185,11 @@
Pattern::Ptr createPattern( const zypp::parser::xmlstore::XMLPatternData & parsed ) const;
Atom::Ptr createAtom( const zypp::parser::xmlstore::XMLPatchAtomData & parsed ) const;
Language::Ptr createLanguage( const zypp::parser::xmlstore::XMLLanguageData & parsed ) const;
-
+
Dependencies createDependencies( const zypp::parser::xmlstore::XMLResObjectData & parsed, const Resolvable::Kind my_kind ) const;
-
+
Capability createCapability(const XMLDependency & dep, const Resolvable::Kind & my_kind) const;
-
+
private:
class Private;
Private *d;
@@ -203,4 +204,5 @@
/////////////////////////////////////////////////////////////////
} // namespace devel
///////////////////////////////////////////////////////////////////
+#endif
#endif // DEVEL_DEVEL_DMACVICAR_SQLITEBACKEND_H
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/target/store/serialize.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/target/store/serialize.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/target/store/serialize.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/target/store/serialize.cc Mon Jan 21 18:03:03 2008
@@ -18,13 +18,9 @@
#include
#include "zypp/base/Logger.h"
-#include "zypp/CapFactory.h"
#include "zypp/Url.h"
#include "zypp/ResObject.h"
-#include "zypp/detail/ImplConnect.h"
-#include "zypp/detail/ResObjectImplIf.h"
-#include "zypp/detail/SelectionImplIf.h"
#include "zypp/repo/ScriptProvider.h"
#include "serialize.h"
@@ -125,18 +121,20 @@
template<>
string toXML( const Capability &cap )
{
+#warning FIX WRITING AND READING CAPABILITY (incl old format)
stringstream out;
- CapFactory factory;
+ //CapFactory factory;
+ //out << "" << xml_escape(factory.encode(cap)) << "</capability>" << endl;
+ out << "<capability>" << cap << "</capability>" << endl; // wrong !
- out << "" << xml_escape(factory.encode(cap)) << "</capability>" << endl;
return out.str();
}
template<>
-string toXML( const CapSet &caps )
+string toXML( const Capabilities &caps )
{
stringstream out;
- CapSet::iterator it = caps.begin();
+ Capabilities::const_iterator it = caps.begin();
for ( ; it != caps.end(); ++it)
{
out << toXML((*it));
@@ -190,16 +188,15 @@
string toXML( const ResObject::constPtr &obj )
{
stringstream out;
-
+#warning FIX WRITING AND READING TRANSLATED TEXTS
// access implementation
- detail::ResImplTraitsResObject::Impl::constPtr pipp( detail::ImplConnect::resimpl( obj ) );
- out << translatedTextToXML(pipp->summary(), "summary");
- out << translatedTextToXML(pipp->description(), "description");
-
- out << translatedTextToXML(pipp->insnotify(), "install-notify");
- out << translatedTextToXML(pipp->delnotify(), "delete-notify");
- //out << " <license-to-confirm>" << xml_escape(obj->licenseToConfirm()) << "</license-to-confirm>" << endl;
- out << translatedTextToXML(pipp->licenseToConfirm(), "license-to-confirm");
+ //detail::ResImplTraitsResObject::Impl::constPtr pipp( detail::ImplConnect::resimpl( obj ) );
+ //out << translatedTextToXML(pipp->summary(), "summary");
+ //out << translatedTextToXML(pipp->description(), "description");
+
+ //out << translatedTextToXML(pipp->insnotify(), "install-notify");
+ //out << translatedTextToXML(pipp->delnotify(), "delete-notify");
+ //out << translatedTextToXML(pipp->licenseToConfirm(), "license-to-confirm");
out << " <vendor>" << xml_escape(obj->vendor()) << "</vendor>" << endl;
out << " <size>" << static_castByteCount::SizeType(obj->size()) << "</size>" << endl;
out << " <archive-size>" << static_castByteCount::SizeType(obj->downloadSize()) << "</archive-size>" << endl;
@@ -335,13 +332,14 @@
out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
out << "http://www.novell.com/metadata/zypp/xml-store\" type=\"" << xml_escape(obj->type()) << "\">" << endl;
out << toXML(static_castResolvable::constPtr(obj)) << endl;
- #warning "FIXME description and displayname of products"
+#warning "FIXME description and displayname of products"
out << toXML(static_castResObject::constPtr(obj));
+#warning FIX WRITING AND READING TRANSLATED TEXTS
// access implementation
- detail::ResImplTraitsProduct::Impl::constPtr pipp( detail::ImplConnect::resimpl( obj ) );
- out << translatedTextToXML(pipp->shortName(), "shortname");
+// detail::ResImplTraitsProduct::Impl::constPtr pipp( detail::ImplConnect::resimpl( obj ) );
+// out << translatedTextToXML(pipp->shortName(), "shortname");
out << " <distribution-name>" << xml_escape(obj->distributionName()) << "</distribution-name>" << endl;
out << " <distribution-edition>" << xml_escape(obj->distributionEdition().asString()) << "</distribution-edition>" << endl;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/target/store/serialize.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/target/store/serialize.h?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/target/store/serialize.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/target/store/serialize.h Mon Jan 21 18:03:03 2008
@@ -29,9 +29,6 @@
#include
#include
#include
-#include
-
-#include
#define SERIALIZER_VERSION "2.0"
@@ -45,19 +42,19 @@
template<class T>
std::string toXML( const T &obj ); //undefined
-template<>
+template<>
std::string toXML( const Edition &edition );
-template<>
+template<>
std::string toXML( const Arch &arch );
-template<>
+template<>
std::string toXML( const Capability &cap );
-template<>
-std::string toXML( const CapSet &caps );
+template<>
+std::string toXML( const Capabilities &caps );
-template<>
+template<>
std::string toXML( const Dependencies &dep );
/**
@@ -65,13 +62,13 @@
* NOTE: This wont serialize child classes properties
* Use castedToXML for that.
*/
-template<>
+template<>
std::string toXML( const Resolvable::constPtr &obj );
/**
* Serialize ResObject properties
*/
-template<>
+template<>
std::string toXML( const ResObject::constPtr &obj );
/**
@@ -89,31 +86,31 @@
*/
std::string resolvableKindToString( const Resolvable::Kind &kind, bool plural = false );
-template<>
+template<>
std::string toXML( const Package::constPtr &obj );
-template<>
+template<>
std::string toXML( const Script::constPtr &obj );
-template<>
+template<>
std::string toXML( const Message::constPtr &obj );
-template<>
+template<>
std::string toXML( const Patch::constPtr &obj );
-template<>
+template<>
std::string toXML( const Atom::constPtr &obj );
-template<>
+template<>
std::string toXML( const Pattern::constPtr &obj );
-template<>
+template<>
std::string toXML( const Selection::constPtr &obj );
-template<>
+template<>
std::string toXML( const Product::constPtr &obj );
-template<>
+template<>
std::string toXML( const Language::constPtr &obj );
/////////////////////////////////////////////////////////////////
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ui/PatternExpander.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ui/PatternExpander.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ui/PatternExpander.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ui/PatternExpander.cc Mon Jan 21 18:03:03 2008
@@ -82,9 +82,9 @@
{
if ( ! pat_r->includes().empty() )
{
- for_each( pat_r->includes().begin(),
- pat_r->includes().end(),
- bind( &Impl::expandInclude, this, _1 ) );
+ std::for_each( pat_r->includes().begin(),
+ pat_r->includes().end(),
+ bind( &Impl::expandInclude, this, _1 ) );
}
}
@@ -107,9 +107,9 @@
/** Store all patterns extending \c pat_r in \c _patternMap. */
void expandExtending( const Pattern::constPtr & pat_r )
{
- for_each( _pool.byKindBegin<Pattern>(),
- _pool.byKindEnd<Pattern>(),
- bind( &Impl::expandIfExtends, this, pat_r, _1 ) );
+ std::for_each( _pool.byKindBegin<Pattern>(),
+ _pool.byKindEnd<Pattern>(),
+ bind( &Impl::expandIfExtends, this, pat_r, _1 ) );
}
/** Store \c extending_r if it extends \c pat_r. */
@@ -119,9 +119,9 @@
if ( ! extending->extends().empty() )
{
- if ( find_if( extending->extends().begin(),
- extending->extends().end(),
- bind( &Impl::providedBy, this, pat_r, _1 ) )
+ if ( std::find_if( extending->extends().begin(),
+ extending->extends().end(),
+ bind( &Impl::providedBy, this, pat_r, _1 ) )
!= extending->extends().end() )
{
// an extends matches the Pattern
@@ -135,9 +135,9 @@
bool providedBy( const Pattern::constPtr & pat_r, const Capability & extends_r )
{
std::string index( extends_r.index() );
- return( find_if( _pool.byCapabilityIndexBegin( index, Dep::PROVIDES ),
- _pool.byCapabilityIndexEnd( index, Dep::PROVIDES ),
- bind( &Impl::providedByFilter, this, pat_r, extends_r, _1 ) )
+ return( std::find_if( _pool.byCapabilityIndexBegin( index, Dep::PROVIDES ),
+ _pool.byCapabilityIndexEnd( index, Dep::PROVIDES ),
+ bind( &Impl::providedByFilter, this, pat_r, extends_r, _1 ) )
!= _pool.byCapabilityIndexEnd( index, Dep::PROVIDES ) );
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/ui/UserWantedPackages.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/ui/UserWantedPackages.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/ui/UserWantedPackages.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/ui/UserWantedPackages.cc Mon Jan 21 18:03:03 2008
@@ -178,9 +178,9 @@
if ( obj )
{
- CapSet freshens = obj->dep( Dep::FRESHENS );
+ Capabilities freshens = obj->dep( Dep::FRESHENS );
- for ( CapSet::const_iterator cap_it = freshens.begin();
+ for ( Capabilities::const_iterator cap_it = freshens.begin();
cap_it != freshens.end();
++cap_it )
{
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/zypp_detail/ZYppImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/zypp_detail/ZYppImpl.cc?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/zypp_detail/ZYppImpl.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/zypp_detail/ZYppImpl.cc Mon Jan 21 18:03:03 2008
@@ -19,7 +19,6 @@
#include "zypp/base/String.h"
#include "zypp/zypp_detail/ZYppImpl.h"
-#include "zypp/detail/ResImplTraits.h"
#include "zypp/solver/detail/Helper.h"
#include "zypp/target/TargetImpl.h"
#include "zypp/ZYpp.h"
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org