libzypp 17.38.14
TestcaseSetup.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12
13#ifndef ZYPP_MISC_TESTCASESETUP_H
14#define ZYPP_MISC_TESTCASESETUP_H
15
16#include <zypp/Arch.h>
17#include <zypp-core/Globals.h>
19#include <zypp/Locale.h>
20#include <zypp-core/Pathname.h>
21#include <zypp/ResolverFocus.h>
22#include <zypp-core/Url.h>
25#include <zypp/sat/Queue.h>
27
28#include <map>
29#include <optional>
30#include <string>
31#include <vector>
32
33namespace zypp {
34 class RepoManager;
35 class ResPool;
36}
37
39{
40
46
47 struct RepoDataImpl;
48 struct ForceInstallImpl;
49 struct TestcaseSetupImpl;
50
51 class RepoData {
52 public:
53 RepoData ();
54 ~RepoData ();
56 TestcaseRepoType type() const;
57 const std::string &alias() const;
58 uint priority() const;
59 const std::string &path() const;
60
61 const RepoDataImpl &data() const;
63 private:
65 };
66
68 public:
69 ForceInstall ();
72 const std::string &channel () const;
73 const std::string &package () const;
74 const std::string &kind () const;
75
76 const ForceInstallImpl &data() const;
78 private:
80 };
81
109
111 {
112 public:
114 using LockEntry = std::pair<std::string, std::map<std::string,std::string>>;
115
118
119 Arch architecture () const;
120
121 const std::optional<RepoData> &systemRepo() const;
122 const std::vector<RepoData> &repos() const;
123
124 // solver flags: default to false - set true if mentioned in <setup>
126
127 const Pathname &globalPath() const;
128 const Pathname &hardwareInfoFile() const;
129 const Pathname &systemCheck() const;
130
133 const std::vector<std::vector<std::string>> &vendorLists() const;
134 const sat::StringQueue &autoinstalled() const;
135 const std::set<std::string> &multiversionSpec() const;
136 const std::vector<ForceInstall> &forceInstallTasks() const;
137 const std::vector<LockEntry> &locks() const;
138
139 bool set_licence() const;
140 bool show_mediaid() const;
141
142 bool ignorealreadyrecommended() const;
143 bool onlyRequires() const;
144 bool forceResolve() const;
145 bool cleandepsOnRemove() const;
146 bool noUpdateProvide() const;
147
148 bool allowDowngrade() const;
149 bool allowNameChange() const;
150 bool allowArchChange() const;
151 bool allowVendorChange() const;
152
153 bool dupAllowDowngrade() const;
154 bool dupAllowNameChange() const;
155 bool dupAllowArchChange() const;
156 bool dupAllowVendorChange() const;
157
158 bool applySetup ( zypp::RepoManager &manager ) const;
159
165 bool applySetup ( zypp::RepoManager &manager, ApplySetupFlags flags_r ) const;
166
167 static bool loadRepo (zypp::RepoManager &manager, const TestcaseSetup &setup, const RepoData &data );
168
170 const TestcaseSetupImpl &data() const;
171
172 private:
174 };
175}
176
177
178#endif // ZYPP_MISC_TESTCASESETUPIMPL_H
#define ZYPP_DECLARE_FLAGS_AND_OPERATORS(Name, Enum)
relates: Flags
Definition Flags.h:189
Provides API related macros.
#define ZYPP_API_DEPTESTOMATIC
Definition Globals.h:82
Architecture.
Definition Arch.h:37
creates and provides information about known sources.
Definition RepoManager.h:60
Global ResObject pool.
Definition ResPool.h:62
Url manipulation class.
Definition Url.h:93
RWCOW_pointer< ForceInstallImpl > _pimpl
const std::string & package() const
const std::string & kind() const
const std::string & channel() const
const ForceInstallImpl & data() const
const RepoDataImpl & data() const
TestcaseRepoType type() const
RWCOW_pointer< RepoDataImpl > _pimpl
const std::string & path() const
const std::string & alias() const
const std::vector< RepoData > & repos() const
bool applySetup(zypp::RepoManager &manager) const
const target::Modalias::ModaliasList & modaliasList() const
const std::vector< ForceInstall > & forceInstallTasks() const
const std::optional< RepoData > & systemRepo() const
const std::vector< std::vector< std::string > > & vendorLists() const
const std::set< std::string > & multiversionSpec() const
RWCOW_pointer< TestcaseSetupImpl > _pimpl
const sat::StringQueue & autoinstalled() const
static bool loadRepo(zypp::RepoManager &manager, const TestcaseSetup &setup, const RepoData &data)
const Pathname & systemCheck() const
std::pair< std::string, std::map< std::string, std::string > > LockEntry
lock/keep node data extracted from trial nodes and applied as pool setup.
const Pathname & globalPath() const
const Pathname & hardwareInfoFile() const
const base::SetTracker< LocaleSet > & localesTracker() const
const std::vector< LockEntry > & locks() const
std::vector< std::string > ModaliasList
Definition Modalias.h:45
ApplySetupFlag
Bits controlling how much of the testcase setup is applied.
@ AS_VENDOR_LISTS
VendorAttr vendor-equivalence lists.
@ AS_AUTOINSTALLED
setAutoInstalled
@ AS_SOLVER_FLAGS
Resolver flags, focus, DUP flags.
@ AS_MODALIAS
Modalias list.
@ AS_UNIVERSE
Package universe without solver opinions: repos, locales, autoinstalled, vendor lists,...
@ AS_LOCKS
lock/keep nodes extracted from trial nodes
@ AS_MULTIVERSION
ZConfig multiversion spec.
@ AS_LOCALES
initRequestedLocales + setRequestedLocales
@ AS_ALL
Apply everything (full fidelity replay).
@ AS_REPOS_ONLY
Only arch, repos, hardware-info (historic default).
Queue StringQueue
Queue with String ids.
Definition Queue.h:28
Easy-to use interface to the ZYPP dependency resolver.
ResolverFocus
The resolver's general attitude.
RW_pointer supporting 'copy on write' functionality.
Definition PtrTypes.h:469
Track added/removed set items based on an initial set.
Definition SetTracker.h:39