libzypp: zypp/SrcPackage.cc Source File

libzypp 17.36.6

SrcPackage.cc
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#include <zypp/SrcPackage.h>
14namespace zyppintern
15{
16 using namespace zypp;
17 // in Package.cc
18 Pathname cachedLocation( const OnMediaLocation & loc_r, const RepoInfo & repo_r );
19} // namespace zyppintern
21
23namespace zypp
24{
25
26 IMPL_PTR_TYPE(SrcPackage);
27
29 //
30 // METHOD NAME : SrcPackage::SrcPackage
31 // METHOD TYPE : Ctor
32 //
33 SrcPackage::SrcPackage( const sat::Solvable & solvable_r )
34 : ResObject( solvable_r )
35 {}
36
38 //
39 // METHOD NAME : SrcPackage::~SrcPackage
40 // METHOD TYPE : Dtor
41 //
42 SrcPackage::~SrcPackage()
43 {}
44
46 //
47 // SrcPackage interface forwarded to implementation
48 //
50
51 std::string SrcPackage::sourcePkgType() const
52 { return lookupStrAttribute( sat::SolvAttr::arch ); }
53
54 OnMediaLocation SrcPackage::location() const
55 { return lookupLocation(); }
56
57 Pathname SrcPackage::cachedLocation() const
58 { return zyppintern::cachedLocation( location(), repoInfo() ); }
59
61} // namespace zypp
SrcPackage.h
zypp::OnMediaLocation
Describes a resource file located on a medium.
Definition onmedialocation.h:37
zypp::RepoInfo
What is known about a repository.
Definition RepoInfo.h:72
zypp::ResObject::ResObject
ResObject(const sat::Solvable &solvable_r)
Ctor.
Definition ResObject.cc:23
zypp::SrcPackage
SrcPackage interface.
Definition SrcPackage.h:30
zypp::SrcPackage::~SrcPackage
~SrcPackage() override
Dtor.
Definition SrcPackage.cc:42
zypp::SrcPackage::cachedLocation
Pathname cachedLocation() const
Location of the downloaded package in cache or an empty path.
Definition SrcPackage.cc:57
zypp::SrcPackage::sourcePkgType
std::string sourcePkgType() const
The type of the source rpm ("src" or "nosrc").
Definition SrcPackage.cc:51
zypp::SrcPackage::SrcPackage
SrcPackage(const sat::Solvable &solvable_r)
Ctor.
Definition SrcPackage.cc:33
zypp::SrcPackage::location
OnMediaLocation location() const
location of resolvable in repo
Definition SrcPackage.cc:54
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:47
zypp::sat::SolvAttr::arch
static const SolvAttr arch
Definition SolvAttr.h:54
zypp::sat::Solvable
A Solvable object within the sat Pool.
Definition Solvable.h:54
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition Application.cc:20
zyppintern
Definition Package.cc:27
zyppintern::cachedLocation
Pathname cachedLocation(const OnMediaLocation &loc_r, const RepoInfo &repo_r)
Definition Package.cc:99
zypp::sat::SolvableType< Resolvable >::lookupLocation
OnMediaLocation lookupLocation() const
Definition SolvableType.h:160
zypp::sat::SolvableType< Resolvable >::lookupStrAttribute
std::string lookupStrAttribute(const SolvAttr &attr) const
Definition SolvableType.h:153
zypp::sat::SolvableType< Resolvable >::repoInfo
RepoInfo repoInfo() const
Definition SolvableType.h:76
IMPL_PTR_TYPE
#define IMPL_PTR_TYPE(NAME)
Definition ReferenceCounted.h:137