cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
334 Views
Registered: ‎04-03-2020

How do I stop a .patch from being applied?

Jump to solution

 

I am attempting to update Qt from 5.11 to 5.12. In the process of doing so I have noticed that there are patch files which are being applied automatically.

 

One such patch file...

0001-qwaylandwindow.cpp-Do-not-destroy-shell-suface-befor.patch

is added to SRC_URI_append by...

petalinux/2019.2/2019.2/components/yocto/source/aarch64/layers/meta-petalinux/recipes-qt/qt5/qtwayland_%.bbappend

 

To counteract this, I have created my own version of the file in my project directory which does not add the problematic patch to SRC_URI_append...

.../project-spec/meta-user/recipes-qt5/qt5/qtbase_%.bbappend

 

QUESTION 1: It is my understand that doing this will replace the existing bbappend file with my custom one. Is that correct?

QUESTION 2: If so, why is the patch still getting applied?

QUESTION 3: What is the gitAUTOINC in the error message below? Is something getting cloned from somewhere? 

 

I get the following error

ERROR: qtwayland-native-5.12.9+gitAUTOINC+32c423c4fc-r0 do_patch: Command Error: 'quilt --quiltrc /home/vivado/project/prepivot-bsp/build/tmp/work/x86_64-linux/qtwayland-native/5.12.9+gitAUTOINC+32c423c4fc-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0 Output:
Applying patch 0001-qwaylandwindow.cpp-Do-not-destroy-shell-suface-befor.patch
patching file src/client/qwaylandwindow.cpp
Hunk #1 FAILED at 385.
1 out of 1 hunk FAILED -- rejects in file src/client/qwaylandwindow.cpp
Patch 0001-qwaylandwindow.cpp-Do-not-destroy-shell-suface-befor.patch does not apply (enforce with -f)
ERROR: qtwayland-native-5.12.9+gitAUTOINC+32c423c4fc-r0 do_patch: Function failed: patch_do_patch
ERROR: Logfile of failure stored in: /home/vivado/project/prepivot-bsp/build/tmp/work/x86_64-linux/qtwayland-native/5.12.9+gitAUTOINC+32c423c4fc-r0/temp/log.do_patch.12891
NOTE: recipe qtwayland-native-5.12.9+gitAUTOINC+32c423c4fc-r0: task do_patch: Failed
NOTE: recipe pointercal-xinput-0.0-r7: task do_fetch: Started
ERROR: Task (virtual:native:/home/vivado/project/prepivot-bsp/project-spec/meta-qt5/recipes-qt/qt5/qtwayland_git.bb:do_patch) failed with exit code '1'

 

As a note: I am attempting to update Qt by including 5.12 as a layer (meta-qt) at the same level as meta-user, which seems to be working because the patches are having conflicts where the code has changed....

 

Thank you for any help!

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Adventurer
Adventurer
289 Views
Registered: ‎02-24-2020

QUESTION 1: It is my understand that doing this will replace the existing bbappend file with my custom one. Is that correct?

No it will not replace it. You can have multiple bbappends in Yocto between layers (which is what PetaLinux is really). They get applied in a specific order based on layer priority.

 

So really, what you want to do instead is make sure that your append makes the changes that essentially remove the inclusion of the patch files in the SRC_URI variable. I think the way I've done this before is actually make fake patch files that have the same name so they won't do anything, but probably a better way to do this by actually removing members from the SRC_URI variable or just overriding it (use = rather than += for example).

 

QUESTION 2: If so, why is the patch still getting applied?

As mentioned above

 

QUESTION 3: What is the gitAUTOINC in the error message below? Is something getting cloned from somewher

gitAUTOINC is just the version prefix that was inserted as part of the recipe at some level. The actual problem is the patch can't be applied to the code properly according to the error message.

 

As a note: I am attempting to update Qt by including 5.12 as a layer (meta-qt) at the same level as meta-user, which seems to be working because the patches are having conflicts where the code has changed....

Yes that probably is why you are getting the issue above. meta-qt is already included in the PetaLinux installation, but you are including it in your project as a custom layer basically which is probably then overriding the PetaLinux one. However, the patches that are part of appends in the Xilinx or other meta- layers are then trying to patch those same files and don't apply the same anymore.

One thing to note is that if you remove the patches you might have other issues (perhaps runtime) so you would need to look more into what the patches are doing and if they should be rebased to the newer version of code.

 

Ken Sloat - Embedded Software Engineer
https://www.designlinxhs.com

View solution in original post

2 Replies
Highlighted
Adventurer
Adventurer
290 Views
Registered: ‎02-24-2020

QUESTION 1: It is my understand that doing this will replace the existing bbappend file with my custom one. Is that correct?

No it will not replace it. You can have multiple bbappends in Yocto between layers (which is what PetaLinux is really). They get applied in a specific order based on layer priority.

 

So really, what you want to do instead is make sure that your append makes the changes that essentially remove the inclusion of the patch files in the SRC_URI variable. I think the way I've done this before is actually make fake patch files that have the same name so they won't do anything, but probably a better way to do this by actually removing members from the SRC_URI variable or just overriding it (use = rather than += for example).

 

QUESTION 2: If so, why is the patch still getting applied?

As mentioned above

 

QUESTION 3: What is the gitAUTOINC in the error message below? Is something getting cloned from somewher

gitAUTOINC is just the version prefix that was inserted as part of the recipe at some level. The actual problem is the patch can't be applied to the code properly according to the error message.

 

As a note: I am attempting to update Qt by including 5.12 as a layer (meta-qt) at the same level as meta-user, which seems to be working because the patches are having conflicts where the code has changed....

Yes that probably is why you are getting the issue above. meta-qt is already included in the PetaLinux installation, but you are including it in your project as a custom layer basically which is probably then overriding the PetaLinux one. However, the patches that are part of appends in the Xilinx or other meta- layers are then trying to patch those same files and don't apply the same anymore.

One thing to note is that if you remove the patches you might have other issues (perhaps runtime) so you would need to look more into what the patches are doing and if they should be rebased to the newer version of code.

 

Ken Sloat - Embedded Software Engineer
https://www.designlinxhs.com

View solution in original post

Highlighted
Visitor
Visitor
227 Views
Registered: ‎04-03-2020

Thank you for the insight. 

 

I used _remove in my .bbappend to under the inclusion of the patch files and that worked. 

0 Kudos