zhengzkkai / opkg

Automatically exported from code.google.com/p/opkg
0 stars 0 forks source link

opkg attempts to process status file twice, resulting in file_move: ERROR: failed to rename //usr/lib/opkg/status.tmp to //usr/lib/opkg/status: No such file or directory #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. opkg install or opkg remove
2.
3.

What is the expected output? What do you see instead?
file_move: ERROR: failed to rename //usr/lib/opkg/status.tmp to
//usr/lib/opkg/status: No such file or directory

What version of the product are you using? On what operating system?
R194

Please provide any additional information below.
This seems to be related to the change in the data structures / for loops
in this block of code:

     for (iter = void_list_first(&conf->pkg_dest_list); iter; iter =
void_list_next(&conf->pkg_dest_list, iter)) {
          dest = (pkg_dest_t *)iter->data;
          if (dest->status_file) {
               err = ferror(dest->status_file);
               fclose(dest->status_file);
               dest->status_file = NULL;
               if (!err) {
                    file_move(dest->status_file_tmp_name,
dest->status_file_name);
               } else {
                    fprintf(stderr, "%s: ERROR: An error has occurred
writing %s, "
                            "retaining old %s\n", __FUNCTION__, 
                            dest->status_file_tmp_name,
dest->status_file_name);
               }
          }
     }

Original issue reported on code.google.com by mjwes...@gmail.com on 2 Jan 2009 at 5:42