* [PATCH] dpkg-deb: strip virtual/ package prefix in control files
@ 2016-07-06 13:45 Joe MacDonald
2016-07-06 16:48 ` Richard Purdie
0 siblings, 1 reply; 3+ messages in thread
From: Joe MacDonald @ 2016-07-06 13:45 UTC (permalink / raw)
To: openembedded-core
If a recipe provides a 'virtual/foo', dpkg-deb will fail as '/' characters
are not allowed in any of the Depends, Recommends, Suggests, etc. fields.
The intent of these in the Debian package system and the few cases where
they are used in Yocto layers seems like throwing away the 'virtual/'
prefix preserves the intent, while not requiring it to be removed for
package systems that allow it (eg. opkg and rpm).
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
---
meta/classes/package_deb.bbclass | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 8f9b09a..1e8afa1 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -253,17 +253,17 @@ python do_package_deb () {
rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS", True) or "")
debian_cmp_remap(rconflicts)
if rdepends:
- ctrlfile.write("Depends: %s\n" % bb.utils.join_deps(rdepends))
+ ctrlfile.write("Depends: %s\n" % re.sub(r'virtual/', '', bb.utils.join_deps(rdepends)))
if rsuggests:
- ctrlfile.write("Suggests: %s\n" % bb.utils.join_deps(rsuggests))
+ ctrlfile.write("Suggests: %s\n" % re.sub(r'virtual/', '', bb.utils.join_deps(rsuggests)))
if rrecommends:
- ctrlfile.write("Recommends: %s\n" % bb.utils.join_deps(rrecommends))
+ ctrlfile.write("Recommends: %s\n" % re.sub(r'virtual/', '', bb.utils.join_deps(rrecommends)))
if rprovides:
- ctrlfile.write("Provides: %s\n" % bb.utils.join_deps(rprovides))
+ ctrlfile.write("Provides: %s\n" % re.sub(r'virtual/', '', bb.utils.join_deps(rprovides)))
if rreplaces:
- ctrlfile.write("Replaces: %s\n" % bb.utils.join_deps(rreplaces))
+ ctrlfile.write("Replaces: %s\n" % re.sub(r'virtual/', '', bb.utils.join_deps(rreplaces)))
if rconflicts:
- ctrlfile.write("Conflicts: %s\n" % bb.utils.join_deps(rconflicts))
+ ctrlfile.write("Conflicts: %s\n" % re.sub(r'virtual/', '', bb.utils.join_deps(rconflicts)))
ctrlfile.close()
for script in ["preinst", "postinst", "prerm", "postrm"]:
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dpkg-deb: strip virtual/ package prefix in control files
2016-07-06 13:45 [PATCH] dpkg-deb: strip virtual/ package prefix in control files Joe MacDonald
@ 2016-07-06 16:48 ` Richard Purdie
[not found] ` <20160706173544.GB5805@mentor.com>
0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2016-07-06 16:48 UTC (permalink / raw)
To: Joe MacDonald, openembedded-core
On Wed, 2016-07-06 at 09:45 -0400, Joe MacDonald wrote:
> If a recipe provides a 'virtual/foo', dpkg-deb will fail as '/'
> characters
> are not allowed in any of the Depends, Recommends, Suggests, etc.
> fields.
> The intent of these in the Debian package system and the few cases
> where
> they are used in Yocto layers seems like throwing away the 'virtual/'
> prefix preserves the intent, while not requiring it to be removed for
> package systems that allow it (eg. opkg and rpm).
>
> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
> ---
> meta/classes/package_deb.bbclass | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
Our virtual/ namespace is only used in DEPENDS, not in the runtime
package namespaces (RDEPENDS, RRECOMMENDS and friends). We therefore
shouldn't need this patch...
Cheers,
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dpkg-deb: strip virtual/ package prefix in control files
[not found] ` <20160706173544.GB5805@mentor.com>
@ 2016-07-06 21:25 ` Richard Purdie
0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2016-07-06 21:25 UTC (permalink / raw)
To: Joe MacDonald; +Cc: openembedded-core
On Wed, 2016-07-06 at 13:35 -0400, Joe MacDonald wrote:
> [Re: [OE-core] [PATCH] dpkg-deb: strip virtual/ package prefix in
> control files] On 16.07.06 (Wed 17:48) Richard Purdie wrote:
>
> > On Wed, 2016-07-06 at 09:45 -0400, Joe MacDonald wrote:
> > > If a recipe provides a 'virtual/foo', dpkg-deb will fail as '/'
> > > characters
> > > are not allowed in any of the Depends, Recommends, Suggests, etc.
> > > fields.
> > > The intent of these in the Debian package system and the few
> > > cases
> > > where
> > > they are used in Yocto layers seems like throwing away the
> > > 'virtual/'
> > > prefix preserves the intent, while not requiring it to be removed
> > > for
> > > package systems that allow it (eg. opkg and rpm).
> > >
> > > Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
> > > ---
> > > meta/classes/package_deb.bbclass | 12 ++++++------
> > > 1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > Our virtual/ namespace is only used in DEPENDS, not in the runtime
> > package namespaces (RDEPENDS, RRECOMMENDS and friends). We
> > therefore
> > shouldn't need this patch...
>
> I first encountered this in the meta-selinux layer but it seemed to
> be
> doing a sensible thing there and then found an example here:
>
> http://cgit.openembedded.org/cgit.cgi/meta-openembedded/tree/meta-oe/
> recipes-core/plymouth/plymouth_0.9.2.bb?h=master#n16
>
> That said, there's so few examples like this, I can easily see it
> being
> an error in both spots.
It is incorrect in both cases, we don't support virtual/ in the runtime
namespace. We could change insane.bbclass to check for and error on
this...
Cheers,
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-06 21:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-06 13:45 [PATCH] dpkg-deb: strip virtual/ package prefix in control files Joe MacDonald
2016-07-06 16:48 ` Richard Purdie
[not found] ` <20160706173544.GB5805@mentor.com>
2016-07-06 21:25 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox