Re: [yocto] Using ${SRCVP} in PR of BB file

2017-03-28 Thread Paul Eggleton
Hi Ian,

On Wednesday, 29 March 2017 9:27:01 AM NZDT Ian Welch wrote:
>   We are preparing to move to PRservice in Yocto to handle auto rolling
> our revisions on every build. As an interim step we are doing some
> reordering or our current PR and PV parameters in our bitbake files. Our
> current syntax is as follows and works as expected
> 
> BB File
> SRC_URI =
> "git://myrepo.git;branch=mybranch;subpath=Linux/bcastforwd;destsuffix=Linux/
> bcastforwd;protocol=ssh" SRCREV = "${AUTOREV}"
> PV = "1.1"
> PR = "r0"
> PV_append = "+git${SRCPV}"
> 
> Output from build
> 
> bcastforwd_1.0-r0git0+afc68d4a00_arm926ejste.ipk
> 
> 
> 
> When we change git${SRCPV} to append to the PR we get "AUTOINC" in place of
> the revision number
> 
> BB File
> "git://myrepo.git;branch=mybranch;subpath=Linux/bcastforwd;destsuffix=Linux/
> bcastforwd;protocol=ssh" SRCREV = "${AUTOREV}"
> PV = "1.1"
> PR = "r0"
> PR_append = "+git${SRCPV}"
> 
> ipk Output from build
> 
> bcastforwd_1.0-r0gitAUTOINC+afc68d4a00_arm926ejste.ipk
> 
> 
> I took a look at the package.bbclass file which appears to be the
> magic sauce for searching and replacing the "AUTOINC" string but
> nothing jumped out at me as to why this would work for PV but not PR.

It's doing the replacement on PKGV, which is the equivalent of PV at the 
packaging end of things. We don't apply the replacement to PKGR, which is the 
equivalent to PR.
 
> Is it possible to support AUTOREV on PR?

The code isn't designed to handle that - the convention is to put it into PV 
and have the AUTOINC value ensure that the version increments properly. Aside 
from the preceding "r", PR is typically just a number.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Using ${SRCVP} in PR of BB file

2017-03-28 Thread Khem Raj


On 3/28/17 1:27 PM, Ian Welch wrote:
> Hello,
>   We are preparing to move to PRservice in Yocto to handle auto
> rolling our revisions on every build. As an interim step we are doing
> some reordering or our current PR and PV parameters in our bitbake
> files. Our current syntax is as follows and works as expected
> 
> BB File
> SRC_URI =
> "git://myrepo.git;branch=mybranch;subpath=Linux/bcastforwd;destsuffix=Linux/bcastforwd;protocol=ssh"
> SRCREV = "${AUTOREV}"
> PV = "1.1"
> PR = "r0"
> PV_append = "+git${SRCPV}"
> 
> Output from build
> 
> bcastforwd_1.0-r0git0+afc68d4a00_arm926ejste.ipk
> 
> 
> 
> When we change git${SRCPV} to append to the PR we get "AUTOINC" in place
> of the revision number
> 
> BB File
> "git://myrepo.git;branch=mybranch;subpath=Linux/bcastforwd;destsuffix=Linux/bcastforwd;protocol=ssh"
> SRCREV = "${AUTOREV}"
> PV = "1.1"
> PR = "r0"
> PR_append = "+git${SRCPV}"
> 
> ipk Output from build
> 
> bcastforwd_1.0-r0gitAUTOINC+afc68d4a00_arm926ejste.ipk
> 
> 
> I took a look at the package.bbclass file which appears to be the magic sauce 
> for searching and replacing the "AUTOINC" string but nothing jumped out at me 
> as to why this would work for PV but not PR.
> 
> 
> Is it possible to support AUTOREV on PR?

git0 and gitAUTOINC is the difference you are seeing however when PR is
bumped r0 would change to r0.0 or something which is preceding the
AUTOINC difference and you should be able to upgrade. Although I would
discourage you from using AUTOREVs in release environment. Use locked
SHA values, it will also help you with reproducible builds.

> 
> 
> 
> Thanks,
>  Ian Welch
>  Trimble Inc. 
> 
> 



signature.asc
Description: OpenPGP digital signature
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] Using ${SRCVP} in PR of BB file

2017-03-28 Thread Ian Welch
Hello,
  We are preparing to move to PRservice in Yocto to handle auto rolling
our revisions on every build. As an interim step we are doing some
reordering or our current PR and PV parameters in our bitbake files. Our
current syntax is as follows and works as expected

BB File
SRC_URI =
"git://myrepo.git;branch=mybranch;subpath=Linux/bcastforwd;destsuffix=Linux/bcastforwd;protocol=ssh"
SRCREV = "${AUTOREV}"
PV = "1.1"
PR = "r0"
PV_append = "+git${SRCPV}"

Output from build

bcastforwd_1.0-r0git0+afc68d4a00_arm926ejste.ipk



When we change git${SRCPV} to append to the PR we get "AUTOINC" in place of
the revision number

BB File
"git://myrepo.git;branch=mybranch;subpath=Linux/bcastforwd;destsuffix=Linux/bcastforwd;protocol=ssh"
SRCREV = "${AUTOREV}"
PV = "1.1"
PR = "r0"
PR_append = "+git${SRCPV}"

ipk Output from build

bcastforwd_1.0-r0gitAUTOINC+afc68d4a00_arm926ejste.ipk


I took a look at the package.bbclass file which appears to be the
magic sauce for searching and replacing the "AUTOINC" string but
nothing jumped out at me as to why this would work for PV but not PR.


Is it possible to support AUTOREV on PR?



Thanks,
 Ian Welch
 Trimble Inc.
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto