Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Best way to downgrade a package back to stock root #34

Open
sonofevil opened this issue Aug 22, 2023 · 3 comments
Open

[Question] Best way to downgrade a package back to stock root #34

sonofevil opened this issue Aug 22, 2023 · 3 comments

Comments

@sonofevil
Copy link

sonofevil commented Aug 22, 2023

Sometimes you may find yourself testing a newer version of a package already included in the read only root, but then wish to return to the default.

If you pacman -R the package, it will be gone from the overlay but also from the package database. This means while the files are still present in root, pacman no longer knows they are installed.

How to best remedy this? The only obvious way I see is to use --dbonly to register the installed stock package in the db. But then I need to make sure that the repos match the stock packages, i.e. edit pacman.conf to match the update channel I'm on.

Actually, does the overlay remember that the files were removed? Then I also need to somehow tell it to restore the files from the lower dir. I have no idea how to do that.

The stock pacman.conf doesn't seem to match the update channel. According to SteamOS settings I'm on "testing" but the repos are configured to be -rel (I deleted pacman.conf from the /etc overlay upper dir to get the stock file). I'm actually not sure which is which. The repo server has -rel, -main, -testing, -debug and -staging, but the update channels are called stable, beta and preview. So I'm kinda stuck.

@sonofevil
Copy link
Author

Actually, does the overlay remember that the files were removed? Then I also need to somehow tell it to restore the files from the lower dir. I have no idea how to do that.

I guess I have two options here: Either after removing a package I search & remove whiteout files in upper dir (but I might delete ones that weren't part of the package), or I install a matching package and use something like overlayfs-tools-git vacuum to remove files from upper dir that are identical to lower. Might not work because of mismatched timestamps.

I should clarify that I want to keep upper dir as small as possible.

@ValShaped
Copy link
Owner

Yeah, unfortunately I don't have much to comment on here. I don't think timestamps of files in packages are updated when a package updates, but installing arbitrary packages in the overlay can have catastrophic consequences if the files do stick around (see #20.)

If you're comfortable nuking your install, you can always unmount the overlays and swap out the disk image. You can also backup and restore the image with rwfus --backup <image> and rwfus --restore <image>.

@ValShaped ValShaped reopened this Sep 17, 2023
@sonofevil
Copy link
Author

sonofevil commented Oct 6, 2023

Bit of a tangent, but is there any way to figure out what exact Arch snapshot a given version of SteamOS is based on that is easier than comparing package version numbers? I removed rwfus and did a system upgrade and have 3.5 now, which seems to be based on mid-June 2023, but I'm not sure about the exact day. When I reinstall rwfus and add other repos I wanna make sure they match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants