Commit af022652 authored by Bernhard Link's avatar Bernhard Link

remove force option

parent e072a94d
......@@ -3,6 +3,7 @@
* changed manpage to make clear options are before the command (dito)
* catch TERM, ABRT, INT and QUIT and do not start any new stuff after
that.
* remove force option (rarely worked and caused ugly bugs otherwise)
2006-06-12 Bernhard R. Link <brlink@debian.org>
* some prework for predelete action
......
......@@ -34,7 +34,7 @@ retvalue chunk_checkfield(const char *chunk,const char *name);
typedef retvalue chunkaction(/*@temp@*/void *data,/*@temp@*/const char *chunk);
/* Call action for each chunk in <filename>,
* until error when not <force> or until ok when <stopwhenok> */
* until error or until ok when <stopwhenok> */
retvalue chunk_foreach(const char *filename,chunkaction action,/*@null@*/ /*@temp@*/void *data,bool_t stopwhenok);
/* modifications of a chunk: */
......
......@@ -294,7 +294,7 @@ static retvalue genarchcontents(filesdb files, struct distribution *distribution
r = target_initpackagesdb(target, dbdir);
if( RET_WAS_ERROR(r) )
break;
r = packages_foreach(target->packages,addpackagetocontents,&data,FALSE);
r = packages_foreach(target->packages,addpackagetocontents,&data);
(void)target_closepackagesdb(target);
if( RET_WAS_ERROR(r) )
break;
......@@ -367,7 +367,7 @@ static retvalue genarchudebcontents(filesdb files, struct distribution *distribu
r = target_initpackagesdb(target, dbdir);
if( RET_WAS_ERROR(r) )
break;
r = packages_foreach(target->packages,addpackagetocontents,&data,FALSE);
r = packages_foreach(target->packages,addpackagetocontents,&data);
(void)target_closepackagesdb(target);
if( RET_WAS_ERROR(r) )
break;
......
......@@ -347,7 +347,7 @@ NULL};
}
/* call <action> for each part of <distribution>. */
retvalue distribution_foreach_part(struct distribution *distribution,const char *component,const char *architecture,const char *packagetype,distribution_each_action action,void *data,int force) {
retvalue distribution_foreach_part(struct distribution *distribution,const char *component,const char *architecture,const char *packagetype,distribution_each_action action,void *data) {
retvalue result,r;
struct target *t;
......@@ -361,7 +361,7 @@ retvalue distribution_foreach_part(struct distribution *distribution,const char
continue;
r = action(data,t,distribution);
RET_UPDATE(result,r);
if( RET_WAS_ERROR(r) && force <= 0 )
if( RET_WAS_ERROR(r) )
return result;
}
return result;
......
......@@ -68,7 +68,7 @@ typedef retvalue distribution_each_action(void *data, struct target *t, struct d
/* call <action> for each part of <distribution>, if component or architecture is
* not NULL or "all", only do those parts */
retvalue distribution_foreach_part(struct distribution *distribution,/*@null@*/const char *component,/*@null@*/const char *architecture,/*@null@*/const char *packagetype,distribution_each_action action,/*@null@*/void *data,int force);
retvalue distribution_foreach_part(struct distribution *distribution,/*@null@*/const char *component,/*@null@*/const char *architecture,/*@null@*/const char *packagetype,distribution_each_action action,/*@null@*/void *data);
/*@dependent@*/struct target *distribution_getpart(const struct distribution *distribution,const char *component,const char *architecture,const char *packagetype);
......
......@@ -40,7 +40,7 @@ counts as five lowercase
.B \-v.
.TP
.B \-f, \-\-force
Do things nevertheless. Might be dangerous and destructive.
This option is ignored, as it no longer exists.
.TP
.B \-b, \-\-basedir \fIbasedir\fP
Sets the base\-dir of the repository to manage, i.e. where the
......@@ -1011,11 +1011,6 @@ if no \fB\-b\fP or \fB\-\-basedir\fP options are supplied.
The directory in this variable is used when no \fB\-\-confdir\fP is
supplied.
.SH BUGS
The
.B \-\-force
option needs to be replaced by something superior so that one can allow
stupid things but not destructive things.
Increased verbosity always shows those things one does not want to know.
(Though this might be inevitable and a corollary to Murphy)
......
......@@ -46,7 +46,7 @@ _reprepro()
--keepunneededlists --keepdirectories --onlyacceptsigned\
--ask-passphrase --nonothingiserror --listsdownload\
--nokeepunreferencesfiles --nokeepunneededfiles --nokeepdirectories\
--noonlyacceptsigned --noask-passphrase --skipold --noskipold --force'
--noonlyacceptsigned --noask-passphrase --skipold --noskipold'
options='-b -i --basedir --ignore --unignore --methoddir --distdir --dbdir\
--listdir --overridedir --confdir --section -S --priority -P --component -C\
--architecture -A --type -T --export'
......
......@@ -351,7 +351,7 @@ retvalue export_target(const char *confdir,const char *relativedir,packagesdb pa
status = "change";
else
status = "new";
r = packages_foreach(packages,printout,file,0);
r = packages_foreach(packages,printout,file);
if( RET_WAS_ERROR(r) ) {
release_abortfile(file);
free(relfilename);
......
......@@ -80,7 +80,6 @@ static char /*@only@*/ /*@null@*/
*architecture = NULL,
*packagetype = NULL;
static int delete = D_COPY;
static int force = 0;
static bool_t nothingiserror = FALSE;
static bool_t nolistsdownload = FALSE;
static bool_t keepunreferenced = FALSE;
......@@ -440,7 +439,7 @@ ACTION_D(remove) {
if( d.gotremoved == NULL )
result = RET_ERROR_OOM;
else
result = distribution_foreach_part(distribution,component,architecture,packagetype,remove_from_target,&d,force);
result = distribution_foreach_part(distribution,component,architecture,packagetype,remove_from_target,&d);
d.refs = NULL;
d.removedfiles = NULL;
......@@ -512,7 +511,7 @@ ACTION_N(list) {
return r;
}
result = distribution_foreach_part(distribution,component,architecture,packagetype,list_in_target,(void*)argv[2],force);
result = distribution_foreach_part(distribution,component,architecture,packagetype,list_in_target,(void*)argv[2]);
r = distribution_free(distribution);
RET_ENDUPDATE(result,r);
return result;
......@@ -550,7 +549,7 @@ static retvalue listfilter_in_target(/*@temp@*/void *data, /*@temp@*/struct targ
}
d.target = target;
d.condition = data;
result = packages_foreach(target->packages,listfilterprint,&d,force);
result = packages_foreach(target->packages,listfilterprint,&d);
d.target = NULL;
d.condition = NULL;
......@@ -580,7 +579,7 @@ ACTION_N(listfilter) {
return result;
}
result = distribution_foreach_part(distribution,component,architecture,packagetype,listfilter_in_target,condition,force);
result = distribution_foreach_part(distribution,component,architecture,packagetype,listfilter_in_target,condition);
term_free(condition);
r = distribution_free(distribution);
RET_ENDUPDATE(result,r);
......@@ -663,7 +662,7 @@ ACTION_N(dumpcontents) {
if( RET_WAS_ERROR(result) )
return result;
result = packages_foreach(packages,printout,NULL,force);
result = packages_foreach(packages,printout,NULL);
r = packages_done(packages);
RET_ENDUPDATE(result,r);
......@@ -697,7 +696,7 @@ ACTION_F(export) {
r = distribution_fullexport(d,confdir,dbdir,distdir,filesdb);
RET_UPDATE(result,r);
if( RET_WAS_ERROR(r) && force<= 0 && export != EXPORT_FORCE)
if( RET_WAS_ERROR(r) && export != EXPORT_FORCE)
return r;
}
r = distribution_freelist(distributions);
......@@ -749,7 +748,7 @@ ACTION_D(update) {
result = updates_clearlists(listdir,u_distributions);
}
if( !RET_WAS_ERROR(result) )
result = updates_update(dbdir,methoddir,filesdb,references,u_distributions,force,nolistsdownload,skipold,dereferenced);
result = updates_update(dbdir,methoddir,filesdb,references,u_distributions,nolistsdownload,skipold,dereferenced);
updates_freeupdatedistributions(u_distributions);
updates_freepatterns(patterns);
......@@ -800,7 +799,7 @@ ACTION_D(iteratedupdate) {
result = updates_clearlists(listdir,u_distributions);
}
if( !RET_WAS_ERROR(result) )
result = updates_iteratedupdate(confdir,dbdir,distdir,methoddir,filesdb,references,u_distributions,force,nolistsdownload,skipold,dereferenced,export);
result = updates_iteratedupdate(confdir,dbdir,distdir,methoddir,filesdb,references,u_distributions,nolistsdownload,skipold,dereferenced,export);
updates_freeupdatedistributions(u_distributions);
updates_freepatterns(patterns);
......@@ -846,7 +845,7 @@ ACTION_N(checkupdate) {
return result;
}
result = updates_checkupdate(dbdir,methoddir,u_distributions,force,nolistsdownload,skipold);
result = updates_checkupdate(dbdir,methoddir,u_distributions,nolistsdownload,skipold);
updates_freeupdatedistributions(u_distributions);
updates_freepatterns(patterns);
......@@ -890,7 +889,7 @@ ACTION_D(pull) {
RET_ENDUPDATE(result,r);
return result;
}
result = pull_update(dbdir,filesdb,references,p,force,dereferenced);
result = pull_update(dbdir,filesdb,references,p,dereferenced);
pull_freerules(rules);
pull_freedistributions(p);
......@@ -937,7 +936,7 @@ ACTION_N(checkpull) {
RET_ENDUPDATE(result,r);
return result;
}
result = pull_checkupdate(dbdir,p,force);
result = pull_checkupdate(dbdir,p);
pull_freerules(rules);
pull_freedistributions(p);
......@@ -959,7 +958,7 @@ static retvalue reref(void *data,struct target *target,UNUSED(struct distributio
result = target_initpackagesdb(target,dbdir);
if( !RET_WAS_ERROR(result) ) {
result = target_rereference(target,d->refs,force);
result = target_rereference(target,d->refs);
r = target_closepackagesdb(target);
RET_ENDUPDATE(result,r);
}
......@@ -992,11 +991,11 @@ ACTION_R(rereference) {
dat.refs = references;
r = distribution_foreach_part(d,component,architecture,packagetype,
reref,&dat,force);
reref,&dat);
dat.refs = NULL;
dat.distribution = NULL;
RET_UPDATE(result,r);
if( RET_WAS_ERROR(r) && force <= 0 )
if( RET_WAS_ERROR(r) )
break;
}
r = distribution_freelist(distributions);
......@@ -1013,7 +1012,7 @@ static retvalue retrack(void *data,struct target *target,UNUSED(struct distribut
result = target_initpackagesdb(target,dbdir);
if( !RET_WAS_ERROR(result) ) {
result = target_retrack(target,d->tracks,d->refs,force);
result = target_retrack(target,d->tracks,d->refs);
r = target_closepackagesdb(target);
RET_ENDUPDATE(result,r);
}
......@@ -1046,7 +1045,7 @@ ACTION_R(retrack) {
r = tracking_initialize(&dat.tracks,dbdir,d);
if( RET_WAS_ERROR(r) ) {
RET_UPDATE(result,r);
if( RET_WAS_ERROR(r) && force <= 0 )
if( RET_WAS_ERROR(r) )
break;
continue;
}
......@@ -1056,13 +1055,13 @@ ACTION_R(retrack) {
RET_UPDATE(result,r);
r = distribution_foreach_part(d,component,architecture,packagetype,
retrack,&dat,force);
retrack,&dat);
RET_UPDATE(result,r);
dat.refs = NULL;
dat.distribution = NULL;
r = tracking_done(dat.tracks);
RET_ENDUPDATE(result,r);
if( RET_WAS_ERROR(result) && force <= 0 )
if( RET_WAS_ERROR(result) )
break;
}
r = distribution_freelist(distributions);
......@@ -1123,7 +1122,7 @@ ACTION_R(cleartracks) {
r = tracking_initialize(&tracks,dbdir,d);
if( RET_WAS_ERROR(r) ) {
RET_UPDATE(result,r);
if( RET_WAS_ERROR(r) && force <= 0 )
if( RET_WAS_ERROR(r) )
break;
continue;
}
......@@ -1133,7 +1132,7 @@ ACTION_R(cleartracks) {
RET_UPDATE(result,r);
r = tracking_done(tracks);
RET_ENDUPDATE(result,r);
if( RET_WAS_ERROR(result) && force <= 0 )
if( RET_WAS_ERROR(result) )
break;
}
r = distribution_freelist(distributions);
......@@ -1162,7 +1161,7 @@ ACTION_N(dumptracks) {
r = tracking_initialize(&tracks,dbdir,d);
if( RET_WAS_ERROR(r) ) {
RET_UPDATE(result,r);
if( RET_WAS_ERROR(r) && force <= 0 )
if( RET_WAS_ERROR(r) )
break;
continue;
}
......@@ -1170,7 +1169,7 @@ ACTION_N(dumptracks) {
RET_UPDATE(result,r);
r = tracking_done(tracks);
RET_ENDUPDATE(result,r);
if( RET_WAS_ERROR(result) && force <= 0 )
if( RET_WAS_ERROR(result) )
break;
}
r = distribution_freelist(distributions);
......@@ -1188,7 +1187,7 @@ static retvalue check_target(void *data,struct target *target,UNUSED(struct dist
r = target_initpackagesdb(target,dbdir);
if( RET_WAS_ERROR(r) )
return r;
result = target_check(target,d->filesdb,d->references,force);
result = target_check(target,d->filesdb,d->references);
r = target_closepackagesdb(target);
RET_ENDUPDATE(result,r);
return result;
......@@ -1219,11 +1218,11 @@ ACTION_RF(check) {
dat.references = references;
dat.filesdb = filesdb;
r = distribution_foreach_part(d,component,architecture,packagetype,check_target,&dat,force);
r = distribution_foreach_part(d,component,architecture,packagetype,check_target,&dat);
dat.references = NULL;
dat.filesdb = NULL;
RET_UPDATE(result,r);
if( RET_WAS_ERROR(r) && force <= 0 )
if( RET_WAS_ERROR(r) )
break;
}
r = distribution_freelist(distributions);
......@@ -1281,7 +1280,7 @@ ACTION_F(reoverride) {
r = override_readall(overridedir,&ao,d->deb_override,d->udeb_override,d->dsc_override);
if( RET_IS_OK(r) ) {
r = distribution_foreach_part(d,component,architecture,packagetype,reoverride_target,&ao,FALSE);
r = distribution_foreach_part(d,component,architecture,packagetype,reoverride_target,&ao);
override_free(ao.deb);
override_free(ao.udeb);
override_free(ao.dsc);
......@@ -1289,7 +1288,7 @@ ACTION_F(reoverride) {
fprintf(stderr,"No override files, thus nothing to do for %s.\n",d->codename);
}
RET_UPDATE(result,r);
if( RET_WAS_ERROR(r) && force <= 0 )
if( RET_WAS_ERROR(r) )
break;
}
r = distribution_exportandfreelist(export,distributions,confdir,dbdir,distdir,filesdb);
......@@ -2066,7 +2065,7 @@ static void handle_option(int c,const char *optarg) {
verbose+=5;
break;
case 'f':
force++;
fprintf(stderr, "Ignoring no longer existing option -f/--force!\n");
break;
case 'b':
CONFIGDUP(mirrordir,optarg);
......
......@@ -236,7 +236,7 @@ static retvalue package_check(packagesdb db,const char *package) {
//typedef retvalue per_package_action(void *data,const char *package,const char *chunk);
/* call action once for each saved chunk: */
retvalue packages_foreach(packagesdb db,per_package_action action,void *privdata, int force) {
retvalue packages_foreach(packagesdb db,per_package_action action,void *privdata) {
DBC *cursor;
DBT key,data;
int dbret;
......@@ -254,9 +254,9 @@ retvalue packages_foreach(packagesdb db,per_package_action action,void *privdata
while( (dbret=cursor->c_get(cursor,&key,&data,DB_NEXT)) == 0 ) {
r = action(privdata,(const char*)key.data,(const char*)data.data);
RET_UPDATE(ret,r);
if( RET_WAS_ERROR(r) && force <= 0 ) {
if( RET_WAS_ERROR(r) ) {
if( verbose > 0 )
fprintf(stderr,"packages_foreach: Stopping procession of further packages due to privious errors\n");
fprintf(stderr,"packages_foreach: Stopping procession of further packages due to previous errors\n");
break;
}
CLEARDBT(key);
......
......@@ -61,7 +61,7 @@ retvalue packages_insert(references refs, packagesdb packagesdb,
typedef retvalue per_package_action(void *data,const char *package,/*@temp@*/const char *chunk);
/* call action once for each saved chunk: */
retvalue packages_foreach(packagesdb packagesdb,per_package_action *action,/*@temp@*/ /*@null@*/void *data, int force);
retvalue packages_foreach(packagesdb packagesdb,per_package_action *action,/*@temp@*/ /*@null@*/void *data);
/* action to be called by packages_modifyall */
struct alloverrides;
......
......@@ -630,7 +630,7 @@ static upgrade_decision ud_decide_by_rule(void *privdata, const char *package,UN
return UD_UPGRADE;
}
static inline retvalue pull_searchformissing(const char *dbdir,struct pull_target *p,int force) {
static inline retvalue pull_searchformissing(const char *dbdir,struct pull_target *p) {
struct pull_source *source;
retvalue result,r;
......@@ -650,7 +650,7 @@ static inline retvalue pull_searchformissing(const char *dbdir,struct pull_targe
fprintf(stderr," marking everything to be deleted\n");
r = upgradelist_deleteall(p->upgradelist);
RET_UPDATE(result,r);
if( RET_WAS_ERROR(r) && force <= 0 )
if( RET_WAS_ERROR(r) )
return result;
p->ignoredelete = FALSE;
continue;
......@@ -664,14 +664,14 @@ static inline retvalue pull_searchformissing(const char *dbdir,struct pull_targe
ud_decide_by_rule, source->rule,
dbdir);
RET_UPDATE(result,r);
if( RET_WAS_ERROR(r) && force <= 0 )
if( RET_WAS_ERROR(r) )
return result;
}
return result;
}
static retvalue pull_search(const char *dbdir,struct pull_distribution *d,int force) {
static retvalue pull_search(const char *dbdir,struct pull_distribution *d) {
retvalue result,r;
struct pull_target *u;
......@@ -691,26 +691,26 @@ static retvalue pull_search(const char *dbdir,struct pull_distribution *d,int fo
result = RET_NOTHING;
for( u=d->targets ; u != NULL ; u=u->next ) {
r = pull_searchformissing(dbdir,u,force);
r = pull_searchformissing(dbdir,u);
RET_UPDATE(result,r);
if( RET_WAS_ERROR(r) && force <= 0 )
if( RET_WAS_ERROR(r) )
break;
}
return result;
}
static retvalue pull_install(const char *dbdir,filesdb filesdb,references refs,struct pull_distribution *distribution,int force,struct strlist *dereferencedfilekeys) {
static retvalue pull_install(const char *dbdir,filesdb filesdb,references refs,struct pull_distribution *distribution,struct strlist *dereferencedfilekeys) {
retvalue result,r;
struct pull_target *u;
result = RET_NOTHING;
for( u=distribution->targets ; u != NULL ; u=u->next ) {
r = upgradelist_install(u->upgradelist,dbdir,filesdb,refs,force,u->ignoredelete,dereferencedfilekeys);
r = upgradelist_install(u->upgradelist,dbdir,filesdb,refs,u->ignoredelete,dereferencedfilekeys);
RET_UPDATE(distribution->distribution->status, r);
RET_UPDATE(result,r);
upgradelist_free(u->upgradelist);
u->upgradelist = NULL;
if( RET_WAS_ERROR(r) && force <= 0 )
if( RET_WAS_ERROR(r) )
break;
}
return result;
......@@ -729,7 +729,7 @@ static void pull_dump(struct pull_distribution *distribution) {
}
}
retvalue pull_update(const char *dbdir,filesdb filesdb,references refs,struct pull_distribution *distributions,int force,struct strlist *dereferencedfilekeys) {
retvalue pull_update(const char *dbdir,filesdb filesdb,references refs,struct pull_distribution *distributions,struct strlist *dereferencedfilekeys) {
retvalue result,r;
struct pull_distribution *d;
......@@ -739,29 +739,29 @@ retvalue pull_update(const char *dbdir,filesdb filesdb,references refs,struct pu
result = RET_NOTHING;
for( d=distributions ; d != NULL ; d=d->next) {
r = pull_search(dbdir,d,force);
r = pull_search(dbdir,d);
RET_UPDATE(result,r);
if( RET_WAS_ERROR(r) && force <= 0 )
if( RET_WAS_ERROR(r) )
break;
// TODO: make already here sure the files are ready?
}
if( RET_WAS_ERROR(result) && force <= 0 ) {
if( RET_WAS_ERROR(result) ) {
return result;
}
if( verbose >= 0 )
fprintf(stderr,"Installing (and possibly deleting) packages...\n");
for( d=distributions ; d != NULL ; d=d->next) {
r = pull_install(dbdir,filesdb,refs,d,force,dereferencedfilekeys);
r = pull_install(dbdir,filesdb,refs,d,dereferencedfilekeys);
RET_UPDATE(result,r);
if( RET_WAS_ERROR(r) && force <= 0 )
if( RET_WAS_ERROR(r) )
break;
}
return result;
}
retvalue pull_checkupdate(const char *dbdir,struct pull_distribution *distributions,int force) {
retvalue pull_checkupdate(const char *dbdir,struct pull_distribution *distributions) {
struct pull_distribution *d;
retvalue result,r;
......@@ -771,9 +771,9 @@ retvalue pull_checkupdate(const char *dbdir,struct pull_distribution *distributi
result = RET_NOTHING;
for( d=distributions ; d != NULL ; d=d->next) {
r = pull_search(dbdir,d,force);
r = pull_search(dbdir,d);
RET_UPDATE(result,r);
if( RET_WAS_ERROR(r) && force <= 0 )
if( RET_WAS_ERROR(r) )
break;
pull_dump(d);
}
......
......@@ -27,7 +27,7 @@ void pull_freerules(/*@only@*/struct pull_rule *p);
void pull_freedistributions(/*@only@*/struct pull_distribution *p);
retvalue pull_prepare(const char *confdir,struct pull_rule *rules,struct distribution *,/*@out@*/struct pull_distribution **,struct distribution **alsoneeded);
retvalue pull_update(const char *dbdir,filesdb filesdb,references refs,struct pull_distribution *distributions,int force,struct strlist *dereferencedfilekeys);
retvalue pull_checkupdate(const char *dbdir,struct pull_distribution *distributions,int force);
retvalue pull_update(const char *dbdir,filesdb filesdb,references refs,struct pull_distribution *distributions,struct strlist *dereferencedfilekeys);
retvalue pull_checkupdate(const char *dbdir,struct pull_distribution *distributions);
#endif
......@@ -308,7 +308,7 @@ static retvalue rereferencepkg(void *data,const char *package,const char *chunk)
return r;
}
retvalue target_rereference(struct target *target,references refs,int force) {
retvalue target_rereference(struct target *target,references refs) {
retvalue result,r;
struct data_reref refdata;
......@@ -328,7 +328,7 @@ retvalue target_rereference(struct target *target,references refs,int force) {
refdata.refs = refs;
refdata.target = target;
r = packages_foreach(target->packages,rereferencepkg,&refdata,force);
r = packages_foreach(target->packages,rereferencepkg,&refdata);
RET_UPDATE(result,r);
return result;
......@@ -349,7 +349,7 @@ static retvalue retrackpkg(void *data,const char *package,const char *chunk) {
return r;
}
retvalue target_retrack(struct target *target,trackingdb tracks,references refs,int force) {
retvalue target_retrack(struct target *target,trackingdb tracks,references refs) {
struct data_retrack trackdata;
assert(target->packages!=NULL);
......@@ -361,7 +361,7 @@ retvalue target_retrack(struct target *target,trackingdb tracks,references refs,
trackdata.refs = refs;
trackdata.tracks = tracks;
trackdata.target = target;
return packages_foreach(target->packages,retrackpkg,&trackdata,force);
return packages_foreach(target->packages,retrackpkg,&trackdata);
}
......@@ -431,7 +431,7 @@ static retvalue checkpkg(void *data,const char *package,const char *chunk) {
return result;
}
retvalue target_check(struct target *target,filesdb filesdb,references refs,int force) {
retvalue target_check(struct target *target,filesdb filesdb,references refs) {
struct data_check data;
assert(target->packages!=NULL);
......@@ -441,7 +441,7 @@ retvalue target_check(struct target *target,filesdb filesdb,references refs,int
data.refs = refs;
data.filesdb = filesdb;
data.target = target;
return packages_foreach(target->packages,checkpkg,&data,force);
return packages_foreach(target->packages,checkpkg,&data);
}
/* Reapply override information */
......
......@@ -77,9 +77,9 @@ retvalue target_closepackagesdb(struct target *target);
retvalue target_addpackage(struct target *target,references refs,const char *name,const char *version,const char *control,const struct strlist *filekeys,bool_t downgrade,/*@null@*/struct strlist *dereferencedfilekeys,/*@null@*/struct trackingdata *,enum filetype);
retvalue target_removepackage(struct target *target,references refs,const char *name, /*@null@*/struct strlist *dereferencedfilekeys,struct trackingdata *);
retvalue target_check(struct target *target,filesdb filesdb,references refsdb,int force);
retvalue target_rereference(struct target *target,references refs,int force);
retvalue target_retrack(struct target *target,trackingdb tracks,references refs,int force);
retvalue target_check(struct target *target,filesdb filesdb,references refsdb);
retvalue target_rereference(struct target *target,references refs);
retvalue target_retrack(struct target *target,trackingdb tracks,references refs);
retvalue target_reoverride(struct target *target,const struct alloverrides *ao);
#endif
This diff is collapsed.
......@@ -33,8 +33,8 @@ retvalue updates_calcindices(const char *listdir,const struct update_pattern *pa
/* remove all files ${listdir}/${distribution}_* that will not be needed. */
retvalue updates_clearlists(const char *listdir,struct update_distribution *distributions);
retvalue updates_update(const char *dbdir,const char *methoddir,filesdb filesdb,references refs,struct update_distribution *distributions,int force,bool_t nolistsdownload,bool_t skipold,struct strlist *dereferencedfilekeys);
retvalue updates_iteratedupdate(const char *confdir,const char *dbdir,const char *distdir,const char *methoddir,filesdb filesdb,references refs,struct update_distribution *distributions,int force,bool_t nolistsdownload,bool_t skipold,struct strlist *dereferencedfilekeys, enum exportwhen export);
retvalue updates_checkupdate(const char *dbdir,const char *methoddir,struct update_distribution *distributions,int force,bool_t nolistsdownload,bool_t skipold);
retvalue updates_update(const char *dbdir,const char *methoddir,filesdb filesdb,references refs,struct update_distribution *distributions,bool_t nolistsdownload,bool_t skipold,struct strlist *dereferencedfilekeys);
retvalue updates_iteratedupdate(const char *confdir,const char *dbdir,const char *distdir,const char *methoddir,filesdb filesdb,references refs,struct update_distribution *distributions,bool_t nolistsdownload,bool_t skipold,struct strlist *dereferencedfilekeys, enum exportwhen export);
retvalue updates_checkupdate(const char *dbdir,const char *methoddir,struct update_distribution *distributions,bool_t nolistsdownload,bool_t skipold);
#endif
......@@ -157,7 +157,7 @@ retvalue upgradelist_initialize(struct upgradelist **ul,struct target *t,const c
}
/* Beginn with the packages currently in the archive */
r = packages_foreach(t->packages,save_package_version,upgrade,0);
r = packages_foreach(t->packages,save_package_version,upgrade);
r2 = target_closepackagesdb(t);
RET_UPDATE(r,r2);
......@@ -449,7 +449,7 @@ retvalue upgradelist_pull(struct upgradelist *upgrade,struct target *source,upgr
r = target_initpackagesdb(source,dbdir);
if( RET_WAS_ERROR(r) )
return r;
result = packages_foreach(source->packages,try,upgrade,FALSE);
result = packages_foreach(source->packages,try,upgrade);
r = target_closepackagesdb(source);
RET_UPDATE(result,r);
return result;
......@@ -485,7 +485,7 @@ retvalue upgradelist_listmissing(struct upgradelist *upgrade,filesdb files){
}
/* request all wanted files in the downloadlists given before */
retvalue upgradelist_enqueue(struct upgradelist *upgrade,struct downloadcache *cache,filesdb filesdb,int force) {
retvalue upgradelist_enqueue(struct upgradelist *upgrade,struct downloadcache *cache,filesdb filesdb) {
struct package_data *pkg;
retvalue result,r;
result = RET_NOTHING;
......@@ -498,7 +498,7 @@ retvalue upgradelist_enqueue(struct upgradelist *upgrade,struct downloadcache *c
&pkg->new_filekeys,
&pkg->new_md5sums);
RET_UPDATE(result,r);
if( RET_WAS_ERROR(r) && force <= 0 )
if( RET_WAS_ERROR(r) )
break;
}
}
......@@ -529,7 +529,7 @@ retvalue upgradelist_predelete(struct upgradelist *upgrade,const char *dbdir,ref
return result;
}
retvalue upgradelist_install(struct upgradelist *upgrade,const char *dbdir,filesdb files,references refs,int force, bool_t ignoredelete, struct strlist *dereferencedfilekeys){
retvalue upgradelist_install(struct upgradelist *upgrade,const char *dbdir,filesdb files,references refs, bool_t ignoredelete, struct strlist *dereferencedfilekeys){
struct package_data *pkg;
retvalue result,r;
......@@ -558,7 +558,7 @@ retvalue upgradelist_install(struct upgradelist *upgrade,const char *dbdir,files
dereferencedfilekeys, NULL, 0);
}
RET_UPDATE(result,r);
if( RET_WAS_ERROR(r) && force <= 0 )
if( RET_WAS_ERROR(r) )
break;
}
if( pkg->deleted && pkg->version_in_use != NULL && !ignoredelete ) {
......@@ -567,7 +567,7 @@ retvalue upgradelist_install(struct upgradelist *upgrade,const char *dbdir,files
else
r = target_removepackage(upgrade->target,refs,pkg->name,dereferencedfilekeys,NULL);
RET_UPDATE(result,r);
if( RET_WAS_ERROR(r) && force <= 0 )
if( RET_WAS_ERROR(r) )
break;
}
}
......
......@@ -44,8 +44,8 @@ retvalue upgradelist_deleteall(struct upgradelist *upgrade);
//longer available upstream)
/* request all wanted files refering the methods given before */
retvalue upgradelist_enqueue(struct upgradelist *upgrade,struct downloadcache *cache,filesdb filesdb,int force);
retvalue upgradelist_enqueue(struct upgradelist *upgrade,struct downloadcache *cache,filesdb filesdb);
retvalue upgradelist_install(struct upgradelist *upgrade,const char *dbdir,filesdb files,references refs,int force, bool_t ignoredelete, struct strlist *dereferencedfilekeys);
retvalue upgradelist_install(struct upgradelist *upgrade,const char *dbdir,filesdb files,references refs, bool_t ignoredelete, struct strlist *dereferencedfilekeys);
#endif
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