-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modifying code procedure does not work. #40657
Comments
Version |
@StarGate-One Correct as per the procedure. You are supported to force a failure to get a sha conflict, is what I thought. Otherwise it would just pull the version it finds, correct? I don't want that. I want to modify an existing version (2.5.14.0) |
Need to modify the existing version and repackage it to the correct gz compressed file name and put a copy in the vcpkg downloads directory/folder. You can use this tool to get hash values https://www.binaryfortress.com/HashTools/Download/ -or- |
That would be correct filename except you want to change the 0 to 1 and do the same in your overlay port vcpkg.json file. |
I set the version as 2.5.14.1 in the file name and the vcpkg.json file.
C:\vcpkg> |
Looks like I need to set the sha in the portfile to get it to work. It seemed to install after I got the sha for the .gz file and put in there. |
@StarGate-One Thank you. I was to get it working, thanks to your help. |
If your issue has been resolved, please close this issue. |
I was able to get the modified version to work. Instructions in link should be updated to reflect this method. |
Where is the actual problem with the instructions? What can be improved in the docs is mentioning cases where you must modify the source reference before determining the SHA512:
Repackaging on the user's side is unlikely to give the same SHA512 as produced by Github or other on-the-fly services. |
That is what is called for in the instructions and what I needed to do to get it to work. For my case, I wanted to modify code in openimageio 2.5.14.0 and use the modified version. How would I do that? Step #2 says : Change the version in vcpkg.json to 1.0.1. If I set it to a known version, vcpkg would have just downloaded that, correct? What version should I have used in step 2? When I changed the version to a non-existing version and tried step 3: I did not get the hash info as indicated.
They way I got it working was to extract the .gz file, change the code and compress it to a new, non-existing version 2.5.14.1 I extracted the hash from that and put that in the portfile.cmake along with 2.5.14.1. |
That's an example. It shows the template.
Any existing version that you want to use. (YMMV.)
But which gz file? There is no 2.5.14.1 release (upstream), and no tutorial in vpckg will be able to explain how to download releases from the future... |
I took the 2.5.14.0 build in downloads, extracted its contents, modified it, then saved it to 2.5.14.1.gz, then got its sha value. I then put that in downloads area. |
So the sources are still 2.5.14.0, but labeled 2.5.14.1, locally. Well, really not an issue with the tutorial. Maybe you have a different goal in the end, but it is not clear. |
I wanted the simplest way to modify openimageio and use the modified version. The procedure in the tutorial did not work for me. |
The given tutorial is for updating a port for a new upstream version, not for injecting own modifications. Maybe you need this tutorial: |
I tried that one first, but it was way to complicated for a simple, one line fix. |
Changing version and making modifications to a library should be trivial and not require a procedure. |
I am trying to modify an existing port (openimageio) using this procedure:
https://learn.microsoft.com/en-us/vcpkg/produce/update-package-version?pivots=shell-cmd
Windows11
To Reproduce
Step1
xcopy C:\vcpkg\ports\openimageio C:\vcpkg\myports\openimageio /E
Step 2
I then modifed the ports version (in myports\openimageio).
Step 3
vcpkg install --overlay-ports=C:\vcpkg\myports\openimageio openimageio
According to the docs, I should get info about sha
Run vcpkg install --overlay-ports=$OVERLAY_LOCATION vcpkg-sample-library, you will get an error about the SHA512 of the package. Copy the value of the actual hash in your portfile.
This is what is printed.
I do not see any sha data. How to I obtain it?
The text was updated successfully, but these errors were encountered: