Librepo library  1.12.1
C library for downloading linux repository metadata and packages
Yum repo manipulation

Data Structures

struct  LrYumRepoPath
 
struct  LrYumRepo
 
struct  CbData_s
 

Typedefs

typedef struct CbData_s CbData
 

Functions

LrYumRepolr_yum_repo_init (void)
 
void lr_yum_repo_free (LrYumRepo *repo)
 
const char * lr_yum_repo_path (LrYumRepo *repo, const char *type)
 
int hmfcb (void *clientp, const char *msg, const char *url)
 
gboolean lr_prepare_repodata_dir (LrHandle *handle, GError **err)
 
gboolean lr_store_mirrorlist_files (LrHandle *handle, LrYumRepo *repo, GError **err)
 
gboolean lr_copy_metalink_content (LrHandle *handle, LrYumRepo *repo, GError **err)
 
int lr_prepare_repomd_xml_file (LrHandle *handle, char **path, GError **err)
 
gboolean lr_check_repomd_xml_asc_availability (LrHandle *handle, LrYumRepo *repo, int fd, char *path, GError **err)
 
void lr_get_best_checksum (const LrMetalink *metalink, GSList **checksums)
 
CbDatalr_get_metadata_failure_callback (const LrHandle *handle)
 
gboolean lr_yum_download_repos (GSList *targets, GError **err)
 

Detailed Description

Typedef Documentation

◆ CbData

typedef struct CbData_s CbData

Mirror Failure Callback Data

Function Documentation

◆ hmfcb()

int hmfcb ( void *  clientp,
const char *  msg,
const char *  url 
)

Handle mirror failure callback

Parameters
clientpPointer to user data.
msgError message.
urlMirror URL.
Returns
See LrCbReturnCode codes

◆ lr_copy_metalink_content()

gboolean lr_copy_metalink_content ( LrHandle handle,
LrYumRepo repo,
GError **  err 
)

Copies metalink content

Parameters
handleHandle object containing dest dir path
repoYum repository
errObject for storing errors
Returns
True on success

◆ lr_get_best_checksum()

void lr_get_best_checksum ( const LrMetalink metalink,
GSList **  checksums 
)

Stores best checksum on the beginning of

Parameters
checksums
metalinkMetalink
checksumsList of checksums

◆ lr_get_metadata_failure_callback()

CbData* lr_get_metadata_failure_callback ( const LrHandle handle)

Returns mirror failure callback data

Parameters
handleHandle object
Returns
Mirror Failure Callback Data

◆ lr_prepare_repodata_dir()

gboolean lr_prepare_repodata_dir ( LrHandle handle,
GError **  err 
)

Prepares directory for repo data

Parameters
handleHandle object containing path to repo data
errObject for storing errors
Returns
True on success

◆ lr_prepare_repomd_xml_file()

int lr_prepare_repomd_xml_file ( LrHandle handle,
char **  path,
GError **  err 
)

Prepares repomd.xml file

Parameters
handleHandle object containing dest dir path
path
errObject for storing errors
Returns
File descriptor of repomd.xml file

◆ lr_store_mirrorlist_files()

gboolean lr_store_mirrorlist_files ( LrHandle handle,
LrYumRepo repo,
GError **  err 
)

Stores mirror list files

Parameters
handleHandle object containing path to mirror list
repoYum repository
errObject for storing errors
Returns
True on success

◆ lr_yum_download_repos()

gboolean lr_yum_download_repos ( GSList *  targets,
GError **  err 
)
Parameters
targets
err
Returns
return TRUE on success, FALSE otherwise

◆ lr_yum_repo_free()

void lr_yum_repo_free ( LrYumRepo repo)

Free yum repo - free its item and the repo itself.

Parameters
repoYum repo object.

◆ lr_yum_repo_init()

LrYumRepo* lr_yum_repo_init ( void  )

Allocate new yum repo object.

Returns
New yum repo object.

◆ lr_yum_repo_path()

const char* lr_yum_repo_path ( LrYumRepo repo,
const char *  type 
)

Retruns path for the file from repository.

Parameters
repoYum repo object.
typeType of path. E.g. "primary", "filelists", ...
Returns
Path or NULL.