rpm
5.4.14
|
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. More... | |
rpmrepo | rpmrepoLink (rpmrepo repo) |
Reference a repo wrapper instance. More... | |
rpmrepo | rpmrepoFree (rpmrepo repo) |
Destroy a repo wrapper. More... | |
rpmrepo | rpmrepoNew (char **av, int flags) |
Create and load a repo wrapper. More... | |
void | rpmrepoError (int lvl, const char *fmt,...) |
Print an error message and exit (if requested). More... | |
const char * | rpmrepoRealpath (const char *lpath) |
Return realpath(3) canonicalized absolute path. More... | |
int | rpmrepoTestSetupDirs (rpmrepo repo) |
Test for repository sanity. More... | |
const char ** | rpmrepoGetFileList (rpmrepo repo, const char *roots[], const char *ext) |
Walk file/directory trees, looking for files with an extension. More... | |
int | rpmrepoCheckTimeStamps (rpmrepo repo) |
Check that repository time stamp is newer than any contained package. More... | |
int | rpmrepoDoPkgMetadata (rpmrepo repo) |
Write repository metadata files. More... | |
int | rpmrepoDoRepoMetadata (rpmrepo repo) |
Write repository manifest. More... | |
int | rpmrepoDoFinalMove (rpmrepo repo) |
Rename temporary repository to final paths. More... | |
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__)) |
Check that repository time stamp is newer than any contained package.
repo | repository |
Definition at line 681 of file rpmrepo.c.
References _, NULL, rc, rpmioExists(), rpmrepoError(), and st.
Referenced by if().
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, int, NULL, p, Rename(), Rmdir(), rpmGetPath(), rpmioExists(), rpmrepoError(), st, t, Unlink(), and xx.
Write repository metadata files.
repo | repository |
Definition at line 1569 of file rpmrepo.c.
References _free(), argvAdd(), argvCount(), argvFree(), fprintf(), NULL, path, rc, Realpath(), repoWriteMetadataDocs(), rpmGetPath(), rpmrepoCloseMDFile(), rpmrepoGetFileList(), rpmrepoOpenMDFile(), and xstrdup().
Write repository manifest.
repo | repository |
Definition at line 1078 of file rpmrepo.c.
References _, _free(), fn, Fopen(), NULL, rc, Rename(), rpmExpand(), rpmGetPath(), rpmioExists(), rpmrepoError(), rpmrepoFclose(), rpmrepoGetPath(), rpmrepoMDExpand(), rpmrfileXMLWrite(), st, strcmp(), Unlink(), void, and xstrdup().
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, exit, EXIT_FAILURE, fprintf(), NULL, and void.
Referenced by if(), repoWriteMetadataDocs(), rfileHeaderSprintf(), rpmrepoCheckTimeStamps(), rpmrepoCloseMDFile(), rpmrepoDoFinalMove(), rpmrepoDoRepoMetadata(), rpmrepoGetFileList(), rpmrepoInitPopt(), rpmrepoMkdir(), rpmrepoOpenMDFile(), rpmrepoTestSetupDirs(), and rpmrfileXMLWrite().
Destroy a repo wrapper.
repo | repo wrapper |
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(), NULL, p, rpmrepoError(), t, void, and xx.
Referenced by rpmrepoDoPkgMetadata().
Reference a repo wrapper instance.
repo | repo wrapper |
Referenced by rpmrepoNew().
Create and load a repo wrapper.
av | repo argv |
flags | repo flags |
Definition at line 1897 of file rpmrepo.c.
References repo, rpmrepoGetPool(), rpmrepoInitPopt(), rpmrepoLink(), and xx.
const char* rpmrepoRealpath | ( | const char * | lpath | ) |
Return realpath(3) canonicalized absolute path.
lpath | file path |
Definition at line 515 of file rpmrepo.c.
References fullpath, MAXPATHLEN, NULL, Realpath(), and xstrdup().
Referenced by if(), and rpmrepoInitPopt().
Test for repository sanity.
repo | repository |
Definition at line 530 of file rpmrepo.c.
References _, _free(), Access(), fn, NULL, rc, rpmGetPath(), rpmioExists(), rpmrepoError(), rpmrepoGetPath(), rpmrepoMkdir(), st, strcmp(), and W_OK.