Giter VIP home page Giter VIP logo

Comments (4)

grtcdr avatar grtcdr commented on September 21, 2024 1

Thanks for the confirmation.

I'm not particularly motivated to work on an implementation for the ndb database, because (1) I'd probably write something that's even slower than spawning the corresponding process and (2) I don't use SUSE technologies. I'm not opposed to including a new dependency for this, though.

from macchina.

grtcdr avatar grtcdr commented on September 21, 2024

@Gobidev Could this be related to Macchina-CLI/libmacchina#154?

from macchina.

Gobidev avatar Gobidev commented on September 21, 2024

Yes, openSUSE uses the ndb database backend for RPM, which is why the file /var/lib/rpm/rpmdb.sqlite doesn't exist and the package count fails. It might be possible to work around this by switching the backend to sqlite manually:

To change the RPM database backend, you need to edit the /usr/lib/rpm/macros file and set the %_db_backend macro to the desired value (such as sqlite or ndb). You may also need to rebuild the RPM database using rpmdb --rebuilddb. However, note that changing the RPM database backend is not recommended unless you have a specific reason to do so. It may cause compatibility issues with other tools that rely on the RPM database format.

When trying this on openSUSE Tumbleweed, I got warning: invalid %_db_backend: sqlite when trying to rebuild the database, so it looks like their build of RPM comes without sqlite support.

Like I said in Macchina-CLI/libmacchina#154, the ideal solution would be to somehow get a package count out of the ndb database, but this is a lot of work. Spawning an rpm process is not really an option for libmacchina, as it takes ~500ms to execute on a modern system.

from macchina.

Gobidev avatar Gobidev commented on September 21, 2024

This was fixed in Macchina-CLI/libmacchina#159, although the rpm-devel package will need to be installed for the detection to work once it is available in macchina.

from macchina.

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.