summaryrefslogtreecommitdiffstats
path: root/meta-oe/classes/gitpkgv.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* gitpkgv.bbclass: inspect repository in UNPACKDIRGyorgy Sarvari2025-08-181-5/+20
| | | | | | | | | | | | | | | | When BB_GIT_SHALLOW = "1" is used, the unpacked gir repository doesn't exist in the download folder, and the class isn't able to inspect the details of the repository. Instead inspect the repository it the UNPACKDIR. Beside this, since BitBake fetcher performs an actual initial shallow clone of the repository when this feature is enabled, it is not possible to determine the exact number of commits. Add a warning about this. Reported-by: WXbet <WXbet@proton.me> Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* gitpkgv.bbclass: Fix broken git revisonHains van den Bosch2025-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | The revision dictionary was built with keys from names list in Bitbake(setup_revisions()). See: https://git.openembedded.org/bitbake/commit/?id=2515fbd10824005fa7f34e87706000c079920366 And used to build names list in gitpkgv.bbclass in the old situation, see: https://git.openembedded.org/meta-openembedded/commit/?id=2920d4909236106e1a36d56b3b20762a308ba3d4 Use name variable to build names list instead of revision variable. Use append() now name variable is a string. Old ipk file name: enigma2_3.13+git3_1_3_0_9_c_7_0_a_4_f_a_6_9_d_6_7_0_1_7_b_b_9_f_7_f_4_d_d_9_d_6_1_0_a_8_c_3_d_20+31309c70a4-r0_dm920.ipk New ipk file name: enigma2_3.13+git21834+31309c70+31309c70a4-r0_dm920.ipk Signed-off-by: Khem Raj <raj.khem@gmail.com>
* gitpkgver: Update to match bitbake fetcher changesRichard Purdie2025-03-201-35/+33
| | | | | | | | The bitbake fetcher dropped support for multiple revisions on a single url. Update the gitpkgver code to match. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* gitpkgv.bbclass: adjust the example in comment a bitMartin Jansa2024-02-091-6/+6
| | | | | | | | | | | * the first example isn't very useful anymore since: SRCPV is deferred now from PV to PKGV since: https://git.openembedded.org/openembedded-core/commit/?h=nanbield&id=a8e7b0f932b9ea69b3a218fca18041676c65aba0 * but keep it in the bbclass in case someone is still using it for whatever reason (the version with tag still makes some sense) Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
* gitpkgv: Fix python deprecation warningKhem Raj2023-05-031-1/+1
| | | | | | | | | Fixes DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13 pipes is an alias for shlex therefore switch to using shlex Signed-off-by: Khem Raj <raj.khem@gmail.com>
* gitpkgv.bbclass: Add support for extending the supported tag formatsPeter Kjellerstedt2020-01-171-4/+10
| | | | | | | | | | Introduce GITPKGV_TAG_REGEXP (which defaults to "v(\d.*)") to support dropping other unwanted parts of the found tags than just a leading "v". Any matching groups in the regexp will be concatenated to yield the final version. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* gitpkgv.bbclass: Support also lightweight tagsniko.mauno@vaisala.com2019-11-191-3/+3
| | | | | | | | | | | | | | When checking for commit specific tags during GITPKGVTAG resolution, use additional '--tags' and '--exact-match' options for 'git describe' command. This changes the behaviour so that in case an annotated tag does not exist for the particular commit, then the latest lightweight (non-annotated) tag is used instead, in case that commit has at least one such tag. Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* gitpkgv.bbclass: Use --git-dir optionniko.mauno@vaisala.com2019-11-191-7/+4
| | | | | | | | Avoid redundant shell working directory change by resorting to '--git-dir' option for git command instead. Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* gitpkgv.bbclass: fix versioning with multiple reposS. Lockwood-Childs2017-02-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gitpkgv class is supposed to use SRCREV_FORMAT variable to define how to smoosh together revision info from multiple repos that are used in a single recipe. It is incorrectly repeating the rev hash for the first repo instead of including the rev from each listed repo. Example: SRC_URI = "git://some-server/purple.git;destsuffix=git/purple;name=purple" SRC_URI += "git://other-server/blue.git;destsuffix=git/blue;name=blue" SRCREV_purple = "${AUTOREV}" SRCREV_blue = "${AUTOREV}" SRCREV_FORMAT = "purple_blue" Suppose gitpkgv calculates "67+ea121ea" for purple repo, and "123+feef001" for blue repo. This should result in a package version with them joined together like so: "67+ea121ea_123+feef001" It didn't. Instead the git hash part for the first repo got repeated: "67+ea121ea_123+ea121ea" Fix this by looking in the right place for the git revisions of 2nd (and following) repos when assembling the full version string. Signed-off-by: S. Lockwood-Childs <sjl@vctlabs.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* remove True option to getVar callsJoshua Lock2016-12-021-2/+2
| | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
* gitpkgv: Fix $GITPKV for a single named git sourceClemens Lang2016-09-051-1/+8
| | | | | | | | | | | | | | | Recipes that fetch from a single git source, assign a name to this source and do not set SRCREV_FORMAT to this name will always get a GITPKGV value of "default", which causes version-going-backwards QA errors. Fix this by automatically determining a suitable SRCREV_FORMAT from the SRC_URI if none is set explicitly. This code does not run for multiple git sources, because bitbake's fetcher enforces setting SRCREV_FORMAT when multiple version-controlled sources are used. Signed-off-by: Clemens Lang <clemens.lang@bmw-carit.de> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* gitkpkgv: Ensure files are closedRichard Purdie2016-06-081-2/+4
| | | | | | | This avoids warnings with python 3. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* gitpkgv.bbclass: Add support for gitsm:// url typeDaniel Adolfsson2015-12-181-1/+1
| | | | | | | | | When using "gitsm://", for projects using submodules, instead of "git://", gitpkgv does not work. The limitation is synthetic, this patch simply adds gitsm as an allowed url type. Signed-off-by: Daniel Adolfsson <daniel.adolfsson@bluetest.se> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* gitpkgv.bbclass: cache GITPKGV resultEnrico Scholz2013-01-181-6/+24
| | | | | | | | | | | | gitpkgv runs the 'git rev-list | wc -l' several times when processing a package using GITPKGV. This takes ages for packages like the linux kernel which has a) a large repository and b) lots of subpackages. This patch caches the result of 'git rev-list' and uses it on the next run. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* Replace bb.data.* with d.*Paul Eggleton2012-10-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Used sed expression given here: http://lists.linuxtogo.org/pipermail/openembedded-core/2011-November/012373.html Plus an additional expression for .expand. Full expression is: sed \ -e 's:bb.data.\(setVar([^,]*,[^,]*\), \([^ )]*\) *):\2.\1):g' \ -e 's:bb.data.\(setVarFlag([^,]*,[^,]*,[^,]*\), \([^) ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,]*\), \([^, ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,]*,[^,]*\), \([^, ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,]*,[^,]*\), \([^) ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,]*\), \([^) ]*\) *):\2.\1):g' \ -e 's:bb.data.\(expand([^,]*\), \([^ )]*\) *):\2.\1):g' \ -i `grep -ril bb.data *` Some minor correction in systemd.bbclass was needed for some expressions that didn't quite match the regex in the desired way; additionally a few instances were manually changed. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
* gitpkgv: add support SRCREV_FORMATOtavio Salvador2011-09-041-24/+35
| | | | | | | | | | | | In case of multiple GIT repositories are used, SRCREV_FORMAT will be respected while filling it with the proper GIT information to each revision. This new feature needed heavy changes in the code so basically it was a rewrote version that keeps compatibility with previous usage. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
* recipes,classes: import a lot of recipes from meta-shrMartin Jansa2011-04-101-0/+84
* tested on shr-lite-image for om-gta02 and nokia900 (with meta-shr layer)