33 typedef std::string (SrcPackage::*inlined)()
const;
34 typedef OnMediaLocation (SrcPackage::*location)()
const;
37 ManagedFile doProvideSrcPackage( repo::RepoMediaAccess & access_r,
38 const SrcPackage & script_r,
39 inlined inlined_r, location location_r )
44 std::string inlined( (script_r.*inlined_r)() );
45 if ( ! inlined.empty() )
50 "zypp-script-"+script_r.name() ),
52 std::ofstream str( ret.value().c_str() );
53 str << inlined << endl;
58 OnMediaLocation location( (script_r.*location_r)() );
59 if ( ! location.filename().empty() )
61 ret = access_r.provideFile( script_r.repoInfo(), location );
int chmod(const Pathname &path, mode_t mode)
Like 'chmod'.
static const Pathname & defaultLocation()
AutoDispose< const Pathname > ManagedFile
A Pathname plus associated cleanup code to be executed when path is no longer needed.
ManagedFile provideSrcPackage(const SrcPackage_constPtr &srcPackage_r) const
Provide SrcPackage in a local file.
SrcPackageProvider(repo::RepoMediaAccess &access_r)
Ctor.
int unlink(const Pathname &path)
Like 'unlink'.
Reference counted access to a _Tp object calling a custom Dispose function when the last AutoDispose ...
~SrcPackageProvider()
Dtor.
RepoMediaAccess & _access