Openembedded Core Discussions
 help / color / mirror / Atom feed
* [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

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