Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3831

Traceback on missing provides key

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Rejected
    • Priority: Higher
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cfbs
    • Labels:
      None

      Description

      I get a traceback for a missing provides key when I try to add this repository directly
      https://github.com/nickanderson/cfengine-inventory-clamav/blob/9a6a5d53a163ebdf30eca3d33c9b10ed1ec365a6/cfbs.json
      I think cfbs should give me a nice error and tell me what to do.

      ❯ cfbs add https://github.com/nickanderson/cfengine-inventory-clamav
      Traceback (most recent call last):
        File "/home/nickanderson/.local/bin/cfbs", line 8, in <module>
          sys.exit(main())
        File "/home/nickanderson/.local/lib/python3.9/site-packages/cfbs/main.py", line 132, in main
          return commands.add_command(
        File "/home/nickanderson/.local/lib/python3.9/site-packages/cfbs/commands.py", line 550, in add_command
          return _add_using_url(
        File "/home/nickanderson/.local/lib/python3.9/site-packages/cfbs/commands.py", line 514, in _add_using_url
          provides = remote_config.get_provides()
        File "/home/nickanderson/.local/lib/python3.9/site-packages/cfbs/index.py", line 200, in get_provides
          for k, v in self._data["provides"].items():
      KeyError: 'provides'
      ❯ curl -s https://raw.githubusercontent.com/nickanderson/cfengine-inventory-clamav/main/cfbs.json
      {
          "modules": {
              "inventory-clamav": {
                  "description": "Inventory useful information from ClamAV (version, definitions version, definitions date)",
                  "tags": ["inventory", "antivirus" ],
                  "version": "1.0.0",
                  "repo": "https://github.com/nickanderson/cfengine-inventory-clamav",
                  "commit": "1d872d1771921b0f8d92da56899d8b61d37dd5ca",
                  "steps": [
                      "copy policy/main.cf services/inventory-clamav/main.cf",
                      "json cfbs/def.json def.json"
                  ]
              }
          }
      }
      ❯ cfbs --version
      cfbs 0.14.0
      
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              a10042 Nick Anderson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: