Jump to content


Photo

How to force apply patch in enigma2


  • Please log in to reply
9 replies to this topic

#1 yousif666

  • Senior Member
  • 110 posts

+1
Neutral

Posted 6 April 2011 - 14:52

Hi

I edited menu.xml the first time and the patch worked but then i edited the file menu.xml again and generated a new patch and tried to apply it but i get:

NOTE: Running task 4 of 14 (ID: 4, /openpli/openembedded/recipes/enigma2/enigma2.bb, do_patch)
NOTE: Applying patch 'timezones.py.patch' (../openembedded/recipes/enigma2/enigma2/timezones.py.patch)
NOTE: Applying patch 'volumecontrol.py.patch' (../openembedded/recipes/enigma2/enigma2/volumecontrol.py.patch)
NOTE: Applying patch 'menu.xml.patch' (../openembedded/recipes/enigma2/enigma2/menu.xml.patch)
ERROR: Error in executing: /openpli/openembedded/recipes/enigma2/enigma2.bb
ERROR: Exception:<class 'CmdError'> Message:Command Error: exit status: 1  Output:
Applying patch 0001-modified-data-menu.xml.patch
patching file data/menu.xml
Hunk #1 FAILED at 96.
1 out of 1 hunk FAILED -- rejects in file data/menu.xml
Patch menu.xml.patch does not apply (enforce with -f)
ERROR: Printing the environment of the function
ERROR: Error in executing: /openpli/openembedded/recipes/enigma2/enigma2.bb

even though i did 'bitbake -c clean enigma2' and also tried 'bitbake -f -b ../../enigma2.bb' but i still get the same error i dont know why it dont force to patch.

Re: How to force apply patch in enigma2 #2 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 7 April 2011 - 07:26

Your patch does not correspond to the file, so you'll have to fix the patch instead.

Use the devshell to create the patch (go to the working dir, "quilt new patchname.patch", edit the file with "quilt edit filename", create/update the patch with "quilt refresh". Then copy patches/patchname.patch from the work dir to the openembedded tree, adjust teh recipe, and you're done.
Real musicians never die - they just decompose

Re: How to force apply patch in enigma2 #3 yousif666

  • Senior Member
  • 110 posts

+1
Neutral

Posted 7 April 2011 - 17:01

What i am doing now is, i downloaded enigma2 repository and there i create patches and then copy them from there and paste them in 'openembedded/enigma2/enigma2'.

about what you said i use the devshell to create the patch i didn't understand it, because i already have the patch done from the enigma2 git repository that i downloaded separately.

I tried to do what you told me but i already have the patch ready why i have to do it again? i generated the patch from git using 'git format-patch...'

Sorry but i didn't understand it very well. could you please explain more.
Thanks.

Re: How to force apply patch in enigma2 #4 Sjaaky

  • Senior Member
  • 7,443 posts

+41
Good

Posted 7 April 2011 - 20:27

As bitbake will fetch the newest enigma to the work dir (everytime, if clean in between), it might be that your patch was based on a previously fetched version and doesn't apply anymore. So pull a new version and fix the merge-conflicts.

Another option is to do "git diff origin/HEAD > /path/to/openembedded/recipes/enigma2/enigma2/all_my_changes.patch"

But the easiest thing to do is probably an 'in-tree' build with "bitbake -b /path/to/enigmarepo/enigma.bb" it just builds the files as they are on disc.

Re: How to force apply patch in enigma2 #5 yousif666

  • Senior Member
  • 110 posts

+1
Neutral

Posted 7 April 2011 - 20:58

What i do is that i have a copy of enigma2 repository and i have branches in there and i make patches from there and then i copy the patch and put it in /openembedded/enigma2/enigma2 and i edit enigma2.bb and add the patches there. i directed the enigma2 'SRC_URI = "git:///openpli/dm500hd/enigma2;protocol=file \' i let it get enigma2 from the repository i downloaded. so it might be that is the problem so i will return it to the default SRC_URI that get enigma2 from pli website and see what happens.

Thanks.

Re: How to force apply patch in enigma2 #6 Sjaaky

  • Senior Member
  • 7,443 posts

+41
Good

Posted 7 April 2011 - 21:38

> so it might be that is the problem so i will return it to the default SRC_URI that get enigma2 from pli website and see what happens.

probably not. Just stick to own src_uri. Only thing is, why add patches to enigma2.bb when it already fetches a copy from your local repo?

Re: How to force apply patch in enigma2 #7 yousif666

  • Senior Member
  • 110 posts

+1
Neutral

Posted 7 April 2011 - 21:44

I am using the enigma2.bb from the openembedded and not the one in the seperate enigma2 repository. i dont know if i am doing it right or not correct me please if i am wrong, should i use the enigma.bb from my own enigma2 repository or i still should use enigma2.bb the one from openembedded if i want to fetch my own repository?
the thing i did to get it from the enigma2 repository that i downloaded is the uri 'SRC_URI = "git:///openpli/build-dm500hd/enigma2;protocol=file'
correct me please.

Thanks

Re: How to force apply patch in enigma2 #8 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 8 April 2011 - 07:10

Bitbake will only use the SRC_URI in openembedded/recipes/enigma2/enigma2.bb. The one in the enigma2 repository can be used, but you have to run it manually using "bitbake -b /path/to/file.bb"

You can place a "local" version of engima2 into local/recipes/enigma2/enigma2.bb, which will be used by bitbake as well, if you use the config/makefile from our website. That way, GIT won't see your local changes to enigma2.bb. The "local" directory must be in the same location as the "openembedded" directory.
Real musicians never die - they just decompose

Re: How to force apply patch in enigma2 #9 yousif666

  • Senior Member
  • 110 posts

+1
Neutral

Posted 8 April 2011 - 23:21

What i did now is i placed my enigma2 repository folder inside openembedded and pointed the SRC_URI from enigma2.bb (/recipes/enigma2/enigma2.bb) "git:///openpli/openembedded/enigma2;protocol=file" and i bitbake -b recipes/enigma2/enigma2.bb

and still i get the same problem i still dont think its fetching from my enigma2 repository. so still what i am doing wrong?

Re: How to force apply patch in enigma2 #10 yousif666

  • Senior Member
  • 110 posts

+1
Neutral

Posted 9 April 2011 - 04:07

and when i go to work dir and go to enigma2 (the folder that is created when i bitbaked enigma2) i see enigma2 files original not the same as the files in my enigma2 repository so what i am missing?


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users