Variable expansion in COPR external URL?

Miroslav Suchý msuchy at redhat.com
Mon Oct 19 10:54:31 UTC 2015


Dne 17.10.2015 v 23:55 Dave Johansen napsal(a):
> How can I do a variable expansion that doesn't have - before and after? I tried "slc${releasever}X" [1] and
> "slc$releaseverX" [2] but neither worked.
> Thanks,
> Dave
> 
> [1]: https://copr-be.cloud.fedoraproject.org/results/daveisfera/odb_2.3_cern/epel-5-i386/00128584-odb/root.log.gz
> [2]: https://copr-be.cloud.fedoraproject.org/results/daveisfera/odb_2.3_cern/epel-5-i386/00128585-odb/root.log.gz
> 
> 

There is nothing special in Copr about this. Copr (or mock to be precise) just pass --releasever to dnf/yum.

Looking at dnf code - and I assume yum will have similar code... There is in dnf/conf/parser.py the regular expression:
  _KEYCRE = re.compile(r"\$(\w+)")
which eat everything until first non word character.
If you want smarter substitution, then please file RFE against DNF. Or even better send patch. :)

-- 
Miroslav Suchy, RHCA
Red Hat, Senior Software Engineer, #brno, #devexp, #fedora-buildsys


More information about the devel mailing list