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 update --with
for non-root packages
#10436
Comments
The rationale is two-fold for disallowing it, one is that it currently modifies existing links on the root package, it doesn't add anything, but that's a weak reason I think. The other more worrying reason is it lets you do really strange things if we allow adding requires, as you could suddenly end up with a lock file containing packages that were not required by anything, they were just added by some --with rule on update, and the next update will remove those dangling packages. I don't know how bad this is, but I think it's the main reason I figured we'd rather not do this initially. One could say it's just a foot-gun, which can be used properly as well.. |
@Seldaek maybe those temporary restrictions should be implemented by filtering the pool (before optimizing it) rather than by adding links. This way, those restrictions cannot cause extra packages to be installed if they are not required somewhere. |
Yeah that's worth investigating, good call |
@Seldaek Yeah, I don't think the request is to allow arbitrary packages to be introduced with |
The other reason why we restricted came back to me as it is in the docs:
Ensuring it's a subset of all the requirements isn't so easy as it is with the root, but doing so at the pool level might still be possible.. |
Well, once we apply |
I wanted to downgrade I needed to downgrade because running
Then I run
So it makes sense to allow updating non-root packages in this case. Or maybe it should've asked me to downgrade |
Ok I ran into this myself one too many time and decided to fix it :) See #10773 |
#8860 added the
--with
parameter toupdate
to run an update with a specific version constraint on a package.In #8756, @Seldaek wrote without elaborating:
Following the resolution of the issue, @froemken (not OP) commented that the change did not satisfy his needs because of its restricted application:
#8756 (comment)
It seems that @louisitvn was also looking for this functionality for non-root packages:
#8756 (comment)
I, too, am looking for this functionality.
What was the motivation for restricting
update --with
to root packages? Is there a technical reason why it can't apply to any package? If not, can the restriction be removed?The text was updated successfully, but these errors were encountered: