#133 Module installation failed without setting default profile.
Closed: Invalid 4 years ago by asamalik. Opened 4 years ago by jaruga.

According to the document, we do not need to specify the profile when installing if the default is set.

https://docs.fedoraproject.org/en-US/modularity/using-modules/#_installing_modules
Not specifying a stream or a profile causes DNF to choose the default.
$ dnf module install NAME

But on f30,

$ rpm -q dnf
dnf-4.2.2-2.fc30.noarch
$ sudo dnf module install ruby:2.6
...
Last metadata expiration check: 0:29:19 ago on Fri 03 May 2019 03:11:26 PM CEST.
No default profiles for module ruby:2.6
Dependencies resolved.
Nothing to do.
Complete!

There is a message "No default profiles for module ruby:2.6". And the installation is skipped when the "default" profile is set at https://src.fedoraproject.org/modules/ruby/blob/2.6/f/ruby.yaml#_117 .

2 problems.
1. The message is not easy to understand the situation. For the output, the mixture of "No default profiles for module ruby:2.6", and repositories. "Nothing to do. Complete!" is wrong indication to a user. The installation should be started in this situation without setting a profile.
2. the installation started with a explicit "default" profile.

$ sudo dnf module install ruby:2.6/default
...
Dependencies resolved.
==============================================================================================
 Package        Arch       Version                                  Repository           Size
==============================================================================================
Upgrading:
 ruby           x86_64     2.6.2-119.module_f30+3838+0c262d71       updates-modular      41 k
 ruby-devel     x86_64     2.6.2-119.module_f30+3838+0c262d71       updates-modular     199 k
 ruby-libs      x86_64     2.6.2-119.module_f30+3838+0c262d71       updates-modular     2.8 M
Installing module profiles:
 ruby/default                                                                                

Transaction Summary
==============================================================================================
Upgrade  3 Packages

Total download size: 3.1 M
Is this ok [y/N]: 

I wish the module is installed without setting profile.


The default profile must be set in https://pagure.io/releng/fedora-module-defaults/ for Fedora. It does not mean "the profile named default". (To add to confusion, it did mean that early in development, but that turned out to be bad for the packager and the distribution, so we dropped it.)

Also, we no longer recommend naming any profile default, since it causes this confusion. Choose a name that makes sense for the project (in this case, interpreter is probably the right choice).

Metadata Update from @sgallagh:
- Issue close_status updated to: Invalid
- Issue status updated to: Closed (was: Open)

4 years ago

@sgallagh Thanks for info. I did not know the situation and info.
Is it documented for example in https://docs.fedoraproject.org/en-US/modularity/making-modules/ or somewhere?
I like it is documented in this document to prevent people like me to be confused.

I also say below messages are not so helpful and actionable for users.

No default profiles for module ruby:2.6
Nothing to do.
Complete!"

How about changing to this kind of message?

Error: No default profiles for module ruby:2.6. Please ask the maintainer to set the default profile in https://pagure.io/releng/fedora-module-defaults/ for Fedora, if you need.

I think I keep open until we decide if we do actions to improve the document and error message.

Metadata Update from @jaruga:
- Issue status updated to: Open (was: Closed)

4 years ago

@asamalik ,

I think we need below documentation to set a default profile in in https://docs.fedoraproject.org/en-US/modularity/making-modules/

An author of the module can set the default profile in https://pagure.io/releng/fedora-module-defaults/ for Fedora.

Because below outputted message is not actionable for the author or users.

$ sudo dnf module install ruby:2.6
...
No default profiles for module ruby:2.6
...

I also want to know how to install every binary RPMs in a module without profile.

Since this is quite old and many things have changed, I'm just closing it. If this issue still exist, please report it to DNF.

Metadata Update from @asamalik:
- Issue close_status updated to: Invalid
- Issue status updated to: Closed (was: Open)

4 years ago

Thanks for the reminding.

The message is not easy to understand the situation. For the output, the mixture of "No default profiles for module ruby:2.6", and repositories. "Nothing to do. Complete!" is wrong indication to a user. The installation should be started in this situation without setting a profile.

This issue was solved by the ticket: https://bugzilla.redhat.com/show_bug.cgi?id=1755028 .
Now the module installation is failed with the error exit status when the profile does not exist, instead of "Nothing to do. Complete!".

And I think that's okay.

Login to comment on this ticket.

Metadata