From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6995471841453146112 Date: Fri, 13 Aug 2021 05:40:42 -0700 (PDT) From: Uladzimir Bely To: isar-users Message-Id: <9030e8b4-5a26-42b8-bca4-7e07977044b1n@googlegroups.com> In-Reply-To: <3665f9de-913c-620c-0327-61894494bbe6@siemens.com> References: <3710f21b-429e-40c2-8a8f-814bf1b734c2n@googlegroups.com> <0a83a4d0-ecbb-e5ae-047d-c362daa8e55f@siemens.com> <3665f9de-913c-620c-0327-61894494bbe6@siemens.com> Subject: Re: [PATCH v2 0/4] Make adjust_git work in both worlds MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_230_1699343511.1628858442979" X-TUID: KmhwZBV0NJ+Z ------=_Part_230_1699343511.1628858442979 Content-Type: multipart/alternative; boundary="----=_Part_231_2110622796.1628858442979" ------=_Part_231_2110622796.1628858442979 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit When I previously looked at patch.bbclass, I noted, that we don't use it completely. There are some patch_task_patch_prefunc() and patch_task_postfunc() here that are used in OE when PATCHTOOL='git'. But in our case they are never run due to not using PATCH_COMMIT_FUNCTIONS in isar. I suppose (but can't be completely sure without deep look to OE) that prefunc may fix this 'patch is allready applied' issue in OE. On Friday, August 13, 2021 at 3:28:45 PM UTC+3 Jan Kiszka wrote: > On 13.08.21 14:23, Uladzimir Bely wrote: > > In addition to this series we still need something like I had done in > > "[RFC,2/2] dpkg-gdb: Reset git to SRCREV revision before patching". > > > > Because the problem with git has gone, but there is a problem that we > > try apply patch on top of git tree where it's already applied. > > > > Steps to reproduce are quite simple: > > > > - Run first build: bitbake mc:qemuamd64-buster:isar-image-base > > - Modify local.conf (e.g. set ISAR_USE_CACHED_BASE_REPO ?= "1" or do > > something else that will cause packages rebuild) > > - Run second build: bitbake mc:qemuamd64-buster:isar-image-base > > > > It ends up with: > > > > ERROR:mc:qemuamd64-buster:cowsay-git-r0 do_patch: Applying 'isar.patch' > > failed: > > The next patch would create the file debian/patches/isar.patch, > > which already exists! Assume -R? [n] > > > > In CI tests we remove build/tmp, so that we don't face this problem. > > > > This is supposed to be handled by the patch class - when it works > properly. Please check if quilt-based patching addresses this and only > git is affected and, if yes, also cross-check how that works in OE. We > either miss something from OE while using their patch class or there is > actually an upstream issue. > > Jan > > -- > Siemens AG, T RDA IOT > Corporate Competence Center Embedded Linux > ------=_Part_231_2110622796.1628858442979 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
When I previously looked at patch.bbclass, I noted, that we don't use = it completely.

There are some patch_task_patch_pre= func() and patch_task_postfunc() here that are used in OE when PATCHTOOL=3D= 'git'. But in our case they are never run due to not using PATCH_COMMIT_FUN= CTIONS in isar.

I suppose (but can't be completely= sure without deep look to OE) that prefunc may fix this 'patch is allready= applied' issue in OE.


On Friday, August 13, 2021 at 3:2= 8:45 PM UTC+3 Jan Kiszka wrote:
On 13.08.21 14:23, Uladzimir Bely wrote:
> In addition to this series we still need something like I had done= in
> "[RFC,2/2] dpkg-gdb: Reset git to SRCREV revision before patc= hing".
>=20
> Because the problem with git has gone, but there is a problem that= we
> try apply patch on top of git tree where it's already applied.
>=20
> Steps to reproduce are quite simple:
>=20
> - Run first build: bitbake mc:qemuamd64-buster:isar-image-base
> - Modify local.conf (e.g. set ISAR_USE_CACHED_BASE_REPO ?=3D "= ;1" or do
> something else that will cause packages rebuild)
> - Run second build: bitbake mc:qemuamd64-buster:isar-image-base
>=20
> It ends up with:
>=20
> ERROR:mc:qemuamd64-buster:cowsay-git-r0 do_patch: Applying 'is= ar.patch'
> failed:
> The next patch would create the file debian/patches/isar.patch,
> which already exists! =C2=A0Assume -R? [n]
>=20
> In CI tests we remove build/tmp, so that we don't face this pr= oblem.
>=20

This is supposed to be handled by the patch class - when it works
properly. Please check if quilt-based patching addresses this and only
git is affected and, if yes, also cross-check how that works in OE. We
either miss something from OE while using their patch class or there is
actually an upstream issue.

Jan

--=20
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
------=_Part_231_2110622796.1628858442979-- ------=_Part_230_1699343511.1628858442979--