base class: make base_read_file not raise an exception if the file to read is not...
authorMichael Lauer <mickey@vanille-media.de>
Sun, 16 Apr 2006 21:15:39 +0000 (21:15 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Sun, 16 Apr 2006 21:15:39 +0000 (21:15 +0000)
This is necessary due to the new RDEPENDS handling. I don't feel 100% comfortable with it,
but until we rework the complete staging-shouldn't-contain-dependency-information, this is
our way.

classes/base.bbclass

index 340e5d9..a06c1c1 100644 (file)
@@ -27,7 +27,7 @@ def base_read_file(filename):
        try:
                f = file( filename, "r" )
        except IOError, reason:
-               raise bb.build.FuncFailed("can't read from file '%s' (%s)", (filename,reason))
+               return "" # WARNING: can't raise an error now because of the new RDEPENDS handling. This is a bit ugly. :M:
        else:
                return f.read().strip()
        return None