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

Pacman db and cache invalid after update #3

Open
ValShaped opened this issue Jul 22, 2022 · 4 comments
Open

Pacman db and cache invalid after update #3

ValShaped opened this issue Jul 22, 2022 · 4 comments
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@ValShaped
Copy link
Owner

ValShaped commented Jul 22, 2022

When updating the Deck, Valve swaps out the entire filesystem and pacman dbs for new ones. This very much makes pacman freak out.

TODO: What?
TODO: Why?
TODO: What can we do about it?

@ValShaped ValShaped added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels Jul 22, 2022
@ValShaped ValShaped changed the title Pacman dbs and cache invalidated on update Pacman db and cache invalid after update Jul 27, 2022
@ValShaped ValShaped added this to the v1.0.0 milestone Jul 27, 2022
@ValShaped
Copy link
Owner Author

ValShaped commented Aug 10, 2022

It seems like, after an update, we'll have to run a script to delete pacman DBs in the upper dir before it gets mounted.
TODO: How to detect an update's occurred?

@NightHammer1000
Copy link

I had this Issue pack when I played around with pacman.

I resorted to just deleting the oldest Version Entry of every duplicate in the Pacman DB.
Seemed to work fine for me.

@Krules02
Copy link

Krules02 commented Nov 7, 2022

I think I've thought of a way to detect updates? Whenever steam updates, the date created of the packages should change to the day they updated. So we should be able to use that to make a startup script. Here's an example of what I mean:

#!/bin/bash

cd /var/lib/pacman/local/

pacmandb="/home/deck/rwfus/pacmandb.txt"
pacmandbcheck="/home/deck/rwfus/pacmandbcheck.txt"

ls -lt > "$pacmandbcheck"

if ! diff "$pacmandb" "$pacmandbcheck"; then
    ls -lt > "$pacmandb"
    #Script to delete pacman db duplicates here
fi

If run before the overlay is mounted, then ls would only output changes in the read only filesystem right? I'm not super experienced in scripting/programming so sorry if my example is not the best.

@ValShaped
Copy link
Owner Author

One optimization you could make is to hash the files with (for example) sha256sum. If the hash is different, the file's definitely been modified. If it's the same, it probably hasn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants