General Public License for more details.
*/
+#include "config.h"
-#include "includes.h"
+#include <stdio.h>
#include <dirent.h>
#include <glob.h>
#include <fnmatch.h>
+#include <signal.h>
+#include <unistd.h>
#include "opkg_conf.h"
#include "opkg_cmd.h"
static int
opkg_install_cmd(int argc, char **argv)
{
- int i;
+ int i, r;
char *arg;
int err=0;
}
}
- opkg_configure_packages(NULL);
+ r = opkg_configure_packages(NULL);
+ if (!err)
+ err = r;
write_status_files_if_changed();
static int
opkg_upgrade_cmd(int argc, char **argv)
{
- int i;
+ int i, r;
pkg_t *pkg;
int err;
pkg_vec_free(installed);
}
- opkg_configure_packages(NULL);
+ r = opkg_configure_packages(NULL);
+ if (!err)
+ err = r;
write_status_files_if_changed();
static int
opkg_download_cmd(int argc, char **argv)
{
- int i, err;
+ int i, err = 0;
char *arg;
pkg_t *pkg;
}
}
- return 0;
+ return err;
}
static int
opkg_remove_cmd(int argc, char **argv)
{
- int i, a, done;
+ int i, a, done, r, err = 0;
pkg_t *pkg;
pkg_t *pkg_to_remove;
pkg_vec_t *available;
opkg_msg(ERROR, "Package %s not installed.\n", pkg->name);
continue;
}
- opkg_remove_pkg(pkg_to_remove, 0);
+ r = opkg_remove_pkg(pkg_to_remove, 0);
+ if (!err)
+ err = r;
+
done = 1;
}
}
opkg_msg(NOTICE, "No packages removed.\n");
write_status_files_if_changed();
- return 0;
+ return err;
}
static int