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

[bug] conan remove does not accept a package reference syntax #6545

Closed
danimtb opened this issue Feb 13, 2020 · 3 comments · Fixed by #9459
Closed

[bug] conan remove does not accept a package reference syntax #6545

danimtb opened this issue Feb 13, 2020 · 3 comments · Fixed by #9459

Comments

@danimtb
Copy link
Member

danimtb commented Feb 13, 2020

Originally reported by @joaquin-herrero

The conan remove command is not prepared to delete pacakge IDs from a recipe revision using the syntax:

conan remove name/version@user/channel#RRev:package_id

Instead you have to use:

conan remove name/version@user/channel#RRev -p package_id

This is expected as the command help specifies it, however, the first syntax does not error and in fact, it does nothing as reproduced in the log down below

Environment Details (include every applicable attribute)

  • Conan version: 1.22.1

Steps to reproduce (Include if Applicable)

joaquin@debian:~/dev/deleteme$ conan search -r dev qt/5.14.0@bincrafters/stable#8342c5ee7c9722ba3772b51cc72a2542
Existing packages for recipe qt/5.14.0@bincrafters/stable:
Existing recipe in remote 'dev':
    Package_ID: 969e1c94f9d73c093625749766b422c260060334
        ...
    Package_ID: c8c7ca7841b57e59b9779430e1b0b3565f6d13b3
        ...

joaquin@debian:~/dev/deleteme$ conan remove -r dev qt/5.14.0@bincrafters/stable#8342c5ee7c9722ba3772b51cc72a2542:c8c7ca7841b57e59b9779430e1b0b3565f6d13b3

joaquin@debian:~/dev/deleteme$ conan search -r dev qt/5.14.0@bincrafters/stable#8342c5ee7c9722ba3772b51cc72a2542
Existing packages for recipe qt/5.14.0@bincrafters/stable:
Existing recipe in remote 'dev':
    Package_ID: 969e1c94f9d73c093625749766b422c260060334
        ...
    Package_ID: c8c7ca7841b57e59b9779430e1b0b3565f6d13b3
        ...
@uilianries
Copy link
Member

I think this issue is invalid now. I didn't the changes in the code, but 1.29.0 has a different behavior:

$ conan search zlib/1.2.11@#be59e4b426fc4b137e10bf481ef8dc17 
Existing packages for recipe zlib/1.2.11:

    Package_ID: 19729b9559f3ae196cad45cb2b97468ccb75dcd1
        [options]
            fPIC: True
            minizip: False
            shared: False
        [settings]
            arch: x86_64
            build_type: Release
            compiler: gcc
            compiler.version: 10
            os: Linux
        Outdated from recipe: False

$ conan remove zlib/1.2.11@#be59e4b426fc4b137e10bf481ef8dc17:19729b9559f3ae196cad45cb2b97468ccb75dcd1

WARN: No package recipe matches 
'zlib/1.2.11@#be59e4b426fc4b137e10bf481ef8dc17:19729b9559f3ae196cad45cb2b97468ccb75dcd1'

$ conan remove zlib/1.2.11@#be59e4b426fc4b137e10bf481ef8dc17 -p 19729b9559f3ae196cad45cb2b97468ccb75dcd1
Are you sure you want to delete "19729b9559f3ae196cad45cb2b97468ccb75dcd1" packages from 'zlib/1.2.11' (yes/no):

Now we have an warning message. The command code error is still 0 (no error).

@memsharded
Copy link
Member

But @uilianries the issue is still valid, using conan remove name/version@user/channel#RRev:package_id still doesn't work. It should be able to work, the -p=packageId syntax is to be deprecated. What am I missing?

@uilianries
Copy link
Member

Okay, for now we only have a warning message. So we should actually implement the support. It's clear now.

@memsharded memsharded added the Hacktoberfest https://hacktoberfest.digitalocean.com/ label Oct 1, 2020
uilianries added a commit to uilianries/conan that referenced this issue Aug 20, 2021
Signed-off-by: Uilian Ries <uilianries@gmail.com>
uilianries added a commit to uilianries/conan that referenced this issue Aug 20, 2021
Signed-off-by: Uilian Ries <uilianries@gmail.com>
memsharded pushed a commit that referenced this issue Aug 23, 2021
* #6545 Add local remove test

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* #6545 Remove package by reference

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
UX
  
Awaiting triage
Development

Successfully merging a pull request may close this issue.

4 participants