[question] export-pkg: specify the 'user' and the 'channel' or neither of them
See original GitHub issueI’m developing a conan package for my own header-only library and I get this error:
$ conan export-pkg . -sf ./tmp/src -bf ./tmp/build
ERROR: Specify the 'user' and the 'channel' or neither of them
I tried to explicitly pass the reference to export-pkg as:
demo/testing;bitmask_enum/0.0.1@;bitmask_enum/0.0.1@demo/testing;bitmask_enum/0.0.1@/.
None of the above worked.
I’m running version 1.46.2 on Windows 10 Pro, installed through the windows installer (did not try pip).
I get the same error both with:
- mintty 3.5.3 (x86_64-pc-msys) [Windows 19042];
- Power Shell.
The full script I run to test my conan package is the following:
#!/bin/sh
typeset -r conan_root=tmp
typeset -r src_folder=${conan_root}/src
typeset -r inst_folder=${conan_root}/instal
typeset -r build_folder=${conan_root}/build
typeset -r pkg_folder=${conan_root}/pkg
rm -rvf tmp/*
echo "> conan source"
conan source . \
--source-folder "$src_folder" \
|| exit 1
echo "> conan install"
conan install . \
--install-folder "$inst_folder" \
|| exit 1
echo "> conan build"
conan build . \
--install-folder "$inst_folder" \
--build-folder "$build_folder" \
|| exit 1
echo "> conan package"
conan package . \
--source-folder "$src_folder" \
--install-folder "$inst_folder" \
--build-folder "$build_folder" \
--package-folder "$pkg_folder" \
|| exit 1
echo "> conan export-pkg"
conan export-pkg . \
--source-folder "$src_folder" \
--build-folder "$build_folder" \
|| exit 1
echo "> conan test"
cnonan test test_package bitmask_enum/0.0.1@ \
|| exit 1
My configuration is:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.runtime=MD
compiler.version=16
os=Windows
os_build=Windows
[options]
[build_requires]
[env]
I’ve read through issues #7568 and #479 but neither seems relevant to my case. The only post I found on stackoveflow recommends upgrading conan: upgrading it did not solve my issue.
- I’ve read the CONTRIBUTING guide.
Issue Analytics
- State:
- Created a year ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Ask Question - Stack Overflow
ERROR: Specify the 'user' and the 'channel' or neither of them . It doesn't make any difference if I remove both user and...
Read more >[bug] most commands fail with "Specify the 'user' and ... - GitHub
[bug] Error: Specify the 'user' and the 'channel' or neither of them when using version ranges #11764 · [question] export-pkg: specify the 'user...
Read more >conan export-pkg — conan 1.36.0 documentation
The export-pkg command let you create a package from already existing files in your working folder, it can be useful if you are...
Read more >Conan packages in the Package Registry - GitLab Docs
Publish Conan packages in your project's Package Registry. Then install the packages whenever you need to use them as a dependency.
Read more >Writing R Extensions - The Comprehensive R Archive Network
Next: Configure and cleanup, Previous: Creating R packages, Up: Creating R ... in the package should be exported to make them available to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That was the solution, thanks a lot. I would have never thought about this myself. After renaming my cache folder, I ran
conan create .and everything works.By comparing the newly created
<username>/.conanwith the old one, I realized the problem is settingstorage.pathinconan.conf. I had changed it since I was exhausting myC:\drive:If I restore
path = ./data, bothconan createandconan export-pkgwork as expected.The issue seems to be due to specifying a
storage.paththat’s a top-level folder of driveD:\. I tried all of these:This is kind of weird to me as I’ve been able to create my own packages in
D:\conan_packagesin the past.If you consider this to be a bug that’s worth investigating, I can provide more information. As far as I’m concerned, I can carry on with changing my
storage.pathto a non top-level folder ofD:\.Thanks a lot for your help.
Thanks for the feedback @UtkarshVerma37051. Just a couple of notes:
conan copycommand that allowed this, and trying to manually rename packages renaming folders will not be possible either.