Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement request – Repositories #97

Closed
Ricky-Tigg opened this issue Mar 31, 2018 · 10 comments
Closed

Enhancement request – Repositories #97

Ricky-Tigg opened this issue Mar 31, 2018 · 10 comments

Comments

@Ricky-Tigg
Copy link

Hi Manatools. For a given enabled repository on system, let's assume here the one named updates-testing, maintained by Fedora. In terminal, assuming the command and its subsequent output as model (Note: Red Hat Bugzilla – Bug 1562191):

# dnf -v repolist --enabled updates-testing | less
...
Repo-pkgs : ...
Repo-size : ...
..

The knowledge of this output would have been appropriate as a prerequisite to estimate the possibility of the addition (# dnf install -y <component> --enablerepo=updates-testing) of such repository or any others, assuming that all subsequent packages they contain would have to be installed on the system. since their respective values related to digital storage may be huge.

As expected it would be valuable for advanced users and especially for beginners that indeed may rely for the package management mainly if not entirely on the GUI tool available in OS' main repository (be it Yumex-DNF or Dnfdragora by whom it was replaced since version 27 of Fedora Desktop) to get that valuable information straight along with the existing one currently located at File -> Repositories, then field section dedicated to repository information. Such enhancement would benefit to Fedora.

@anaselli
Copy link
Collaborator

anaselli commented Apr 8, 2018

@Conan-Kudo dnfdaemon GetRepo(repo_id) does not export such information. Looking at dnf.cli.command.repolist code:
Repo-size
Repo-pkgs
Are both evaluated by another query, so which is the right way, porting those query in dnfdaemon and provide new info, or add them to repo managemet dialog?
@Ricky-Tigg any more relevant information?

@Ricky-Tigg
Copy link
Author

A decision that would be taken by developers. My own experience tend to indicate that those values would be needed before take place decision to enable any repository,

@anaselli
Copy link
Collaborator

anaselli commented Apr 8, 2018

maybe... i usually enable a repo just because i need something from it, despite of it size for instance... and so more than how many packages the relevant part in my opinion is which ones...

@Ricky-Tigg
Copy link
Author

It seems to me that your decision will be the right one according to your own experience. which may conduct you to consider #97 as a partly or entirely irrelevant request.

@anaselli
Copy link
Collaborator

anaselli commented Apr 9, 2018

not really. That is why I asked you if they were the only ones, or you needed other information also... I'm already working on it, in dnfdaemon without good results though...

@Ricky-Tigg
Copy link
Author

My mistake! I have to keep on trying (refers to foreign language ). Those ones as well may have a useful purpose and are not yet present in the dnfdragora's existing list:

  • Repo-baseurl :
  • Repo-expire :
  • Repo-filename:

@anaselli
Copy link
Collaborator

In your report you quoted dnf -v repolist --enabled Repo-id that magically enables a repo and then prints out the repositories (those enabled plus the one enabled temporary) information.
Now from UI perspective that means checking the enable flag. Does it sound reasonable to get those info after checking a disabled repository? because it isn't that easy to temporary enable a repo to get them and then to disable it again...
In any cases without pressing the Apply button nothing changes...

@Ricky-Tigg
Copy link
Author

From a TUI perspective, checking a repository in disabled state appears clearly to be not adequate for the purpose of the task. As an additional information, the use of another command relying on 'wc' may as well serve as model for the implementation you may plan; it allows for retrieving the number of packages related to a specific repository as a single value, however it does not handle the storage size.

Output resulting from command
$ dnf repoquery --repo=updates-testing | wc -l
is therefore the value resulting from command
$ dnf -v repolist --enabled updates-testing | less
mentioned under the class 'Repo-pkgs : .'

The following command returns the sum of each enabled repository's number of packages (Overall number of packages) resulting from:
$ dnf repoquery | wc -l

For each enabled repository, a valuable information is the value expressed in percentage (optimally with a two digits accuracy) resulting from expression:
(enabled repository's number of packages / Overall number of packages) = _.00 %,
which refers to commands (with 'updates-testing' as model)
(dnf repoquery --repo=updates-testing | wc -l / 'dnf repoquery | wc -l') = _.00 %.

@anaselli
Copy link
Collaborator

Using new dnfdaemon the requested information is now shown into repository info view, that is changed in table in which key are localized (if knwon) and values are in human readable form for some keys (e.g. size for instnace)

@Ricky-Tigg
Copy link
Author

OS: Fedora – Installed omponents:
$ dnf list installed | egrep 'dnfdaemon|dnfdragora'
dnfdaemon.noarch 0.3.18-6.fc28 @fedora
dnfdaemon-selinux.noarch 0.3.18-6.fc28 @fedora
dnfdragora.noarch 1.0.1-10.git20180108.b0e8a66.fc28
python3-dnfdaemon.noarch 0.3.18-6.fc28 @fedora

Announced features are not visible in the interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants