#include "includes.h"
#include <dirent.h>
#include <glob.h>
#include "includes.h"
#include <dirent.h>
#include <glob.h>
#include "opkg_conf.h"
#include "opkg_cmd.h"
#include "opkg_conf.h"
#include "opkg_cmd.h"
#include "libbb/libbb.h"
#include "opkg_utils.h"
#include "opkg_defines.h"
#include "libbb/libbb.h"
#include "opkg_utils.h"
#include "opkg_defines.h"
-
-#include <fnmatch.h>
-
-
#include "opkg_download.h"
#include "opkg_install.h"
#include "opkg_upgrade.h"
#include "opkg_remove.h"
#include "opkg_configure.h"
#include "opkg_message.h"
#include "opkg_download.h"
#include "opkg_install.h"
#include "opkg_upgrade.h"
#include "opkg_remove.h"
#include "opkg_configure.h"
#include "opkg_message.h"
static int opkg_update_cmd(opkg_conf_t *conf, int argc, char **argv);
static int opkg_upgrade_cmd(opkg_conf_t *conf, int argc, char **argv);
static int opkg_update_cmd(opkg_conf_t *conf, int argc, char **argv);
static int opkg_upgrade_cmd(opkg_conf_t *conf, int argc, char **argv);
struct dirent *de;
while (de = readdir (dir), de != NULL) {
char *path;
struct dirent *de;
while (de = readdir (dir), de != NULL) {
char *path;
if (de->d_name[0] == '.')
continue;
sprintf_alloc (&path, "%s/%s", ctx->statedir, de->d_name);
if (access (path, X_OK) == 0) {
if (de->d_name[0] == '.')
continue;
sprintf_alloc (&path, "%s/%s", ctx->statedir, de->d_name);
if (access (path, X_OK) == 0) {
- if (system (path)) {
- err = errno;
- perror (de->d_name);
- }
perror (ctx->statedir);
sprintf_alloc (&cmd, "rm -rf %s", ctx->statedir);
perror (ctx->statedir);
sprintf_alloc (&cmd, "rm -rf %s", ctx->statedir);
free (cmd);
free (ctx->statedir);
free (cmd);
free (ctx->statedir);
}
ic = opkg_prep_intercepts (conf);
}
ic = opkg_prep_intercepts (conf);
- if (ic == NULL)
- return -1;
+ if (ic == NULL) {
+ err = -1;
+ goto error;
+ }
for(i = 0; i < all->len; i++) {
pkg = all->pkgs[i];
for(i = 0; i < all->len; i++) {
pkg = all->pkgs[i];
pkg_vec_free(all);
pkg_vec_free(ordered);
pkg_vec_free(visited);
pkg_vec_free(all);
pkg_vec_free(ordered);
pkg_vec_free(visited);