createrepo_c library  0.2.1
C library for metadata manipulation
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Package parser API.

Functions

void cr_package_parser_init ()
 
void cr_package_parser_cleanup ()
 
cr_Packagecr_package_from_rpm (const char *filename, cr_ChecksumType checksum_type, const char *location_href, const char *location_base, int changelog_limit, struct stat *stat_buf, GError **err)
 
struct cr_XmlStruct cr_xml_from_rpm (const char *filename, cr_ChecksumType checksum_type, const char *location_href, const char *location_base, int changelog_limit, struct stat *stat_buf, GError **err)
 

Variables

short cr_initialized
 

Detailed Description

Function Documentation

cr_Package* cr_package_from_rpm ( const char *  filename,
cr_ChecksumType  checksum_type,
const char *  location_href,
const char *  location_base,
int  changelog_limit,
struct stat *  stat_buf,
GError **  err 
)

Generate package object from package file.

Parameters
filenamefilename
checksum_typetype of checksum to be used
location_hrefpackage location inside repository
location_baselocation (url) of repository
changelog_limitnumber of changelog entries
stat_bufstruct stat of the filename (optional - could be NULL)
errGError **
Returns
cr_Package
void cr_package_parser_cleanup ( )

Free global structures for package parsing.

void cr_package_parser_init ( )

Initialize global structures for package parsing. This function call rpmReadConfigFiles() and create global transaction set. This function should be called only once! This function is not thread safe!

struct cr_XmlStruct cr_xml_from_rpm ( const char *  filename,
cr_ChecksumType  checksum_type,
const char *  location_href,
const char *  location_base,
int  changelog_limit,
struct stat *  stat_buf,
GError **  err 
)

Generate XML for the specified package.

Parameters
filenamerpm filename
checksum_typetype of checksum to be used
location_hrefpackage location inside repository
location_baselocation (url) of repository
changelog_limitnumber of changelog entries
stat_bufstruct stat of the filename (optional - could be NULL)
errGError **
Returns
struct cr_XmlStruct with primary, filelists and other xmls

Variable Documentation

short cr_initialized

Status of initialization of global structures for package parsing.