binaries.h 2.73 KB
Newer Older
Bernhard Link's avatar
Bernhard Link committed
1 2
#ifndef REPREPRO_BINARIES_H
#define REPREPRO_BINARIES_H
Bernhard Link's avatar
Bernhard Link committed
3

Bernhard Link's avatar
Bernhard Link committed
4
#ifndef REPREPRO_ERROR_H
Bernhard Link's avatar
Bernhard Link committed
5 6 7
#include "error.h"
#warning "What's hapening here?"
#endif
Bernhard Link's avatar
Bernhard Link committed
8
#ifndef REPREPRO_TARGET_H
9 10
#include "target.h"
#endif
11 12 13
#ifndef REPREPRO_CHECKSUMS_H
#include "checksums.h"
#endif
Bernhard Link's avatar
Bernhard Link committed
14

15

16
/* Functions for the target.h-stuff: */
17
retvalue binaries_getversion(const char *chunk,char **version);
18 19
retvalue binaries_getinstalldata(const struct target *t, const char *packagename, const char *version, architecture_t, const char *chunk, /*@out@*/char **control, /*@out@*/struct strlist *filekeys, /*@out@*/struct checksumsarray *origfiles);
retvalue binaries_getarchitecture(const char *chunk, /*@out@*/architecture_t *);
20 21
retvalue binaries_getfilekeys(const char *chunk, /*@out@*/struct strlist *);
retvalue binaries_getchecksums(const char *chunk, /*@out@*/struct checksumsarray *);
22 23
retvalue binaries_doreoverride(const struct distribution *,const char *packagename,const char *controlchunk,/*@out@*/char **newcontrolchunk);
retvalue ubinaries_doreoverride(const struct distribution *,const char *packagename,const char *controlchunk,/*@out@*/char **newcontrolchunk);
24
retvalue binaries_retrack(const char *packagename, const char *chunk, trackingdb tracks, struct database *);
25
retvalue binaries_getsourceandversion(const char *chunk, const char *packagename, char **source, char **version);
26

27
/* Functions for checkindeb.c and incoming.c: */
28

29 30
struct deb_headers {
	char *name,*version;
31 32
	char *source;
	architecture_t architecture_atom;
33 34 35 36 37 38 39 40 41 42 43 44 45
	char *control;
	/* only extracted when requested: */
	/*@null@*/char *sourceversion;
	/* optional fields: */
	/*@null@*/char *section;
	/*@null@*/char *priority;
};

/* read contents of filename into deb_headers.
 * - does not follow retvalue conventions, some fields may be set even when
 *   error returned
 * - no checks for sanity of values, left to the caller */

46
retvalue binaries_readdeb(struct deb_headers *, const char *filename, bool needssourceversion);
47 48
void binaries_debdone(struct deb_headers *);

49
retvalue binaries_calcfilekeys(component_t, const struct deb_headers *, packagetype_t, /*@out@*/struct strlist *);
50

51
struct overrideinfo;
52
retvalue binaries_complete(const struct deb_headers *, const char *filekey, const struct checksums *, const struct overrideinfo *, const char *section, const char *priority, char **newcontrol);
53

54
retvalue binaries_adddeb(const struct deb_headers *, struct database *, architecture_t forcedarchitecture, packagetype_t, struct distribution *, /*@null@*/struct trackingdata *, component_t, const struct strlist *filekeys, const char *control);
55
retvalue binaries_checkadddeb(const struct deb_headers *, struct database *, architecture_t forcearchitecture, packagetype_t, struct distribution *, bool tracking, component_t, bool permitnewerold);
Bernhard Link's avatar
Bernhard Link committed
56
#endif