@@ -48,54 +48,51 @@ build_partition = "x86_partition:"
4848link_libraries = ""
4949link_info_file = "linkings.yml"
5050
51- # walk through each directory in the installed packages
52- dirs = []
5351
54- dirs .append (".." )
5552first = True
5653
57- for dirname in dirs :
58-
5954# open link_library yml file
6055
61- link_data = []
62-
63- try :
64- with open (INSTALLED_PKGS_DIR + dirname + "/" + link_info_file , 'r' ) as infile :
65-
66- data = yaml .load (infile )
67- try :
68- link_data = data ['libs' ]
69- try :
70-
71- for lib in link_data :
72- if not first :
73- link_libraries += ","
74- else :
75- first = False
76-
77- link_libraries += lib
78-
79- except TypeError :
80- print "empty linking list, proceed..."
81- except KeyError :
82- print "no link data, proceed..."
83- except IOError :
84- print "could not read linkings.yml in " + INSTALLED_PKGS_DIR + dirname + "/" + link_info_file + ", aborting..."
85- sys .exit ()
86- except KeyError :
87- print "could not read linkings.yml in " + INSTALLED_PKGS_DIR + dirname + "/" + link_info_file + ", aborting..."
88- sys .exit ()
89-
90- #print link_libraries
56+ link_data = []
57+
58+ try :
59+ with open (link_info_file , 'r' ) as infile :
60+
61+ data = yaml .load (infile )
62+ try :
63+ link_data = data ['libs' ]
64+ try :
65+
66+ for lib in link_data :
67+ if not first :
68+ link_libraries += ","
69+ else :
70+ first = False
71+
72+ link_libraries += lib
73+ except TypeError :
74+ print "empty linking list, proceed..."
75+ except KeyError :
76+ print "no link data, proceed..."
77+ except IOError :
78+ print "could not read linkings.yml in " + link_info_file + ", aborting..."
79+ sys .exit ()
80+ except KeyError :
81+ print "could not read linkings.yml in " + link_info_file + ", aborting..."
82+ sys .exit ()
9183
9284print "DONE"
9385
9486# write infos to user_init_pre.sh
9587
88+ orchestrator_options = ""
89+
90+ if link_libraries != "" :
91+ orchestrator_options = 'export ORCHESTRATOR_OPTIONS="--with-extra-lib ' + build_partition + link_libraries + '"'
92+
9693try :
9794 with open ("./user_init_pre.sh" , 'w' ) as outfile :
98- outfile .write ('export DEPLOYMENTVIEW="' + project_name + '_dp.aadl"\n \n export ORCHESTRATOR_OPTIONS="--with-extra-lib ' + build_partition + link_libraries + '"' )
95+ outfile .write ('export DEPLOYMENTVIEW="' + project_name + '_dp.aadl"\n \n ' + orchestrator_options )
9996
10097except IOError as err :
10198 print "could not write to file, exit..."
0 commit comments