Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] package-deb: Ignore circular dependencies
@ 2016-03-09 18:19 Ricardo Ribalda Delgado
  2016-03-09 20:33 ` Burton, Ross
  0 siblings, 1 reply; 9+ messages in thread
From: Ricardo Ribalda Delgado @ 2016-03-09 18:19 UTC (permalink / raw)
  To: Richard Purdie, Aníbal Limón, Matt Madison,
	openembedded-core

If a package depends on itself apt-get fails to install it with the
error attached to this patch.

This patch checks for this conditions and notifies the user so the
recipe maintainer can fix his RDEPENDS variable.

root@qt5022:~# apt-get install perl-module-cpan
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  perl-module-cpan
0 upgraded, 640 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/5964 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
E: Internal error: MaxLoopCount reached in SmartUnPack (2) for
perl-module-cpan:amd64, aborting
E: Internal error, packages left unconfigured. perl-module-cpan:amd64
root@qt5022:~# apt-get install perl-modules

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
 meta/classes/package_deb.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 6ecea0e1824e..2eee083cc130 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -235,6 +235,9 @@ python do_package_deb () {
         rdepends = bb.utils.explode_dep_versions2(localdata.getVar("RDEPENDS", True) or "")
         debian_cmp_remap(rdepends)
         for dep in rdepends.keys():
+                if dep == pkg:
+                        bb.warn("Package %s rdepends on itself. Ignoring this dependency" % pkg)
+                        del rdepends[dep]
                 if '*' in dep:
                         del rdepends[dep]
         rrecommends = bb.utils.explode_dep_versions2(localdata.getVar("RRECOMMENDS", True) or "")
-- 
2.7.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-03-09 21:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-09 18:19 [PATCH] package-deb: Ignore circular dependencies Ricardo Ribalda Delgado
2016-03-09 20:33 ` Burton, Ross
2016-03-09 20:47   ` Aníbal Limón
2016-03-09 20:54     ` Aníbal Limón
2016-03-09 21:00       ` Ricardo Ribalda Delgado
2016-03-09 21:23   ` Mark Hatle
2016-03-09 21:27     ` Mark Hatle
2016-03-09 21:30       ` Ricardo Ribalda Delgado
2016-03-09 21:47         ` Mark Hatle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox