Description of problem: I want to install packages as optional dependencies of already installed software to make sure that these dependencies do not stay when the installed software is done. First this was needed for Enki. https://ask.fedoraproject.org/en/question/124469/dnf-mark-package-as-dependency/ Then for Phoronix Test Suite. https://github.com/phoronix-test-suite/phoronix-test-suite/issues/284 Version-Release number of selected component (if applicable): 7.8.0-2.fc29
s/done/gone/
I would recommend to build your own package that will serve only to delivery your functionality. See fedora wiki how to do it. It should requires "already installed" and also requires (hard) packages that you want to connect to installed package. Instead of requires you can use a weak deps that makes it optional. I think that your request is better to handle by this way. Anyway thanks for your report.