-
Notifications
You must be signed in to change notification settings - Fork 59
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
Implement xlocate to sync with all the repos defined #231
base: master
Are you sure you want to change the base?
Conversation
I'm not sure about formatting guidelines, lemme know if any error is there regarding file formatting, max-line lengths etc. Also lemme know if we need to force generate a new indexes for a remote repository (instead of syncing with xlocate.git, even if available)? |
Using xbps repos is wrong, you can't assume that /xlocate is there. The only sane way to support multiple repos is to allow the user to specify the git repos. |
Your implementation is broken, repository files can include multiple repositories.
So how are we supposed to create the actual index? |
Yes we're checking if there exists a git repository by
Oh didn't knew about that, I thought the files are just shell scripts defining shell variables, like
Oh if we mean about the official remote repository, then I was also worried about that post writing the changes, also stated in |
What is number in front of result of |
I'm talking about the urls, you can't assume the path of xlocate, xbps repositories are structured differently and mirros might put everything in more directories. |
Thank you!
Um, but those repository don't have prebuilt xlocate indexes attached to them (or I'm missing something), a musl package may contain some more or maybe less file(s), their prebuilt indexes aren't in |
How do you come from The main point is that its not really possible to get the repo and/or assume where the xlocate directory is located it. |
By replacing |
Thats the point, that doens't work for musl while it should work, and you can't replace everything since that would break mirrors. There is no point in trying to guess xlocate repos or enforcing some directory layout if the user just configures them.
No, it should work like it currently does, simply don't use xbps repositories to guess locations of xlocate repositories. |
Ok I had some misconceptions lately, the If it does we should just be able to pull from the guess (saving lot of cpu work), if not we just used xbps-query to build the indexes locally for rest of custom repo / sub repo, so we can search through all of it? Otherwise |
Its generated from x86_64-glibc, but that doesn't matter, we use it for every architecture and libc.
Right, and we still need that since that is used to generate |
So if we club index of all repositories (including subrepos) coming from a certain base url into one single commit, will it be better? |
xlocate already contains all repos, I don't get the purpose of the PR, you can't derive the xlocate git repo from the repository urls and there are no other xlocate git repo to even add. If you want to have xlocate on you own repo then it would be simpler to allow to add additional git repositories urls to xlocate than trying to assume things based on configured xbps repos. |
Is it better now,
at env variable, and if one/more argument supplied to Example: It generates commit as:
for each of the repository specified in the env variable. It also keeps track of the remote updates are present by hashing |
…nt variable to get it synced, adds optional repository argument to -g if present restrict to generate xlocate indexes only for the given repository(ies) rather than all the repositories defined in the system
Closes #230.
230, In short:
What it does:
repository
through/etc/xbps.d
and/usr/share/xbps.d
prioritizing the former.$XLOCATE_REPOS[i]
) if exists. Or else usexbps-query --repository=<repo> -Mio
to resolve all the subrepo (like multilib/nonfree) or the custom repos at local path(s).This makes
-g
obselete, so is removed. Shebang is changed tobash
to utilize arrays and[[
checking builtin over the test command[
.