[OE-core] fetcher uses wrong SRCREV for class-native

Andre McCurdy armccurdy at gmail.com
Wed Nov 13 14:00:26 UTC 2019


With the following test recipe, foo.bb:

  LICENSE = "CLOSED"
  PV .= "+git${SRCPV}"
  SRCREV = "015b0cdce1a0abb68ab99510e7fc8d2f77e8ec77"
  SRCREV_class-native = "fc3e8f717779cabcbe583cac304308eaad5f1648"
  SRC_URI = "git://github.com/file/file.git;protocol=https"
  S = "${WORKDIR}/git"
  BBCLASSEXTEND = "native"

when building foo-native, although SRCREV is set to "fc3..." via the
class-native over-ride, the version of code actually fetched is
"015..":

  $ bitbake foo-native -e | grep -e ^SRCREV= -e ^PV=
  PV="1.0+gitAUTOINC+015b0cdce1"
  SRCREV="fc3e8f717779cabcbe583cac304308eaad5f1648"

A similar problem happens in reverse if SRCREV is set using a machine
specific over-ride, e.g.

  SRCREV = "015b0cdce1a0abb68ab99510e7fc8d2f77e8ec77"
  SRCREV_mymachine = "fc3e8f717779cabcbe583cac304308eaad5f1648"

Now foo-native fetches the target specific version "fc3..." even
though the machine specific over-ride shouldn't effect -native
variants:

  $ bitbake foo-native -e | grep -e ^SRCREV= -e ^PV=
  PV="1.0+gitAUTOINC+fc3e8f7177"
  SRCREV="015b0cdce1a0abb68ab99510e7fc8d2f77e8ec77"

Commenting out the line which appends "+git${SRCPV}" to PV seems to be
a workaround which results in the expected version of code being
fetched.


More information about the Openembedded-core mailing list