Commit 5d88650c authored by Bernhard Link's avatar Bernhard Link

consult override files when importing packages with 'update' or 'pull'

parent c5a9978e
2010-07-04
* consult override files when importing packages
with 'update' or 'pull'.
2010-07-01
* fix inconsistency in changelog.example.
Thanks to Christoph Mathys.
......
Updates between 4.1.1 and 4.1.3:
Updates between 4.1.1 and 4.2.0:
- allow patterns in override files
- apply override files when doing 'pull' and 'update'
Updates between 4.1.1 and 4.1.2:
- fix parsing of .orig-*.tar.* lines in .changes files,
......
.TH REPREPRO 1 "2010-06-30" "reprepro" REPREPRO
.TH REPREPRO 1 "2010-07-04" "reprepro" REPREPRO
.SH NAME
reprepro \- produce, manage and sync a local repository of Debian packages
.SH SYNOPSIS
......@@ -1620,9 +1620,8 @@ but for the udebs.
.B FilterList
The same as with update rules.
.SH "OVERRIDE FILES"
Override files are yet only used when things are manually added,
not when imported while updating from an external source.
The format should resemble the extended ftp\-archive format,
The format of override files used by reprepro
should resemble the extended ftp\-archive format,
to be specific it is:
.B \fIpackagename\fP \fIfield name\fP \fInew value\fP
......@@ -2303,7 +2302,7 @@ Report bugs or wishlist requests to the Debian BTS
.br
or directly to <brlink@debian.org>.
.SH COPYRIGHT
Copyright \(co 2004,2005,2006,2007 Bernhard R. Link
Copyright \(co 2004,2005,2006,2007,2008,2009,2010 Bernhard R. Link
.br
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
......@@ -727,15 +727,6 @@ static retvalue pull_search(/*@null@*/FILE *out,struct database *database,struct
retvalue result,r;
struct pull_target *u;
if( d->distribution->deb_override != NULL ||
d->distribution->dsc_override != NULL ||
d->distribution->udeb_override != NULL ) {
if( verbose >= 0 )
fprintf(stderr,
"Warning: Override files of '%s' ignored as not yet supported while updating!\n",
d->distribution->codename);
}
result = RET_NOTHING;
for( u=d->targets ; u != NULL ; u=u->next ) {
r = pull_searchformissing(out, database, u);
......
......@@ -1301,12 +1301,6 @@ static retvalue updates_startup(struct aptmethodrun *run, struct update_distribu
if( RET_WAS_ERROR(r) )
return r;
}
if( d->distribution->deb_override != NULL ||
d->distribution->dsc_override != NULL ||
d->distribution->udeb_override != NULL ) {
if( verbose >= 0 )
fprintf(stderr,"Warning: Override-Files of '%s' ignored as not yet supported while updating!\n",d->distribution->codename);
}
}
return remote_startup(run);
}
......
......@@ -265,6 +265,7 @@ static retvalue upgradelist_trypackage(struct upgradelist *upgrade, void *privda
if( current == NULL ) {
/* adding a package not yet known */
struct package_data *new;
char *newcontrol;
decision = predecide(predecide_data, upgrade->target,
packagename_const, NULL, version, chunk);
......@@ -309,6 +310,17 @@ static retvalue upgradelist_trypackage(struct upgradelist *upgrade, void *privda
package_data_free(new);
return r;
}
/* apply override data */
r = upgrade->target->doreoverride(upgrade->target,
new->name, new->new_control, &newcontrol);
if( RET_WAS_ERROR(r) ) {
package_data_free(new);
return r;
}
if( RET_IS_OK(r) ) {
free(new->new_control);
new->new_control = newcontrol;
}
if( insertafter != NULL ) {
new->next = insertafter->next;
insertafter->next = new;
......@@ -319,7 +331,7 @@ static retvalue upgradelist_trypackage(struct upgradelist *upgrade, void *privda
upgrade->last = new;
} else {
/* The package already exists: */
char *control;
char *control, *newcontrol;
struct strlist files;
struct checksumsarray origfiles;
int versioncmp;
......@@ -424,6 +436,20 @@ static retvalue upgradelist_trypackage(struct upgradelist *upgrade, void *privda
free(version);
return r;
}
/* apply override data */
r = upgrade->target->doreoverride(upgrade->target,
packagename_const, control, &newcontrol);
if( RET_WAS_ERROR(r) ) {
free(version);
free(control);
strlist_done(&files);
checksumsarray_done(&origfiles);
return r;
}
if( RET_IS_OK(r) ) {
free(control);
control = newcontrol;
}
current->deleted = false;
free(current->new_version);
current->new_version = 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