summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/opkg/opkg/no-install-recommends.patch')
-rw-r--r--meta/recipes-devtools/opkg/opkg/no-install-recommends.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch b/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch
new file mode 100644
index 0000000..6d1ccec
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch
@@ -0,0 +1,78 @@
1Add the ability to not install ANY recommended packages.
2
3Upstream-Status: Pending
4
5Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
6
7Index: trunk/libopkg/opkg_conf.h
8===================================================================
9--- trunk.orig/libopkg/opkg_conf.h
10+++ trunk/libopkg/opkg_conf.h
11@@ -80,6 +80,7 @@ struct opkg_conf
12 int prefer_arch_to_version;
13 int check_signature;
14 int nodeps; /* do not follow dependencies */
15+ int noinstall_recommends;
16 char *offline_root;
17 char *overlay_root;
18 int query_all;
19Index: trunk/libopkg/pkg_depends.c
20===================================================================
21--- trunk.orig/libopkg/pkg_depends.c
22+++ trunk/libopkg/pkg_depends.c
23@@ -19,6 +19,7 @@
24 #include <ctype.h>
25
26 #include "pkg.h"
27+#include "opkg_conf.h"
28 #include "opkg_utils.h"
29 #include "pkg_hash.h"
30 #include "opkg_message.h"
31@@ -204,7 +205,7 @@ pkg_hash_fetch_unsatisfied_dependencies(
32 /* user request overrides package recommendation */
33 if (satisfying_pkg != NULL
34 && (compound_depend->type == RECOMMEND || compound_depend->type == SUGGEST)
35- && (satisfying_pkg->state_want == SW_DEINSTALL || satisfying_pkg->state_want == SW_PURGE)) {
36+ && (satisfying_pkg->state_want == SW_DEINSTALL || satisfying_pkg->state_want == SW_PURGE || conf->noinstall_recommends)) {
37 opkg_msg(NOTICE, "%s: ignoring recommendation for "
38 "%s at user request\n",
39 pkg->name, satisfying_pkg->name);
40Index: trunk/src/opkg-cl.c
41===================================================================
42--- trunk.orig/src/opkg-cl.c
43+++ trunk/src/opkg-cl.c
44@@ -50,6 +50,7 @@ enum {
45 ARGS_OPT_NODEPS,
46 ARGS_OPT_AUTOREMOVE,
47 ARGS_OPT_CACHE,
48+ ARGS_OPT_NOINSTALL_RECOMMENDS,
49 };
50
51 static struct option long_options[] = {
52@@ -89,6 +90,7 @@ static struct option long_options[] = {
53 {"noaction", 0, 0, ARGS_OPT_NOACTION},
54 {"download-only", 0, 0, ARGS_OPT_DOWNLOAD_ONLY},
55 {"nodeps", 0, 0, ARGS_OPT_NODEPS},
56+ {"no-install-recommends", 0, 0, ARGS_OPT_NOINSTALL_RECOMMENDS},
57 {"offline", 1, 0, 'o'},
58 {"offline-root", 1, 0, 'o'},
59 {"add-arch", 1, 0, ARGS_OPT_ADD_ARCH},
60@@ -199,6 +201,9 @@ args_parse(int argc, char *argv[])
61 case ARGS_OPT_NOACTION:
62 conf->noaction = 1;
63 break;
64+ case ARGS_OPT_NOINSTALL_RECOMMENDS:
65+ conf->noinstall_recommends = 1;
66+ break;
67 case ARGS_OPT_DOWNLOAD_ONLY:
68 conf->download_only = 1;
69 break;
70@@ -293,6 +298,8 @@ usage()
71 printf("\t--noaction No action -- test only\n");
72 printf("\t--download-only No action -- download only\n");
73 printf("\t--nodeps Do not follow dependencies\n");
74+ printf("\t--no-install-recommends\n");
75+ printf("\t Do not install any recommended packages\n");
76 printf("\t--force-removal-of-dependent-packages\n");
77 printf("\t Remove package and all dependencies\n");
78 printf("\t--autoremove Remove packages that were installed\n");