All of lore.kernel.org
 help / color / mirror / Atom feed
* [dizzy][PATCH 0/1] Enable complementary package exclusion
@ 2015-02-18 10:23 Paul Eggleton
  2015-02-18 10:23 ` [dizzy][PATCH 1/1] lib/oe/package_manager: support exclusion from complementary glob process by regex Paul Eggleton
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Eggleton @ 2015-02-18 10:23 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 3cd31ef5bb5d0bd9245956d16680ba9d9668817e:

  toaster.bbclass: use the openembedded-core name (2015-02-13 14:46:28 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib paule/exclude-complementary-dizzy
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/exclude-complementary-dizzy

Paul Eggleton (1):
  lib/oe/package_manager: support exclusion from complementary glob
    process by regex

 meta/lib/oe/package_manager.py |  3 +++
 scripts/oe-pkgdata-util        | 12 +++++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

-- 
1.9.3



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dizzy][PATCH 1/1] lib/oe/package_manager: support exclusion from complementary glob process by regex
  2015-02-18 10:23 [dizzy][PATCH 0/1] Enable complementary package exclusion Paul Eggleton
@ 2015-02-18 10:23 ` Paul Eggleton
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggleton @ 2015-02-18 10:23 UTC (permalink / raw)
  To: openembedded-core

Sometimes you do not want certain packages to be installed when
installing complementary packages, e.g. when using dev-pkgs in
IMAGE_FEATURES you may not want to install all packages from a
particular multilib. This introduces a new PACKAGE_EXCLUDE_COMPLEMENTARY
variable to allow specifying regexes to match packages to exclude.

(From OE-Core master rev: d4fe8f639d87d5ff35e50d07d41d0c1e9f12c4e3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
---
 meta/lib/oe/package_manager.py |  3 +++
 scripts/oe-pkgdata-util        | 12 +++++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 8609156..411b9d6 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -531,6 +531,9 @@ class PackageManager(object):
         cmd = [bb.utils.which(os.getenv('PATH'), "oe-pkgdata-util"),
                "glob", self.d.getVar('PKGDATA_DIR', True), installed_pkgs_file,
                globs]
+        exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY', True)
+        if exclude:
+            cmd.extend(['-x', exclude])
         try:
             bb.note("Installing complementary packages ...")
             complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index bf87547..28a9f83 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -28,7 +28,7 @@ import re
 import optparse
 from collections import defaultdict
 
-def glob(args, usage, debug=False):
+def glob(args, usage, debug=False, exclude=""):
     if len(args) < 3:
         usage()
         sys.exit(1)
@@ -45,7 +45,10 @@ def glob(args, usage, debug=False):
         print('ERROR: Unable to find package list file %s' % pkglist_file)
         sys.exit(1)
 
-    skipregex = re.compile("-locale-|^locale-base-|-dev$|-doc$|-dbg$|-staticdev$|^kernel-module-")
+    skipval = "-locale-|^locale-base-|-dev$|-doc$|-dbg$|-staticdev$|^kernel-module-"
+    if exclude:
+        skipval += "|" + exclude
+    skipregex = re.compile(skipval)
 
     mappedpkgs = set()
     with open(pkglist_file, 'r') as f:
@@ -305,6 +308,9 @@ Available commands:
     parser.add_option("-d", "--debug",
             help = "Enable debug output",
             action="store_true", dest="debug", default=False)
+    parser.add_option("-x", "--exclude",
+            help = "Exclude packages matching specified regex from the glob operation",
+            action="store", type="string", dest="exclude", default="")
 
     options, args = parser.parse_args(sys.argv)
     args = args[1:]
@@ -314,7 +320,7 @@ Available commands:
         sys.exit(1)
 
     if args[0] == "glob":
-        glob(args[1:], parser.print_help, options.debug)
+        glob(args[1:], parser.print_help, options.debug, options.exclude)
     elif args[0] == "lookup-pkg":
         lookup_pkg(args[1:], parser.print_help, options.debug)
     elif args[0] == "lookup-recipe":
-- 
1.9.3



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-18 10:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-18 10:23 [dizzy][PATCH 0/1] Enable complementary package exclusion Paul Eggleton
2015-02-18 10:23 ` [dizzy][PATCH 1/1] lib/oe/package_manager: support exclusion from complementary glob process by regex Paul Eggleton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.