Package parser API.

Functions

void cr_package_parser_init ()
void cr_package_parser_cleanup ()
cr_Packagecr_package_from_rpm_base (const char *filename, int changelog_limit, cr_HeaderReadingFlags flags, GError **err)
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, cr_HeaderReadingFlags flags, 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)

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,
cr_HeaderReadingFlags  flags,
GError **  err 
)

Generate a package object from a package file.

Parameters:
filename filename
checksum_type type of checksum to be used
location_href package location inside repository
location_base location (url) of repository
changelog_limit number of changelog entries
stat_buf struct stat of the filename (optional - could be NULL)
flags Flags for header reading
err GError **
Returns:
cr_Package or NULL on error
cr_Package* cr_package_from_rpm_base ( const char *  filename,
int  changelog_limit,
cr_HeaderReadingFlags  flags,
GError **  err 
)

Generate a package object from a package file. Some attributes like pkgId (checksum), checksum_type, time_file, location_href, location_base, rpm_header_start, rpm_header_end are not filled.

Parameters:
filename filename
changelog_limit number of changelogs that will be loaded
flags Flags for header reading
err GError **
Returns:
cr_Package or NULL on error
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 
) [read]

Generate XML for the specified package.

Parameters:
filename rpm filename
checksum_type type of checksum to be used
location_href package location inside repository
location_base location (url) of repository
changelog_limit number of changelog entries
stat_buf struct stat of the filename (optional - could be NULL)
err GError **
Returns:
struct cr_XmlStruct with primary, filelists and other xmls

Generated on 22 Oct 2014 for createrepo_c library by  doxygen 1.6.1