-
Notifications
You must be signed in to change notification settings - Fork 25
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
Allow to specify a custom repo for the local cache #119
Comments
Can you try % PACMAN_CACHE='/var/cache/pacman/pkg/ /var/cache/aur/pkg/' downgrade foo |
Yup, that works, sorry. |
Would it be suitable to make downgrade use all cache location by default? |
I think that makes sense! Feel free to report that as a separate feature request (with example |
If we push through with this as a PR, it would be good if we could then pass Also, if we want to expand to searching all possible cache locations, we could also consider adding the maximum depth in the WDYT? I don't mind personally developing this in the next iteration(s) if it is of interest. Not sure what priority this would take with respect to our other two open issues #83 and #118. |
If @terencode wishes to contribute, I'm comfortable with them just solving their immedate problem and us handling that aspect as a separate issue. In fact, it seems like a separate issue anyway. These should have command line flags (or not) regardless of us working on better defaults (this Issue).
Is it possible just to increase or remove the current
Up to @terencode if they'd like to contribute. If not, go for it.
I think I'm m going to configure Projects for this repo, now that we're getting more maintainers collaborating. We can slot things into a Backlog column to indicate priority and use assignment and an In-Progress column to indicate ongoing work. I don't have an opinion on priority between our current Issues, only that we have some clear approach to indicating it. |
If we specify the cache directory as For other cases, it might be necessary, especially if we want to search for cached packages where there are other large directories present. We can address this in a new issue. |
@atreyasha feel free to contribute if you are motivated ;). |
With #123, it should be possible to search more cache locations with varying file structures. For example: $ downgrade --pacman-cache '/var/cache/' --maxdepth 3 foo bar You can vary the |
Very nice, thank you! |
Ok I tested it and while it works well, I think it could benefit from a couple of improvements:
|
Hmm, so if the package you wish to downgrade is already installed, the current version is shown in the generated table with a
Would be good to get views from @pbrisbin here. AFAIK, this could be possible by just querying via
I just tested this and it is possible to have the following lines in
In my case, with or without the trailing slash did not affect the search. Could you provide the command that did not work for you?
Once again would be good to get views from @pbrisbin here. Maybe this issue of diverging defaults could be settled by having a @terencode if you require this as a default right away, maybe |
Re-opening this issue as there could be some things to discuss still. |
Ok that works, I would have just prefered masking it and having it on top so it's easier to compare versions.
Indeed, but for me it does not pick up the second
A custom configuration file would be welcome indeed. I would think most user with a local repo would put its cache next to the pacman one but I might be wrong.
Yes that's a good enough workaround for when the Cachedir issue is fixed :) |
Ah I see. Yes, the current line to read from https://github.com/pbrisbin/downgrade/blob/master/downgrade#L37 read_pacman_conf() { sed '/^#\?'"$1"' *= *\(.*\)$/!d; s//\1/' "$PACMAN_CONF"; } In
Hmm, I am able to get search results for I know sometimes
|
Same behaviour as before unfortunately. |
Just to summarize some main discussion points in this issue :
|
@terencode for point 4, could you paste the output of |
Sorry for my terse mobile reply, but it wanted to leave some thoughts until I can get back to my computer. 1- SGTM, though if the option is there to pass arbitrary cache directories, don't we need to show that (and deal with long lines)? We can't know the cache name all the time. 2- seems not worth the complexity. If someone were very serious about this feature, I'd encourage them to contribute a stand alone exe to pacman that reuses its own config code to resolve includes and print values (this could very well exist), then we could use that here 3- since every option has an env var, some export lines in bashrc is meant to be the config file. If one really wanted, they could put exports into a specific file and make a wrapper to source it and call downgrade to achieve the same. 4- I can investigate this week 5- I love me some good --debug :) |
@atreyasha here you go:
|
I tried to replicate your cache directory structure using a locally built tarball of
This part of the error message shows that What are the outputs of the following commands?
|
If this does not fix it, I won't bother you with more of these tests :) We can just wait till @pbrisbin tries to reproduce it. |
nothing
nothing
nothing
|
I can reproduce the error now, it has to do with the symlink to another directory. Seems like without the deliberate trailing slash at the end, This is a good find. One rudimentary fix is to force post-pend a slash on all pacman caches, since extra slashes will not change the semantics. Alternatively, there could also be an option within We can add this as a fix in the upcoming release(s). Thanks @terencode! |
Thanks for your perspicacity @atreyasha ;) |
Happy to be of use while stuck at home :D To overcome this issue of following symlinks, we can prepend options Also, can I label this issue as a bug?
|
I'm not against post-pending a |
Possible, but we might encounter some issues. Below is the usage syntax of
This means we would actively have to split whichever options the user provides into the relevant categories and place them either before or after the |
Oh that's too bad. I agree it's not a useful idea, given that. |
Main remaining points of this issue have been transferred to #133. Closing this issue. |
It seems this tool only allow downgrading packages from the default local pacman repo.
However, if the user created a custom repo for say all the AUR packages, downgrade will not find the different package versions.
I'd like an option like
downgrade --repo <repo-name>
EDIT: It seems you can use
--pacman-conf
but it will only work if you have the repo configured in a separate pacman.d file, and it's not very convenient to use.The text was updated successfully, but these errors were encountered: