Giter Club home page Giter Club logo

Comments (9)

cgwalters avatar cgwalters commented on August 16, 2024

We need to choose whether to copy rpmlog data into https://developer.gnome.org/glib/stable/glib-Error-Reporting.html or just have a wrapper API in HifContext for callers to set up a callback.

from libdnf.

cgwalters avatar cgwalters commented on August 16, 2024

See this code:

    rc = rpmtsRun(priv->ts, NULL, problems_filter);
    if (rc < 0) {
        ret = FALSE;
        g_set_error(error,
                    HIF_ERROR,
                    HIF_ERROR_INTERNAL_ERROR,
                    "Error running transaction: %s", rc, priv->error_log);
        goto out;
    }

from libdnf.

copumpkin avatar copumpkin commented on August 16, 2024

I'm also getting bitten by the rather opaque -1 error.

from libdnf.

hughsie avatar hughsie commented on August 16, 2024

I think using a GError is the only sane way to handle this.

from libdnf.

copumpkin avatar copumpkin commented on August 16, 2024

In response to my opaque -1 error (in rpm-ostree), I tried calling rpmlogSetCallback during hif_context_new (was just looking at something that would be called early on) to a callback that prints everything. I also had to catch an attempt by hif_rpmts_find_package to set the callback back to NULL.

End result was that my logging callback never got called, so I think I must be doing something wrong.

from libdnf.

cgwalters avatar cgwalters commented on August 16, 2024

Re: GError...the problem I see with that is that there can potentially be a lot of output, right? Or just multiple unrelated lines. I'd lean a bit towards just having a thin wrapper for rpmSetLogCallback and promising not to call it ourselves. But it's not a strong opinion. Perhaps we can do both even, use GError by default but allow callers to get the logs directly.

from libdnf.

copumpkin avatar copumpkin commented on August 16, 2024

I realized my issue was because I was missing rpmlogSetMask or rpmSetVerbosity. Now it's plenty chatty 😄

from libdnf.

j-mracek avatar j-mracek commented on August 16, 2024

Is the issue still valid?

from libdnf.

j-mracek avatar j-mracek commented on August 16, 2024

I am closing for an inactivity.

from libdnf.

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.