Hello,
How can I make a dnf install "list of pkgs in a file"?
I tried dnf install `file`
but it does not work.
Thank
=========================================================================== Patrick DUPRÉ | | email: pdupre@gmx.com Laboratoire interdisciplinaire Carnot de Bourgogne 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE Tel: +33 (0)380395988 ===========================================================================
As long as you're sure you want to install all of those packages then:
# cat 'file' | xargs dnf -y install
should do it. You have to do the -y because dnf will just exit if you don't. You can't run an interactive prompt...
Thanks, Richard
On Thu, 21 Feb 2019 15:36:08 +0100 "Patrick Dupre" pdupre@gmx.com wrote:
How can I make a dnf install "list of pkgs in a file"?
I tried dnf install `file`
but it does not work.
I usually use a python script to read the file and run dnf in a subprocess for each package. That way, a single problem doesn't stop the whole update.
I haven't tried these, so I don't know if they work, but you could try dnf update < $(cat file) or cat file | xargs dnf update
Because I haven't tried them, there may be syntax or grammar errors in the commands. The first should treat the file as a group, and will be faster if there are no dependency errors. The second should do each package individually, so will be slower but error tolerant.
dnf install `cat file`
On Thu, Feb 21, 2019 at 9:02 AM stan via users users@lists.fedoraproject.org wrote:
On Thu, 21 Feb 2019 15:36:08 +0100 "Patrick Dupre" pdupre@gmx.com wrote:
How can I make a dnf install "list of pkgs in a file"?
I tried dnf install `file`
but it does not work.
I usually use a python script to read the file and run dnf in a subprocess for each package. That way, a single problem doesn't stop the whole update.
I haven't tried these, so I don't know if they work, but you could try dnf update < $(cat file) or cat file | xargs dnf update
Because I haven't tried them, there may be syntax or grammar errors in the commands. The first should treat the file as a group, and will be faster if there are no dependency errors. The second should do each package individually, so will be slower but error tolerant.
users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org