Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | # For compatibility |
| 2 | def base_path_join(a, *p): |
| 3 | return oe.path.join(a, *p) |
| 4 | |
| 5 | def base_path_relative(src, dest): |
| 6 | return oe.path.relative(src, dest) |
| 7 | |
| 8 | def base_path_out(path, d): |
| 9 | return oe.path.format_display(path, d) |
| 10 | |
| 11 | def base_read_file(filename): |
| 12 | return oe.utils.read_file(filename) |
| 13 | |
| 14 | def base_ifelse(condition, iftrue = True, iffalse = False): |
| 15 | return oe.utils.ifelse(condition, iftrue, iffalse) |
| 16 | |
| 17 | def base_conditional(variable, checkvalue, truevalue, falsevalue, d): |
| 18 | return oe.utils.conditional(variable, checkvalue, truevalue, falsevalue, d) |
| 19 | |
| 20 | def base_less_or_equal(variable, checkvalue, truevalue, falsevalue, d): |
| 21 | return oe.utils.less_or_equal(variable, checkvalue, truevalue, falsevalue, d) |
| 22 | |
| 23 | def base_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d): |
| 24 | return oe.utils.version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d) |
| 25 | |
| 26 | def base_contains(variable, checkvalues, truevalue, falsevalue, d): |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 27 | bb.note('base_contains is deprecated, please use bb.utils.contains instead.') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 28 | return bb.utils.contains(variable, checkvalues, truevalue, falsevalue, d) |
| 29 | |
| 30 | def base_both_contain(variable1, variable2, checkvalue, d): |
| 31 | return oe.utils.both_contain(variable1, variable2, checkvalue, d) |
| 32 | |
| 33 | def base_prune_suffix(var, suffixes, d): |
| 34 | return oe.utils.prune_suffix(var, suffixes, d) |
| 35 | |
| 36 | def oe_filter(f, str, d): |
| 37 | return oe.utils.str_filter(f, str, d) |
| 38 | |
| 39 | def oe_filter_out(f, str, d): |
| 40 | return oe.utils.str_filter_out(f, str, d) |
| 41 | |
| 42 | def machine_paths(d): |
| 43 | """List any existing machine specific filespath directories""" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 44 | machine = d.getVar("MACHINE") |
| 45 | filespathpkg = d.getVar("FILESPATHPKG").split(":") |
| 46 | for basepath in d.getVar("FILESPATHBASE").split(":"): |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 47 | for pkgpath in filespathpkg: |
| 48 | machinepath = os.path.join(basepath, pkgpath, machine) |
| 49 | if os.path.isdir(machinepath): |
| 50 | yield machinepath |
| 51 | |
| 52 | def is_machine_specific(d): |
| 53 | """Determine whether the current recipe is machine specific""" |
| 54 | machinepaths = set(machine_paths(d)) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 55 | srcuri = d.getVar("SRC_URI").split() |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 56 | for url in srcuri: |
| 57 | fetcher = bb.fetch2.Fetch([srcuri], d) |
| 58 | if url.startswith("file://"): |
| 59 | if any(fetcher.localpath(url).startswith(mp + "/") for mp in machinepaths): |
| 60 | return True |
| 61 | |
| 62 | oe_soinstall() { |
| 63 | # Purpose: Install shared library file and |
| 64 | # create the necessary links |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 65 | # Example: oe_soinstall libfoo.so.1.2.3 ${D}${libdir} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 66 | libname=`basename $1` |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 67 | case "$libname" in |
| 68 | *.so) |
| 69 | bbfatal "oe_soinstall: Shared library must haved versioned filename (e.g. libfoo.so.1.2.3)" |
| 70 | ;; |
| 71 | esac |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 72 | install -m 755 $1 $2/$libname |
| 73 | sonamelink=`${HOST_PREFIX}readelf -d $1 |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'` |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 74 | if [ -z $sonamelink ]; then |
| 75 | bbfatal "oe_soinstall: $libname is missing ELF tag 'SONAME'." |
| 76 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 77 | solink=`echo $libname | sed -e 's/\.so\..*/.so/'` |
| 78 | ln -sf $libname $2/$sonamelink |
| 79 | ln -sf $libname $2/$solink |
| 80 | } |
| 81 | |
| 82 | oe_libinstall() { |
| 83 | # Purpose: Install a library, in all its forms |
| 84 | # Example |
| 85 | # |
| 86 | # oe_libinstall libltdl ${STAGING_LIBDIR}/ |
| 87 | # oe_libinstall -C src/libblah libblah ${D}/${libdir}/ |
| 88 | dir="" |
| 89 | libtool="" |
| 90 | silent="" |
| 91 | require_static="" |
| 92 | require_shared="" |
| 93 | staging_install="" |
| 94 | while [ "$#" -gt 0 ]; do |
| 95 | case "$1" in |
| 96 | -C) |
| 97 | shift |
| 98 | dir="$1" |
| 99 | ;; |
| 100 | -s) |
| 101 | silent=1 |
| 102 | ;; |
| 103 | -a) |
| 104 | require_static=1 |
| 105 | ;; |
| 106 | -so) |
| 107 | require_shared=1 |
| 108 | ;; |
| 109 | -*) |
| 110 | bbfatal "oe_libinstall: unknown option: $1" |
| 111 | ;; |
| 112 | *) |
| 113 | break; |
| 114 | ;; |
| 115 | esac |
| 116 | shift |
| 117 | done |
| 118 | |
| 119 | libname="$1" |
| 120 | shift |
| 121 | destpath="$1" |
| 122 | if [ -z "$destpath" ]; then |
| 123 | bbfatal "oe_libinstall: no destination path specified" |
| 124 | fi |
| 125 | if echo "$destpath/" | egrep '^${STAGING_LIBDIR}/' >/dev/null |
| 126 | then |
| 127 | staging_install=1 |
| 128 | fi |
| 129 | |
| 130 | __runcmd () { |
| 131 | if [ -z "$silent" ]; then |
| 132 | echo >&2 "oe_libinstall: $*" |
| 133 | fi |
| 134 | $* |
| 135 | } |
| 136 | |
| 137 | if [ -z "$dir" ]; then |
| 138 | dir=`pwd` |
| 139 | fi |
| 140 | |
| 141 | dotlai=$libname.lai |
| 142 | |
| 143 | # Sanity check that the libname.lai is unique |
| 144 | number_of_files=`(cd $dir; find . -name "$dotlai") | wc -l` |
| 145 | if [ $number_of_files -gt 1 ]; then |
| 146 | bbfatal "oe_libinstall: $dotlai is not unique in $dir" |
| 147 | fi |
| 148 | |
| 149 | |
| 150 | dir=$dir`(cd $dir;find . -name "$dotlai") | sed "s/^\.//;s/\/$dotlai\$//;q"` |
| 151 | olddir=`pwd` |
| 152 | __runcmd cd $dir |
| 153 | |
| 154 | lafile=$libname.la |
| 155 | |
| 156 | # If such file doesn't exist, try to cut version suffix |
| 157 | if [ ! -f "$lafile" ]; then |
| 158 | libname1=`echo "$libname" | sed 's/-[0-9.]*$//'` |
| 159 | lafile1=$libname.la |
| 160 | if [ -f "$lafile1" ]; then |
| 161 | libname=$libname1 |
| 162 | lafile=$lafile1 |
| 163 | fi |
| 164 | fi |
| 165 | |
| 166 | if [ -f "$lafile" ]; then |
| 167 | # libtool archive |
| 168 | eval `cat $lafile|grep "^library_names="` |
| 169 | libtool=1 |
| 170 | else |
| 171 | library_names="$libname.so* $libname.dll.a $libname.*.dylib" |
| 172 | fi |
| 173 | |
| 174 | __runcmd install -d $destpath/ |
| 175 | dota=$libname.a |
| 176 | if [ -f "$dota" -o -n "$require_static" ]; then |
| 177 | rm -f $destpath/$dota |
| 178 | __runcmd install -m 0644 $dota $destpath/ |
| 179 | fi |
| 180 | if [ -f "$dotlai" -a -n "$libtool" ]; then |
| 181 | rm -f $destpath/$libname.la |
| 182 | __runcmd install -m 0644 $dotlai $destpath/$libname.la |
| 183 | fi |
| 184 | |
| 185 | for name in $library_names; do |
| 186 | files=`eval echo $name` |
| 187 | for f in $files; do |
| 188 | if [ ! -e "$f" ]; then |
| 189 | if [ -n "$libtool" ]; then |
| 190 | bbfatal "oe_libinstall: $dir/$f not found." |
| 191 | fi |
| 192 | elif [ -L "$f" ]; then |
| 193 | __runcmd cp -P "$f" $destpath/ |
| 194 | elif [ ! -L "$f" ]; then |
| 195 | libfile="$f" |
| 196 | rm -f $destpath/$libfile |
| 197 | __runcmd install -m 0755 $libfile $destpath/ |
| 198 | fi |
| 199 | done |
| 200 | done |
| 201 | |
| 202 | if [ -z "$libfile" ]; then |
| 203 | if [ -n "$require_shared" ]; then |
| 204 | bbfatal "oe_libinstall: unable to locate shared library" |
| 205 | fi |
| 206 | elif [ -z "$libtool" ]; then |
| 207 | # special case hack for non-libtool .so.#.#.# links |
| 208 | baselibfile=`basename "$libfile"` |
| 209 | if (echo $baselibfile | grep -qE '^lib.*\.so\.[0-9.]*$'); then |
| 210 | sonamelink=`${HOST_PREFIX}readelf -d $libfile |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'` |
| 211 | solink=`echo $baselibfile | sed -e 's/\.so\..*/.so/'` |
| 212 | if [ -n "$sonamelink" -a x"$baselibfile" != x"$sonamelink" ]; then |
| 213 | __runcmd ln -sf $baselibfile $destpath/$sonamelink |
| 214 | fi |
| 215 | __runcmd ln -sf $baselibfile $destpath/$solink |
| 216 | fi |
| 217 | fi |
| 218 | |
| 219 | __runcmd cd "$olddir" |
| 220 | } |
| 221 | |
| 222 | oe_machinstall() { |
| 223 | # Purpose: Install machine dependent files, if available |
| 224 | # If not available, check if there is a default |
| 225 | # If no default, just touch the destination |
| 226 | # Example: |
| 227 | # $1 $2 $3 $4 |
| 228 | # oe_machinstall -m 0644 fstab ${D}/etc/fstab |
| 229 | # |
| 230 | # TODO: Check argument number? |
| 231 | # |
| 232 | filename=`basename $3` |
| 233 | dirname=`dirname $3` |
| 234 | |
| 235 | for o in `echo ${OVERRIDES} | tr ':' ' '`; do |
| 236 | if [ -e $dirname/$o/$filename ]; then |
| 237 | bbnote $dirname/$o/$filename present, installing to $4 |
| 238 | install $1 $2 $dirname/$o/$filename $4 |
| 239 | return |
| 240 | fi |
| 241 | done |
| 242 | # bbnote overrides specific file NOT present, trying default=$3... |
| 243 | if [ -e $3 ]; then |
| 244 | bbnote $3 present, installing to $4 |
| 245 | install $1 $2 $3 $4 |
| 246 | else |
| 247 | bbnote $3 NOT present, touching empty $4 |
| 248 | touch $4 |
| 249 | fi |
| 250 | } |
| 251 | |
| 252 | create_cmdline_wrapper () { |
| 253 | # Create a wrapper script where commandline options are needed |
| 254 | # |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 255 | # These are useful to work around relocation issues, by passing extra options |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 256 | # to a program |
| 257 | # |
| 258 | # Usage: create_cmdline_wrapper FILENAME <extra-options> |
| 259 | |
| 260 | cmd=$1 |
| 261 | shift |
| 262 | |
| 263 | echo "Generating wrapper script for $cmd" |
| 264 | |
| 265 | mv $cmd $cmd.real |
| 266 | cmdname=`basename $cmd` |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 267 | dirname=`dirname $cmd` |
| 268 | cmdoptions=$@ |
| 269 | if [ "${base_prefix}" != "" ]; then |
| 270 | relpath=`python3 -c "import os; print(os.path.relpath('${D}${base_prefix}', '$dirname'))"` |
| 271 | cmdoptions=`echo $@ | sed -e "s:${base_prefix}:\\$realdir/$relpath:g"` |
| 272 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 273 | cat <<END >$cmd |
| 274 | #!/bin/bash |
| 275 | realpath=\`readlink -fn \$0\` |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 276 | realdir=\`dirname \$realpath\` |
| 277 | exec -a \`dirname \$realpath\`/$cmdname \`dirname \$realpath\`/$cmdname.real $cmdoptions "\$@" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 278 | END |
| 279 | chmod +x $cmd |
| 280 | } |
| 281 | |
| 282 | create_wrapper () { |
| 283 | # Create a wrapper script where extra environment variables are needed |
| 284 | # |
| 285 | # These are useful to work around relocation issues, by setting environment |
| 286 | # variables which point to paths in the filesystem. |
| 287 | # |
| 288 | # Usage: create_wrapper FILENAME [[VAR=VALUE]..] |
| 289 | |
| 290 | cmd=$1 |
| 291 | shift |
| 292 | |
| 293 | echo "Generating wrapper script for $cmd" |
| 294 | |
| 295 | mv $cmd $cmd.real |
| 296 | cmdname=`basename $cmd` |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 297 | dirname=`dirname $cmd` |
| 298 | exportstring=$@ |
| 299 | if [ "${base_prefix}" != "" ]; then |
| 300 | relpath=`python3 -c "import os; print(os.path.relpath('${D}${base_prefix}', '$dirname'))"` |
| 301 | exportstring=`echo $@ | sed -e "s:${base_prefix}:\\$realdir/$relpath:g"` |
| 302 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 303 | cat <<END >$cmd |
| 304 | #!/bin/bash |
| 305 | realpath=\`readlink -fn \$0\` |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 306 | realdir=\`dirname \$realpath\` |
| 307 | export $exportstring |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 308 | exec -a \`dirname \$realpath\`/$cmdname \`dirname \$realpath\`/$cmdname.real "\$@" |
| 309 | END |
| 310 | chmod +x $cmd |
| 311 | } |
| 312 | |
| 313 | # Copy files/directories from $1 to $2 but using hardlinks |
| 314 | # (preserve symlinks) |
| 315 | hardlinkdir () { |
| 316 | from=$1 |
| 317 | to=$2 |
| 318 | (cd $from; find . -print0 | cpio --null -pdlu $to) |
| 319 | } |
| 320 | |
| 321 | |
| 322 | def check_app_exists(app, d): |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 323 | app = d.expand(app).split()[0].strip() |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 324 | path = d.getVar('PATH') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 325 | return bool(bb.utils.which(path, app)) |
| 326 | |
| 327 | def explode_deps(s): |
| 328 | return bb.utils.explode_deps(s) |
| 329 | |
| 330 | def base_set_filespath(path, d): |
| 331 | filespath = [] |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 332 | extrapaths = (d.getVar("FILESEXTRAPATHS") or "") |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 333 | # Remove default flag which was used for checking |
| 334 | extrapaths = extrapaths.replace("__default:", "") |
| 335 | # Don't prepend empty strings to the path list |
| 336 | if extrapaths != "": |
| 337 | path = extrapaths.split(":") + path |
| 338 | # The ":" ensures we have an 'empty' override |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 339 | overrides = (":" + (d.getVar("FILESOVERRIDES") or "")).split(":") |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 340 | overrides.reverse() |
| 341 | for o in overrides: |
| 342 | for p in path: |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 343 | if p != "": |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 344 | filespath.append(os.path.join(p, o)) |
| 345 | return ":".join(filespath) |
| 346 | |
| 347 | def extend_variants(d, var, extend, delim=':'): |
| 348 | """Return a string of all bb class extend variants for the given extend""" |
| 349 | variants = [] |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 350 | whole = d.getVar(var) or "" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 351 | for ext in whole.split(): |
| 352 | eext = ext.split(delim) |
| 353 | if len(eext) > 1 and eext[0] == extend: |
| 354 | variants.append(eext[1]) |
| 355 | return " ".join(variants) |
| 356 | |
| 357 | def multilib_pkg_extend(d, pkg): |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 358 | variants = (d.getVar("MULTILIB_VARIANTS") or "").split() |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 359 | if not variants: |
| 360 | return pkg |
| 361 | pkgs = pkg |
| 362 | for v in variants: |
| 363 | pkgs = pkgs + " " + v + "-" + pkg |
| 364 | return pkgs |
| 365 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 366 | def get_multilib_datastore(variant, d): |
| 367 | localdata = bb.data.createCopy(d) |
| 368 | overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + variant |
| 369 | localdata.setVar("OVERRIDES", overrides) |
| 370 | localdata.setVar("MLPREFIX", variant + "-") |
| 371 | return localdata |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 372 | get_multilib_datastore[vardepsexclude] = "OVERRIDES" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 373 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 374 | def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = ' '): |
| 375 | """Return a string of all ${var} in all multilib tune configuration""" |
| 376 | values = [] |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 377 | value = d.getVar(var) or "" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 378 | if value != "": |
| 379 | if need_split: |
| 380 | for item in value.split(delim): |
| 381 | values.append(item) |
| 382 | else: |
| 383 | values.append(value) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 384 | variants = d.getVar("MULTILIB_VARIANTS") or "" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 385 | for item in variants.split(): |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 386 | localdata = get_multilib_datastore(item, d) |
| 387 | value = localdata.getVar(var) or "" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 388 | if value != "": |
| 389 | if need_split: |
| 390 | for item in value.split(delim): |
| 391 | values.append(item) |
| 392 | else: |
| 393 | values.append(value) |
| 394 | if unique: |
| 395 | #we do this to keep order as much as possible |
| 396 | ret = [] |
| 397 | for value in values: |
| 398 | if not value in ret: |
| 399 | ret.append(value) |
| 400 | else: |
| 401 | ret = values |
| 402 | return " ".join(ret) |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 403 | |
| 404 | def all_multilib_tune_list(vars, d): |
| 405 | """ |
| 406 | Return a list of ${VAR} for each variable VAR in vars from each |
| 407 | multilib tune configuration. |
| 408 | Is safe to be called from a multilib recipe/context as it can |
| 409 | figure out the original tune and remove the multilib overrides. |
| 410 | """ |
| 411 | values = {} |
| 412 | for v in vars: |
| 413 | values[v] = [] |
| 414 | |
| 415 | localdata = bb.data.createCopy(d) |
| 416 | overrides = localdata.getVar("OVERRIDES", False).split(":") |
| 417 | newoverrides = [] |
| 418 | for o in overrides: |
| 419 | if not o.startswith("virtclass-multilib-"): |
| 420 | newoverrides.append(o) |
| 421 | localdata.setVar("OVERRIDES", ":".join(newoverrides)) |
| 422 | localdata.setVar("MLPREFIX", "") |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 423 | origdefault = localdata.getVar("DEFAULTTUNE_MULTILIB_ORIGINAL") |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 424 | if origdefault: |
| 425 | localdata.setVar("DEFAULTTUNE", origdefault) |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 426 | values['ml'] = [''] |
| 427 | for v in vars: |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 428 | values[v].append(localdata.getVar(v)) |
| 429 | variants = d.getVar("MULTILIB_VARIANTS") or "" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 430 | for item in variants.split(): |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 431 | localdata = get_multilib_datastore(item, d) |
| 432 | values[v].append(localdata.getVar(v)) |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 433 | values['ml'].append(item) |
| 434 | return values |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 435 | all_multilib_tune_list[vardepsexclude] = "OVERRIDES" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 436 | |
| 437 | # If the user hasn't set up their name/email, set some defaults |
| 438 | check_git_config() { |
| 439 | if ! git config user.email > /dev/null ; then |
| 440 | git config --local user.email "${PATCH_GIT_USER_EMAIL}" |
| 441 | fi |
| 442 | if ! git config user.name > /dev/null ; then |
| 443 | git config --local user.name "${PATCH_GIT_USER_NAME}" |
| 444 | fi |
| 445 | } |