CARDS 2.4.87
Package manager for the NuTyX GNU/Linux distribution
Pkgrepo Class Reference
Inheritance diagram for Pkgrepo:
Cards_info Flcards_info Pkgtest Repodwl Repodwl Pkginst Pkginst Pkginst Pkginst cards::CClient Cards_create Cards_install Cards_upgrade cards::CClient Cards_create Cards_install Cards_upgrade cards::CClient Cards_create Cards_install Cards_upgrade cards::CClient Cards_create Cards_install Cards_upgrade

Public Member Functions

 Pkgrepo (const std::string &fileName)
 
std::set< std::string > getListOutOfDate ()
 
std::string getPortDir (const std::string &portName)
 
std::string getBasePortName (const std::string &portName)
 
std::string getBasePackageName (const std::string &packageName)
 
std::string getBasePackageVersion (const std::string &packageName)
 
std::string getPortVersion (const std::string &portName)
 
int getBasePackageRelease (const std::string &packageName)
 
int getPortRelease (const std::string &portName)
 
bool checkPortExist (const std::string &portName)
 
std::set< std::string > getListOfPackagesFromCollection (const std::string &collectionName)
 
time_t getBinaryBuildTime (const std::string &portName)
 
std::set< std::string > getBinaryPackageList ()
 
std::set< Pkg * > getListOfPackages ()
 
std::vector< RepoInfogetRepoInfo ()
 
unsigned int getPortsList ()
 
bool getBinaryPackageInfo (const std::string &packageName)
 
bool getPortInfo (const std::string &portName)
 
 Pkgrepo (const std::string &fileName)
 
std::set< std::string > getListOutOfDate ()
 
std::string getPortDir (const std::string &portName)
 
std::string getBasePortName (const std::string &portName)
 
std::string getBasePackageName (const std::string &packageName)
 
std::string getBasePackageVersion (const std::string &packageName)
 
std::string getPortVersion (const std::string &portName)
 
int getBasePackageRelease (const std::string &packageName)
 
int getPortRelease (const std::string &portName)
 
bool checkPortExist (const std::string &portName)
 
std::set< std::string > getListOfPackagesFromCollection (const std::string &collectionName)
 
time_t getBinaryBuildTime (const std::string &portName)
 
std::set< std::string > getBinaryPackageList ()
 
std::set< Pkg * > getListOfPackages ()
 
std::vector< RepoInfogetRepoInfo ()
 
unsigned int getPortsList ()
 
bool getBinaryPackageInfo (const std::string &packageName)
 
bool getPortInfo (const std::string &portName)
 

Static Public Member Functions

static int parseConfig (const char *fileName, Config &config)
 
static int parseConfig (const char *fileName, Config &config)
 

Protected Member Functions

int parseConfig (const char *fileName)
 
void parsePkgRepoCollectionFile ()
 
void parseCollectionDirectory ()
 
void parseCurrentPackagePkgRepoFile ()
 
void parsePackagePkgfileFile ()
 
int parseConfig (const char *fileName)
 
void parsePkgRepoCollectionFile ()
 
void parseCollectionDirectory ()
 
void parseCurrentPackagePkgRepoFile ()
 
void parsePackagePkgfileFile ()
 

Protected Attributes

bool m_parsePkgRepoCollectionFile
 
bool m_parseCollectionDirectory
 
bool m_parsePackagePkgfileFile
 
std::vector< PortsDirectory >::iterator m_PortsDirectory_i
 
std::vector< BasePackageInfo >::iterator m_BasePackageInfo_i
 
std::vector< PortFilesList >::iterator m_PortFilesList_i
 
std::vector< PortFilesListm_portFilesList
 
std::string m_packageFileName
 
std::string m_packageFileNameSignature
 
std::string m_configFileName
 
Config m_config
 
std::vector< PortsDirectorym_portsDirectoryList
 

Member Function Documentation

