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

API to get information about available updates #1242

Open
abitrolly opened this issue Aug 11, 2020 · 9 comments
Open

API to get information about available updates #1242

abitrolly opened this issue Aug 11, 2020 · 9 comments
Labels
Priority: LOW RFE Request For Enhancement (as opposed to a bug)

Comments

@abitrolly
Copy link

abitrolly commented Aug 11, 2020

Need API to get immediate info about updates. Without waiting for caches to refresh.

(for example for osquery/osquery#5201)

@jan-kolarik jan-kolarik transferred this issue from rpm-software-management/libdnf Feb 12, 2024
@jan-kolarik
Copy link
Member

This seems to have no parent now, therefore closing this.

@abitrolly
Copy link
Author

@jan-kolarik by parent do you mean osquery/osquery#5201 ? I edited the description to clarify that it is not the parent. Please reopen.

@jan-kolarik jan-kolarik reopened this Mar 12, 2024
@abitrolly
Copy link
Author

@jan-kolarik thanks! ;)

@jan-kolarik
Copy link
Member

Sure, reopened. Do I understand correctly that this involves providing an API similar to what the check-upgrade command does? Essentially, it's a combination of several package queries. While there isn't currently a single helper method for this functionality, it could potentially be created.

@abitrolly
Copy link
Author

Yes, but check-upgrade has not enough info.

~ sudo dnf5 check-upgrade
[sudo] password for anatoli: 
Sorry, try again.
[sudo] password for anatoli: 
Sorry, try again.
[sudo] password for anatoli: 
Updating and loading repositories:
 Fedora 39 - x86_64 - Updates                                                                                                     100% |  17.1 KiB/s |  19.2 KiB |  00m01s
 Fedora 39 - x86_64 - Updates                                                                                                     100% | 756.1 KiB/s |   3.0 MiB |  00m04s
Repositories loaded.
libusb1.x86_64         1.0.27-1.fc39 updates
rpm-ostree-libs.x86_64 2024.3-3.fc39 updates

What is needed is.

  • name
  • old, new version
  • one line description
  • changes
  • if the update is critical
  • what packages are system installed (blue), what are user installed (yellow) and what are their automatic dependencies (white)

(taken from my notes while trying to build update viewer https://gitlab.com/abitrolly/dnf-go-gui)

@ppisar
Copy link
Contributor

ppisar commented Mar 12, 2024

So you want "dnf5 --cacheonly --assumeno upgrade" combined with "dnf5 check-upgrade" with additional details in a single API call. I don't think there will ever be something like that. It's to much specific use case. You can obtain list of packages to update and then query for the details of each package separately.

Check "dnf5daemon-client upgrade" command. It uses D-Bus API and the output is similar what dnf5 tool prints. So there is a high change than many of the details are already obtainable through API. Of course not a single call.

@ppisar ppisar added RFE Request For Enhancement (as opposed to a bug) Priority: LOW labels Mar 12, 2024
@abitrolly
Copy link
Author

@ppisar that's why I want ERD diagram for the database to query it directly,

#1243 (comment)

@j-mracek
Copy link
Contributor

@abitrolly May I ask you whether you need C++ or a Python code?

@abitrolly
Copy link
Author

@j-mracek it was Python, but then I switched to Go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: LOW RFE Request For Enhancement (as opposed to a bug)
Projects
Status: Backlog
Development

No branches or pull requests

4 participants