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

charmcraft list-lib does not work without a metadata.yaml file #1973

Open
DanielArndt opened this issue Oct 22, 2024 · 0 comments
Open

charmcraft list-lib does not work without a metadata.yaml file #1973

DanielArndt opened this issue Oct 22, 2024 · 0 comments
Labels
Bug Something isn't working

Comments

@DanielArndt
Copy link
Member

Bug Description

The command charmcraft list-lib seems to expect the charm name to be in a metadata.yaml file, but newer charms do not have this file, as everything is in charmcraft.yaml.

To Reproduce

  1. Go to a directory which contains a charm with only a charmcraft.yaml file (no metadata.yaml)
  2. Run charmcraft list-lib

Environment

Latest charmcraft (3a09483)

charmcraft.yaml

# This file configures Charmcraft.
# See https://juju.is/docs/sdk/charmcraft-config for guidance.

name: listlibs
type: charm
title: Charm Template
summary: A very short one-line summary of the charm.
description: |
  A single sentence that says what the charm is, concisely and memorably.

  A paragraph of one to three short sentences, that describe what the charm does.

  A third paragraph that explains what need the charm meets.

  Finally, a paragraph that describes whom the charm is useful for.
bases:
  - build-on:
    - name: ubuntu
      channel: "22.04"
    run-on:
    - name: ubuntu
      channel: "22.04"
config:
  options:
    log-level:
      description: |
        Configures the log level of gunicorn.

        Acceptable values are: "info", "debug", "warning", "error" and "critical"
      default: "info"
      type: string
containers:
  httpbin:
    resource: httpbin-image
resources:
  httpbin-image:
    type: oci-image
    description: OCI image for httpbin
    upstream-source: kennethreitz/httpbin

Relevant log output

Can't access name in 'metadata.yaml' file. The 'list-lib' command must either be executed from a valid project directory, or specify a charm name using the --charm-name option.
@DanielArndt DanielArndt added the Bug Something isn't working label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant