createrepo_c library
C library for metadata manipulation
 Vše Třídy Funkce Proměnné Definice typů Výčty Hodnoty výčtu Skupiny Stránky
Locate metadata API.

Datové struktry

struct  cr_MetadataLocation
 

Funkce

struct cr_MetadataLocationcr_get_metadata_location (const char *repopath, int ignore_sqlite)
 
void cr_free_metadata_location (struct cr_MetadataLocation *ml)
 
int cr_remove_metadata (const char *repopath)
 
int cr_remove_metadata_classic (const char *repopath, int retain)
 

Detailní popis

Dokumentace funkcí

void cr_free_metadata_location ( struct cr_MetadataLocation ml)

Free cr_MetadataLocation. If repodata were downloaded remove a temporary directory with repodata.

Parametry
mlMeatadaLocation
struct cr_MetadataLocation* cr_get_metadata_location ( const char *  repopath,
int  ignore_sqlite 
)
read

Parses repomd.xml and returns a filled cr_MetadataLocation structure. Remote repodata (repopath with prefix "ftp://" or "http://") are dowloaded into a temporary directory and removed when the cr_free_metadata_location() is called on the cr_MetadataLocation.

Parametry
repopathpath to directory with repodata/ subdirectory
ignore_sqliteif ignore_sqlite != 0 sqlite dbs are ignored
Návratová hodnota
filled cr_MetadataLocation structure or NULL
int cr_remove_metadata ( const char *  repopath)

Remove files related to repodata from the specified path. Files not listed in repomd.xml and with nonstandard names (standard names are names with suffixes like primary.xml.*, primary.sqlite.*, other.xml.*, etc.) are keep untouched (repodata/ subdirectory IS NOT removed!).

Parametry
repopathpath to directory with repodata/ subdirectory
Návratová hodnota
number of removed files
int cr_remove_metadata_classic ( const char *  repopath,
int  retain 
)

Remove repodata in same manner as classic createrepo. This function removes only (primary|filelists|other)[.sqlite].* files from repodata.

Parametry
repopathpath to directory with repodata/subdirectory
retainkeep around the latest N old, uniquely named primary, filelists and otherdata xml and sqlite files. If <1 no old files will be kept.