diff options
| author | Joshua Lock <joshua.g.lock@intel.com> | 2016-12-14 21:13:04 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-16 10:23:23 +0000 |
| commit | c4e2c59088765d1f1de7ec57cde91980f887c2ff (patch) | |
| tree | a2fda8ac5916fb59a711e9220c2177008cca9347 /meta/classes/debian.bbclass | |
| parent | d5e67725ac11e3296cad104470931ffa16824b90 (diff) | |
| download | poky-c4e2c59088765d1f1de7ec57cde91980f887c2ff.tar.gz | |
meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.
Search made with the following regex: getVar ?\(( ?[^,()]*), True\)
(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/debian.bbclass')
| -rw-r--r-- | meta/classes/debian.bbclass | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass index be7cacca98..8124558b81 100644 --- a/meta/classes/debian.bbclass +++ b/meta/classes/debian.bbclass | |||
| @@ -20,17 +20,17 @@ do_package_write_tar[rdeptask] = "${DEBIANRDEP}" | |||
| 20 | do_package_write_rpm[rdeptask] = "${DEBIANRDEP}" | 20 | do_package_write_rpm[rdeptask] = "${DEBIANRDEP}" |
| 21 | 21 | ||
| 22 | python () { | 22 | python () { |
| 23 | if not d.getVar("PACKAGES", True): | 23 | if not d.getVar("PACKAGES"): |
| 24 | d.setVar("DEBIANRDEP", "") | 24 | d.setVar("DEBIANRDEP", "") |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | python debian_package_name_hook () { | 27 | python debian_package_name_hook () { |
| 28 | import glob, copy, stat, errno, re | 28 | import glob, copy, stat, errno, re |
| 29 | 29 | ||
| 30 | pkgdest = d.getVar('PKGDEST', True) | 30 | pkgdest = d.getVar('PKGDEST') |
| 31 | packages = d.getVar('PACKAGES', True) | 31 | packages = d.getVar('PACKAGES') |
| 32 | bin_re = re.compile(".*/s?" + os.path.basename(d.getVar("bindir", True)) + "$") | 32 | bin_re = re.compile(".*/s?" + os.path.basename(d.getVar("bindir")) + "$") |
| 33 | lib_re = re.compile(".*/" + os.path.basename(d.getVar("libdir", True)) + "$") | 33 | lib_re = re.compile(".*/" + os.path.basename(d.getVar("libdir")) + "$") |
| 34 | so_re = re.compile("lib.*\.so") | 34 | so_re = re.compile("lib.*\.so") |
| 35 | 35 | ||
| 36 | def socrunch(s): | 36 | def socrunch(s): |
| @@ -53,11 +53,11 @@ python debian_package_name_hook () { | |||
| 53 | return (s[stat.ST_MODE] & stat.S_IEXEC) | 53 | return (s[stat.ST_MODE] & stat.S_IEXEC) |
| 54 | 54 | ||
| 55 | def add_rprovides(pkg, d): | 55 | def add_rprovides(pkg, d): |
| 56 | newpkg = d.getVar('PKG_' + pkg, True) | 56 | newpkg = d.getVar('PKG_' + pkg) |
| 57 | if newpkg and newpkg != pkg: | 57 | if newpkg and newpkg != pkg: |
| 58 | provs = (d.getVar('RPROVIDES_' + pkg, True) or "").split() | 58 | provs = (d.getVar('RPROVIDES_' + pkg) or "").split() |
| 59 | if pkg not in provs: | 59 | if pkg not in provs: |
| 60 | d.appendVar('RPROVIDES_' + pkg, " " + pkg + " (=" + d.getVar("PKGV", True) + ")") | 60 | d.appendVar('RPROVIDES_' + pkg, " " + pkg + " (=" + d.getVar("PKGV") + ")") |
| 61 | 61 | ||
| 62 | def auto_libname(packages, orig_pkg): | 62 | def auto_libname(packages, orig_pkg): |
| 63 | sonames = [] | 63 | sonames = [] |
| @@ -70,7 +70,7 @@ python debian_package_name_hook () { | |||
| 70 | if lib_re.match(root): | 70 | if lib_re.match(root): |
| 71 | has_libs = 1 | 71 | has_libs = 1 |
| 72 | if so_re.match(os.path.basename(file)): | 72 | if so_re.match(os.path.basename(file)): |
| 73 | cmd = (d.getVar('TARGET_PREFIX', True) or "") + "objdump -p " + file + " 2>/dev/null" | 73 | cmd = (d.getVar('TARGET_PREFIX') or "") + "objdump -p " + file + " 2>/dev/null" |
| 74 | fd = os.popen(cmd) | 74 | fd = os.popen(cmd) |
| 75 | lines = fd.readlines() | 75 | lines = fd.readlines() |
| 76 | fd.close() | 76 | fd.close() |
| @@ -84,7 +84,7 @@ python debian_package_name_hook () { | |||
| 84 | if len(sonames) == 1: | 84 | if len(sonames) == 1: |
| 85 | soname = sonames[0] | 85 | soname = sonames[0] |
| 86 | elif len(sonames) > 1: | 86 | elif len(sonames) > 1: |
| 87 | lead = d.getVar('LEAD_SONAME', True) | 87 | lead = d.getVar('LEAD_SONAME') |
| 88 | if lead: | 88 | if lead: |
| 89 | r = re.compile(lead) | 89 | r = re.compile(lead) |
| 90 | filtered = [] | 90 | filtered = [] |
| @@ -115,7 +115,7 @@ python debian_package_name_hook () { | |||
| 115 | newpkg = pkgname | 115 | newpkg = pkgname |
| 116 | else: | 116 | else: |
| 117 | newpkg = pkg.replace(orig_pkg, devname, 1) | 117 | newpkg = pkg.replace(orig_pkg, devname, 1) |
| 118 | mlpre=d.getVar('MLPREFIX', True) | 118 | mlpre=d.getVar('MLPREFIX') |
| 119 | if mlpre: | 119 | if mlpre: |
| 120 | if not newpkg.find(mlpre) == 0: | 120 | if not newpkg.find(mlpre) == 0: |
| 121 | newpkg = mlpre + newpkg | 121 | newpkg = mlpre + newpkg |
| @@ -131,7 +131,7 @@ python debian_package_name_hook () { | |||
| 131 | # and later | 131 | # and later |
| 132 | # DEBUG: LIBNAMES: pkgname libtic5 devname libtic pkg ncurses-libticw orig_pkg ncurses-libtic debian_pn None newpkg libticw | 132 | # DEBUG: LIBNAMES: pkgname libtic5 devname libtic pkg ncurses-libticw orig_pkg ncurses-libtic debian_pn None newpkg libticw |
| 133 | # so we need to handle ncurses-libticw->libticw5 before ncurses-libtic->libtic5 | 133 | # so we need to handle ncurses-libticw->libticw5 before ncurses-libtic->libtic5 |
| 134 | for pkg in sorted((d.getVar('AUTO_LIBNAME_PKGS', True) or "").split(), reverse=True): | 134 | for pkg in sorted((d.getVar('AUTO_LIBNAME_PKGS') or "").split(), reverse=True): |
| 135 | auto_libname(packages, pkg) | 135 | auto_libname(packages, pkg) |
| 136 | } | 136 | } |
| 137 | 137 | ||