◆ checkPortExist() [1/2]

bool Pkgrepo::checkPortExist ( const std::string &  portName)

return true if port name exist

◆ checkPortExist() [2/2]

bool Pkgrepo::checkPortExist ( const std::string &  portName)

return true if port name exist

◆ getBasePackageName() [1/2]

std::string Pkgrepo::getBasePackageName ( const std::string &  packageName)

return the basename of the packagename

◆ getBasePackageName() [2/2]

std::string Pkgrepo::getBasePackageName ( const std::string &  packageName)

return the basename of the packagename

◆ getBasePackageRelease() [1/2]

int Pkgrepo::getBasePackageRelease ( const std::string &  packageName)

return the release of the packagename

◆ getBasePackageRelease() [2/2]

int Pkgrepo::getBasePackageRelease ( const std::string &  packageName)

return the release of the packagename

◆ getBasePackageVersion() [1/2]

std::string Pkgrepo::getBasePackageVersion ( const std::string &  packageName)

return the version of the packagename

◆ getBasePackageVersion() [2/2]

std::string Pkgrepo::getBasePackageVersion ( const std::string &  packageName)

return the version of the packagename

◆ getBasePortName() [1/2]

std::string Pkgrepo::getBasePortName ( const std::string &  portName)

return the basename of the portname

◆ getBasePortName() [2/2]

std::string Pkgrepo::getBasePortName ( const std::string &  portName)

return the basename of the portname

◆ getBinaryBuildTime() [1/2]

time_t Pkgrepo::getBinaryBuildTime ( const std::string &  portName)

return the build time of the binary

◆ getBinaryBuildTime() [2/2]

time_t Pkgrepo::getBinaryBuildTime ( const std::string &  portName)

return the build time of the binary

◆ getBinaryPackageList() [1/2]

std::set<std::string> Pkgrepo::getBinaryPackageList ( )

return the list of available binaries packages

◆ getBinaryPackageList() [2/2]

set< string > Pkgrepo::getBinaryPackageList ( )

return the list of available binaries packages

◆ getListOfPackages() [1/2]

std::set<Pkg*> Pkgrepo::getListOfPackages ( )

return a Pkg set List of available binaries packages

◆ getListOfPackages() [2/2]

set< Pkg * > Pkgrepo::getListOfPackages ( )

return a Pkg set List of available binaries packages

◆ getListOfPackagesFromCollection() [1/2]

std::set<std::string> Pkgrepo::getListOfPackagesFromCollection ( const std::string &  collectionName)

retun list of packages of the collection

◆ getListOfPackagesFromCollection() [2/2]

std::set<std::string> Pkgrepo::getListOfPackagesFromCollection ( const std::string &  collectionName)

retun list of packages of the collection

◆ getListOutOfDate() [1/2]

std::set<std::string> Pkgrepo::getListOutOfDate ( )

return a list of ports which has to be compiled OR has to be updated

Depends on: parsePkgRepoCollectionFile

Populate: nothing

◆ getListOutOfDate() [2/2]

set< string > Pkgrepo::getListOutOfDate ( )

return a list of ports which has to be compiled OR has to be updated

Depends on: parsePkgRepoCollectionFile

Populate: nothing

◆ getPortDir() [1/2]

std::string Pkgrepo::getPortDir ( const std::string &  portName)

return the folder of the port name

◆ getPortDir() [2/2]

string Pkgrepo::getPortDir ( const std::string &  portName)

return the folder of the port name

◆ getPortRelease() [1/2]

int Pkgrepo::getPortRelease ( const std::string &  portName)

return the release of the port name

◆ getPortRelease() [2/2]

int Pkgrepo::getPortRelease ( const std::string &  portName)

return the release of the port name

◆ getPortsList() [1/2]

unsigned int Pkgrepo::getPortsList ( )

printout the list of available ports which are compiled return a list of name version

◆ getPortsList() [2/2]

