GithubHelp home page GithubHelp logo

Comments (7)

dralley avatar dralley commented on May 25, 2024

Separately: this (calculating the header byte range) kind of feels like functionality that librpm ought to provide rather than be implemented in createrepo_c. createrepo_c shouldn't be in the business of parsing RPM files and making assumptions about their structure?

from createrepo_c.

j-mracek avatar j-mracek commented on May 25, 2024

I think it sound reasonable to remove part of the code in createrepo_c and replace it by calling function from rpm-libs.

In the first place we have to investigate whether both functions returns compatible outputs.

In the second part we have to ask RPM team whether they would expose headerSizeof() as API. May I ask you @pmatilai for an opinion?

from createrepo_c.

dralley avatar dralley commented on May 25, 2024

I think it's already exposed? It's listed in the documentation.

from createrepo_c.

dralley avatar dralley commented on May 25, 2024

@pmatilai see discussion

from createrepo_c.

dralley avatar dralley commented on May 25, 2024

Maybe the reason is that there isn't a version of rpmReadPackageFile() / rpmReadHeader() that works with the signature header? If you can't calculate the size / padding, you can't finish the calculation. But you could probably still simplify it.

from createrepo_c.

dralley avatar dralley commented on May 25, 2024

I did eventually figure out the magic constants, I'll make a PR eventually to clean the code up a bit.

from createrepo_c.

dralley avatar dralley commented on May 25, 2024

The fact that there's no way to get back a pair of signature and normal headers, and that the API merges the headers together, makes this impossible.

from createrepo_c.

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.