diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2013-08-13 15:02:01 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-22 18:30:01 +0100 |
commit | c52820b403aa967c2bde33743405a4cb56a8c142 (patch) | |
tree | c7b6a6ace6793f37a2550fbe8fdd302db8c8defc /meta | |
parent | 388278818d2af0a2c6a687765d43f22fe6f3c407 (diff) | |
download | poky-c52820b403aa967c2bde33743405a4cb56a8c142.tar.gz |
opkg: Add --no-install-recommends option.
The new --no-install-recommends option is similar to the behavior of
apt-get's --no-install-recommedns. Only required packages will be
installed.
(From OE-Core rev: 86a30a88cf89ed97c372c391169f4ae243c89fd2)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/no-install-recommends.patch | 78 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg_svn.bb | 4 |
2 files changed, 81 insertions, 1 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 0000000000..6d1ccecbf4 --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch | |||
@@ -0,0 +1,78 @@ | |||
1 | Add the ability to not install ANY recommended packages. | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
6 | |||
7 | Index: 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; | ||
19 | Index: 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); | ||
40 | Index: 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"); | ||
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb index 032578d23d..dbfca0fcc8 100644 --- a/meta/recipes-devtools/opkg/opkg_svn.bb +++ b/meta/recipes-devtools/opkg/opkg_svn.bb | |||
@@ -1,6 +1,8 @@ | |||
1 | require opkg.inc | 1 | require opkg.inc |
2 | 2 | ||
3 | SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;protocol=http" | 3 | SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;protocol=http \ |
4 | file://no-install-recommends.patch \ | ||
5 | " | ||
4 | 6 | ||
5 | S = "${WORKDIR}/trunk" | 7 | S = "${WORKDIR}/trunk" |
6 | 8 | ||