Closed drtinaz closed 7 months ago
Thx Thomas,
Have merged it. During cmd line base installation, I see the following error message: patching file @.***/node-red-contrib-victron/src/services/services.json Possibly reversed hunk 1 at 6822 Hunk 1 FAILED 3848/3848. "type": "enum", "name": "Venus relay 4 state",
But It seems the file is correctly patched anyway. I made sure before executing the setup, that I restored an original service.json Any idea?
Sorry for asking, but I don’t yet understand how the patch is working. I have identified you specify the line after the @, but what is the second argument?
The water is always bluer on the other side of the ocean ;-)
Le 18 mars 2024 à 01:35, thomasinaz41213 @.***> a écrit :
Removed number of digital inputs limit. Remove services.json entry from fileListPatched. Patching of this file is handled by arguments in the setup script based on the large os being installed. Having this file in the fileListPatched will result in an attempt to install the patch ALWAYS regardless of OS image, which will result in a failed install on non large os systems. Also breaks uninstall of services.json patch when package is uninstalled.
v3.1 uninstall breaks services.json unpatching because of the entry in the filelist. Shouldn't be an issue if v3.1 was never uninstalled, but if you did uninstall v3.1 you will most likely get a no fileset error when trying to reinstall again. if so, just run the following from terminal on the cerbo. Copy and paste it all at once.
patch -R @.***/node-red-contrib-victron/src/services/services.json /data/RemoteGPIO/FileSets/PatchSource/services.json.patch
You can view, comment on, or merge this pull request online at:
https://github.com/Lucifer06/RemoteGPIO/pull/21
Commit Summary
5992fae https://github.com/Lucifer06/RemoteGPIO/pull/21/commits/5992faefe66e5251442aed04d1cfa3d744189dc8 fix PageSettingsIo patch and remove entry from fileListPatched f5ce14e https://github.com/Lucifer06/RemoteGPIO/pull/21/commits/f5ce14e8007f00295e5858568fa104a46893817d removed wrong entry from file list File Changes (3 files https://github.com/Lucifer06/RemoteGPIO/pull/21/files) M FileSets/PatchSource/PageSettingsIo.qml.patch https://github.com/Lucifer06/RemoteGPIO/pull/21/files#diff-fcce3b5a7b342746b29a8b5eb6c7eb349be7c0646388a27d789e7329aad11259 (20) M FileSets/fileListPatched https://github.com/Lucifer06/RemoteGPIO/pull/21/files#diff-30d20d9655586e05b7e35bc88bd03bf5eece0526dd3ec5b9f2820a059589c704 (3) M FileSets/fileListVersionIndependent https://github.com/Lucifer06/RemoteGPIO/pull/21/files#diff-cbd034656512724ce59375a5cee6859e590a6ddf8ce8496e0d14e3a8c737e4b2 (2) Patch Links:
https://github.com/Lucifer06/RemoteGPIO/pull/21.patch https://github.com/Lucifer06/RemoteGPIO/pull/21.diff — Reply to this email directly, view it on GitHub https://github.com/Lucifer06/RemoteGPIO/pull/21, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNVCP6U7ZK7I57BORVXK43YYYZE3AVCNFSM6AAAAABE2UTD7CVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE4TCMBQGA2DEMA. You are receiving this because you are subscribed to this thread.
What version OS? Did you replace the services.json with the original untouched one from the Venus image?
The entry in the patch files that have @@ tell the patch mechanism where to look for the original code, compares it to the few lines surrounding where the patch should get applied, and if there is a match it inserts/removes the appropriate text. Because of this it's very important when creating the patch files that a virgin untouched file be used as the .source (more on that below), and that an exact copy of the source be used to create the .edited file, making changes to the desired text/area of the file only.
.patch files are created using 'diff -u file.source file.edited > file.patch'
Patch only looks at specific sections of the file where the hunks should be added or removed, and ignores the rest. That makes it a great tool for version independency, but also requires that the .edited files are created in a very specific way. I always open and verify the patch file in a code editor to make sure the diff didn't explode and just replace the whole file.
I have installed and uninstalled v3.1.2 on os 3.22 and 3.30-18 from command line with no errors and services.json patched correctly. Unless you are running a beta os services.json does not have 6800 lines even with the patch installed. The error you posted indicates hunk 1 failed which means the patch does not get applied. Since you say the patch was applied I believe that services.json was left in a patched state because of a previous issue from v3.1 and that will cause what you experienced.
I would uninstall RemoteGPIO and do a fresh firmware install. Or download and extract the Venus image and replace /usr/lib/node_modules/@victronenergy/node-red-contrib-victron/src/services/services.json
I was running v3.22 of Venus OS. And I did manually restored the service.json original file. Then after patch applied with this error, I was surprised to see a correct patched service.jsonMaybe my restore of the service.json was not correct, not sure. I will test again laterThxExcuse possible typo: swallowed by my iPhoneLe 18 mars 2024 à 15:19, thomasinaz41213 @.> a écrit : I have installed and uninstalled v3.1.2 on os 3.22 and 3.30-18 from command line with no errors and services.json patched correctly. Unless you are running a beta os services.json does not have 6800 lines even with the patch installed. The error you posted indicates hunk 1 failed which means the patch does not get applied. Since you say the patch was applied I believe that services.json was left in a patched state because of a previous issue from v3.1 and that will cause what you experienced. I would uninstall RemoteGPIO and do a fresh firmware install. Or download and extract the Venus image and replace @./node-red-contrib-victron/src/services/services.json
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you modified the open/close state.Message ID: @.***>
You uninstalled the package before you restored services.json? And you remembered to use force when copying the file? Just throwing out ideas here. You know more about this programming stuff than I do.
Removed number of digital inputs limit. Remove services.json entry from fileListPatched. Patching of this file is handled by arguments in the setup script based on the large os being installed. Having this file in the fileListPatched will result in an attempt to install the patch ALWAYS regardless of OS image, which will result in a failed install on non large os systems. Also breaks uninstall of services.json patch when package is uninstalled.
v3.1 uninstall breaks services.json unpatching because of the entry in the filelist. Shouldn't be an issue if v3.1 was never uninstalled, but if you did uninstall v3.1 you will most likely get a no fileset error when trying to reinstall again. if so, just run the following from terminal on the cerbo. Copy and paste it all at once.
patch -R /usr/lib/node_modules/@victronenergy/node-red-contrib-victron/src/services/services.json /data/RemoteGPIO/FileSets/PatchSource/services.json.patch