Skip to content

Feature request: Freeze a distribution version globally #247

@zatricky

Description

@zatricky

I've found that some packages are needed to be held back but there is no way to do a simple upgrade of all other packages without clobbering those packages into the too-new versions. To allow this, system package managers usually use some kind of version pinning. Some require you to edit a config file - but some use a command, such as apt's apt-mark hold <pkgname>.

I'm not sure what the best implementation plan would be - but I can at least think of two ways this might be done. This is also assuming there isn't already a way to do this that I haven't noticed from the documentation:

a) Extend the .binenv.lock functionality to search for a file in $HOME/.config/binenv/ as a fallback when a .binenv.lock file does not already exist in the current project folder. Then use the lock file functionality to pin versions when running the binenv upgrade command rather than only using it at runtime.

b) Make a separate option/parameter to record global version pins, much like the apt example above: binenv hold <pkg> <pkgversion>. This would save the pins in a meaningful location (such as $HOME/.config/binenv/). Upgrades would then keep the package on the "held back" version but, unlike suggestion a) above, it would ignore .binenv.lock files.

In both scenarios I would suggest a warning to remind the user their upgrade is keeping a "held back" version.

For some users, using the existing per-project freeze functionality would work - but in my case I have many projects that need to use the same version of a package. It is actually less of a burden on me to globally uninstall the package, run the upgrade, then reinstall the "correct" package version again every time I do updates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions