Giter VIP home page Giter VIP logo

Comments (5)

Gobidev avatar Gobidev commented on June 5, 2024

What distro did you base your bedrock installation on and what package manager are you using?

from pfetch-rs.

Alxhr0 avatar Alxhr0 commented on June 5, 2024

openSUSE Tumbleweed and original pfetch used Bedrock's package manager(pmm) to check how many packages are installed

from pfetch-rs.

Gobidev avatar Gobidev commented on June 5, 2024

Thank you for reporting this. I couldn't find the usage of either pmm or zypper in the original pfetch source code (these are all package managers checked) so it is strange that it counted them for you there. The solution seems to be to implement a zypper package count (ideally in libmacchina).

from pfetch-rs.

Gobidev avatar Gobidev commented on June 5, 2024

I just looked more into this and this issue lead me down a rabbit hole.

libmacchina already supports RPM package count, which is the backend used by zypper by interacting with its sqlite database directly. However, it turns out that RPM also supports different database formats (bdb and ndb), where ndb is used by OpenSUSE. It will probably be really hard to create an implementation that directly accesses this ndb file, as this is a RPM native database implementation with no libraries I could find supporting it (for more detail see Macchina-CLI/libmacchina#154).

So to get a package count on OpenSUSE, the options are to either change the RPM backend from ndb to sqlite (has to be done by the user), work on an implementation that gets the info from the bdb file directly (really hard) or just invoke an rpm process like the original pfetch did it (really slow).

I will probably implement the last one for now to have a package count on OpenSUSE (although being really slow) that can be disabled with the PF_FAST_PKG_COUNT option similar to nix.

from pfetch-rs.

Gobidev avatar Gobidev commented on June 5, 2024

With version 2.6.1, openSUSE package count has gotten significantly faster, as long as the rpm-devel package is installed.

from pfetch-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.