diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-10-31 14:43:48 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-18 16:42:03 +0000 |
commit | a0d1ac7999cc914e170f067428925e1056f5deb7 (patch) | |
tree | 1ccaf9bff407193d1eea7aae3926c21426dc4f4c /meta/recipes-devtools | |
parent | 11af6b042cee91c52e13df6f76628fdacc5c692a (diff) | |
download | poky-a0d1ac7999cc914e170f067428925e1056f5deb7.tar.gz |
python-smartpm: Add basic knowledge of RPMSENSE_MISSINGOK
Currently smart does not support recommend dependencies. Add the first set
of 'support' for RPMSENSE_MISSINGOK (the flag that makes something a
recommend). This initial support ends up ignoring the recommendation, but is
written in a way that it will be the basis of eventual support.
(From OE-Core rev: 4f1f6d39803c94cf9ff55f0a4616e7a1703bcef6)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/python/python-smartpm/smart-missingok.patch | 43 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python-smartpm_1.4.1.bb | 3 |
2 files changed, 45 insertions, 1 deletions
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-missingok.patch b/meta/recipes-devtools/python/python-smartpm/smart-missingok.patch new file mode 100644 index 0000000000..7e138696b8 --- /dev/null +++ b/meta/recipes-devtools/python/python-smartpm/smart-missingok.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | backends/rpm: Identify recommended packages | ||
2 | |||
3 | We identify and store recommended packages (and later throw that data away.) | ||
4 | |||
5 | This is indended to be the starting work to add support for recommended | ||
6 | packages to smart. | ||
7 | |||
8 | Upstream-status: Inappropriate [ Code isn't finished! ] | ||
9 | |||
10 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
11 | |||
12 | Index: smart-1.4.1/smart/backends/rpm/header.py | ||
13 | =================================================================== | ||
14 | --- smart-1.4.1.orig/smart/backends/rpm/header.py | ||
15 | +++ smart-1.4.1/smart/backends/rpm/header.py | ||
16 | @@ -292,6 +292,7 @@ class RPMHeaderLoader(Loader): | ||
17 | f = [0] | ||
18 | elif type(f) != list: | ||
19 | f = [f] | ||
20 | + recdict = {} | ||
21 | reqdict = {} | ||
22 | for i in range(len(n)): | ||
23 | ni = n[i] | ||
24 | @@ -308,10 +309,17 @@ class RPMHeaderLoader(Loader): | ||
25 | # RPMSENSE_SCRIPT_PREUN | | ||
26 | # RPMSENSE_SCRIPT_POST | | ||
27 | # RPMSENSE_SCRIPT_POSTUN == 7744 | ||
28 | - reqdict[(f[i]&7744 and PreReq or Req, | ||
29 | - intern(ni), r, vi)] = True | ||
30 | + if (f[i]&rpm.RPMSENSE_MISSINGOK): | ||
31 | + print "Ignoring Recommend Dependency: %s" % (ni) | ||
32 | + recdict[(f[i]&7744 and PreReq or Req, | ||
33 | + intern(ni), r, vi)] = True | ||
34 | + else: | ||
35 | + reqdict[(f[i]&7744 and PreReq or Req, | ||
36 | + intern(ni), r, vi)] = True | ||
37 | + recargs = collapse_libc_requires(recdict.keys()) | ||
38 | reqargs = collapse_libc_requires(reqdict.keys()) | ||
39 | else: | ||
40 | + recargs = None | ||
41 | reqargs = None | ||
42 | |||
43 | n = h[1054] # RPMTAG_CONFLICTNAME | ||
diff --git a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb index bc0c1f9941..4314564cd8 100644 --- a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb +++ b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb | |||
@@ -11,13 +11,14 @@ LICENSE = "GPLv2" | |||
11 | LIC_FILES_CHKSUM = "file://LICENSE;md5=393a5ca445f6965873eca0259a17f833" | 11 | LIC_FILES_CHKSUM = "file://LICENSE;md5=393a5ca445f6965873eca0259a17f833" |
12 | 12 | ||
13 | DEPENDS = "python rpm" | 13 | DEPENDS = "python rpm" |
14 | PR = "r0" | 14 | PR = "r1" |
15 | SRCNAME = "smart" | 15 | SRCNAME = "smart" |
16 | 16 | ||
17 | SRC_URI = "\ | 17 | SRC_URI = "\ |
18 | http://launchpad.net/smart/trunk/${PV}/+download/${SRCNAME}-${PV}.tar.bz2 \ | 18 | http://launchpad.net/smart/trunk/${PV}/+download/${SRCNAME}-${PV}.tar.bz2 \ |
19 | file://smartpm-rpm5-nodig.patch \ | 19 | file://smartpm-rpm5-nodig.patch \ |
20 | file://smart-rpm-root.patch \ | 20 | file://smart-rpm-root.patch \ |
21 | file://smart-missingok.patch \ | ||
21 | " | 22 | " |
22 | 23 | ||
23 | SRC_URI[md5sum] = "573ef32ba177a6b3c4bf7ef04873fcb6" | 24 | SRC_URI[md5sum] = "573ef32ba177a6b3c4bf7ef04873fcb6" |