Skip to content

Package versioning suggestions #2823

@cmpute

Description

@cmpute

This is a discussed topic, but I think there is no satisfying solution by now for version specifiying. Related discussions: #25, #1458, #1481, #1681.
Multiple versions installation is not the topic of this issue

I hope the ability to install certain version of a package can be added. For example, I want to add a port of V-REP, which depends on Lua5.1, but the current version of lua is 5.3 and Lua has many breaking changes since 5.1. It's not able to use Lua5.1 now because the initial version of Lua in vcpkg is 5.3

Current way to do version roll-back

git checkout <refspec> -- ports\<library>

Pros:

Cons:

  • Unable to roll back to versions before vcpkg was developed.
  • Hard to find the git checksum for certain version of an package.
  • Unable to use a new version of port B if roll back port A to when port B is not updated in time.

The proposed ways that could help

vcpkg pin <library> <version> or vcpkg install <library>=<version>

The details in my opinion:

  • The port folder structure changes from

        ports
            |--- <library>
                |--- CONTROL
                |--- portfile.cmake
                |--- ...
    

    to

        ports
            |--- <library>
                |--- <version>
                    |--- CONTROL
                    |--- portfile.cmake
                    |--- ...
                |--- <version>
                    |--- CONTROL
                    |--- portfile.cmake
                    |--- ...
                |--- latest
                    |--- CONTROL
                    |--- portfile.cmake
                    |--- ...
    

    The <version> may be a pattern that can match a series of versions like 1.2.x (or 1.2._) matches 1.2.3 and 1.2.4. When the maintainer wants to update the version of a library, you just have to edit the files in the latest folder, and move the original files into corresponding verison folder if necessary (if the upgrade doesn't break something and a existing version pattern covers the old version, you can just edit the file in the latest folder).

  • Dependency specifying in the CONTROL file changes from
    Build-Depends: dp1, dp2, ...
    to
    Build-Depends: dp1=<ver1>, dp2=<ver2>, ...

    Here versions are match patterns as well.

  • If a certain version of library is installed, vcpkg install <library>=<another version> will remove the previous version. If existing version of package A doesn't meet the demand of package B, then vcpkg install B will remove the current version of A.

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:vcpkg-featureThe issue is a new capability of the tool that doesn’t already exist and we haven’t committed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions