diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2015-01-27 13:07:06 -0800 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2015-01-28 08:58:48 -0800 |
commit | 571c347d5f727a7a004fbae2e6a3e832636d5926 (patch) | |
tree | cdeb96f899abe4dd0c40a08c81964ae6ff1afe61 /tools | |
parent | 0555a31358f6b4d55b9f30b97b9dfc4554c89fa5 (diff) | |
download | tizen-571c347d5f727a7a004fbae2e6a3e832636d5926.tar.gz tizen-571c347d5f727a7a004fbae2e6a3e832636d5926.tar.bz2 tizen-571c347d5f727a7a004fbae2e6a3e832636d5926.zip |
spec2yocto: use env variable to find files
gitCloneAll.sh changes the directory before calling spec2yocto,
so we have to use absolute paths for the auxiliary files. For that
we need to add support for env variable substitution in all
usages of the "uri" properties.
Change-Id: I9f14bfed67e44d01205fac7478871d7fba2ac063
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/spec2yocto.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/spec2yocto.py b/tools/spec2yocto.py index c52927e4d..90ff2b064 100755 --- a/tools/spec2yocto.py +++ b/tools/spec2yocto.py @@ -181,7 +181,7 @@ class Spec2yoctoConfig( object ): packages_dico={} whitelist_list=self.__get_list(project,"whitelist", None) for whitelist_v in whitelist_list: - whitelist_uri = self.__get_value(whitelist_v,"uri", None ) + whitelist_uri = os.path.expanduser(os.path.expandvars(self.__get_value(whitelist_v,"uri", None ))) if whitelist_uri.startswith( "http" ): whitelist_file=download_url( whitelist_uri ) @@ -2437,13 +2437,15 @@ class manifestCollection: with open( meta_manifest_path, "w" ) as manifest_xml_file: manifest_xml_file.write( manifest_xml ) else: - if not os.path.isfile( meta_manifest_uri ): + filename = os.path.expanduser(os.path.expandvars(meta_manifest_uri)) + + if not os.path.isfile( filename ): msg = "In the project \"%s\" the manifest \"%s\" is not a valid file." msg = msg % ( self.__my_project, meta_manifest_uri ) print >> sys.stderr, colorize( msg, "red" ) sys.exit( 1 ) else: - meta_manifest_path = meta_manifest_uri + meta_manifest_path = filename self.__my_manifest_file_list[ meta_manifest ] = meta_manifest_path |