[OE-core] what is the significance of the numeric version part of 'PV = "1.0.1+git${SRCPV}"'?
Leonardo Sandoval
leonardo.sandoval.gonzalez at linux.intel.com
Thu Feb 9 15:16:15 UTC 2017
On 02/09/2017 06:06 AM, Robert P. J. Day wrote:
> i *thought* i understood this, but a colleague insists i don't so
> ... dumb question time.
>
> recently, i asked about the netdata recipe file "netdata_git.bb",
> which contains the snippet:
>
> SRC_URI = "git://github.com/firehol/netdata.git;protocol=https"
> SRCREV = "36c1304e37094174ea51001903058e65053107ca"
> PV = "1.0.1+git${SRCPV}"
>
> perhaps i've been wrong all this time, but i understood the above to
> mean that the source checked out would be based on commit
> 36c1304e37094174ea51001903058e65053107ca, and that the "1.0.1+" part
> of the PV variable was simply for aesthetics.
>
> i realize that the full value of PV would be used to generate the
> final rpm files, and here's what i get:
>
> netdata-1.0.1+git0+36c1304e37-r0.0.ppc7400.rpm
> netdata-dbg-1.0.1+git0+36c1304e37-r0.0.ppc7400.rpm
> netdata-dev-1.0.1+git0+36c1304e37-r0.0.ppc7400.rpm
>
> but is there some other significance or functionality associated with
> that "1.0.1+" prefix for PV?
that is the version and it should be the most recent release or tag
point of the SCM.
>
> the only thing i can think of is OE's algorithm for selecting the
> most recent recipe. AIUI, if i have multiple versions for the same
> recipe. all things being equal, OE would choose the "git" recipe file
> over a numerically-versioned recipe file, correct?
>
> so, say i have two recipe files:
>
> netdata_1.0.2.bb
> netdata_git.bb
>
> i assume that OE would choose the second one by default, even if,
> internally, that "git" form of the recipe selected a SRCREV that might
> represent an earlier commit than the 1.0.2 version.
On this area, check this link
http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-PREFERRED_VERSION
If you want to use git recipe, then you need to explicitly indicate it
through the latter variable, otherwise the 1.0.2 will be used.
>
> do i have that right? i'm quite prepared to be told i'm totally
> off-base here. if this is explained in one of the YP docs, i'm happy
> with a pointer to it, thanks.
>
> rday
>
More information about the Openembedded-core
mailing list