package_ipk.bbclass: don't choke on empty SRC_URI.
authorChris Larson <clarson@kergoth.com>
Wed, 26 Aug 2009 10:58:03 +0000 (03:58 -0700)
committerChris Larson <clarson@kergoth.com>
Wed, 26 Aug 2009 10:58:03 +0000 (03:58 -0700)
Signed-off-by: Chris Larson <clarson@kergoth.com>
classes/package_ipk.bbclass

index e3a7522..e556108 100644 (file)
@@ -266,10 +266,9 @@ python do_package_ipk () {
                        ctrlfile.write("Replaces: %s\n" % ", ".join(rreplaces))
                if rconflicts:
                        ctrlfile.write("Conflicts: %s\n" % ", ".join(rconflicts))
-               src_uri = bb.data.getVar("SRC_URI", localdata, 1)
-               if src_uri:
-                       src_uri = re.sub("\s+", " ", src_uri)
-                       ctrlfile.write("Source: %s\n" % " ".join(src_uri.split()))
+               src_uri = bb.data.getVar("SRC_URI", localdata, 1) or d.getVar("FILE", True)
+               src_uri = re.sub("\s+", " ", src_uri)
+               ctrlfile.write("Source: %s\n" % " ".join(src_uri.split()))
                ctrlfile.close()
 
                for script in ["preinst", "postinst", "prerm", "postrm"]: