blurstudio / hab

A application environment and launcher
GNU Lesser General Public License v3.0
25 stars 3 forks source link

A config with no distros respects forced requirements #80

Closed MHendricks closed 10 months ago

MHendricks commented 10 months ago

Addresses #35

Checklist

Types of Changes

Proposed Changes

Fixes this bug and also modernizes the license_file setting in setup.cfg

Testing:

  1. Set HAB_PATH to your tests\site_main.json
  2. Use the URI not_set/no_distros. This is a config that doesn't inherit and doesn't define distros.
  3. Run hab -r aliased dump not_set/no_distros -v. You will now see aliased listed in the versions section.
    WARNING:hab.solvers:Forced Requirement: aliased
    Dump of FlatConfig('not_set/no_distros')
    ----------------------------------------------------------
    name:  no_distros
    uri:  not_set/no_distros
    aliases:  as_dict inherited as_list as_str global
    versions:  aliased==2.0
    ----------------------------------------------------------
  4. If you remove -r aliased from the command you won't see any versions. This is the correct behavior.
    Dump of FlatConfig('not_set/no_distros')
    -------------------------------------------------
    name:  no_distros
    uri:  not_set/no_distros
    versions:
    -------------------------------------------------