Commit 1f2357af authored by Bernhard Link's avatar Bernhard Link

fix checkupdate when using delete rules

parent 45952288
2006-05-03 Bernhard R. Link <brlink@debian.org>
* add new pull and checkpull actions
* repair checkupdate statistics of newest available
version of checkupdate when using delete rules.
(Showed 'unavailable for reload').
2006-04-29 Bernhard R. Link <brlink@debian.org>
* fix some minor memory leaks
......
......@@ -365,10 +365,14 @@ static retvalue upgradelist_trypackage(void *data,const char *chunk){
if( versioncmp == 0 ) {
/* we are replacing a package with the same version,
* so we keep the old one for sake of speed. */
// TODO: add switch to force reimport of everything...
if( current->deleted &&
current->version != current->new_version) {
/* remember the version for checkupdate/pull */
free(current->new_version);
current->new_version = version;
} else
free(version);
current->deleted = FALSE;
// TODO: if it was deleted, set new_version here
free(version);
free(packagename);
return RET_NOTHING;
}
......@@ -381,10 +385,12 @@ static retvalue upgradelist_trypackage(void *data,const char *chunk){
int vcmp = 1;
(void)dpkgversions_cmp(version,current->version_in_use,&vcmp);
if( vcmp == 0 ) {
current->deleted = FALSE;
current->version = current->version_in_use;
// TODO: if it was deleted, set new_version here
free(version);
if( current->deleted )
current->new_version = version;
else
free(version);
current->deleted = FALSE;
free(packagename);
return RET_NOTHING;
}
......
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