libzypp 17.38.15

TestcaseSetup.cc
Go to the documentation of this file.
1#include "TestcaseSetupImpl.h"
2
3#include <zypp/ZYpp.h>
4#include <zypp/ZYppFactory.h>
5#include <zypp/Resolver.h>
6#include <zypp/ResPool.h>
7#include <zypp/VendorAttr.h>
8#include <zypp/target/modalias/Modalias.h>
9#include <zypp/base/Algorithm.h>
10
11 namespace zypp::misc::testcase
12{
13
14 // ─── Helpers (migrated verbatim from deptestomatic, refactor in second pass) ─
15 namespace {
16
17 struct FindPackage
18 {
19 PoolItem poolItem;
20 Resolvable::Kind kind;
21 bool edition_set;
22 Edition edition;
23 bool arch_set;
24 Arch arch;
25
26 FindPackage( Resolvable::Kind k, const std::string & v,
27 const std::string & r, const std::string & a )
28 : kind( k )
29 , edition_set( !v.empty() )
30 , edition( v, r )
31 , arch_set( !a.empty() )
32 , arch( a )
33 {}
34
35 void _remember( PoolItem p ) { poolItem = p; }
36
37 bool operator()( PoolItem p )
38 {
39 if ( arch_set && arch != p->arch() )
40 return true;
41 if ( !p->arch().compatibleWith( ZConfig::instance().systemArchitecture() ) )
42 return true;
43 if ( edition_set && p->edition().match( edition ) != 0 )
44 return true;
45 if ( !poolItem
46 || poolItem->arch().compare( p->arch() ) < 0
47 || poolItem->edition().compare( p->edition() ) < 0 )
48 _remember( p );
49 return true;
50 }
51 };
52
53 static PoolItem get_poolItem( const std::string & source_alias,
54 const std::string & package_name,
55 const std::string & kind_name = "",
56 const std::string & ver = "",
57 const std::string & rel = "",
58 const std::string & arch = "" )
59 {
60 PoolItem poolItem;
61 ResPool pool = ResPool::instance();
62 Resolvable::Kind kind = ResKind::fromBuiltin( kind_name );
63 if ( kind == ResKind::nokind ) kind = ResKind::package;
64
65 try {
66 FindPackage info( kind, ver, rel, arch );
67
68 invokeOnEach( pool.byIdentBegin( kind, package_name ),
69 pool.byIdentEnd ( kind, package_name ),
70 resfilter::ByRepository( source_alias ),
71 std::ref( info ) );
72
73 poolItem = info.poolItem;
74 if ( !poolItem ) {
75 // Try all channels — useful for language packages.
76 invokeOnEach( pool.byIdentBegin( kind, package_name ),
77 pool.byIdentEnd ( kind, package_name ),
78 std::ref( info ) );
79 poolItem = info.poolItem;
80 }
81 }
82 catch ( const Exception & e ) {
83 ZYPP_CAUGHT( e );
84 WAR << "Can't find kind[" << kind_name << "]:'" << package_name
85 << "': source '" << source_alias << "' not defined" << std::endl;
86 }
87
88 if ( !poolItem )
89 WAR << "Can't find kind: " << kind << ":'" << package_name
90 << "' in source '" << source_alias << "': no such name/kind" << std::endl;
91
92 return poolItem;
93 }
94
95 void applyLockEntry(const TestcaseSetup::LockEntry &entry, ResPool &pool )
96 {
97 const bool isKeep = ( entry.first == "keep" );
98 const auto & props = entry.second;
99
100 auto getProp = [&]( const std::string & k ) -> std::string {
101 auto it = props.find(k);
102 return it != props.end() ? it->second : std::string();
103 };
104
105 if ( !isKeep ) {
106 std::string source_alias = getProp ("channel");
107 std::string package_name = getProp ("name");
108 if (package_name.empty())
109 package_name = getProp ("package");
110 std::string kind_name = getProp ("kind");
111 std::string version = getProp ("version");
112 if ( version.empty() )
113 version = getProp ("ver");
114 std::string release = getProp ("release");
115 if ( release.empty() )
116 release = getProp ("rel");
117 std::string architecture = getProp ("arch");
118
119 if ( version.empty() )
120 {
121 if ( kind_name.empty() )
122 kind_name = "package";
123 ui::Selectable::Ptr item = ui::Selectable::get( ResKind(kind_name), package_name );
124 if ( item )
125 {
126 // first set to protected, then to taboo so we run through both logic paths
127 // to make sure that if there is a installed object the candidates are also locked
128 item->setStatus( item->hasInstalledObj() ? ui::S_Protected : ui::S_Taboo );
129 item->setStatus( ui::S_Taboo );
130 }
131 else
132 {
133 WAR << "Unknown Selectable " << kind_name << ":" << package_name << std::endl;
134 }
135 }
136 else
137 {
138 PoolItem poolItem;
139 poolItem = get_poolItem (source_alias, package_name, kind_name, version, release, architecture );
140 if (poolItem) {
141 MIL << "Locking " << package_name << " from channel " << source_alias << poolItem << std::endl;
142 poolItem.status().setLock (true, ResStatus::USER);
143 } else {
144 WAR << "Unknown package " << source_alias << "::" << package_name << std::endl;
145 }
146 }
147
148 } else {
149
150 std::string kind_name = getProp ("kind");
151 std::string name = getProp ("name");
152 if (name.empty())
153 name = getProp ("package");
154
155 std::string source_alias = getProp ("channel");
156 if (source_alias.empty())
157 source_alias = "@System";
158
159 if (name.empty())
160 {
161 WAR << "transact need 'name' parameter" << std::endl;
162 return;
163 }
164
165 PoolItem poolItem;
166
167 poolItem = get_poolItem( source_alias, name, kind_name, getProp ("version"), getProp ("release") );
168
169 if (poolItem) {
170 // first: set anything
171 if (source_alias == "@System") {
172 poolItem.status().setToBeUninstalled( ResStatus::USER );
173 }
174 else {
175 poolItem.status().setToBeInstalled( ResStatus::USER );
176 }
177 // second: keep old state
178 poolItem.status().setTransact( false, ResStatus::USER );
179 }
180 else {
181 WAR << "Unknown item " << source_alias << "::" << name << std::endl;
182 }
183 }
184 }
185 }
186
187 // ─────────────────────────────────────────────────────────────────────────────
188
189 RepoData::RepoData() : _pimpl( new RepoDataImpl )
190 {}
191
192 RepoData::~RepoData()
193 { }
194
195 RepoData::RepoData(RepoDataImpl &&data) : _pimpl( new RepoDataImpl( std::move(data)) )
196 { }
197
198 TestcaseRepoType RepoData::type() const
199 { return _pimpl->type; }
200
201 const std::string &RepoData::alias() const
202 { return _pimpl->alias; }
203
204 uint RepoData::priority() const
205 { return _pimpl->priority; }
206
207 const std::string &RepoData::path() const
208 { return _pimpl->path; }
209
210 const RepoDataImpl &RepoData::data() const
211 { return *_pimpl; }
212
213 RepoDataImpl &RepoData::data()
214 { return *_pimpl; }
215
216 ForceInstall::ForceInstall() : _pimpl( new ForceInstallImpl )
217 { }
218
219 ForceInstall::~ForceInstall()
220 { }
221
222 ForceInstall::ForceInstall(ForceInstallImpl &&data) : _pimpl( new ForceInstallImpl( std::move(data) ))
223 { }
224
225 const ForceInstallImpl &ForceInstall::data() const
226 { return *_pimpl; }
227
228 ForceInstallImpl &ForceInstall::data()
229 { return *_pimpl; }
230
231 const std::string &ForceInstall::channel() const
232 { return _pimpl->channel; }
233
234 const std::string &ForceInstall::package() const
235 { return _pimpl->package; }
236
237 const std::string &ForceInstall::kind() const
238 { return _pimpl->kind; }
239
240 TestcaseSetup::TestcaseSetup() : _pimpl( new TestcaseSetupImpl )
241 { }
242
243 TestcaseSetup::~TestcaseSetup()
244 { }
245
246 Arch TestcaseSetup::architecture() const
247 { return _pimpl->architecture; }
248
249 const std::optional<RepoData> &TestcaseSetup::systemRepo() const
250 { return _pimpl->systemRepo; }
251
252 const std::vector<RepoData> &TestcaseSetup::repos() const
253 { return _pimpl->repos; }
254
255 ResolverFocus TestcaseSetup::resolverFocus() const
256 { return _pimpl->resolverFocus; }
257
258 const zypp::filesystem::Pathname &TestcaseSetup::globalPath() const
259 { return _pimpl->globalPath; }
260
261 const zypp::filesystem::Pathname &TestcaseSetup::hardwareInfoFile() const
262 { return _pimpl->hardwareInfoFile; }
263
264 const zypp::filesystem::Pathname &TestcaseSetup::systemCheck() const
265 { return _pimpl->systemCheck; }
266
267 const target::Modalias::ModaliasList &TestcaseSetup::modaliasList() const
268 { return _pimpl->modaliasList; }
269
270 const base::SetTracker<LocaleSet> &TestcaseSetup::localesTracker() const
271 { return _pimpl->localesTracker; }
272
273 const std::vector<std::vector<std::string> > &TestcaseSetup::vendorLists() const
274 { return _pimpl->vendorLists; }
275
276 const sat::StringQueue &TestcaseSetup::autoinstalled() const
277 { return _pimpl->autoinstalled; }
278
279 const std::set<std::string> &TestcaseSetup::multiversionSpec() const
280 { return _pimpl->multiversionSpec; }
281
282 const std::vector<ForceInstall> &TestcaseSetup::forceInstallTasks() const
283 { return _pimpl->forceInstallTasks; }
284
285 const std::vector<TestcaseSetup::LockEntry> &TestcaseSetup::locks() const
286 { return _pimpl->locks; }
287
288 bool TestcaseSetup::set_licence() const
289 { return _pimpl->set_licence; }
290
291 bool TestcaseSetup::show_mediaid() const
292 { return _pimpl->show_mediaid; }
293
294 bool TestcaseSetup::ignorealreadyrecommended() const
295 { return _pimpl->ignorealreadyrecommended; }
296
297 bool TestcaseSetup::onlyRequires() const
298 { return _pimpl->onlyRequires; }
299
300 bool TestcaseSetup::forceResolve() const
301 { return _pimpl->forceResolve; }
302
303 bool TestcaseSetup::cleandepsOnRemove() const
304 { return _pimpl->cleandepsOnRemove; }
305
306 bool TestcaseSetup::noUpdateProvide() const
307 { return _pimpl->noUpdateProvide; }
308
309 bool TestcaseSetup::allowDowngrade() const
310 { return _pimpl->allowDowngrade; }
311
312 bool TestcaseSetup::allowNameChange() const
313 { return _pimpl->allowNameChange; }
314
315 bool TestcaseSetup::allowArchChange() const
316 { return _pimpl->allowArchChange; }
317
318 bool TestcaseSetup::allowVendorChange() const
319 { return _pimpl->allowVendorChange; }
320
321 bool TestcaseSetup::dupAllowDowngrade() const
322 { return _pimpl->dupAllowDowngrade; }
323
324 bool TestcaseSetup::dupAllowNameChange() const
325 { return _pimpl->dupAllowNameChange; }
326
327 bool TestcaseSetup::dupAllowArchChange() const
328 { return _pimpl->dupAllowArchChange; }
329
330 bool TestcaseSetup::dupAllowVendorChange() const
331 { return _pimpl->dupAllowVendorChange; }
332
333 bool TestcaseSetup::applySetup( zypp::RepoManager &manager ) const
334 {
335 const auto &setup = data();
336 if ( !setup.architecture.empty() )
337 {
338 MIL << "Setting architecture to '" << setup.architecture << "'" << std::endl;
339 ZConfig::instance().setSystemArchitecture( setup.architecture );
340 setenv ("ZYPP_TESTSUITE_FAKE_ARCH", setup.architecture.c_str(), 1);
341 }
342
343 if ( setup.systemRepo ) {
344 if (!loadRepo( manager, *this, *setup.systemRepo ) )
345 {
346 ERR << "Can't setup 'system'" << std::endl;
347 return false;
348 }
349 }
350
351 if ( !setup.hardwareInfoFile.empty() ) {
352 setenv( "ZYPP_MODALIAS_SYSFS", setup.hardwareInfoFile.asString().c_str(), 1 );
353 MIL << "setting HardwareInfo to: " << setup.hardwareInfoFile.asString() << std::endl;
354 }
355
356 for ( const auto &channel : setup.repos ) {
357 if ( !loadRepo( manager, *this, channel ) )
358 {
359 ERR << "Can't setup 'channel'" << std::endl;
360 return false;
361 }
362 }
363
364 if ( !setup.systemCheck.empty() ) {
365 MIL << "setting systemCheck to: " << setup.systemCheck.asString() << std::endl;
366 SystemCheck::instance().setFile( setup.systemCheck );
367 }
368
369 return true;
370 }
371
372 bool TestcaseSetup::loadRepo( zypp::RepoManager &manager, const TestcaseSetup &setup, const RepoData &data )
373 {
374 const auto &repoData = data.data();
375 Pathname pathname = Pathname::assertprefix ( setup._pimpl->globalPath, repoData.path );
376 MIL << "'" << pathname << "'" << std::endl;
377
378 Repository repo;
379
380 using TrType = zypp::misc::testcase::TestcaseRepoType;
381
382 if ( repoData.type == TrType::Url ) {
383 try {
384 MIL << "Load from Url '" << repoData.path << "'" << std::endl;
385
386 RepoInfo nrepo;
387 nrepo.setAlias ( repoData.alias );
388 nrepo.setName ( repoData.alias );
389 nrepo.setEnabled ( true );
390 nrepo.setAutorefresh( false );
391 nrepo.setPriority ( repoData.priority );
392
393 Url repoUrl( repoData.path );
394 if ( repoUrl.getScheme() == "testcase" )
395 {
396 // testcase:<relative-path> — a repo bundled alongside the testcase
397 // fixture itself (e.g. a local susetags/rpm-md directory), resolved
398 // against the testcase directory. Any other scheme (http://, dir:,
399 // ftp://, ...) is used verbatim, unchanged from prior behaviour.
400 repoUrl = Pathname::assertprefix ( setup._pimpl->globalPath, repoUrl.getPathName() ).asUrl();
401 // Bundled fixtures are never signed — same precedent as
402 // zypp-logic/tests/lib/TestSetup.h::loadRepo(), which disables
403 // gpgCheck for its own local test repos. Absolute URLs (any other
404 // scheme) are untouched: a testcase pointing at a real repo keeps
405 // whatever signature checking it would normally get.
406 nrepo.setGpgCheck( false );
407 }
408 nrepo.addBaseUrl( repoUrl );
409
410 manager.refreshMetadata( nrepo );
411 manager.buildCache( nrepo );
412 manager.loadFromCache( nrepo );
413 }
414 catch ( Exception & excpt_r ) {
415 ZYPP_CAUGHT (excpt_r);
416 ERR << "Couldn't load packages from Url '" << repoData.path << "'" << std::endl;
417 return false;
418 }
419 }
420 else {
421 try {
422 MIL << "Load from File '" << pathname << "'" << std::endl;
423 zypp::Repository satRepo;
424
425 if ( repoData.alias == "@System" ) {
426 satRepo = zypp::sat::Pool::instance().systemRepo();
427 } else {
428 satRepo = zypp::sat::Pool::instance().reposInsert( repoData.alias );
429 }
430
431 RepoInfo nrepo;
432
433 nrepo.setAlias ( repoData.alias );
434 nrepo.setName ( repoData.alias );
435 nrepo.setEnabled ( true );
436 nrepo.setAutorefresh( false );
437 nrepo.setPriority ( repoData.priority );
438 nrepo.addBaseUrl ( pathname.asUrl() );
439
440 satRepo.setInfo (nrepo);
441 if ( repoData.type == TrType::Helix )
442 satRepo.addHelix( pathname );
443 else
444 satRepo.addTesttags( pathname );
445 MIL << "Loaded " << satRepo.solvablesSize() << " resolvables from " << ( repoData.path.empty()?pathname.asString():repoData.path) << "." << std::endl;
446 }
447 catch ( Exception & excpt_r ) {
448 ZYPP_CAUGHT (excpt_r);
449 ERR << "Couldn't load packages from XML file '" << repoData.path << "'" << std::endl;
450 return false;
451 }
452 }
453 return true;
454 }
455
456 TestcaseSetupImpl &TestcaseSetup::data()
457 {
458 return *_pimpl;
459 }
460
461 const TestcaseSetupImpl &TestcaseSetup::data() const
462 {
463 return *_pimpl;
464 }
465
466 bool TestcaseSetup::applySetup( zypp::RepoManager &manager, ApplySetupFlags flags_r ) const
467 {
468 // Repos/arch/hardware are always applied via the existing overload.
469 if ( !applySetup( manager ) )
470 return false;
471
472 if ( flags_r.testFlag( AS_LOCALES ) )
473 {
474 base::SetTracker<LocaleSet> lt = localesTracker();
475 lt.removed().insert( lt.current().begin(), lt.current().end() );
476 sat::Pool::instance().initRequestedLocales( lt.removed() );
477 lt.added().insert( lt.current().begin(), lt.current().end() );
478 sat::Pool::instance().setRequestedLocales( lt.added() );
479 }
480
481 if ( flags_r.testFlag( AS_AUTOINSTALLED ) )
482 {
483 sat::Pool::instance().setAutoInstalled( autoinstalled() );
484 }
485
486 if ( flags_r.testFlag( AS_VENDOR_LISTS ) )
487 {
488 for ( const auto & vlist : vendorLists() )
489 VendorAttr::noTargetInstance().addVendorList( vlist );
490 }
491
492 if ( flags_r.testFlag( AS_MODALIAS ) )
493 {
494 target::Modalias::instance().modaliasList( modaliasList() );
495 }
496
497 if ( flags_r.testFlag( AS_MULTIVERSION ) )
498 {
499 ZConfig::instance().multiversionSpec( multiversionSpec() );
500 }
501
502 if ( flags_r.testFlag( AS_LOCKS ) )
503 {
504 ResPool pool = ResPool::instance();
505 for ( const auto & entry : locks() )
506 applyLockEntry( entry, pool );
507 }
508
509 if ( flags_r.testFlag( AS_SOLVER_FLAGS ) )
510 {
511 Resolver_Ptr resolver = getZYpp()->resolver();
512 resolver->setFocus ( resolverFocus() );
513 resolver->setIgnoreAlreadyRecommended( ignorealreadyrecommended() );
514 resolver->setOnlyRequires ( onlyRequires() );
515 resolver->setForceResolve ( forceResolve() );
516 resolver->setCleandepsOnRemove ( cleandepsOnRemove() );
517 resolver->setAllowDowngrade ( allowDowngrade() );
518 resolver->setAllowNameChange ( allowNameChange() );
519 resolver->setAllowArchChange ( allowArchChange() );
520 resolver->setAllowVendorChange ( allowVendorChange() );
521 resolver->dupSetAllowDowngrade ( dupAllowDowngrade() );
522 resolver->dupSetAllowNameChange ( dupAllowNameChange() );
523 resolver->dupSetAllowArchChange ( dupAllowArchChange() );
524 resolver->dupSetAllowVendorChange ( dupAllowVendorChange() );
525 }
526
527 return true;
528 }
529}
Algorithm.h
ZYPP_CAUGHT
#define ZYPP_CAUGHT(EXCPT)
Drops a logline telling the Exception was caught (in order to handle it).
Definition Exception.h:475
MIL
#define MIL
Definition Logger.h:130
ERR
#define ERR
Definition Logger.h:132
WAR
#define WAR
Definition Logger.h:131
Modalias.h
ResPool.h
Resolver.h
TestcaseSetupImpl.h
VendorAttr.h
ZYppFactory.h
ZYpp.h
zypp::Arch
Architecture.
Definition Arch.h:37
zypp::Exception
Base class for Exception.
Definition Exception.h:153
zypp::Pathname::assertprefix
static Pathname assertprefix(const Pathname &root_r, const Pathname &path_r)
Unless path_r does not already denote a path below root_r, combine them.
Definition Pathname.cc:272
zypp::RepoInfo
What is known about a repository.
Definition RepoInfo.h:72
zypp::RepoInfo::setGpgCheck
void setGpgCheck(TriBool value_r)
Set the value for gpgCheck (or indeterminate to use the default).
Definition RepoInfo.cc:616
zypp::RepoInfo::addBaseUrl
void addBaseUrl(Url url)
Add a base url.
Definition RepoInfo.cc:752
zypp::RepoInfo::setPriority
void setPriority(unsigned newval_r)
Set repository priority for solver.
Definition RepoInfo.cc:609
zypp::RepoManager
creates and provides information about known sources.
Definition RepoManager.h:60
zypp::RepoManager::refreshMetadata
void refreshMetadata(const RepoInfo &info, RawMetadataRefreshPolicy policy=RefreshIfNeeded, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Refresh local raw cache.
Definition RepoManager.cc:142
zypp::RepoManager::buildCache
void buildCache(const RepoInfo &info, CacheBuildPolicy policy=BuildIfNeeded, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Refresh local cache.
Definition RepoManager.cc:158
zypp::RepoManager::loadFromCache
void loadFromCache(const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Load resolvables into the pool.
Definition RepoManager.cc:171
zypp::Repository
Definition Repository.h:40
zypp::Repository::addHelix
void addHelix(const Pathname &file_r)
Load Solvables from a helix-file.
Definition Repository.cc:345
zypp::Repository::addTesttags
void addTesttags(const Pathname &file_r)
Load Solvables from a libsolv testtags-file.
Definition Repository.cc:364
zypp::Repository::solvablesSize
size_type solvablesSize() const
Number of solvables in Repository.
Definition Repository.cc:231
zypp::Repository::setInfo
void setInfo(const RepoInfo &info_r)
Set RepoInfo for this repository.
Definition Repository.cc:285
zypp::ResKind::nokind
static const ResKind nokind
Value representing nokind ("").
Definition ResKind.h:38
zypp::ResKind::package
static const ResKind package
Definition ResKind.h:40
zypp::ResKind::ResKind
ResKind()
Default ctor: nokind.
Definition ResKind.h:69
zypp::ResKind::fromBuiltin
static ResKind fromBuiltin(const std::string &str)
Converts the string representation of a kind to its ResKind value or noKind if the passed string is n...
Definition ResKind.cc:68
zypp::ResPool
Global ResObject pool.
Definition ResPool.h:62
zypp::ResPool::instance
static ResPool instance()
Singleton ctor.
Definition ResPool.cc:38
zypp::ResStatus::USER
@ USER
Definition ResStatus.h:112
zypp::Resolvable::Kind
TraitsType::KindType Kind
Definition Resolvable.h:57
zypp::Url
Url manipulation class.
Definition Url.h:93
zypp::Url::getScheme
std::string getScheme() const
Returns the scheme name of the URL.
Definition Url.cc:560
zypp::Url::getPathName
std::string getPathName(EEncoding eflag=zypp::url::E_DECODED) const
Returns the path name from the URL.
Definition Url.cc:631
zypp::VendorAttr::noTargetInstance
static VendorAttr & noTargetInstance()
Singleton, settings used if no Target is active.
Definition VendorAttr.cc:236
zypp::VendorAttr::addVendorList
void addVendorList(VendorList &&list_r)
Adding new equivalent vendor strings container.
Definition VendorAttr.h:105
zypp::ZConfig::systemArchitecture
Arch systemArchitecture() const
The system architecture zypp uses.
Definition ZConfig.cc:857
zypp::ZConfig::setSystemArchitecture
void setSystemArchitecture(const Arch &arch_r)
Override the zypp system architecture.
Definition ZConfig.cc:860
zypp::ZConfig::instance
static ZConfig & instance()
Singleton ctor.
Definition ZConfig.cc:794
zypp::ZConfig::multiversionSpec
const std::set< std::string > & multiversionSpec() const
Definition ZConfig.cc:1141
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:48
zypp::filesystem::Pathname::asUrl
Url asUrl(const std::string &scheme_r) const
Url representation using scheme_r schema .
Definition Pathname.cc:172
zypp::filesystem::Pathname::asString
const std::string & asString() const
String representation.
Definition Pathname.h:94
zypp::misc::testcase::ForceInstall::_pimpl
RWCOW_pointer< ForceInstallImpl > _pimpl
Definition TestcaseSetup.h:79
zypp::misc::testcase::ForceInstall::package
const std::string & package() const
Definition TestcaseSetup.cc:234
zypp::misc::testcase::ForceInstall::kind
const std::string & kind() const
Definition TestcaseSetup.cc:237
zypp::misc::testcase::ForceInstall::~ForceInstall
~ForceInstall()
Definition TestcaseSetup.cc:219
zypp::misc::testcase::ForceInstall::ForceInstall
ForceInstall()
Definition TestcaseSetup.cc:216
zypp::misc::testcase::ForceInstall::channel
const std::string & channel() const
Definition TestcaseSetup.cc:231
zypp::misc::testcase::ForceInstall::data
const ForceInstallImpl & data() const
Definition TestcaseSetup.cc:225
zypp::misc::testcase::RepoData
Definition TestcaseSetup.h:51
zypp::misc::testcase::RepoData::data
const RepoDataImpl & data() const
Definition TestcaseSetup.cc:210
zypp::misc::testcase::RepoData::~RepoData
~RepoData()
Definition TestcaseSetup.cc:192
zypp::misc::testcase::RepoData::type
TestcaseRepoType type() const
Definition TestcaseSetup.cc:198
zypp::misc::testcase::RepoData::priority
uint priority() const
Definition TestcaseSetup.cc:204
zypp::misc::testcase::RepoData::RepoData
RepoData()
Definition TestcaseSetup.cc:189
zypp::misc::testcase::RepoData::_pimpl
RWCOW_pointer< RepoDataImpl > _pimpl
Definition TestcaseSetup.h:64
zypp::misc::testcase::RepoData::path
const std::string & path() const
Definition TestcaseSetup.cc:207
zypp::misc::testcase::RepoData::alias
const std::string & alias() const
Definition TestcaseSetup.cc:201
zypp::misc::testcase::TestcaseSetup::architecture
Arch architecture() const
Definition TestcaseSetup.cc:246
zypp::misc::testcase::TestcaseSetup::repos
const std::vector< RepoData > & repos() const
Definition TestcaseSetup.cc:252
zypp::misc::testcase::TestcaseSetup::applySetup
bool applySetup(zypp::RepoManager &manager) const
Definition TestcaseSetup.cc:333
zypp::misc::testcase::TestcaseSetup::resolverFocus
ResolverFocus resolverFocus() const
Definition TestcaseSetup.cc:255
zypp::misc::testcase::TestcaseSetup::onlyRequires
bool onlyRequires() const
Definition TestcaseSetup.cc:297
zypp::misc::testcase::TestcaseSetup::modaliasList
const target::Modalias::ModaliasList & modaliasList() const
Definition TestcaseSetup.cc:267
zypp::misc::testcase::TestcaseSetup::noUpdateProvide
bool noUpdateProvide() const
Definition TestcaseSetup.cc:306
zypp::misc::testcase::TestcaseSetup::forceInstallTasks
const std::vector< ForceInstall > & forceInstallTasks() const
Definition TestcaseSetup.cc:282
zypp::misc::testcase::TestcaseSetup::systemRepo
const std::optional< RepoData > & systemRepo() const
Definition TestcaseSetup.cc:249
zypp::misc::testcase::TestcaseSetup::vendorLists
const std::vector< std::vector< std::string > > & vendorLists() const
Definition TestcaseSetup.cc:273
zypp::misc::testcase::TestcaseSetup::multiversionSpec
const std::set< std::string > & multiversionSpec() const
Definition TestcaseSetup.cc:279
zypp::misc::testcase::TestcaseSetup::dupAllowVendorChange
bool dupAllowVendorChange() const
Definition TestcaseSetup.cc:330
zypp::misc::testcase::TestcaseSetup::_pimpl
RWCOW_pointer< TestcaseSetupImpl > _pimpl
Definition TestcaseSetup.h:173
zypp::misc::testcase::TestcaseSetup::allowNameChange
bool allowNameChange() const
Definition TestcaseSetup.cc:312
zypp::misc::testcase::TestcaseSetup::autoinstalled
const sat::StringQueue & autoinstalled() const
Definition TestcaseSetup.cc:276
zypp::misc::testcase::TestcaseSetup::allowDowngrade
bool allowDowngrade() const
Definition TestcaseSetup.cc:309
zypp::misc::testcase::TestcaseSetup::loadRepo
static bool loadRepo(zypp::RepoManager &manager, const TestcaseSetup &setup, const RepoData &data)
Definition TestcaseSetup.cc:372
zypp::misc::testcase::TestcaseSetup::systemCheck
const Pathname & systemCheck() const
Definition TestcaseSetup.cc:264
zypp::misc::testcase::TestcaseSetup::LockEntry
std::pair< std::string, std::map< std::string, std::string > > LockEntry
lock/keep node data extracted from trial nodes and applied as pool setup.
Definition TestcaseSetup.h:114
zypp::misc::testcase::TestcaseSetup::data
TestcaseSetupImpl & data()
Definition TestcaseSetup.cc:456
zypp::misc::testcase::TestcaseSetup::set_licence
bool set_licence() const
Definition TestcaseSetup.cc:288
zypp::misc::testcase::TestcaseSetup::dupAllowNameChange
bool dupAllowNameChange() const
Definition TestcaseSetup.cc:324
zypp::misc::testcase::TestcaseSetup::allowArchChange
bool allowArchChange() const
Definition TestcaseSetup.cc:315
zypp::misc::testcase::TestcaseSetup::cleandepsOnRemove
bool cleandepsOnRemove() const
Definition TestcaseSetup.cc:303
zypp::misc::testcase::TestcaseSetup::show_mediaid
bool show_mediaid() const
Definition TestcaseSetup.cc:291
zypp::misc::testcase::TestcaseSetup::~TestcaseSetup
~TestcaseSetup()
Definition TestcaseSetup.cc:243
zypp::misc::testcase::TestcaseSetup::forceResolve
bool forceResolve() const
Definition TestcaseSetup.cc:300
zypp::misc::testcase::TestcaseSetup::globalPath
const Pathname & globalPath() const
Definition TestcaseSetup.cc:258
zypp::misc::testcase::TestcaseSetup::hardwareInfoFile
const Pathname & hardwareInfoFile() const
Definition TestcaseSetup.cc:261
zypp::misc::testcase::TestcaseSetup::ignorealreadyrecommended
bool ignorealreadyrecommended() const
Definition TestcaseSetup.cc:294
zypp::misc::testcase::TestcaseSetup::allowVendorChange
bool allowVendorChange() const
Definition TestcaseSetup.cc:318
zypp::misc::testcase::TestcaseSetup::TestcaseSetup
TestcaseSetup()
Definition TestcaseSetup.cc:240
zypp::misc::testcase::TestcaseSetup::localesTracker
const base::SetTracker< LocaleSet > & localesTracker() const
Definition TestcaseSetup.cc:270
zypp::misc::testcase::TestcaseSetup::dupAllowArchChange
bool dupAllowArchChange() const
Definition TestcaseSetup.cc:327
zypp::misc::testcase::TestcaseSetup::locks
const std::vector< LockEntry > & locks() const
Definition TestcaseSetup.cc:285
zypp::misc::testcase::TestcaseSetup::dupAllowDowngrade
bool dupAllowDowngrade() const
Definition TestcaseSetup.cc:321
zypp::repo::RepoInfoBase::setAutorefresh
void setAutorefresh(bool autorefresh)
enable or disable autorefresh
Definition RepoInfoBase.cc:92
zypp::repo::RepoInfoBase::setAlias
void setAlias(const std::string &alias)
set the repository alias
Definition RepoInfoBase.cc:95
zypp::repo::RepoInfoBase::setName
void setName(const std::string &name)
set the repository name
Definition RepoInfoBase.cc:98
zypp::repo::RepoInfoBase::setEnabled
void setEnabled(bool enabled)
enable or disable the repository
Definition RepoInfoBase.cc:89
zypp::sat::Pool::setAutoInstalled
void setAutoInstalled(const Queue &autoInstalled_r)
Set ident list of all autoinstalled solvables.
Definition Pool.cc:265
zypp::sat::Pool::instance
static Pool instance()
Singleton ctor.
Definition Pool.h:55
zypp::sat::Pool::reposInsert
Repository reposInsert(const std::string &alias_r)
Return a Repository named alias_r.
Definition Pool.cc:143
zypp::sat::Pool::setRequestedLocales
void setRequestedLocales(const LocaleSet &locales_r)
Set the requested locales.
Definition Pool.cc:236
zypp::sat::Pool::systemRepo
Repository systemRepo()
Return the system repository, create it if missing.
Definition Pool.cc:178
zypp::sat::Pool::initRequestedLocales
void initRequestedLocales(const LocaleSet &locales_r)
Start tracking changes based on this locales_r.
Definition Pool.cc:251
zypp::target::Modalias::ModaliasList
std::vector< std::string > ModaliasList
Definition Modalias.h:45
zypp::target::Modalias::instance
static Modalias & instance()
Singleton access.
Definition Modalias.cc:223
zypp::target::Modalias::modaliasList
const ModaliasList & modaliasList() const
List of modaliases found on system.
Definition Modalias.cc:232
zypp::ui::Selectable::get
static Ptr get(const pool::ByIdent &ident_r)
Get the Selctable.
Definition Selectable.cc:29
zypp::ui::Selectable::Ptr
intrusive_ptr< Selectable > Ptr
Definition Selectable.h:58
a
unsigned short a
Definition mediablocklist.cc:0
std
Definition ansi.h:855
ztui::table::CStyle::Edition
@ Edition
Editions with v-r setparator highlighted.
Definition Table.h:160
zypp::misc::testcase
Definition LoadTestcase.cc:19
zypp::misc::testcase::AS_VENDOR_LISTS
@ AS_VENDOR_LISTS
VendorAttr vendor-equivalence lists.
Definition TestcaseSetup.h:97
zypp::misc::testcase::AS_AUTOINSTALLED
@ AS_AUTOINSTALLED
setAutoInstalled
Definition TestcaseSetup.h:96
zypp::misc::testcase::AS_SOLVER_FLAGS
@ AS_SOLVER_FLAGS
Resolver flags, focus, DUP flags.
Definition TestcaseSetup.h:94
zypp::misc::testcase::AS_MODALIAS
@ AS_MODALIAS
Modalias list.
Definition TestcaseSetup.h:98
zypp::misc::testcase::AS_LOCKS
@ AS_LOCKS
lock/keep nodes extracted from trial nodes
Definition TestcaseSetup.h:100
zypp::misc::testcase::AS_MULTIVERSION
@ AS_MULTIVERSION
ZConfig multiversion spec.
Definition TestcaseSetup.h:99
zypp::misc::testcase::AS_LOCALES
@ AS_LOCALES
initRequestedLocales + setRequestedLocales
Definition TestcaseSetup.h:95
zypp::misc::testcase::TestcaseRepoType
TestcaseRepoType
Definition TestcaseSetup.h:41
zypp::pool
Definition ByIdent.h:24
zypp::repo
Definition DeltaCandidates.cc:30
zypp::sat::empty
bool empty() const
Whether neither idents nor provides are set.
zypp::sat::StringQueue
Queue StringQueue
Queue with String ids.
Definition Queue.h:28
zypp::ui::S_Taboo
@ S_Taboo
Definition Status.h:38
zypp::ui::S_Protected
@ S_Protected
Definition Status.h:37
zypp::ResolverFocus
ResolverFocus
The resolver's general attitude.
Definition ResolverFocus.h:24
zypp::getZYpp
ZYpp::Ptr getZYpp()
relates: ZYppFactory Convenience to get the Pointer to the ZYpp instance.
Definition ZYppFactory.h:77
zypp::kind
const ResKind ResTraits< Package >::kind(ResKind::package)
zypp::invokeOnEach
int invokeOnEach(TIterator begin_r, TIterator end_r, TFilter filter_r, TFunction fnc_r)
Iterate through [begin_r,end_r) and invoke fnc_r on each item that passes filter_r.
Definition Algorithm.h:30
zypp::base::SetTracker
Track added/removed set items based on an initial set.
Definition SetTracker.h:39
zypp::base::SetTracker::current
const set_type & current() const
Return the current set.
Definition SetTracker.h:140
zypp::base::SetTracker::added
const set_type & added() const
Return the set of added items.
Definition SetTracker.h:143
zypp::base::SetTracker::removed
const set_type & removed() const
Return the set of removed items.
Definition SetTracker.h:146
zypp::misc::testcase::ForceInstallImpl
Definition TestcaseSetupImpl.h:34
zypp::misc::testcase::RepoDataImpl
Definition TestcaseSetupImpl.h:25
zypp::misc::testcase::TestcaseSetupImpl
Definition TestcaseSetupImpl.h:43