Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1 | .. SPDX-License-Identifier: CC-BY-SA-2.0-UK |
| 2 | |
| 3 | Using an External SCM |
| 4 | ********************* |
| 5 | |
| 6 | If you're working on a recipe that pulls from an external Source Code |
| 7 | Manager (SCM), it is possible to have the OpenEmbedded build system |
| 8 | notice new recipe changes added to the SCM and then build the resulting |
| 9 | packages that depend on the new recipes by using the latest versions. |
| 10 | This only works for SCMs from which it is possible to get a sensible |
| 11 | revision number for changes. Currently, you can do this with Apache |
| 12 | Subversion (SVN), Git, and Bazaar (BZR) repositories. |
| 13 | |
| 14 | To enable this behavior, the :term:`PV` of |
| 15 | the recipe needs to reference |
| 16 | :term:`SRCPV`. Here is an example:: |
| 17 | |
| 18 | PV = "1.2.3+git${SRCPV}" |
| 19 | |
| 20 | Then, you can add the following to your |
| 21 | ``local.conf``:: |
| 22 | |
| 23 | SRCREV:pn-PN = "${AUTOREV}" |
| 24 | |
| 25 | :term:`PN` is the name of the recipe for |
| 26 | which you want to enable automatic source revision updating. |
| 27 | |
| 28 | If you do not want to update your local configuration file, you can add |
| 29 | the following directly to the recipe to finish enabling the feature:: |
| 30 | |
| 31 | SRCREV = "${AUTOREV}" |
| 32 | |
| 33 | The Yocto Project provides a distribution named ``poky-bleeding``, whose |
| 34 | configuration file contains the line:: |
| 35 | |
| 36 | require conf/distro/include/poky-floating-revisions.inc |
| 37 | |
| 38 | This line pulls in the |
| 39 | listed include file that contains numerous lines of exactly that form:: |
| 40 | |
| 41 | #SRCREV:pn-opkg-native ?= "${AUTOREV}" |
| 42 | #SRCREV:pn-opkg-sdk ?= "${AUTOREV}" |
| 43 | #SRCREV:pn-opkg ?= "${AUTOREV}" |
| 44 | #SRCREV:pn-opkg-utils-native ?= "${AUTOREV}" |
| 45 | #SRCREV:pn-opkg-utils ?= "${AUTOREV}" |
| 46 | SRCREV:pn-gconf-dbus ?= "${AUTOREV}" |
| 47 | SRCREV:pn-matchbox-common ?= "${AUTOREV}" |
| 48 | SRCREV:pn-matchbox-config-gtk ?= "${AUTOREV}" |
| 49 | SRCREV:pn-matchbox-desktop ?= "${AUTOREV}" |
| 50 | SRCREV:pn-matchbox-keyboard ?= "${AUTOREV}" |
| 51 | SRCREV:pn-matchbox-panel-2 ?= "${AUTOREV}" |
| 52 | SRCREV:pn-matchbox-themes-extra ?= "${AUTOREV}" |
| 53 | SRCREV:pn-matchbox-terminal ?= "${AUTOREV}" |
| 54 | SRCREV:pn-matchbox-wm ?= "${AUTOREV}" |
| 55 | SRCREV:pn-settings-daemon ?= "${AUTOREV}" |
| 56 | SRCREV:pn-screenshot ?= "${AUTOREV}" |
| 57 | . . . |
| 58 | |
| 59 | These lines allow you to |
| 60 | experiment with building a distribution that tracks the latest |
| 61 | development source for numerous packages. |
| 62 | |
| 63 | .. note:: |
| 64 | |
| 65 | The ``poky-bleeding`` distribution is not tested on a regular basis. Keep |
| 66 | this in mind if you use it. |
| 67 | |