-
Notifications
You must be signed in to change notification settings - Fork 138
multi repo staging #662
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
base: master
Are you sure you want to change the base?
multi repo staging #662
Conversation
classabbyamp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall this looks sound, I think
bin/xbps-rindex/index-add.c
Outdated
| xbps_object_iterator_t iter; | ||
| xbps_object_t keysym; | ||
|
|
||
| // XXX: should this really print all staged packages every time? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo no, it should only print the new ones (like index: added ... does)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current version prints everything since there is nothing really tracking what was added last, it just always adds to the stage then runs the staging check and unstages if possible. I could probably just add another xbps_array_t with all the newly added package versions and just print them as is.
bin/xbps-rindex/index-add.c
Outdated
|
|
||
| for (unsigned i = 0; i < nstates; i++) { | ||
| struct repo_state *state = &states[i]; | ||
| // XXX: kinda useless to print for all repos, also print stage?. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo it would be useful to print the stage count too. maybe this could be prefixed by the repo path?
/path/to/repo: index: %u packages registered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment about it being "useless" is that previously xbps-rindex could only add packages to one repo at a time and so printing the stats for just that repo that was being modified would've made sense. But theoretically with this change unless I'm missing something you could add all packages in different repositories with one xbps-rindex call.
So i guess it depends whether that is allowed or not.
Not sure if the distinction makes sense, since the xbps-rindex call that unstages the repo, unstages not just the repo we added to in that case printing stats for those repos too makes sense. Maybe its good to track and print stats only for modified repos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Executing command [ xbps-rindex -v -R repo1 -R repo2 -a repo1/A-1.0_2.noarch.xbps ]
Fail: stdout not empty
--- /dev/null 2025-12-08 15:08:46.234592808 +0000
+++ /tmp/kyua.gj0Txk/2/work/check.l1bqlW/stdout 2025-12-09 20:17:43.372614626 +0000
@@ -0,0 +1,11 @@
+Inconsistent shlibs:
+ libruby.so.3.3 (provided by: ruby; used by: B)
+repo1: stage: added `A-1.0_2' (noarch)
+repo1: stage: added `flac-1.5.0_1' (noarch)
+repo1: stage: added `ruby-3.4.5_1' (noarch)
+repo2: stage: added `AA-1.0_2' (noarch)
+repo2: stage: added `BB-1.0_2' (noarch)
+repo1: index: 5 packages registered.
+repo1: stage: 3 packages registered.
+repo2: index: 3 packages registered.
+repo2: stage: 2 packages registered.
I think its a bit noisy if it always prints it for all registered repos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be ok (and more ergonomic and expected by the user) to allow adding packages to multiple repos in one invocation, especially when the repo can be modified during staging checks anyways
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Executing command [ xbps-rindex -v -R repo1 -R repo2 -a repo1/A-1.0_2.noarch.xbps ]
Fail: stdout not empty
--- /dev/null 2025-12-08 15:08:46.234592808 +0000
+++ /tmp/kyua.XduQkk/2/work/check.fkj0Ml/stdout 2025-12-09 20:37:00.678680807 +0000
@@ -0,0 +1,5 @@
+Inconsistent shlibs:
+ libruby.so.3.3 (provided by: ruby; used by: B)
+repo1: stage: added `A-1.0_2' (noarch)
+repo1: index: 5 packages registered.
+repo1: stage: 3 packages registered.
with the latest fixup, it will only print the newly added package and only print stats for repos that have been modified.
|
|
||
| // remove all shlibs that are still provided by a staged package | ||
| while ((keysym = xbps_object_iterator_next(iter))) { | ||
| // const char *pkgname = xbps_dictionary_keysym_cstring_nocopy(keysym); |
Check notice
Code scanning / CodeQL
Commented-out code Note
No description provided.