We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unable to concretize with Clingo when libyogrt is part of dependency tree
<!-- Explain, in a clear and concise way, the command you ran and the result you were trying to achieve.
Example: "I ran `spack find` to list all the installed packages and ..." -->

### Steps to reproduce the issue
Any of the above result in the same error:
```console
$ spack spec -I libyogrt
$ spack spec -I scr # SCR depends on libyogrt
$ spack spec -I axom # axom depends on SCR
$ spack spec -I macsio # macsio depends on SCR
...
```

### Error Message

<!-- If Spack reported an error, provide the error message. If it did not report an error but the output appears incorrect, provide the incorrect output. If there was no error message and no output but the result is incorrect, describe how it does not match what you expect. -->
```console
Concretized
--------------------------------
==> Error: invalid values for variant "scheduler" in package "libyogrt": ['lsf']
```

I imagine this is because https://github.com/spack/spack/blob/c22141f444861abeaee297a3d92696e9ae94a509/var/spack/repos/builtin/packages/libyogrt/package.py#L39

references an invalid value of the 'scheduler` variant:
https://github.com/spack/spack/blob/c22141f444861abeaee297a3d92696e9ae94a509/var/spack/repos/builtin/packages/libyogrt/package.py#L36

Adding `lsf` to the possible values for `scheduler` fixes the issue, but I am not sure that this fix is correct.

### Information on your system

* **Spack:** 0.16.0
* **Python:** 3.7.2
* **Platform:** linux-rhel7-power9le
* **Concretizer:** clingo


### Additional information

<!-- These boxes can be checked by replacing [ ] with [x] or by clicking them after submitting the issue. -->
- [x] I have run `spack debug report` and reported the version of Spack/Python/Platform
- [x] I have searched the issues of this repo and believe this is not a duplicate
- [x] I have run the failing commands in debug mode and reported the output

<!-- We encourage you to try, as much as possible, to reduce your problem to the minimal example that still reproduces the issue. That would help us a lot in fixing it quickly and effectively!

If you want to ask a question about the tool (how to use it, what it can currently do, etc.), try the `#general` channel on our Slack first. We have a welcoming community and chances are you'll get your reply faster and without opening an issue.

