Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | inherit package |
| 2 | |
| 3 | IMAGE_PKGTYPE ?= "ipk" |
| 4 | |
| 5 | IPKGCONF_TARGET = "${WORKDIR}/opkg.conf" |
| 6 | IPKGCONF_SDK = "${WORKDIR}/opkg-sdk.conf" |
| 7 | |
| 8 | PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks" |
| 9 | |
| 10 | # Program to be used to build opkg packages |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 11 | OPKGBUILDCMD ??= 'opkg-build -Z xz -a "${XZ_DEFAULTS}"' |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 13 | OPKG_ARGS += "--force_postinstall --prefer-arch-to-version" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 14 | OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 15 | OPKG_ARGS += "${@['', '--add-exclude ' + ' --add-exclude '.join((d.getVar('PACKAGE_EXCLUDE') or "").split())][(d.getVar("PACKAGE_EXCLUDE") or "").strip() != ""]}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 16 | |
Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 17 | OPKGLIBDIR ??= "${localstatedir}/lib" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 18 | |
| 19 | python do_package_ipk () { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 20 | workdir = d.getVar('WORKDIR') |
| 21 | outdir = d.getVar('PKGWRITEDIRIPK') |
| 22 | tmpdir = d.getVar('TMPDIR') |
| 23 | pkgdest = d.getVar('PKGDEST') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 24 | if not workdir or not outdir or not tmpdir: |
| 25 | bb.error("Variables incorrectly set, unable to package") |
| 26 | return |
| 27 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 28 | packages = d.getVar('PACKAGES') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 29 | if not packages or packages == '': |
| 30 | bb.debug(1, "No packages; nothing to do") |
| 31 | return |
| 32 | |
| 33 | # We're about to add new packages so the index needs to be checked |
| 34 | # so remove the appropriate stamp file. |
| 35 | if os.access(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"), os.R_OK): |
| 36 | os.unlink(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN")) |
| 37 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 38 | oe.utils.multiprocess_launch(ipk_write_pkg, packages.split(), d, extraargs=(d,)) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 39 | } |
| 40 | do_package_ipk[vardeps] += "ipk_write_pkg" |
| 41 | do_package_ipk[vardepsexclude] = "BB_NUMBER_THREADS" |
| 42 | |
| 43 | def ipk_write_pkg(pkg, d): |
| 44 | import re, copy |
| 45 | import subprocess |
| 46 | import textwrap |
| 47 | import collections |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame^] | 48 | import glob |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 49 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 50 | def cleanupcontrol(root): |
| 51 | for p in ['CONTROL', 'DEBIAN']: |
| 52 | p = os.path.join(root, p) |
| 53 | if os.path.exists(p): |
| 54 | bb.utils.prunedir(p) |
| 55 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 56 | outdir = d.getVar('PKGWRITEDIRIPK') |
| 57 | pkgdest = d.getVar('PKGDEST') |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 58 | recipesource = os.path.basename(d.getVar('FILE')) |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 59 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 60 | localdata = bb.data.createCopy(d) |
| 61 | root = "%s/%s" % (pkgdest, pkg) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 62 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 63 | lf = bb.utils.lockfile(root + ".lock") |
| 64 | try: |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 65 | localdata.setVar('ROOT', '') |
| 66 | localdata.setVar('ROOT_%s' % pkg, root) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 67 | pkgname = localdata.getVar('PKG_%s' % pkg) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 68 | if not pkgname: |
| 69 | pkgname = pkg |
| 70 | localdata.setVar('PKG', pkgname) |
| 71 | |
| 72 | localdata.setVar('OVERRIDES', d.getVar("OVERRIDES", False) + ":" + pkg) |
| 73 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 74 | basedir = os.path.join(os.path.dirname(root)) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 75 | arch = localdata.getVar('PACKAGE_ARCH') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 76 | |
| 77 | if localdata.getVar('IPK_HIERARCHICAL_FEED', False) == "1": |
| 78 | # Spread packages across subdirectories so each isn't too crowded |
| 79 | if pkgname.startswith('lib'): |
| 80 | pkg_prefix = 'lib' + pkgname[3] |
| 81 | else: |
| 82 | pkg_prefix = pkgname[0] |
| 83 | |
| 84 | # Keep -dbg, -dev, -doc, -staticdev, -locale and -locale-* packages |
| 85 | # together. These package suffixes are taken from the definitions of |
| 86 | # PACKAGES and PACKAGES_DYNAMIC in meta/conf/bitbake.conf |
| 87 | if pkgname[-4:] in ('-dbg', '-dev', '-doc'): |
| 88 | pkg_subdir = pkgname[:-4] |
| 89 | elif pkgname.endswith('-staticdev'): |
| 90 | pkg_subdir = pkgname[:-10] |
| 91 | elif pkgname.endswith('-locale'): |
| 92 | pkg_subdir = pkgname[:-7] |
| 93 | elif '-locale-' in pkgname: |
| 94 | pkg_subdir = pkgname[:pkgname.find('-locale-')] |
| 95 | else: |
| 96 | pkg_subdir = pkgname |
| 97 | |
| 98 | pkgoutdir = "%s/%s/%s/%s" % (outdir, arch, pkg_prefix, pkg_subdir) |
| 99 | else: |
| 100 | pkgoutdir = "%s/%s" % (outdir, arch) |
| 101 | |
| 102 | bb.utils.mkdirhier(pkgoutdir) |
| 103 | os.chdir(root) |
| 104 | cleanupcontrol(root) |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame^] | 105 | g = glob.glob('*') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 106 | if not g and localdata.getVar('ALLOW_EMPTY', False) != "1": |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 107 | bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV'), localdata.getVar('PKGR'))) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 108 | return |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 109 | |
| 110 | controldir = os.path.join(root, 'CONTROL') |
| 111 | bb.utils.mkdirhier(controldir) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 112 | ctrlfile = open(os.path.join(controldir, 'control'), 'w') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 113 | |
| 114 | fields = [] |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 115 | pe = d.getVar('PKGE') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 116 | if pe and int(pe) > 0: |
| 117 | fields.append(["Version: %s:%s-%s\n", ['PKGE', 'PKGV', 'PKGR']]) |
| 118 | else: |
| 119 | fields.append(["Version: %s-%s\n", ['PKGV', 'PKGR']]) |
| 120 | fields.append(["Description: %s\n", ['DESCRIPTION']]) |
| 121 | fields.append(["Section: %s\n", ['SECTION']]) |
| 122 | fields.append(["Priority: %s\n", ['PRIORITY']]) |
| 123 | fields.append(["Maintainer: %s\n", ['MAINTAINER']]) |
| 124 | fields.append(["License: %s\n", ['LICENSE']]) |
| 125 | fields.append(["Architecture: %s\n", ['PACKAGE_ARCH']]) |
| 126 | fields.append(["OE: %s\n", ['PN']]) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 127 | if d.getVar('HOMEPAGE'): |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 128 | fields.append(["Homepage: %s\n", ['HOMEPAGE']]) |
| 129 | |
| 130 | def pullData(l, d): |
| 131 | l2 = [] |
| 132 | for i in l: |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 133 | l2.append(d.getVar(i)) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 134 | return l2 |
| 135 | |
| 136 | ctrlfile.write("Package: %s\n" % pkgname) |
| 137 | # check for required fields |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 138 | for (c, fs) in fields: |
| 139 | for f in fs: |
| 140 | if localdata.getVar(f, False) is None: |
| 141 | raise KeyError(f) |
| 142 | # Special behavior for description... |
| 143 | if 'DESCRIPTION' in fs: |
| 144 | summary = localdata.getVar('SUMMARY') or localdata.getVar('DESCRIPTION') or "." |
| 145 | ctrlfile.write('Description: %s\n' % summary) |
| 146 | description = localdata.getVar('DESCRIPTION') or "." |
| 147 | description = textwrap.dedent(description).strip() |
| 148 | if '\\n' in description: |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 149 | # Manually indent: multiline description includes a leading space |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 150 | for t in description.split('\\n'): |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 151 | ctrlfile.write(' %s\n' % (t.strip() or ' .')) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 152 | else: |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 153 | # Auto indent |
| 154 | ctrlfile.write('%s\n' % textwrap.fill(description, width=74, initial_indent=' ', subsequent_indent=' ')) |
| 155 | else: |
| 156 | ctrlfile.write(c % tuple(pullData(fs, localdata))) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 157 | |
| 158 | custom_fields_chunk = get_package_additional_metadata("ipk", localdata) |
| 159 | if custom_fields_chunk is not None: |
| 160 | ctrlfile.write(custom_fields_chunk) |
| 161 | ctrlfile.write("\n") |
| 162 | |
| 163 | mapping_rename_hook(localdata) |
| 164 | |
| 165 | def debian_cmp_remap(var): |
| 166 | # In debian '>' and '<' do not mean what it appears they mean |
| 167 | # '<' = less or equal |
| 168 | # '>' = greater or equal |
| 169 | # adjust these to the '<<' and '>>' equivalents |
| 170 | # |
| 171 | for dep in var: |
| 172 | for i, v in enumerate(var[dep]): |
| 173 | if (v or "").startswith("< "): |
| 174 | var[dep][i] = var[dep][i].replace("< ", "<< ") |
| 175 | elif (v or "").startswith("> "): |
| 176 | var[dep][i] = var[dep][i].replace("> ", ">> ") |
| 177 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 178 | rdepends = bb.utils.explode_dep_versions2(localdata.getVar("RDEPENDS") or "") |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 179 | debian_cmp_remap(rdepends) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 180 | rrecommends = bb.utils.explode_dep_versions2(localdata.getVar("RRECOMMENDS") or "") |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 181 | debian_cmp_remap(rrecommends) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 182 | rsuggests = bb.utils.explode_dep_versions2(localdata.getVar("RSUGGESTS") or "") |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 183 | debian_cmp_remap(rsuggests) |
| 184 | # Deliberately drop version information here, not wanted/supported by ipk |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 185 | rprovides = dict.fromkeys(bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES") or ""), []) |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 186 | rprovides = collections.OrderedDict(sorted(rprovides.items(), key=lambda x: x[0])) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 187 | debian_cmp_remap(rprovides) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 188 | rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES") or "") |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 189 | debian_cmp_remap(rreplaces) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 190 | rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS") or "") |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 191 | debian_cmp_remap(rconflicts) |
| 192 | |
| 193 | if rdepends: |
| 194 | ctrlfile.write("Depends: %s\n" % bb.utils.join_deps(rdepends)) |
| 195 | if rsuggests: |
| 196 | ctrlfile.write("Suggests: %s\n" % bb.utils.join_deps(rsuggests)) |
| 197 | if rrecommends: |
| 198 | ctrlfile.write("Recommends: %s\n" % bb.utils.join_deps(rrecommends)) |
| 199 | if rprovides: |
| 200 | ctrlfile.write("Provides: %s\n" % bb.utils.join_deps(rprovides)) |
| 201 | if rreplaces: |
| 202 | ctrlfile.write("Replaces: %s\n" % bb.utils.join_deps(rreplaces)) |
| 203 | if rconflicts: |
| 204 | ctrlfile.write("Conflicts: %s\n" % bb.utils.join_deps(rconflicts)) |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 205 | ctrlfile.write("Source: %s\n" % recipesource) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 206 | ctrlfile.close() |
| 207 | |
| 208 | for script in ["preinst", "postinst", "prerm", "postrm"]: |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 209 | scriptvar = localdata.getVar('pkg_%s' % script) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 210 | if not scriptvar: |
| 211 | continue |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 212 | scriptfile = open(os.path.join(controldir, script), 'w') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 213 | scriptfile.write(scriptvar) |
| 214 | scriptfile.close() |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 215 | os.chmod(os.path.join(controldir, script), 0o755) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 216 | |
| 217 | conffiles_str = ' '.join(get_conffiles(pkg, d)) |
| 218 | if conffiles_str: |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 219 | conffiles = open(os.path.join(controldir, 'conffiles'), 'w') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 220 | for f in conffiles_str.split(): |
| 221 | if os.path.exists(oe.path.join(root, f)): |
| 222 | conffiles.write('%s\n' % f) |
| 223 | conffiles.close() |
| 224 | |
| 225 | os.chdir(basedir) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 226 | subprocess.check_output("PATH=\"%s\" %s %s %s" % (localdata.getVar("PATH"), |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 227 | d.getVar("OPKGBUILDCMD"), pkg, pkgoutdir), |
| 228 | stderr=subprocess.STDOUT, |
| 229 | shell=True) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 230 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 231 | if d.getVar('IPK_SIGN_PACKAGES') == '1': |
| 232 | ipkver = "%s-%s" % (d.getVar('PKGV'), d.getVar('PKGR')) |
| 233 | ipk_to_sign = "%s/%s_%s_%s.ipk" % (pkgoutdir, pkgname, ipkver, d.getVar('PACKAGE_ARCH')) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 234 | sign_ipk(d, ipk_to_sign) |
| 235 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 236 | finally: |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 237 | cleanupcontrol(root) |
| 238 | bb.utils.unlockfile(lf) |
| 239 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame^] | 240 | # Have to list any variables referenced as X_<pkg> that aren't in pkgdata here |
| 241 | IPKEXTRAVARS = "PRIORITY MAINTAINER PACKAGE_ARCH HOMEPAGE" |
| 242 | ipk_write_pkg[vardeps] += "${@gen_packagevar(d, 'IPKEXTRAVARS')}" |
| 243 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 244 | # Otherwise allarch packages may change depending on override configuration |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 245 | ipk_write_pkg[vardepsexclude] = "OVERRIDES" |
| 246 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 247 | |
| 248 | SSTATETASKS += "do_package_write_ipk" |
| 249 | do_package_write_ipk[sstate-inputdirs] = "${PKGWRITEDIRIPK}" |
| 250 | do_package_write_ipk[sstate-outputdirs] = "${DEPLOY_DIR_IPK}" |
| 251 | |
| 252 | python do_package_write_ipk_setscene () { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 253 | tmpdir = d.getVar('TMPDIR') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 254 | |
| 255 | if os.access(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"), os.R_OK): |
| 256 | os.unlink(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN")) |
| 257 | |
| 258 | sstate_setscene(d) |
| 259 | } |
| 260 | addtask do_package_write_ipk_setscene |
| 261 | |
| 262 | python () { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 263 | if d.getVar('PACKAGES') != '': |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 264 | deps = ' opkg-utils-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot xz-native:do_populate_sysroot' |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 265 | d.appendVarFlag('do_package_write_ipk', 'depends', deps) |
| 266 | d.setVarFlag('do_package_write_ipk', 'fakeroot', "1") |
| 267 | } |
| 268 | |
| 269 | python do_package_write_ipk () { |
| 270 | bb.build.exec_func("read_subpackage_metadata", d) |
| 271 | bb.build.exec_func("do_package_ipk", d) |
| 272 | } |
| 273 | do_package_write_ipk[dirs] = "${PKGWRITEDIRIPK}" |
| 274 | do_package_write_ipk[cleandirs] = "${PKGWRITEDIRIPK}" |
| 275 | do_package_write_ipk[umask] = "022" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 276 | do_package_write_ipk[depends] += "${@oe.utils.build_depends_string(d.getVar('PACKAGE_WRITE_DEPS'), 'do_populate_sysroot')}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 277 | addtask package_write_ipk after do_packagedata do_package |
| 278 | |
| 279 | PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot" |
| 280 | PACKAGEINDEXDEPS += "opkg-native:do_populate_sysroot" |
| 281 | |
| 282 | do_build[recrdeptask] += "do_package_write_ipk" |