Giter Club home page Giter Club logo

Comments (5)

jlebon avatar jlebon commented on July 17, 2024 1

There is one concern during rebase if we were to add releasever/ basearch suffix to the cache directory. Currently, we are still fetching os-release information from etc/os-release. However, during rebase, the os-release file will not get modified until a reboot happens. The cached information will therefore still not get updated during a rebease.( What will be a reasonable solution to this?).

If you look at https://github.com/projectatomic/rpm-ostree/blob/0ff4403253b8fd6af8a4d468aaff7ad11f300f23/src/daemon/rpmostree-sysroot-upgrader.c#L800, we tell libdnf to use the tmpdir where we checked out the new commit to find the releasever information. In #215, libdnf learned to look in usr/etc/os-release. Though that's not used now in the rpm-ostree path since #278, which makes libdnf actually look in the rpmdb of the new commit as well. If you don't see the releasever from the new commit being used, then I suspect something in that flow is failing.

from libdnf.

cgwalters avatar cgwalters commented on July 17, 2024

So dnf does this: https://github.com/rpm-software-management/dnf/blob/00c8fe31cf82c393f8d903c3a191ac399a8b6c19/dnf/repo.py#L405

Using a short hash seems a bit weird; do we ever expect any substitutions beyond basearch and releasever?

from libdnf.

cgwalters avatar cgwalters commented on July 17, 2024

Also, maybe we should have clean operations here; specifically for rebases, if we do separate by releasever/basearch, we want to clean up the old repo.

from libdnf.

peterbaouoft avatar peterbaouoft commented on July 17, 2024

There is one concern during rebase if we were to add releasever/ basearch suffix to the cache directory. Currently, we are still fetching os-release information from etc/os-release. However, during rebase, the os-release file will not get modified until a reboot happens. The cached information will therefore still not get updated during a rebease.( What will be a reasonable solution to this?). But I am thinking may be it is a wanted behavior, because the system is still in the old version when no reboot happens, and it makes sense that before system version change, the cache should remain same?

However, there is another interesting pattern that I noticed. It seems like the cache directory still remains after a rebase(after reboot) occurs, and whenever a user tries to install a package, the operations will fail due to the presence of the old cache. This problem, however, can be solved by checking the releasever because the suffix of the cache directories will be different.(as os-release gets changed)

In that case , would it be better if we just expires the metadata during a rebase, and we do a similar step again when a roll back takes place?

from libdnf.

peterbaouoft avatar peterbaouoft commented on July 17, 2024

ah, I thought it wrong in the first place,... now things start to make sense :p, will look further into the issue after this. thanks @jlebon! :D

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.