Other than that, thanks for taking the time to contribute to Spack! -->


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `var/spack/repos/builtin/packages/libyogrt/package.py`
Content:
```
1 # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
2 # Spack Project Developers. See the top-level COPYRIGHT file for details.
3 #
4 # SPDX-License-Identifier: (Apache-2.0 OR MIT)
5 
6 from spack import *
7 
8 
9 class Libyogrt(AutotoolsPackage):
10     """Your One Get Remaining Time Library."""
11 
12     homepage = "https://github.com/LLNL/libyogrt"
13     url      = "https://github.com/LLNL/libyogrt/releases/download/1.21/libyogrt-1.21.tar.gz"
14 
15     version('1.24',   sha256='36695030e72b24b1f22bfcfe42bfd1d3c87f9c0eea5e94ce0120782581ea522f')
16     version('1.23',   sha256='c95e7a6be29c0d1ac1b673b0ba1d4e5781981722f93d0da99ae62ff3b5f35b5f')
17     version('1.22',   sha256='38e7d1ea3fa030f0169197aa96cde9f01caa595a590764ef1cb2ae07379cb711')
18     version('1.21',   sha256='5f8f0942d35ee4e418273e478e632210b3fa648dcb6a2e6a92c6ba4213cdc362')
19     version('1.20-7', sha256='735e9d6fa572e239ccc73e11c84b4583338b24df0fa91c48e8bc038d882003f7')
20     version('1.20-6', sha256='ba5a2e202f995cf7ae3bf87b451943733e760ede02ca172f712cbf2eea693222')
21     version('1.20-5', sha256='1e41bc656abffb121145264bc898421c3f355d3be35f1711b7b5e3ffe7effdd9')
22     version('1.20-4', sha256='0858a729068b272d4047d79f6a5187cdbd427bdfec64db4e143524b4789a06c5')
23     version('1.20-3', sha256='61a8f28f452aef0e09d700dbaaffd91ae3855f7ac221c7ebe478a028df635e31')
24     version('1.20-2', sha256='bf22a82ab3bfede780be3fb6c132cc354234f8d57d3cccd58fe594f074ed7f95')
25 
26     # libyogrt supports the following schedulers:
27     #     lcrm, lsf, moab, slurm, AIX+slurm
28 
29     # however, only slurm exists in spack
30     # libyogrt's build system is smart enough to detect the system scheduler
31     # the slurm option here connects to a spack-installed slurm
32     # if/when other schedulers have spack packages, they can be added
33 
34     variant('scheduler', default='system',
35             description="Select scheduler integration",
36             values=['system', 'slurm'], multi=False)
37     depends_on('slurm', when='scheduler=slurm')
38 
39     conflicts('scheduler=lsf', when='@:1.22')
40 
41     variant('static', default='False',
42             description="build static library")
43 
44     def url_for_version(self, version):
45         if version < Version(1.21):
46             return "https://github.com/LLNL/libyogrt/archive/%s.tar.gz" % version
47         else:
48             return "https://github.com/LLNL/libyogrt/releases/download/{0}/libyogrt-{0}.tar.gz".format(version)
49 
50     def configure_args(self):
51         args = []
52 
53         sched = self.spec.variants['scheduler'].value
54         if sched != "system":
55             args.append('--with-%s=%s' % (sched, self.spec[sched].prefix))
56 
57         if '+static' in self.spec:
58             args.append('--enable-static=yes')
59 
60         return args
61
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/var/spack/repos/builtin/packages/libyogrt/package.py b/var/spack/repos/builtin/packages/libyogrt/package.py
--- a/var/spack/repos/builtin/packages/libyogrt/package.py
+++ b/var/spack/repos/builtin/packages/libyogrt/package.py
@@ -34,13 +34,11 @@
     variant('scheduler', default='system',
             description="Select scheduler integration",
             values=['system', 'slurm'], multi=False)
-    depends_on('slurm', when='scheduler=slurm')
-
-    conflicts('scheduler=lsf', when='@:1.22')
-
     variant('static', default='False',
             description="build static library")
 
+    depends_on('slurm', when='scheduler=slurm')
+
     def url_for_version(self, version):
         if version < Version(1.21):
             return "https://github.com/LLNL/libyogrt/archive/%s.tar.gz" % version

{"golden_diff": "diff --git a/var/spack/repos/builtin/packages/libyogrt/package.py b/var/spack/repos/builtin/packages/libyogrt/package.py\n--- a/var/spack/repos/builtin/packages/libyogrt/package.py\n+++ b/var/spack/repos/builtin/packages/libyogrt/package.py\n@@ -34,13 +34,11 @@\n     variant('scheduler', default='system',\n             description=\"Select scheduler integration\",\n             values=['system', 'slurm'], multi=False)\n-    depends_on('slurm', when='scheduler=slurm')\n-\n-    conflicts('scheduler=lsf', when='@:1.22')\n-\n     variant('static', default='False',\n             description=\"build static library\")\n \n+    depends_on('slurm', when='scheduler=slurm')\n+\n     def url_for_version(self, version):\n         if version < Version(1.21):\n             return \"https://github.com/LLNL/libyogrt/archive/%s.tar.gz\" % version\n", "issue": "Unable to concretize with Clingo when libyogrt is part of dependency tree\n<!-- Explain, in a clear and concise way, the command you ran and the result you were trying to achieve.\r\nExample: \"I ran `spack find` to list all the installed packages and ...\" -->\r\n\r\n### Steps to reproduce the issue\r\nAny of the above result in the same error:\r\n```console\r\n$ spack spec -I libyogrt\r\n$ spack spec -I scr # SCR depends on libyogrt\r\n$ spack spec -I axom # axom depends on SCR\r\n$ spack spec -I macsio # macsio depends on SCR\r\n...\r\n```\r\n\r\n### Error Message\r\n\r\n<!-- If Spack reported an error, provide the error message. If it did not report an error but the output appears incorrect, provide the incorrect output. If there was no error message and no output but the result is incorrect, describe how it does not match what you expect. -->\r\n```console\r\nConcretized\r\n--------------------------------\r\n==> Error: invalid values for variant \"scheduler\" in package \"libyogrt\": ['lsf']\r\n```\r\n\r\nI imagine this is because https://github.com/spack/spack/blob/c22141f444861abeaee297a3d92696e9ae94a509/var/spack/repos/builtin/packages/libyogrt/package.py#L39\r\n\r\nreferences an invalid value of the 'scheduler` variant:\r\nhttps://github.com/spack/spack/blob/c22141f444861abeaee297a3d92696e9ae94a509/var/spack/repos/builtin/packages/libyogrt/package.py#L36\r\n\r\nAdding `lsf` to the possible values for `scheduler` fixes the issue, but I am not sure that this fix is correct.\r\n\r\n### Information on your system\r\n\r\n* **Spack:** 0.16.0\r\n* **Python:** 3.7.2\r\n* **Platform:** linux-rhel7-power9le\r\n* **Concretizer:** clingo\r\n\r\n\r\n### Additional information\r\n\r\n<!-- These boxes can be checked by replacing [ ] with [x] or by clicking them after submitting the issue. -->\r\n- [x] I have run `spack debug report` and reported the version of Spack/Python/Platform\r\n- [x] I have searched the issues of this repo and believe this is not a duplicate\r\n- [x] I have run the failing commands in debug mode and reported the output\r\n\r\n<!-- We encourage you to try, as much as possible, to reduce your problem to the minimal example that still reproduces the issue. That would help us a lot in fixing it quickly and effectively!\r\n\r\nIf you want to ask a question about the tool (how to use it, what it can currently do, etc.), try the `#general` channel on our Slack first. We have a welcoming community and chances are you'll get your reply faster and without opening an issue.\r\n\r\nOther than that, thanks for taking the time to contribute to Spack! -->\r\n\n", "before_files": [{"content": "# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Libyogrt(AutotoolsPackage):\n    \"\"\"Your One Get Remaining Time Library.\"\"\"\n\n    homepage = \"https://github.com/LLNL/libyogrt\"\n    url      = \"https://github.com/LLNL/libyogrt/releases/download/1.21/libyogrt-1.21.tar.gz\"\n\n    version('1.24',   sha256='36695030e72b24b1f22bfcfe42bfd1d3c87f9c0eea5e94ce0120782581ea522f')\n    version('1.23',   sha256='c95e7a6be29c0d1ac1b673b0ba1d4e5781981722f93d0da99ae62ff3b5f35b5f')\n    version('1.22',   sha256='38e7d1ea3fa030f0169197aa96cde9f01caa595a590764ef1cb2ae07379cb711')\n    version('1.21',   sha256='5f8f0942d35ee4e418273e478e632210b3fa648dcb6a2e6a92c6ba4213cdc362')\n    version('1.20-7', sha256='735e9d6fa572e239ccc73e11c84b4583338b24df0fa91c48e8bc038d882003f7')\n    version('1.20-6', sha256='ba5a2e202f995cf7ae3bf87b451943733e760ede02ca172f712cbf2eea693222')\n    version('1.20-5', sha256='1e41bc656abffb121145264bc898421c3f355d3be35f1711b7b5e3ffe7effdd9')\n    version('1.20-4', sha256='0858a729068b272d4047d79f6a5187cdbd427bdfec64db4e143524b4789a06c5')\n    version('1.20-3', sha256='61a8f28f452aef0e09d700dbaaffd91ae3855f7ac221c7ebe478a028df635e31')\n    version('1.20-2', sha256='bf22a82ab3bfede780be3fb6c132cc354234f8d57d3cccd58fe594f074ed7f95')\n\n    # libyogrt supports the following schedulers:\n    #     lcrm, lsf, moab, slurm, AIX+slurm\n\n    # however, only slurm exists in spack\n    # libyogrt's build system is smart enough to detect the system scheduler\n    # the slurm option here connects to a spack-installed slurm\n    # if/when other schedulers have spack packages, they can be added\n\n    variant('scheduler', default='system',\n            description=\"Select scheduler integration\",\n            values=['system', 'slurm'], multi=False)\n    depends_on('slurm', when='scheduler=slurm')\n\n    conflicts('scheduler=lsf', when='@:1.22')\n\n    variant('static', default='False',\n            description=\"build static library\")\n\n    def url_for_version(self, version):\n        if version < Version(1.21):\n            return \"https://github.com/LLNL/libyogrt/archive/%s.tar.gz\" % version\n        else:\n            return \"https://github.com/LLNL/libyogrt/releases/download/{0}/libyogrt-{0}.tar.gz\".format(version)\n\n    def configure_args(self):\n        args = []\n\n        sched = self.spec.variants['scheduler'].value\n        if sched != \"system\":\n            args.append('--with-%s=%s' % (sched, self.spec[sched].prefix))\n\n        if '+static' in self.spec:\n            args.append('--enable-static=yes')\n\n        return args\n", "path": "var/spack/repos/builtin/packages/libyogrt/package.py"}], "after_files": [{"content": "# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Libyogrt(AutotoolsPackage):\n    \"\"\"Your One Get Remaining Time Library.\"\"\"\n\n    homepage = \"https://github.com/LLNL/libyogrt\"\n    url      = \"https://github.com/LLNL/libyogrt/releases/download/1.21/libyogrt-1.21.tar.gz\"\n\n    version('1.24',   sha256='36695030e72b24b1f22bfcfe42bfd1d3c87f9c0eea5e94ce0120782581ea522f')\n    version('1.23',   sha256='c95e7a6be29c0d1ac1b673b0ba1d4e5781981722f93d0da99ae62ff3b5f35b5f')\n    version('1.22',   sha256='38e7d1ea3fa030f0169197aa96cde9f01caa595a590764ef1cb2ae07379cb711')\n    version('1.21',   sha256='5f8f0942d35ee4e418273e478e632210b3fa648dcb6a2e6a92c6ba4213cdc362')\n    version('1.20-7', sha256='735e9d6fa572e239ccc73e11c84b4583338b24df0fa91c48e8bc038d882003f7')\n    version('1.20-6', sha256='ba5a2e202f995cf7ae3bf87b451943733e760ede02ca172f712cbf2eea693222')\n    version('1.20-5', sha256='1e41bc656abffb121145264bc898421c3f355d3be35f1711b7b5e3ffe7effdd9')\n    version('1.20-4', sha256='0858a729068b272d4047d79f6a5187cdbd427bdfec64db4e143524b4789a06c5')\n    version('1.20-3', sha256='61a8f28f452aef0e09d700dbaaffd91ae3855f7ac221c7ebe478a028df635e31')\n    version('1.20-2', sha256='bf22a82ab3bfede780be3fb6c132cc354234f8d57d3cccd58fe594f074ed7f95')\n\n    # libyogrt supports the following schedulers:\n    #     lcrm, lsf, moab, slurm, AIX+slurm\n\n    # however, only slurm exists in spack\n    # libyogrt's build system is smart enough to detect the system scheduler\n    # the slurm option here connects to a spack-installed slurm\n    # if/when other schedulers have spack packages, they can be added\n\n    variant('scheduler', default='system',\n            description=\"Select scheduler integration\",\n            values=['system', 'slurm'], multi=False)\n    variant('static', default='False',\n            description=\"build static library\")\n\n    depends_on('slurm', when='scheduler=slurm')\n\n    def url_for_version(self, version):\n        if version < Version(1.21):\n            return \"https://github.com/LLNL/libyogrt/archive/%s.tar.gz\" % version\n        else:\n            return \"https://github.com/LLNL/libyogrt/releases/download/{0}/libyogrt-{0}.tar.gz\".format(version)\n\n    def configure_args(self):\n        args = []\n\n        sched = self.spec.variants['scheduler'].value\n        if sched != \"system\":\n            args.append('--with-%s=%s' % (sched, self.spec[sched].prefix))\n\n        if '+static' in self.spec:\n            args.append('--enable-static=yes')\n\n        return args\n", "path": "var/spack/repos/builtin/packages/libyogrt/package.py"}]}