Skip to content
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

Directory named 'control' is mistaken as a 'CONTROL' file failing manifest mode of vcpkg #22686

Closed
mabu4ch opened this issue Jan 21, 2022 · 1 comment · Fixed by #25226
Closed
Assignees
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) info:manifests This PR or Issue pertains to the Manifests feature requires:tool-release An issue that has been fixed in the microsoft/vcpkg-tool repo and is waiting for a release thereof

Comments

@mabu4ch
Copy link

mabu4ch commented Jan 21, 2022

Describe the bug
We wanted to add vcpkg to manage libraries in an existing project using the manifest mode with vcpkg.json.
We have added vcpkg.json to the root directory and use the -DCMAKE_TOOLCHAIN_FILE=vcpkginstall/.../vcpkg.cmake.
Running CMake results in following error message:

-- Running vcpkg install
Found both manifest and CONTROL file in port /Users/markus/Programming/vcpkgbug; please rename one or the other
-- Running vcpkg install - failed

Part of our code is in a directory named "control". Renaming it makes the bug disappear.
Also adding a folder "control" to another project that works well with vcpkg will trigger this bug.

Environment

  • OS: MacOs 11.6.2
  • Compiler: Xcode_12_4 Clang

To Reproduce
Steps to reproduce the behavior:

  1. take any project using a manifest: vcpkg.json
  2. add a folder named 'control' at the same level as the manifest
  3. Run configure

Expected behavior
I would have expected that a folder 'control' will not be interpreted as a CONTROL file.

@Cheney-W Cheney-W added info:manifests This PR or Issue pertains to the Manifests feature category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) labels Jan 24, 2022
@pmeems
Copy link

pmeems commented Feb 18, 2022

I have the same issue with https://github.com/MapWindow/MapWinGIS/tree/develop/src making it very hard to use vcpkg together with vcpkg.json and Github Actions

BillyONeal added a commit to BillyONeal/vcpkg-tool that referenced this issue Jun 10, 2022
… a consumer manifest.

Today, manifest mode works by effectively injecting the manifest directory as an overlay and letting load_port handle the situation. However, this means that the consuming manifest needs to follow all normal port rules, such as not having a CONTROL file. microsoft#574 attempts to partially fix this by not failing of the CONTROL found is a directory rather than a file, but we really shouldn't be having opinions about the consuming location at all.

Changes:
* Add ManifestProvider and CombinedProvider which explicitly model the loaded manifest overlay without needing to treat the manifest directory as a port directory
* Fix plumbing in install.cpp to use the same overlay provider at all times.

Competing resolution of microsoft#574 / microsoft/vcpkg#22686
BillyONeal added a commit to microsoft/vcpkg-tool that referenced this issue Jun 14, 2022
… a consumer manifest. (#582)

* Don't complain about CONTROL files or directories in the directory of a consumer manifest.

Today, manifest mode works by effectively injecting the manifest directory as an overlay and letting load_port handle the situation. However, this means that the consuming manifest needs to follow all normal port rules, such as not having a CONTROL file. #574 attempts to partially fix this by not failing of the CONTROL found is a directory rather than a file, but we really shouldn't be having opinions about the consuming location at all.

Changes:
* Add ManifestProvider and CombinedProvider which explicitly model the loaded manifest overlay without needing to treat the manifest directory as a port directory
* Fix plumbing in install.cpp to use the same overlay provider at all times.

Competing resolution of #574 / microsoft/vcpkg#22686

* Add e2e test and make the manifest file the primary overlay.

* Add missing overrides.

* Degeneralize IOverlayProvider
@BillyONeal BillyONeal added the requires:tool-release An issue that has been fixed in the microsoft/vcpkg-tool repo and is waiting for a release thereof label Jun 14, 2022
BillyONeal added a commit that referenced this issue Jun 15, 2022
* Update vcpkg-tool to 2022-06-15. See https://github.com/microsoft/vcpkg-tool/releases/tag/2022-06-15
* Add `=pass` entries from microsoft/vcpkg-tool#579
* Cherry pick XUnit output from #23477 which hooks up microsoft/vcpkg-tool#585 (Thanks again @dg0yt !)
* Update release process document now that we can do the full tree rebuild to test the tool release before signing.

Thank you:

@autoantwort 
@christophe-calmejane 
@JackBoosY 
@benmcmorran
@hmoffatt 
@klalumiere 
@Thomas1664 
@Neumann-A 
@AenBleidd

for your contributions!

Fixes #22686 .
Fixes #21800 .
Fixes #16216 .
Fixes #15836 .

Full tree rebuild testing this update is: https://dev.azure.com/vcpkg/public/_build/results?buildId=73664&view=results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) info:manifests This PR or Issue pertains to the Manifests feature requires:tool-release An issue that has been fixed in the microsoft/vcpkg-tool repo and is waiting for a release thereof
Projects
None yet
4 participants