On Fri, Jan 15, 2010 at 09:33:40AM -0500, Joshua Judson Rosen wrote:
> Martin Jansa <[email protected]> writes:
> >
> > On Fri, Jan 15, 2010 at 08:46:24AM +0100, Jens Seidel wrote:
> > > On Thu, Jan 14, 2010 at 06:14:09PM +0100, Martin Jansa wrote:
> > > >
> > > > libbz2 is dependency of bzip2 and opkg wants to upgrade it
> > > > first.. but in that time there is still bzip2 with libbz
> > > > included on filesystem. Not sure how to fix this properly :/.
> > >
> > > Let libbz conflict with bzip2 <= 1.0.5-r0.4 would not work? I have to read
> > > more about OpenEmbedded ...
> >
> > It would but bitbake doesn't support versioned dependencies, so I guess
> > there is no way to specify version in RCONFLICTS :/.
>
> What does that mean--what does bitbake even have to do with it?
OK you're right, i should be more precise what bitbake/bbclasses do.
But first I was refering to build-time dependecies where we would sometimes
need to add something like ie "DEPENDS => qt4-x11-free_4.6" and make
bitbake to emit error if someone has PREFERRED_VERSION_qt4-x11-free =
"4.5.2" and tries to build recipe with this dependency.
> Isn't all of the logic that creates a .ipk from a bitbake recipe
> implemented in bbclass files in OE (on top of bitbake), which
> ultimately just call out to the ipkg command-line tools?
Yes it's mostly in package.bbclass package-ipk.bbclass.
> So, can't you just write "bzip2 (<= 1.05-r0.4)" in RCONFLICTS,
> and have bitbake just naively pass that string all the way through
> to ipkg-build?
>From what I tried now, bitbake is not naive enough to let this happen.
Package names from RDEPENDS are modified on their way to "Depends:" in
opk file, because RDEPENDS has to refer to existing name in PACKAGES
varible of some other recipe and this recipe is build as dependency (to
make sure that it will be available in feeds when user install package
depending on that.
But package name in PACKAGES isn't the same what opkg see, its also
modified on its way and you can even specify how, ie in shr.conf we have
# libfoo -> libfoo0-2 (etc)
INHERIT += "debian"
Example:
in dillo2_2.1.1.bb is RDEPENDS = "fltk2-images"
in fltk2_svn.bb is PACKAGES =+ "${PN}-fluid ${PN}-images"
but the resulting file is named
libfltk2-images_1.9.9+svnr6916-r1.4_armv4t.ipk
and "Depends:" fields is expanded with other dependencies and package
names are "fixed" like this
Depends: libfltk2-images, libc6 (>= 2.10), libjpeg62 (>= 6b), libpng12-0
(>= 1.2.41), libz1 (>= 1.2.3), libfltk2-2.0 (>= 1.9.9+svnr6916),
libx11-6 (>= 1.3.2), libxi6 (>= 1.3), libxinerama1 (>= 1.1), libxcursor1
(>= 1.1.10), libxft2 (>= 2.1.14), libxext6 (>= 1.1.1), libstdc++6 (>=
4.4.2), libgcc1 (>= 4.4.2)
RCONFLICTS isn't expanded so much, but runtime renaming is still needed
For bzip2 issue I tried
RCONFLICTS_libbz2 = "'bzip2 (<= 1.05-r0.4)'"
and
RCONFLICTS_libbz2 = "bzip2 (<= 1.05-r0.4)"
First ends with
Conflicts: bzip2, (<=, 1.05-r0.4)
Because before writting it to Conflicts: it's splitted and then ", ".joined,
but it goes OE through explode_deps
<debug>
NOTE: RCONFLICTS before: bzip2 (<= 1.05-r0.4)
NOTE: explode_deps: bzip2 (<= 1.05-r0.4) before
NOTE: explode_deps: ['bzip2 (<= 1.05-r0.4)'] after
NOTE: RCONFLICTS after: bzip2 (<= 1.05-r0.4)
NOTE: RCONFLICTS: bzip2 (<= 1.05-r0.4)
NOTE: rdepends: ['libc6 (>= 2.9)'] - libc6 (>= 2.9)
NOTE: rconflicts: ['bzip2', '(<=', '1.05-r0.4)'] - bzip2, (<=,
1.05-r0.4)
</debug>
and the second
Conflicts: 'bzip2
Killed in explode_deps
<debug>
NOTE: RCONFLICTS before: 'bzip2 (<= 1.05-r0.4)'
NOTE: explode_deps: 'bzip2 (<= 1.05-r0.4)' before
NOTE: explode_deps: ["'bzip2"] after
NOTE: RCONFLICTS after: 'bzip2
NOTE: RCONFLICTS: 'bzip2
NOTE: rconflicts: ["'bzip2"] - 'bzip2
</debug>
I'm not OE/bitbake guru (or even python programmer) to fix this issue in
bbclasses and as you can see it's not as easy as it seems to be. Also if
there is some easy way I guess it would be already used in OE recipes.
But if you create patch, which will work for all OE-possible
combinations, then I guess it will be really welcome.
In attachment is what I used for additional debug info, in case someone wants to
do his homework too :).
Cheers
> > Not sure about .opk files maybe they support it in headers.
>
> Yes--the Debian package format supports it, and there appears to be
> code in opkg to handle it; cf. libopkg/pkg_depends.c, libopgk/pkg_depends.h.
>
> --
> "Don't be afraid to ask (λf.((λx.xx) (λr.f(rr))))."
> _______________________________________________
> Shr-devel mailing list
> [email protected]
> http://lists.shr-project.org/mailman/listinfo/shr-devel
--
uin:136542059 jid:[email protected]
Jansa Martin sip:[email protected]
JaMa
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 384a67d..82b2c66 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -1192,6 +1192,8 @@ def explode_deps(s):
r[-1] += ' ' + ' '.join(j)
else:
r.append(i)
+ bb.note("explode_deps: %s before" % (s))
+ bb.note("explode_deps: %s after" % (r))
return r
# Make sure MACHINE isn't exported
diff --git a/classes/package.bbclass b/classes/package.bbclass
index 062f782..5acac33 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -286,7 +286,7 @@ def get_package_mapping (pkg, d):
return pkg
def runtime_mapping_rename (varname, d):
- #bb.note("%s before: %s" % (varname, bb.data.getVar(varname, d, True)))
+ bb.note("%s before: %s" % (varname, bb.data.getVar(varname, d, True)))
new_depends = []
for depend in explode_deps(bb.data.getVar(varname, d, True) or ""):
@@ -300,7 +300,7 @@ def runtime_mapping_rename (varname, d):
bb.data.setVar(varname, " ".join(new_depends) or None, d)
- #bb.note("%s after: %s" % (varname, bb.data.getVar(varname, d, True)))
+ bb.note("%s after: %s" % (varname, bb.data.getVar(varname, d, True)))
#
# Package functions suitable for inclusion in PACKAGEFUNCS
diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass
index 420c892..aaf0833 100644
--- a/classes/package_ipk.bbclass
+++ b/classes/package_ipk.bbclass
@@ -244,6 +244,9 @@ python do_package_ipk () {
bb.build.exec_func("mapping_rename_hook", localdata)
+ bb.note("RDEPENDS: %s" % (bb.data.getVar("RDEPENDS", localdata,
1)))
+ bb.note("RCONFLICTS: %s" % (bb.data.getVar("RCONFLICTS",
localdata, 1)))
+
rdepends = explode_deps(bb.data.getVar("RDEPENDS", localdata,
1) or "")
rrecommends = explode_deps(bb.data.getVar("RRECOMMENDS",
localdata, 1) or "")
rsuggests = (bb.data.getVar("RSUGGESTS", localdata, 1) or
"").split()
@@ -251,6 +254,9 @@ python do_package_ipk () {
rreplaces = (bb.data.getVar("RREPLACES", localdata, 1) or
"").split()
rconflicts = (bb.data.getVar("RCONFLICTS", localdata, 1) or
"").split()
+ bb.note("rdepends: %s - %s" % (rdepends, ", ".join(rdepends)))
+ bb.note("rconflicts: %s - %s" % (rconflicts, ",
".join(rconflicts)))
+
if not '-locale-' and not '-dbg' and not '-dev' in pkgname:
rdepends.append('%s-locale*' % pkgname)
diff --git a/recipes/bzip2/bzip2_1.0.5.bb b/recipes/bzip2/bzip2_1.0.5.bb
index dadffde..06f262b 100644
--- a/recipes/bzip2/bzip2_1.0.5.bb
+++ b/recipes/bzip2/bzip2_1.0.5.bb
@@ -20,6 +20,7 @@ do_install_append () {
PACKAGES =+ "libbz2"
FILES_libbz2 = "${libdir}/libbz2.so.*"
+RCONFLICTS_libbz2 = "bzip2 (<= 1.05-r0.4)"
pkg_postinst_${PN} () {
update-alternatives --install ${bindir}/bunzip2 bunzip2 bunzip2.${PN}
100
_______________________________________________
Shr-devel mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-devel