sources.h 1.65 KB
Newer Older
Bernhard Link's avatar
Bernhard Link committed
1 2
#ifndef REPREPRO_SOURCES_H
#define REPREPRO_SOURCES_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
#include "error.h"
Bernhard Link's avatar
Bernhard Link committed
6
#warning "What's hapening here?"
Bernhard Link's avatar
Bernhard Link committed
7
#endif
Bernhard Link's avatar
Bernhard Link committed
8
#ifndef REPREPRO_TARGET_H
9 10
#include "target.h"
#endif
Bernhard Link's avatar
Bernhard Link committed
11

12
/* Functions for the target.h-stuff: */
13 14 15 16 17 18 19 20
get_version sources_getversion;
get_installdata sources_getinstalldata;
get_architecture sources_getarchitecture;
get_filekeys sources_getfilekeys;
get_checksums sources_getchecksums;
do_reoverride sources_doreoverride;
do_retrack sources_retrack;
get_sourceandversion sources_getsourceandversion;
21
complete_checksums sources_complete_checksums;
22 23 24 25 26

/* Functions for checkindsc.c and incoming.c: */
struct dsc_headers {
	char *name, *version;
	char *control;
27
	struct checksumsarray files;
28
	/* normally not in a .dsc file: */
29 30 31 32 33 34
	/*@null@*/ char *section, *priority;
};

/* read contents of filename into sources_readdsc.
 * - broken is like signature_readsignedchunk
 * - does not follow retvalue conventions, some fields may be set even when
Bernhard Link's avatar
Bernhard Link committed
35
 *   error returned
36
 * - no checks for sanity of values, left to the caller */
37
retvalue sources_readdsc(struct dsc_headers *, const char *filename, const char *filenametoshow, bool *broken);
38 39 40

void sources_done(struct dsc_headers *);

41 42
struct overridedata;
retvalue sources_complete(const struct dsc_headers *, const char *directory, const struct overridedata *override, const char *section, const char *priority, char **newcontrol);
43

44 45 46
char *calc_source_basename(const char *name, const char *version);
char *calc_sourcedir(component_t, const char *sourcename);
char *calc_filekey(component_t, const char *sourcename, const char *filename);
47
char *calc_byhanddir(component_t, const char *sourcename, const char *version);
Bernhard Link's avatar
Bernhard Link committed
48
#endif