libzypp
12.16.5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
libzypp
Welcome to libzypp
Code Pitfalls - Frequently made mistakes
Code Snippets
Environment Variables
Testing for provided features.
Notes on revisions
Extending ZYpp: Plugins and Hooks
Services
Solver - Vendor protection
Writing and tunning testcases
Libzypp and threads
User data as transaction id
Todo List
Deprecated List
Modules
Namespaces
Classes
Files
File List
zypp
base
media
misc
parser
pool
repo
sat
solver
detail
Helper.cc
Helper.h
InstallOrder.cc
InstallOrder.h
ProblemSolutionCombi.cc
ProblemSolutionCombi.h
ProblemSolutionIgnore.cc
ProblemSolutionIgnore.h
Resolver.cc
Resolver.h
SATResolver.cc
SATResolver.h
SolutionAction.cc
SolutionAction.h
SolverQueueItem.cc
SolverQueueItem.h
SolverQueueItemDelete.cc
SolverQueueItemDelete.h
SolverQueueItemInstall.cc
SolverQueueItemInstall.h
SolverQueueItemInstallOneOf.cc
SolverQueueItemInstallOneOf.h
SolverQueueItemLock.cc
SolverQueueItemLock.h
SolverQueueItemUpdate.cc
SolverQueueItemUpdate.h
SystemCheck.cc
SystemCheck.h
Testcase.cc
Testcase.h
Types.h
libzypp_solver.h
target
thread
ui
url
ws
zypp_detail
APIConfig.h
Arch.cc
Arch.h
AutoDispose.h
Bit.h
ByteCount.cc
ByteCount.h
Callback.h
Capabilities.cc
Capabilities.h
Capability.cc
Capability.h
CapMatch.cc
CapMatch.h
Changelog.cc
Changelog.h
CheckSum.cc
CheckSum.h
CountryCode.cc
CountryCode.h
Date.cc
Date.h
Dep.cc
Dep.h
Digest.cc
Digest.h
DiskUsage.cc
DiskUsage.h
DiskUsageCounter.cc
DiskUsageCounter.h
DownloadMode.cc
DownloadMode.h
Edition.cc
Edition.h
ExternalProgram.cc
ExternalProgram.h
Fetcher.cc
Fetcher.h
FileChecker.cc
FileChecker.h
Filter.h
Glob.cc
Glob.h
HistoryLog.cc
HistoryLog.h
HistoryLogData.cc
HistoryLogData.h
IdString.cc
IdString.h
IdStringType.h
InstanceId.cc
InstanceId.h
KeyContext.h
KeyRing.cc
KeyRing.h
KVMap.h
LanguageCode.cc
LanguageCode.h
Locale.cc
Locale.h
Locks.cc
Locks.h
ManagedFile.h
MediaProducts.cc
MediaProducts.h
MediaSetAccess.cc
MediaSetAccess.h
Misc.h
OnMediaLocation.cc
OnMediaLocation.h
Package.cc
Package.h
PackageKeyword.h
Patch.cc
Patch.h
PathInfo.cc
PathInfo.h
Pathname.cc
Pathname.h
Pattern.cc
Pattern.h
PluginFrame.cc
PluginFrame.h
PluginFrameException.cc
PluginFrameException.h
PluginScript.cc
PluginScript.h
PluginScriptException.cc
PluginScriptException.h
PoolItem.cc
PoolItem.h
PoolItemBest.cc
PoolItemBest.h
PoolQuery.cc
PoolQuery.h
PoolQueryResult.cc
PoolQueryResult.h
PoolQueryUtil.tcc
ProblemSolution.cc
ProblemSolution.h
ProblemTypes.h
Product.cc
Product.h
ProgressData.cc
ProgressData.h
ProvideFilePolicy.cc
ProvideFilePolicy.h
PublicKey.cc
PublicKey.h
Range.cc
Range.h
Rel.cc
Rel.h
RelCompare.h
RepoInfo.cc
RepoInfo.h
RepoManager.cc
RepoManager.h
Repository.cc
Repository.h
RepoStatus.cc
RepoStatus.h
ResFilters.h
ResKind.cc
ResKind.h
ResObject.cc
ResObject.h
ResObjects.h
Resolvable.cc
Resolvable.h
Resolver.cc
Resolver.h
ResolverProblem.cc
ResolverProblem.h
ResPool.cc
ResPool.h
ResPoolProxy.cc
ResPoolProxy.h
ResStatus.cc
ResStatus.h
ResTraits.h
ServiceInfo.cc
ServiceInfo.h
Signature.cc
Signature.h
SrcPackage.cc
SrcPackage.h
SysContent.cc
SysContent.h
Target.cc
Target.h
TmpPath.cc
TmpPath.h
TriBool.h
Url.cc
Url.h
Vendor.h
VendorAttr.cc
VendorAttr.h
VendorSupportOptions.cc
VendorSupportOptions.h
ZConfig.cc
ZConfig.h
ZYpp.cc
ZYpp.h
ZYppCallbacks.h
ZYppCommit.h
ZYppCommitPolicy.cc
ZYppCommitPolicy.h
ZYppCommitResult.cc
ZYppCommitResult.h
ZYppFactory.cc
ZYppFactory.h
File Members
Helper.h
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2
/* Helper.h
3
*
4
* Static helpers
5
*
6
* Copyright (C) 2000-2002 Ximian, Inc.
7
* Copyright (C) 2005 SUSE Linux Products GmbH
8
*
9
* This program is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU General Public License,
11
* version 2, as published by the Free Software Foundation.
12
*
13
* This program is distributed in the hope that it will be useful, but
14
* WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with this program; if not, write to the Free Software
20
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21
* 02111-1307, USA.
22
*/
23
24
#ifndef ZYPP_SOLVER_DETAIL_HELPER_H
25
#define ZYPP_SOLVER_DETAIL_HELPER_H
26
27
#include <iosfwd>
28
29
#include "
zypp/ResPool.h
"
30
#include "
zypp/PoolItem.h
"
31
#include "
zypp/Capabilities.h
"
32
#include "
zypp/base/String.h
"
33
#include "
zypp/solver/detail/Types.h
"
34
36
namespace
zypp
37
{
38
39
namespace
solver
40
{
41
42
namespace
detail
43
{
44
46
//
47
// CLASS NAME : Helper
48
49
class
Helper
{
50
public
:
51
52
// for name, find installed item which has same name
53
// does *NOT* check edition
54
// FIXME: should probably take provides/obsoletes into account for
55
// renamed upgrades
56
static
PoolItem
findInstalledByNameAndKind
(
const
ResPool
& pool,
const
std::string & name,
const
Resolvable::Kind
& kind);
57
58
// for name, find uninstalled item which has same name
59
static
PoolItem
findUninstalledByNameAndKind
(
const
ResPool
& pool,
const
std::string & name,
const
Resolvable::Kind
& kind);
60
61
// for item, find installed item which has same name -> calls findInstalledByNameAndKind()
62
// does *NOT* check edition
63
// FIXME: should probably take provides/obsoletes into account for
64
// renamed upgrades
65
static
PoolItem
findInstalledItem
(
const
ResPool
& pool,
PoolItem
item);
67
static
PoolItem
findInstalledItem
(
const
std::vector<PoolItem> & pool,
PoolItem
item);
68
69
// for item, find uninstalled item which has same name and higher edition
70
static
PoolItem
findUninstalledItem
(
const
ResPool
& pool,
PoolItem
item);
71
72
// for item, find uninstalled item which has same name and equal edition
73
static
PoolItem
findReinstallItem
(
const
ResPool
& pool,
PoolItem
item);
74
75
static
PoolItem
findUpdateItem
(
const
ResPool
& pool,
PoolItem
item);
77
static
PoolItem
findUpdateItem
(
const
std::vector<PoolItem> & pool,
PoolItem
item);
78
79
// for item, check if this is the 'best' uninstalled (best arch, best version) item
80
static
bool
isBestUninstalledItem
(
const
ResPool
& pool,
PoolItem
item);
81
82
// Human readable item
83
static
std::string
itemToString
(
PoolItem
item,
bool
shortVersion=
false
);
84
static
std::string
capToString
(
const
Capability
& capability);
85
86
friend
std::ostream&
operator<<
(std::ostream&,
const
PoolItemList
& itemlist);
87
88
};
89
91
};
// namespace detail
94
};
// namespace solver
97
};
// namespace zypp
99
100
#endif // ZYPP_SOLVER_DETAIL_HELPER_H
zypp
solver
detail
Helper.h
Generated by
1.8.2