Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 08/11] opkg: Add --no-install-recommends option.
Date: Wed, 14 Aug 2013 15:30:06 -0500	[thread overview]
Message-ID: <1376512209-11622-9-git-send-email-mark.hatle@windriver.com> (raw)
In-Reply-To: <1376512209-11622-1-git-send-email-mark.hatle@windriver.com>

The new --no-install-recommends option is similar to the behavior of
apt-get's --no-install-recommedns.  Only required packages will be
installed.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 .../opkg/opkg/no-install-recommends.patch          | 78 ++++++++++++++++++++++
 meta/recipes-devtools/opkg/opkg_svn.bb             |  4 +-
 2 files changed, 81 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/opkg/opkg/no-install-recommends.patch

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..f71b027
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch
@@ -0,0 +1,78 @@
+Add the ability to not install ANY recommended packages.
+
+Upstream-status: Pending
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: trunk/libopkg/opkg_conf.h
+===================================================================
+--- trunk.orig/libopkg/opkg_conf.h
++++ trunk/libopkg/opkg_conf.h
+@@ -80,6 +80,7 @@ struct opkg_conf
+      int prefer_arch_to_version;
+      int check_signature;
+      int nodeps; /* do not follow dependencies */
++     int noinstall_recommends;
+      char *offline_root;
+      char *overlay_root;
+      int query_all;
+Index: trunk/libopkg/pkg_depends.c
+===================================================================
+--- trunk.orig/libopkg/pkg_depends.c
++++ trunk/libopkg/pkg_depends.c
+@@ -19,6 +19,7 @@
+ #include <ctype.h>
+ 
+ #include "pkg.h"
++#include "opkg_conf.h"
+ #include "opkg_utils.h"
+ #include "pkg_hash.h"
+ #include "opkg_message.h"
+@@ -204,7 +205,7 @@ pkg_hash_fetch_unsatisfied_dependencies(
+ 		    /* user request overrides package recommendation */
+ 		    if (satisfying_pkg != NULL
+ 			&& (compound_depend->type == RECOMMEND || compound_depend->type == SUGGEST)
+-			&& (satisfying_pkg->state_want == SW_DEINSTALL || satisfying_pkg->state_want == SW_PURGE)) {
++			&& (satisfying_pkg->state_want == SW_DEINSTALL || satisfying_pkg->state_want == SW_PURGE || conf->noinstall_recommends)) {
+ 			 opkg_msg(NOTICE, "%s: ignoring recommendation for "
+ 					"%s at user request\n",
+ 					pkg->name, satisfying_pkg->name);
+Index: trunk/src/opkg-cl.c
+===================================================================
+--- trunk.orig/src/opkg-cl.c
++++ trunk/src/opkg-cl.c
+@@ -50,6 +50,7 @@ enum {
+ 	ARGS_OPT_NODEPS,
+ 	ARGS_OPT_AUTOREMOVE,
+ 	ARGS_OPT_CACHE,
++	ARGS_OPT_NOINSTALL_RECOMMENDS,
+ };
+ 
+ static struct option long_options[] = {
+@@ -89,6 +90,7 @@ static struct option long_options[] = {
+ 	{"noaction", 0, 0, ARGS_OPT_NOACTION},
+ 	{"download-only", 0, 0, ARGS_OPT_DOWNLOAD_ONLY},
+ 	{"nodeps", 0, 0, ARGS_OPT_NODEPS},
++	{"no-install-recommends", 0, 0, ARGS_OPT_NOINSTALL_RECOMMENDS},
+ 	{"offline", 1, 0, 'o'},
+ 	{"offline-root", 1, 0, 'o'},
+ 	{"add-arch", 1, 0, ARGS_OPT_ADD_ARCH},
+@@ -199,6 +201,9 @@ args_parse(int argc, char *argv[])
+ 		case ARGS_OPT_NOACTION:
+ 			conf->noaction = 1;
+ 			break;
++		case ARGS_OPT_NOINSTALL_RECOMMENDS:
++			conf->noinstall_recommends = 1;
++			break;
+         case ARGS_OPT_DOWNLOAD_ONLY:
+ 			conf->download_only = 1;
+ 			break;
+@@ -293,6 +298,8 @@ usage()
+ 	printf("\t--noaction		No action -- test only\n");
+ 	printf("\t--download-only	No action -- download only\n");
+ 	printf("\t--nodeps		Do not follow dependencies\n");
++	printf("\t--no-install-recommends\n");
++	printf("\t                      Do not install any recommended packages\n");
+ 	printf("\t--force-removal-of-dependent-packages\n");
+ 	printf("\t			Remove package and all dependencies\n");
+ 	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 032578d..dbfca0f 100644
--- a/meta/recipes-devtools/opkg/opkg_svn.bb
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -1,6 +1,8 @@
 require opkg.inc
 
-SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;protocol=http"
+SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;protocol=http \
+           file://no-install-recommends.patch \
+"
 
 S = "${WORKDIR}/trunk"
 
-- 
1.8.1.2.545.g2f19ada



  parent reply	other threads:[~2013-08-14 20:29 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14 20:29 [PATCH 00/11] Update the way we control the construction of filesystems Mark Hatle
2013-08-14 20:29 ` [PATCH 01/11] image.bbclass: Add basic support for PACKAGE_EXCLUDE Mark Hatle
2013-08-14 20:30 ` [PATCH 02/11] python-smartpm: Add support for excluding package from the install Mark Hatle
2013-08-14 20:30 ` [PATCH 03/11] package_rpm.bbclass: Add support for PACKAGE_EXCLUDE to RPM installs Mark Hatle
2013-08-15 12:01   ` Paul Eggleton
2013-08-15 13:37     ` Mark Hatle
2013-08-14 20:30 ` [PATCH 04/11] python-smartpm: Add support to disable installing recommends Mark Hatle
2013-08-14 20:30 ` [PATCH 05/11] package_rpm.bbclass: NO_RECOMMENDATIONS support Mark Hatle
2013-08-14 20:30 ` [PATCH 06/11] package_deb.bbclass: Use the WORKDIR not SYSROOT for temp files Mark Hatle
2013-08-14 20:30 ` [PATCH 07/11] package_deb: Add support for NO_RECOMMENDATIONS and PACKAGE_EXCLUDE Mark Hatle
2013-08-14 20:30 ` Mark Hatle [this message]
2013-08-19 18:08   ` [PATCH 08/11] opkg: Add --no-install-recommends option Saul Wold
2013-08-19 18:32     ` Mark Hatle
2013-09-18 15:14       ` Paul Barker
2013-09-18 16:07         ` Richard Purdie
2013-09-18 16:35           ` Paul Barker
2013-09-18 16:48             ` Richard Purdie
2013-09-18 17:24               ` Paul Barker
2013-09-18 18:44                 ` Phil Blundell
2013-09-18 19:09                   ` Paul Barker
2013-09-18 20:33                 ` Richard Purdie
2013-09-18 20:51                   ` Paul Barker
2013-10-07 15:00         ` opkg-devel group (was: Re: [PATCH 08/11] opkg: Add --no-install-recommends option.) Andreas Oberritter
2013-10-07 16:08           ` Paul Barker
2013-08-14 20:30 ` [PATCH 09/11] package_ipk: Add support for NO_RECOMMENDATIONS Mark Hatle
2013-08-14 20:30 ` [PATCH 10/11] opkg: Add support for excluding packages from the install Mark Hatle
2013-08-14 20:30 ` [PATCH 11/11] package_ipk: Add support for PACKAGE_EXCLUDE Mark Hatle
2013-08-14 20:35 ` [PATCH 00/11] Update the way we control the construction of filesystems Burton, Ross
2013-08-14 20:41   ` Mark Hatle
2013-08-14 21:03     ` Burton, Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1376512209-11622-9-git-send-email-mark.hatle@windriver.com \
    --to=mark.hatle@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox