Commit e7491184 authored by Bernhard Link's avatar Bernhard Link

allow to specify an specific .changes file at processincoming

parent d79dbf11
2007-06-24 Bernhard R. Link <brlink@debian.org>
* processincoming allows an optional second argument
to limit processing to a specific file for better
integration with inoticoming.
2007-06-16 Bernhard R. Link <brlink@debian.org>
* when checking a file to have the expected checksum,
first check if the file size matches before calculating
......
......@@ -357,8 +357,9 @@ Include in the specified distribution all packages found and suitable
in the \fI.changes\fP file, applying override information guessing all
values not given and guessable.
.TP
.B processincoming \fIrulesetname\fP
.B processincoming \fIrulesetname\fP \fR[\fP\fI.changes-file\fP\fR]\fP
Scan an incomming directory and process the .changes files found there.
If a filename is supplied, processing is limited to that file.
.I rulesetname
identifies which rule-set in
.B conf/incoming
......
......@@ -1651,7 +1651,7 @@ static retvalue process_changes(const char *confdir,const char *overridedir,file
}
/* tempdir should ideally be on the same partition like the pooldir */
retvalue process_incoming(const char *basedir,const char *confdir,const char *overridedir,filesdb files,const char *dbdir,references refs,struct strlist *dereferenced,struct distribution *distributions,const char *name) {
retvalue process_incoming(const char *basedir,const char *confdir,const char *overridedir,filesdb files,const char *dbdir,references refs,struct strlist *dereferenced,struct distribution *distributions,const char *name,const char *changesfilename) {
struct incoming *i;
retvalue result,r;
int j;
......@@ -1669,6 +1669,8 @@ retvalue process_incoming(const char *basedir,const char *confdir,const char *ov
#define C_LEN strlen(C_SUFFIX)
if( l <= C_LEN || strcmp(basename+(l-C_LEN),C_SUFFIX) != 0 )
continue;
if( changesfilename != NULL && strcmp(basename, changesfilename) != 0 )
continue;
/* a .changes file, check it */
r = process_changes(confdir, overridedir, files, dbdir, refs, dereferenced, i, j);
RET_UPDATE(result, r);
......
......@@ -6,5 +6,5 @@
#warning "What's hapening here?"
#endif
retvalue process_incoming(const char *basedir,const char *confdir,const char *overridedir,filesdb files,const char *dbdir,references refs,struct strlist *dereferenced,struct distribution *distributions,const char *name);
retvalue process_incoming(const char *basedir,const char *confdir,const char *overridedir,filesdb files,const char *dbdir,references refs,struct strlist *dereferenced,struct distribution *distributions,const char *name,/*@null@*/const char *onlychangesfilename);
#endif
......@@ -2065,8 +2065,8 @@ ACTION_D(processincoming) {
retvalue result,r;
struct distribution *distributions;
if( argc != 2 ) {
fprintf(stderr,"reprepro processincoming <rule-name>\n");
if( argc != 2 && argc != 3 ) {
fprintf(stderr,"reprepro processincoming <rule-name> [<.changes file>]\n");
return RET_ERROR;
}
......@@ -2076,7 +2076,7 @@ ACTION_D(processincoming) {
return r;
}
result = process_incoming(mirrordir, confdir, overridedir, filesdb, dbdir, references, dereferenced, distributions, argv[1]);
result = process_incoming(mirrordir, confdir, overridedir, filesdb, dbdir, references, dereferenced, distributions, argv[1], (argc==3)?argv[2]:NULL);
logger_wait();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment