summaryrefslogtreecommitdiffstats
path: root/package/opkg/patches/012-cleanup-tmpdir.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/opkg/patches/012-cleanup-tmpdir.patch')
-rw-r--r--package/opkg/patches/012-cleanup-tmpdir.patch37
1 files changed, 30 insertions, 7 deletions
diff --git a/package/opkg/patches/012-cleanup-tmpdir.patch b/package/opkg/patches/012-cleanup-tmpdir.patch
index f6d5e8732..d794a070e 100644
--- a/package/opkg/patches/012-cleanup-tmpdir.patch
+++ b/package/opkg/patches/012-cleanup-tmpdir.patch
@@ -1,12 +1,35 @@
--- a/src/opkg-cl.c
+++ b/src/opkg-cl.c
-@@ -333,6 +333,9 @@
+@@ -263,7 +263,7 @@
+ int
+ main(int argc, char *argv[])
+ {
+- int opts;
++ int opts, err = -1;
+ char *cmd_name;
+ opkg_cmd_t *cmd;
+ int nocheckfordirorfile = 0;
+@@ -327,15 +327,8 @@
+ usage();
+ }
+
+- if (opkg_cmd_exec(cmd, argc - opts, (const char **) (argv + opts)))
+- goto err2;
++ err = opkg_cmd_exec(cmd, argc - opts, (const char **) (argv + opts));
+
+- print_error_list();
+- free_error_list();
+-
+- return 0;
+-
+-err2:
+ #ifdef HAVE_CURL
+ opkg_curl_cleanup();
+ #endif
+@@ -346,5 +339,5 @@
print_error_list();
free_error_list();
-+ if( conf->tmp_dir )
-+ rm_r(conf->tmp_dir);
-+
- return 0;
-
- err2:
+- return -1;
++ return err;
+ }