feat: Implement new update system with git hash tracking#101
feat: Implement new update system with git hash tracking#101drpaneas wants to merge 5 commits intoKallistiOS:masterfrom
Conversation
|
To be clear, this is not replacing the current system -- I didn't want to be too intrusive here. It just adds the possibility to use git commit hashes. It stores it locally and makes sure it's in the To test this properly, you need to pick a kos-port that has drpaneas@m2:/opt/toolchains/dc/kos-ports (master)% cd raylib4dc
drpaneas@m2:/opt/toolchains/dc/kos-ports/raylib4dc (master)% make show-deps
Dependencies for raylib4dc:
✗ libGL (not installed)It is currently not installed, not its dependency. btw I added this nice drpaneas@m2:/opt/toolchains/dc/kos-ports/raylib4dc (master)% make update
Checking raylib4dc for updates...
✗ raylib4dc is not currently installed.
Nothing to update. To install this port, run: make clean install
make: *** [update] Error 1
drpaneas@m2:/opt/toolchains/dSo let's install it: it stored cat ../lib/.kos-ports/raylib4dc.hash
34b35e8fd83bad7f5c9b25e2478b7dd6a157778cby the way we can see that drpaneas@m2:/opt/toolchains/dc/kos-ports/raylib4dc (master)% make show-deps
Dependencies for raylib4dc:
✓ libGL (installed)and also the same functionality for libGL which also has drpaneas@m2:/opt/toolchains/dc/kos-ports/raylib4dc (master)% cat ../lib/.kos-ports/libGL.hash
dfeb32c609e0fcfd846dc0fb8eed2d17d9818396If you try to update now, it will check if there is a new commit upstream and decide: drpaneas@m2:/opt/toolchains/dc/kos-ports/raylib4dc (master)% make update
Checking raylib4dc for updates...
Last stored hash: 34b35e8fd83bad7f5c9b25e2478b7dd6a157778c
Checking specified branch: raylib4Consoles
Current repository hash: 34b35e8fd83bad7f5c9b25e2478b7dd6a157778c
✓ raylib4dc is up to date with git repository. No changes detected.Now I am going to be evil and pretend there is a new update, for libGL, by changing its local # you should not do this, this is just for demo testing purposes
drpaneas@m2:/opt/toolchains/dc/kos-ports/raylib4dc (master)% echo "123456789abcdfe" > ../lib/.kos-ports/libGL.hashso if you try now to update raylibdc with dependencies it will check also its depedencies (that is libGL) in this example: drpaneas@m2:/opt/toolchains/dc/kos-ports/raylib4dc (master)% make update-with-deps
Checking dependencies for raylib4dc...
Updating dependency: libGL
Checking libGL for updates...
Last stored hash: 123456789abcdfe
Using default branch: master
Current repository hash: dfeb32c609e0fcfd846dc0fb8eed2d17d9818396
! libGL has new changes in repository. Rebuilding...
... omitted for brevity ...
Installing...
Marking libGL 1.1.0 as installed.
Current directory: /opt/toolchains/dc/kos-ports/libGL/build/libGL-1.1.0
Using default branch: master
Stored git hash: dfeb32c609e0fcfd846dc0fb8eed2d17d9818396
---
Checking raylib4dc for updates...
Checking raylib4dc for updates...
Last stored hash: 34b35e8fd83bad7f5c9b25e2478b7dd6a157778c
Checking specified branch: raylib4Consoles
Current repository hash: 34b35e8fd83bad7f5c9b25e2478b7dd6a157778c
✓ raylib4dc is up to date with git repository. No changes detected.Of course you could also go to libGL directory and issue a Ok, so what happens if yout kos-port does not use git, but versions and releases. Then simply enough, the Indeed it tells you that there is no way to verify if there is a new version there. Based on the implementation of it, the Maintainer has to keep track of the Now, instead of updating doing one by one, you can run the script: drpaneas@m2:/opt/toolchains/dc/kos-ports (master)% ./utils/update-all.sh
... omitted for brevity...
Status Summary:
✓ Up to date: 2 port(s)
- Skipped: 45 port(s) (not installed)
- Skipped: 1 port(s) (not using git)The two kos-ports I am using (raylib4dc, and libGL) are already up to date. There 45 which I have not installed, so nothing to update there and there is another one, which I do have it installed, but it's not using git, meaning it's not using I hope these clears things up in what this PR is doing :) |
|
Hi! First off, thank you very much for this contribution and your very clear explanation of the intent. And my apologies for the long delay, but I'm not super proficient with these build scripts and a big concern was to set up some of our other supported environments to validate that it worked on multiple platforms. I found though that it didn't quite work right: What seemed to happen was that the script set the branch of kos-ports back to Since I was setting up a brand new environment I have the good opportunity to exactly recreate how I arrived at the error: |
|
Thanks @QuzarDC for your review! I have addressed your issues. drpaneas@m2:/opt/toolchains/dc/kos (master)% git clone --recursive https://github.com/KallistiOS/kos-ports
drpaneas@m2:/opt/toolchains/dc/kos (master)% cd ../kos-ports/
drpaneas@m2:/opt/toolchains/dc/kos-ports (master)% git remote add DrPaneas https://github.com/drpaneas/kos-ports.git
drpaneas@m2:/opt/toolchains/dc/kos-ports (master)% git pull DrPaneas
drpaneas@m2:/opt/toolchains/dc/kos-ports (master)% git switch update
branch 'update' set up to track 'DrPaneas/update'.
drpaneas@m2:/opt/toolchains/dc/kos-ports (update)% cd raylib4dc/
drpaneas@m2:/opt/toolchains/dc/kos-ports/raylib4dc (update)% make
Please build your port with 'make install clean'.
drpaneas@m2:/opt/toolchains/dc/kos-ports/raylib4dc (update)% make install cleanthis worked without any issues. |
This commit introduces a new update system that uses git hashes to track changes in git-based ports and version numbers for non-git ports. Key changes: - Add git hash tracking for git-based ports - Replace version-check with new update target that handles both git and version-based ports - Add update-all.sh utility script for managing all ports - Update build-all.sh to use clean install instead of version-check - Add *.hash to .gitignore to prevent tracking local state - Update documentation to reflect new update system and remove version-check The new system provides better tracking of git-based ports and clearer status reports during updates. It also maintains backward compatibility with version-based ports while adding more robust update detection for git repositories. Signed-off-by: Panagiotis Georgiadis <drpaneas@gmail.com>
Signed-off-by: Panagiotis Georgiadis <drpaneas@gmail.com>
Signed-off-by: Panagiotis Georgiadis <drpaneas@gmail.com>
Signed-off-by: Panagiotis Georgiadis <drpaneas@gmail.com>
Signed-off-by: Panagiotis Georgiadis <pgeorgia@redhat.com>
This commit introduces a new update system that uses git hashes to track changes in git-based ports and version numbers for non-git ports. Key changes:
update-with-depstarget to handle dependencies as well if you want toThe new system provides better tracking of git-based ports and clearer status reports during updates. It also maintains backward compatibility with version-based ports while adding more robust update detection for git repositories.