Commit c5a9978e authored by Bernhard Link's avatar Bernhard Link

reoverride takes target as argument as the rest

parent 4ebb4242
/* This file is part of "reprepro"
* Copyright (C) 2003,2004,2005,2006,2007,2009 Bernhard R. Link
* Copyright (C) 2003,2004,2005,2006,2007,2009,2010 Bernhard R. Link
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
......@@ -266,7 +266,7 @@ retvalue binaries_getchecksums(const char *chunk, struct checksumsarray *filekey
return RET_OK;
}
retvalue binaries_doreoverride(const struct distribution *distribution,const char *packagename,const char *controlchunk,/*@out@*/char **newcontrolchunk) {
retvalue binaries_doreoverride(const struct target *target, const char *packagename, const char *controlchunk, /*@out@*/char **newcontrolchunk) {
const struct overridedata *o;
struct fieldtoadd *fields;
char *newchunk;
......@@ -275,7 +275,7 @@ retvalue binaries_doreoverride(const struct distribution *distribution,const cha
if( interrupted() )
return RET_ERROR_INTERRUPTED;
o = override_search(distribution->overrides.deb, packagename);
o = override_search(target->distribution->overrides.deb, packagename);
if( o == NULL )
return RET_NOTHING;
......@@ -290,7 +290,7 @@ retvalue binaries_doreoverride(const struct distribution *distribution,const cha
return RET_OK;
}
retvalue ubinaries_doreoverride(const struct distribution *distribution,const char *packagename,const char *controlchunk,/*@out@*/char **newcontrolchunk) {
retvalue ubinaries_doreoverride(const struct target *target, const char *packagename, const char *controlchunk, /*@out@*/char **newcontrolchunk) {
const struct overridedata *o;
struct fieldtoadd *fields;
char *newchunk;
......@@ -298,7 +298,7 @@ retvalue ubinaries_doreoverride(const struct distribution *distribution,const ch
if( interrupted() )
return RET_ERROR_INTERRUPTED;
o = override_search(distribution->overrides.udeb, packagename);
o = override_search(target->distribution->overrides.udeb, packagename);
if( o == NULL )
return RET_NOTHING;
......
......@@ -14,15 +14,15 @@
/* Functions for the target.h-stuff: */
retvalue binaries_getversion(const char *chunk,char **version);
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 *);
retvalue binaries_getfilekeys(const char *chunk, /*@out@*/struct strlist *);
retvalue binaries_getchecksums(const char *chunk, /*@out@*/struct checksumsarray *);
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);
retvalue binaries_retrack(const char *packagename, const char *chunk, trackingdb tracks, struct database *);
retvalue binaries_getsourceandversion(const char *chunk, const char *packagename, char **source, char **version);
get_version binaries_getversion;
get_installdata binaries_getinstalldata;
get_architecture binaries_getarchitecture;
get_filekeys binaries_getfilekeys;
get_checksums binaries_getchecksums;
do_reoverride binaries_doreoverride;
do_reoverride ubinaries_doreoverride;
do_retrack binaries_retrack;
get_sourceandversion binaries_getsourceandversion;
/* Functions for checkindeb.c and incoming.c: */
......
/* This file is part of "reprepro"
* Copyright (C) 2003,2004,2005,2006,2007,2008,2009 Bernhard R. Link
* Copyright (C) 2003,2004,2005,2006,2007,2008,2009,2010 Bernhard R. Link
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
......@@ -322,7 +322,7 @@ retvalue sources_getchecksums(const char *chunk, struct checksumsarray *out) {
return RET_OK;
}
retvalue sources_doreoverride(const struct distribution *distribution,const char *packagename,const char *controlchunk,/*@out@*/char **newcontrolchunk) {
retvalue sources_doreoverride(const struct target *target, const char *packagename, const char *controlchunk, /*@out@*/char **newcontrolchunk) {
const struct overridedata *o;
struct fieldtoadd *fields;
char *newchunk;
......@@ -331,7 +331,7 @@ retvalue sources_doreoverride(const struct distribution *distribution,const char
if( interrupted() )
return RET_ERROR_INTERRUPTED;
o = override_search(distribution->overrides.dsc, packagename);
o = override_search(target->distribution->overrides.dsc, packagename);
if( o == NULL )
return RET_NOTHING;
......
......@@ -13,14 +13,14 @@
retvalue sources_calcfilelines(const struct checksumsarray *, /*@out@*/char **item);
/* Functions for the target.h-stuff: */
retvalue sources_getversion(const char *chunk, /*@out@*/char **version);
retvalue sources_getinstalldata(const struct target *t, const char *packagename, const char *version, architecture_t, const char *chunk, char **control, /*@out@*/struct strlist *filekeys, /*@out@*/struct checksumsarray *origfiles);
retvalue sources_getarchitecture(const char *chunk, /*@out@*/architecture_t *);
retvalue sources_getfilekeys(const char *, /*@out@*/struct strlist *);
retvalue sources_getchecksums(const char *, /*@out@*/struct checksumsarray *);
retvalue sources_doreoverride(const struct distribution *,const char *packagename,const char *controlchunk,/*@out@*/char **newcontrolchunk);
retvalue sources_retrack(const char *packagename, const char *chunk, trackingdb tracks, struct database *);
retvalue sources_getsourceandversion(const char *chunk, const char *packagename, char **source, char **version);
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;
/* Functions for checkindsc.c and incoming.c: */
struct dsc_headers {
......
......@@ -787,7 +787,7 @@ retvalue target_reoverride(struct target *target, struct distribution *distribut
while( target_nextpackage(&iterator, &package, &controlchunk) ) {
char *newcontrolchunk = NULL;
r = target->doreoverride(distribution, package, controlchunk,
r = target->doreoverride(target, package, controlchunk,
&newcontrolchunk);
RET_UPDATE(result, r);
if( RET_WAS_ERROR(r) ) {
......
......@@ -32,7 +32,7 @@ typedef retvalue get_installdata(const struct target *, const char *, const char
/* md5sums may be NULL */
typedef retvalue get_filekeys(const char *, /*@out@*/struct strlist *);
typedef retvalue get_checksums(const char *, /*@out@*/struct checksumsarray *);
typedef retvalue do_reoverride(const struct distribution *,const char *packagename,const char *controlchunk,/*@out@*/char **newcontrolchunk);
typedef retvalue do_reoverride(const struct target *, const char *packagename, const char *controlchunk, /*@out@*/char **newcontrolchunk);
typedef retvalue do_retrack(const char *packagename, const char *controlchunk, trackingdb, struct database *);
typedef retvalue get_sourceandversion(const char *chunk, const char *packagename, /*@out@*/char **source, /*@out@*/char **version);
......
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