unsigned int Pkgrepo::getPortsList ( )

printout the list of available ports which are compiled return a list of name version

◆ getPortVersion() [1/2]

std::string Pkgrepo::getPortVersion ( const std::string &  portName)

return the version of the port name

◆ getPortVersion() [2/2]

std::string Pkgrepo::getPortVersion ( const std::string &  portName)

return the version of the port name

◆ getRepoInfo() [1/2]

std::vector<RepoInfo> Pkgrepo::getRepoInfo ( )

populate RepoInfo List

◆ getRepoInfo() [2/2]

vector< RepoInfo > Pkgrepo::getRepoInfo ( )

populate RepoInfo List

◆ parseCollectionDirectory() [1/2]

void Pkgrepo::parseCollectionDirectory ( )
protected

parse the directory directly based on what we have locally. This method is used in the case of synchronisation with the mirror is NOT possible. If they are no directories, they will be nothing add

Depends on: m_config.dirUrl

populate: m_portsDirectoryList ( Dir, BasePackageInfo->basePackageName only )

◆ parseCollectionDirectory() [2/2]

void Pkgrepo::parseCollectionDirectory ( )
protected

parse the directory directly based on what we have locally. This method is used in the case of synchronisation with the mirror is NOT possible. If they are no directories, they will be nothing add

Depends on: m_config.dirUrl

populate: m_portsDirectoryList ( Dir, BasePackageInfo->basePackageName only )

◆ parseConfig() [1/2]

int Pkgrepo::parseConfig ( const char *  fileName)
protected

parse the config file

◆ parseConfig() [2/2]

int Pkgrepo::parseConfig ( const char *  fileName)
protected

parse the config file

◆ parseCurrentPackagePkgRepoFile() [1/2]

void Pkgrepo::parseCurrentPackagePkgRepoFile ( )
protected

parse the ".PKGREPO" file of a port directory if it found a first line with the date of construction and the extension of the archive then it populate the list of packages

Depends on: parsePkgRepoCollectionFile

Populate: m_portFilesList (md5SUM.name,arch)

◆ parseCurrentPackagePkgRepoFile() [2/2]

void Pkgrepo::parseCurrentPackagePkgRepoFile ( )
protected

parse the ".PKGREPO" file of a port directory if it found a first line with the date of construction and the extension of the archive then it populate the list of packages

Depends on: parsePkgRepoCollectionFile

Populate: m_portFilesList (md5SUM.name,arch)

◆ parsePackagePkgfileFile() [1/2]

void Pkgrepo::parsePackagePkgfileFile ( )
protected

parse the "Pkgfile" file for each basePackage add the version of the port found in the Pkgfile

◆ parsePackagePkgfileFile() [2/2]

void Pkgrepo::parsePackagePkgfileFile ( )
protected

parse the "Pkgfile" file for each basePackage add the version of the port found in the Pkgfile

◆ parsePkgRepoCollectionFile() [1/2]

void Pkgrepo::parsePkgRepoCollectionFile ( )
protected

parse the .PKGREPO file which belong to the collection found in the configuration file cards.conf. It populate the the m_packageList.basePackageName part by looking the downloaded .PKGREPO file of each activate collection

Depends on: m_config.dirUrl

populate: m_portsDirectoryList (Dir, Url, BasePackageInfo for each possible port found in Dir) with the contents of the collection .PKGREPO file

◆ parsePkgRepoCollectionFile() [2/2]

void Pkgrepo::parsePkgRepoCollectionFile ( )
protected

parse the .PKGREPO file which belong to the collection found in the configuration file cards.conf. It populate the the m_packageList.basePackageName part by looking the downloaded .PKGREPO file of each activate collection

Depends on: m_config.dirUrl

populate: m_portsDirectoryList (Dir, Url, BasePackageInfo for each possible port found in Dir) with the contents of the collection .PKGREPO file


The documentation for this class was generated from the following files: