Skip to contentSkip to conversation

package.bbclass: Add warning about FILES containing '//'

PATCH Richard Purdie 1 participant 1 message May 30, 2012

lore
Share & tools
lore
#0 lore raw

'//' in a FILES variable causes hard to track down issues with packaging. This adds a warning and attempts to auto-correct the issue to try and make the problem more user friendly.

[YOCTO #2448]

---

meta/classes/package.bbclass +3 -0
index bc83bfb..6bce742 100644
@@ -917,6 +917,9 @@ python populate_packages () {
 		files = filesvar.split()
 		file_links = {}
 		for file in files:
+			if file.find("//") != -1:
+				bb.warn("FILES variable for package %s contains '//' which is invalid. Attempting to fix this but you should correct the metadata.\n" % pkg)
+				file.replace("//", "/")
 			if os.path.isabs(file):
 				file = '.' + file
 			if not os.path.islink(file):