5 * \file build/buildio.h
6 * Routines to read and write packages.
7 * @deprecated this information will move elsewhere eventually.
8 * @todo Eliminate, merge into rpmlib.
16 typedef /*@abstract@*/ struct cpioSourceArchive_s {
17 unsigned int cpioArchiveSize;
20 /*@only@*/ struct rpmlead * lead; /* XXX FIXME: exorcize lead/arch/os */
28 * Read rpm package components from file.
29 * @param fileName file name of package (or NULL to use stdin)
30 * @retval specp spec structure to carry package header (or NULL)
31 * @retval lead package lead
32 * @retval sigs package signature
34 * @return 0 on success
36 /*@unused@*/ int readRPM(/*@null@*/ const char * fileName,
37 /*@out@*/ Spec * specp,
38 /*@out@*/ struct rpmlead * lead,
39 /*@out@*/ Header * sigs,
41 /*@globals rpmGlobalMacroContext,
42 fileSystem, internalState @*/
43 /*@modifies *specp, *lead, *sigs, csa, csa->cpioFdIn,
44 rpmGlobalMacroContext, fileSystem, internalState @*/;
47 * Write rpm package to file.
49 * @warning The first argument (header) is now passed by reference in order to
50 * return a reloaded contiguous header to the caller.
52 * @retval hdrp header to write (final header is returned).
53 * @param fileName file name of package
54 * @param type RPMLEAD_SOURCE/RPMLEAD_BINARY
57 * @retval cookie generated cookie (i.e build host/time)
58 * @return 0 on success
60 int writeRPM(Header * hdrp,
61 const char * fileName,
64 /*@null@*/ char * passPhrase,
65 /*@out@*/ const char ** cookie)
66 /*@globals rpmGlobalMacroContext,
67 fileSystem, internalState @*/
68 /*@modifies *hdrp, *cookie, csa, csa->cpioArchiveSize,
69 rpmGlobalMacroContext, fileSystem, internalState @*/;
75 #endif /* _H_BUILDIO_ */