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

Change the behavior of history when nothing is changed by group install #2096

Open
tsuchiclay opened this issue May 13, 2024 · 1 comment
Open

Comments

@tsuchiclay
Copy link

When nothing changes in the result by group install, I would suggest changing the behavior of the history so that nothing appears for that event.
But since it is about QoL, it should be a low priority.
The version of dnf used is as follows.

$ dnf --version
4.19.2
  Installed: dnf-0:4.19.2-1.fc40.noarch at Mon 13 May 2024 08:33:46 PM GMT
  Built    : Fedora Project at Fri 29 Mar 2024 05:54:01 PM GMT

  Installed: rpm-0:4.19.1.1-1.fc40.x86_64 at Mon 13 May 2024 08:33:36 PM GMT
  Built    : Fedora Project at Wed 07 Feb 2024 03:55:53 PM GMT

When some packages are installed by group install, the history will look like this.

$ sudo dnf group install dial-up -y

$ dnf history | head -n 3
ID     | Command line                                                                                                           | Date and time    | Action(s)      | Altered
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    11 | group install dial-up -y                                                                                               | 2024-05-13 20:44 | Install        |   14 EE

Then, when the same is done again, the history is updated as follows, even though no updates, new installations, or other things have happened.

$ sudo dnf group install dial-up -y

$ dnf history | head -n 4
ID     | Command line                                                                                                           | Date and time    | Action(s)      | Altered
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    12 | group install dial-up -y                                                                                               | 2024-05-13 20:46 | Install        |    1   
    11 | group install dial-up -y                                                                                               | 2024-05-13 20:44 | Install        |   14 EE

$ dnf history info 12
Transaction ID : 12
Begin time     : Mon 13 May 2024 08:46:30 PM UTC
Begin rpmdb    : cf353284b5519140edf9baa6f1a3e2ce57eb47796bc39c97fbf6aa58606a915c
End time       : Mon 13 May 2024 08:46:30 PM UTC (0 seconds)
End rpmdb      : cf353284b5519140edf9baa6f1a3e2ce57eb47796bc39c97fbf6aa58606a915c
User           :  <tsuchiclay>
Return-Code    : Success
Releasever     : 40
Command Line   : group install dial-up -y
Comment        : 
Packages Altered:
    Install @dial-up 

I would suggest, for example, that the behavior of the history with group install be changed to the same as install without group, as shown below.

$ sudo dnf install NetworkManager-adsl -y

$ dnf history | head -n 3
ID     | Command line                                                                                                           | Date and time    | Action(s)      | Altered
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    33 | install NetworkManager-adsl -y                                                                                         | 2024-05-13 21:03 | Install        |    1   

$ sudo dnf install NetworkManager-adsl -y # not showing up in the history

$ dnf history | head -n 3
ID     | Command line                                                                                                           | Date and time    | Action(s)      | Altered
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    33 | install NetworkManager-adsl -y                                                                                         | 2024-05-13 21:03 | Install        |    1    

However, the current history behavior described here may be reasonable in ways I have not thought of.
If so, I would appreciate a few hints on that point.

@pkratoch
Copy link
Contributor

Thanks for the report, the issue is valid.

To fix this, I think the behavior of group install would need to change, so that it produces an empty transaction if there is nothing to do. Interestingly, it is already so for group remove, so maybe it would be possible to implement it also for group install.

The behavior is the same for dnf5, so it should be fixed there as well - rpm-software-management/dnf5#1492

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