opkg: improve opkg_install error reporting and include a check to verify repository...
[oweals/opkg-lede.git] / libopkg / libopkg.c
index c57838ac3f1b0524da3a6d8d7fa45671e221a1cb..dba19838f47862e552c6337ac3a15aa7374bbdb8 100644 (file)
@@ -1,4 +1,4 @@
-/* opkglib.c - the itsy package management system
+/* opkglib.c - the opkg package management system
 
    Florina Boor
 
@@ -477,6 +477,10 @@ opkg_op (int argc, char *argv[])
              !strcmp(cmd_name,"status") )
            args.noreadfeedsfile = 1;
 
+       opkg_cb_message = default_opkg_message_callback;
+       opkg_cb_response = default_opkg_response_callback;
+       opkg_cb_status = default_opkg_status_callback;
+
 
        err = opkg_conf_init (&opkg_conf, &args);
        if (err)
@@ -486,9 +490,6 @@ opkg_op (int argc, char *argv[])
 
        args_deinit (&args);
 
-       opkg_cb_message = default_opkg_message_callback;
-       opkg_cb_response = default_opkg_response_callback;
-       opkg_cb_status = default_opkg_status_callback;
        if ( strcmp(cmd_name, "files")==0)
             opkg_cb_list = default_opkg_files_callback;
        else