libzypp  17.14.0
SrcPackage.cc
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #include "zypp/SrcPackage.h"
14 namespace 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 
23 namespace zypp
24 {
25 
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  //
43  {}
44 
46  //
47  // SrcPackage interface forwarded to implementation
48  //
50 
51  std::string SrcPackage::sourcePkgType() const
53 
55  { return lookupLocation(); }
56 
58  { return zyppintern::cachedLocation( location(), repoInfo() ); }
59 
61 } // namespace zypp
A Solvable object within the sat Pool.
Definition: Solvable.h:53
SrcPackage(const sat::Solvable &solvable_r)
Ctor.
Definition: SrcPackage.cc:33
Pathname cachedLocation(const OnMediaLocation &loc_r, const RepoInfo &repo_r)
Definition: Package.cc:37
Pathname cachedLocation() const
Location of the downloaded package in cache or an empty path.
Definition: SrcPackage.cc:57
OnMediaLocation location() const
location of resolvable in repo
Definition: SrcPackage.cc:54
Describes a path on a certain media amongs as the information required to download it,...
static const SolvAttr arch
Definition: SolvAttr.h:54
What is known about a repository.
Definition: RepoInfo.h:71
OnMediaLocation lookupLocation() const
Definition: SolvableType.h:141
Base for resolvable objects.
Definition: ResObject.h:37
SrcPackage interface.
Definition: SrcPackage.h:29
std::string sourcePkgType() const
The type of the source rpm ("src" or "nosrc").
Definition: SrcPackage.cc:51
virtual ~SrcPackage()
Dtor.
Definition: SrcPackage.cc:42
std::string lookupStrAttribute(const SolvAttr &attr) const
Definition: SolvableType.h:134
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
#define IMPL_PTR_TYPE(NAME)