[oe] [Bug 4549] A number of xorg dev packages are uninstallable
Tom Rini
trini at kernel.crashing.org
Tue Sep 16 17:19:10 UTC 2008
On Tue, Sep 16, 2008 at 04:49:26PM +0100, Phil Blundell wrote:
> On Mon, 2008-09-15 at 17:21 -0700, Tom Rini wrote:
> > for pkg in package_list:
> > rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or "")
> > +
> > + if main_is_empty:
> > + for rdep in rdepends:
> > + if rdep.find(main_pkg + " ") != -1:
> > + rdepends.remove(rdep)
> > for l in dangling_links[pkg]:
> > found = False
> > bb.debug(1, "%s contains dangling link %s" % (pkg, l))
>
> If you change that 1 to 0 in the first bb.data.getVar() call, the
> package names should be left in their unexpanded form and you can then
> safely match against a literal '${PN} (= ${PV})' as found in
> bitbake.conf. That's still a bit yucky but probably better than what
> you have there.
>
> Other than that, yeah, this looks fine to me.
OK, done. Checked with zeroconf and we can get away with not expanding
rdepends in that case.
Signed-off-by: Tom Rini <trini at embeddedalley.com>
#
# old_revision [4ac14ced8bc6330634ea2b24a201a4f6a556ef24]
#
# patch "classes/package.bbclass"
# from [6f3deeb912b24b09204110bd00e94e30f64d3936]
# to [0255f64eac991d83a518c70b907131f1d30bfc58]
#
============================================================
--- classes/package.bbclass 6f3deeb912b24b09204110bd00e94e30f64d3936
+++ classes/package.bbclass 0255f64eac991d83a518c70b907131f1d30bfc58
@@ -351,6 +351,8 @@ python populate_packages () {
os.system('rm -rf %s' % pkgdest)
seen = []
+ main_is_empty = 1
+ main_pkg = bb.data.getVar('PN', d, 1)
for pkg in package_list:
localdata = bb.data.createCopy(d)
@@ -395,6 +397,8 @@ python populate_packages () {
ret = bb.copyfile(file, fpath)
if ret is False or ret == 0:
raise bb.build.FuncFailed("File population failed")
+ if pkg == main_pkg and main_is_empty:
+ main_is_empty = 0
del localdata
os.chdir(workdir)
@@ -439,7 +443,11 @@ python populate_packages () {
dangling_links[pkg].append(os.path.normpath(target))
for pkg in package_list:
- rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or "")
+ rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "")
+
+ remstr = "${PN} (= ${DEBPV})"
+ if main_is_empty and remstr in rdepends:
+ rdepends.remove(remstr)
for l in dangling_links[pkg]:
found = False
bb.debug(1, "%s contains dangling link %s" % (pkg, l))
--
Tom Rini
More information about the Openembedded-devel
mailing list