Commit 9aa110a3 authored by Bernhard Link's avatar Bernhard Link

fix some bugs in --nothingiserror handling

parent f3d3652a
2009-02-28
* fix some bugs in --nothingiserror handling
2009-02-27 2009-02-27
* move handling of downloaded files from aptmethod.c to * move handling of downloaded files from aptmethod.c to
the code queuing the files. (refactorisation in preparation of later the code queuing the files. (refactorisation in preparation of later
......
...@@ -697,14 +697,15 @@ retvalue copy_from_file(struct database *database, struct distribution *into, co ...@@ -697,14 +697,15 @@ retvalue copy_from_file(struct database *database, struct distribution *into, co
result = RET_NOTHING; result = RET_NOTHING;
while( indexfile_getnext(i, &packagename, &version, &control, while( indexfile_getnext(i, &packagename, &version, &control,
&package_architecture, target, false) ) { &package_architecture, target, false) ) {
result = choose_by_name(target, r = choose_by_name(target,
packagename, version, control, &d); packagename, version, control, &d);
if( RET_IS_OK(result) ) if( RET_IS_OK(r) )
result = list_prepareadd(database, &list, target, r = list_prepareadd(database, &list, target,
packagename, version, packagename, version,
package_architecture, control); package_architecture, control);
free(packagename); free(packagename);
free(version); free(version);
RET_UPDATE(result, r);
if( RET_WAS_ERROR(result) ) if( RET_WAS_ERROR(result) )
break; break;
} }
......
...@@ -1733,11 +1733,9 @@ ACTION_D(y, n, y, addpackage) { ...@@ -1733,11 +1733,9 @@ ACTION_D(y, n, y, addpackage) {
if( RET_WAS_ERROR(result) ) if( RET_WAS_ERROR(result) )
return result; return result;
r = copy_from_file(database, destination, result = copy_from_file(database, destination,
component, architecture, packagetype, argv[2], component, architecture, packagetype, argv[2],
argc-3, argv+3); argc-3, argv+3);
RET_ENDUPDATE(result,r);
logger_wait(); logger_wait();
r = distribution_export(export, destination, database); r = distribution_export(export, destination, database);
...@@ -3143,7 +3141,7 @@ static retvalue callaction(command_t command, const struct action *action, int a ...@@ -3143,7 +3141,7 @@ static retvalue callaction(command_t command, const struct action *action, int a
} }
logger_warn_waiting(); logger_warn_waiting();
r = database_close(database); r = database_close(database);
RET_UPDATE(result, r); RET_ENDUPDATE(result, r);
r = distribution_freelist(alldistributions); r = distribution_freelist(alldistributions);
RET_ENDUPDATE(result,r); RET_ENDUPDATE(result,r);
database = NULL; database = NULL;
......
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