rpm
5.4.10
|
Go to the source code of this file.
Macros | |
#define | rpmrepoUnlink(_repo) ((rpmrepo)rpmioUnlinkPoolItem((rpmioItem)(_repo), __FUNCTION__, __FILE__, __LINE__)) |
#define | rpmrepoLink(_repo) ((rpmrepo)rpmioLinkPoolItem((rpmioItem)(_repo), __FUNCTION__, __FILE__, __LINE__)) |
#define | rpmrepoFree(_repo) ((rpmrepo)rpmioFreePoolItem((rpmioItem)(_repo), __FUNCTION__, __FILE__, __LINE__)) |
Typedefs | |
typedef struct rpmrepo_s * | rpmrepo |
typedef struct rpmrfile_s * | rpmrfile |
Functions | |
rpmrepo | rpmrepoUnlink (rpmrepo repo) |
Unreference a repo wrapper instance. | |
rpmrepo | rpmrepoLink (rpmrepo repo) |
Reference a repo wrapper instance. | |
rpmrepo | rpmrepoFree (rpmrepo repo) |
Destroy a repo wrapper. | |
rpmrepo | rpmrepoNew (char **av, int flags) |
Create and load a repo wrapper. | |
void | rpmrepoError (int lvl, const char *fmt,...) |
Print an error message and exit (if requested). | |
const char * | rpmrepoRealpath (const char *lpath) |
Return realpath(3) canonicalized absolute path. | |
int | rpmrepoTestSetupDirs (rpmrepo repo) |
Test for repository sanity. | |
const char ** | rpmrepoGetFileList (rpmrepo repo, const char *roots[], const char *ext) |
Walk file/directory trees, looking for files with an extension. | |
int | rpmrepoCheckTimeStamps (rpmrepo repo) |
Check that repository time stamp is newer than any contained package. | |
int | rpmrepoDoPkgMetadata (rpmrepo repo) |
Write repository metadata files. | |
int | rpmrepoDoRepoMetadata (rpmrepo repo) |
Write repository manifest. | |
int | rpmrepoDoFinalMove (rpmrepo repo) |
Rename temporary repository to final paths. |
Variables | |
int | _rpmrepo_debug |
#define rpmrepoFree | ( | _repo | ) | ((rpmrepo)rpmioFreePoolItem((rpmioItem)(_repo), __FUNCTION__, __FILE__, __LINE__)) |
#define rpmrepoLink | ( | _repo | ) | ((rpmrepo)rpmioLinkPoolItem((rpmioItem)(_repo), __FUNCTION__, __FILE__, __LINE__)) |
#define rpmrepoUnlink | ( | _repo | ) | ((rpmrepo)rpmioUnlinkPoolItem((rpmioItem)(_repo), __FUNCTION__, __FILE__, __LINE__)) |
int rpmrepoCheckTimeStamps | ( | rpmrepo | repo | ) |
Check that repository time stamp is newer than any contained package.
repo | repository |
Definition at line 681 of file rpmrepo.c.
References _, rpmioExists(), and rpmrepoError().
Referenced by main().
int rpmrepoDoFinalMove | ( | rpmrepo | repo | ) |
Rename temporary repository to final paths.
repo | repository |
Definition at line 1264 of file rpmrepo.c.
References _, _free(), errno, _ftsent::fts_accpath, Fts_close(), FTS_DP, FTS_F, _ftsent::fts_info, _ftsent::fts_level, _ftsent::fts_name, FTS_NOCHDIR, Fts_open(), _ftsent::fts_path, FTS_PHYSICAL, Fts_read(), FTS_SL, FTS_SLNONE, FTS_XDEV, Rename(), Rmdir(), rpmGetPath(), rpmioExists(), rpmrepoError(), and Unlink().
Referenced by main().
int rpmrepoDoPkgMetadata | ( | rpmrepo | repo | ) |
Write repository metadata files.
repo | repository |
Definition at line 1569 of file rpmrepo.c.
References _free(), argvAdd(), argvCount(), argvFree(), Realpath(), repoWriteMetadataDocs(), rpmGetPath(), rpmrepoCloseMDFile(), rpmrepoGetFileList(), rpmrepoOpenMDFile(), and xstrdup().
Referenced by main().
int rpmrepoDoRepoMetadata | ( | rpmrepo | repo | ) |
Write repository manifest.
repo | repository |
Definition at line 1078 of file rpmrepo.c.
References _, _free(), algo2tagname(), Fopen(), Rename(), rpmExpand(), rpmGetPath(), rpmioExists(), rpmrepoError(), rpmrepoFclose(), rpmrepoGetPath(), rpmrepoMDExpand(), rpmrfileXMLWrite(), Unlink(), and xstrdup().
Referenced by main().
void rpmrepoError | ( | int | lvl, |
const char * | fmt, | ||
... | |||
) |
Print an error message and exit (if requested).
lvl | error level (non-zero exits) |
fmt | msg format |
Definition at line 427 of file rpmrepo.c.
References __progname, and EXIT_FAILURE.
Referenced by main(), repoWriteMetadataDocs(), rfileHeaderSprintf(), rpmrepoCheckTimeStamps(), rpmrepoCloseMDFile(), rpmrepoDoFinalMove(), rpmrepoDoRepoMetadata(), rpmrepoGetFileList(), rpmrepoInitPopt(), rpmrepoMkdir(), rpmrepoOpenMDFile(), rpmrepoTestSetupDirs(), and rpmrfileXMLWrite().
Destroy a repo wrapper.
repo | repo wrapper |
Referenced by main().
const char** rpmrepoGetFileList | ( | rpmrepo | repo, |
const char * | roots[], | ||
const char * | ext | ||
) |
Walk file/directory trees, looking for files with an extension.
repo | repository |
roots | file/directory trees to search |
ext | file extension to match (usually ".rpm") |
Definition at line 622 of file rpmrepo.c.
References _, argvAdd(), argvPrint(), chkSuffix(), errno, Fts_close(), FTS_D, FTS_DP, FTS_F, _ftsent::fts_info, _ftsent::fts_level, _ftsent::fts_name, _ftsent::fts_namelen, Fts_open(), _ftsent::fts_path, Fts_read(), FTS_SL, mireApply(), and rpmrepoError().
Referenced by main(), and rpmrepoDoPkgMetadata().
Reference a repo wrapper instance.
repo | repo wrapper |
Referenced by rpmrepoNew().
rpmrepo rpmrepoNew | ( | char ** | av, |
int | flags | ||
) |
Create and load a repo wrapper.
av | repo argv |
flags | repo flags |
Definition at line 1897 of file rpmrepo.c.
References rpmrepoGetPool(), rpmrepoInitPopt(), and rpmrepoLink().
Referenced by main().
const char* rpmrepoRealpath | ( | const char * | lpath | ) |
Return realpath(3) canonicalized absolute path.
lpath | file path |
Definition at line 515 of file rpmrepo.c.
References MAXPATHLEN, Realpath(), and xstrdup().
Referenced by main(), and rpmrepoInitPopt().
int rpmrepoTestSetupDirs | ( | rpmrepo | repo | ) |
Test for repository sanity.
repo | repository |
Definition at line 530 of file rpmrepo.c.
References _, _free(), Access(), rpmGetPath(), rpmioExists(), rpmrepoError(), rpmrepoGetPath(), rpmrepoMkdir(), and W_OK.
Referenced by main().