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
InstallOrder.h
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/* InstallOrder.h
3
*
4
* Copyright (C) 2005 SUSE Linux Products GmbH
5
*
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License,
8
* version 2, as published by the Free Software Foundation.
9
*
10
* This program is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18
* 02111-1307, USA.
19
*/
20
21
// stolen from yast2-packagemanager
22
/*
23
File: InstallOrder.h
24
Purpose: Determine order for installing packages
25
Author: Ludwig Nussel <lnussel@suse.de>
26
Maintainer: Ludwig Nussel <lnussel@suse.de>
27
28
/-*/
29
30
#ifndef ZYPP_SOLVER_DETAIL_INSTALLORDER_H
31
#define ZYPP_SOLVER_DETAIL_INSTALLORDER_H
32
33
#include <string>
34
#include <list>
35
#include <map>
36
#include <set>
37
38
#include "
zypp/PoolItem.h
"
39
#include "
zypp/ResPool.h
"
40
#include "
zypp/Capabilities.h
"
41
42
#include "
zypp/solver/detail/Types.h
"
43
45
namespace
zypp
46
{
47
48
namespace
solver
49
{
50
51
namespace
detail
52
{
53
62
class
InstallOrder
63
{
64
private
:
65
const
ResPool
&
_pool
;
66
PoolItemSet
_toinstall
;
67
PoolItemSet
_installed
;
68
70
typedef
std::map<PoolItem, PoolItemList>
Graph
;
71
73
Graph
_graph
;
74
76
Graph
_rgraph
;
77
78
struct
NodeInfo
79
{
80
unsigned
begintime
;
81
unsigned
endtime
;
82
bool
visited
;
83
int
order
;
// number of incoming edges in reverse graph
84
85
PoolItem
item
;
86
87
NodeInfo
() :
begintime
(0),
endtime
(0),
visited
(false),
order
(0) {}
88
NodeInfo
(
PoolItem
item
) :
begintime
(0),
endtime
(0),
visited
(false),
order
(0), item(item) {}
89
};
90
91
typedef
std::map<PoolItem, NodeInfo>
Nodes
;
92
93
Nodes
_nodes
;
94
95
unsigned
_rdfstime
;
96
97
PoolItemList
_topsorted
;
98
99
bool
_dirty
;
100
101
unsigned
_numrun
;
102
103
std::set<std::string>
_logset
;
104
105
private
:
106
void
rdfsvisit
(
PoolItem
item);
107
108
PoolItem
findProviderInSet
(
const
Capability
requirement,
const
PoolItemSet
& candidates )
const
;
109
bool
doesProvide
(
const
Capability
requirement,
PoolItem
item )
const
;
110
111
public
:
112
119
InstallOrder
(
const
ResPool
& pool,
const
PoolItemSet
& toinstall,
const
PoolItemSet
& installed);
120
125
PoolItemList
computeNextSet
();
126
131
void
setInstalled
(
PoolItem
item );
132
136
void
setInstalled
(
const
PoolItemList
& list );
137
141
void
startrdfs
();
142
147
void
init
() {
startrdfs
(); }
148
154
const
PoolItemList
getTopSorted
()
const
;
155
156
void
printAdj
(std::ostream & os,
bool
reversed =
false
)
const
;
157
};
158
160
};
// namespace detail
163
};
// namespace solver
166
};
// namespace zypp
168
169
#endif // ZYPP_SOLVER_DETAIL_INSTALLORDER_H
zypp
solver
detail
InstallOrder.h
Generated by
1.8.2