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

install script restore appears not to work #21

Open
antoine-gallix opened this issue Nov 24, 2021 · 3 comments
Open

install script restore appears not to work #21

antoine-gallix opened this issue Nov 24, 2021 · 3 comments

Comments

@antoine-gallix
Copy link

antoine-gallix commented Nov 24, 2021

using the restore option of the install script, files installed by it previously are still there after the operation. I also don't seem to be able to remove them neither by reinstalling the package that own the keyboard config in my system. I mean, I like those changes up to now, but I was trying a complete reinstall of xkb and the trick bag as part of a debug investigation. I have to say though, that those scripts looks like a lot of work, in the good sense.

@DreymaR
Copy link
Owner

DreymaR commented Nov 30, 2021

The restore # option of the install-dreymar-xmod.sh script can get back a previous set of files from a backup that was generated earlier (unless you installed with the -n option to force no backup). It does not remove the backups.

What do you mean that the files are still there? Are you sure that you gave the -r option a numerical argument like -r 1?

Reinstalling xkb will not delete any files not used by xkb. My backup isn't generated by xkb so it won't be removed. If you want to lose the backup, delete it manually (probably needs sudo privileges).

If you mean that the actual xkb-data files changed by the BigBag script aren't restored, then I'm not sure why. If reinstalling xkb doesn't overwrite those you probably have a file privilege problem, trying to do something as non-root after doing something else as root. I don't think you should need to run my script as root, as it should sort that bit out itself.

@antoine-gallix
Copy link
Author

I think I haven't been precise enough in my original post. In a more systematic form, what I see as an issue is the following.

state 0: I have my original xkb data files

state 1: after installing the bag of trick with the script, I can see a backup, and new files in the xkb-data directory. new options are available in the menu.

I was expecting that running the script with the restore option would put me back in state 0. Apparently it does not, because I can still see the newly installed files after the restore, in the xkb data dir.

I was also expecting that reinstalling the xkb system package would also perform the same task of reseting the xkb data dir, but eventhough the installation is successful, the files installed by the bag of trick script are still there.

I'm not well versed enough in bash incantations to fully understand the script code but it definitely seems more complicated than replacing the xkb dir by it's last backup dir. I seems to do something file by file.

I solve the problem by deleting the xkb data dir and copying the backup in its place. But the operation is a bit frightening and I would have expected the install script to deinstall itself cleanly. In amy case, there is a problem or with my expectation of the effect of restore, or with the restore script.

@DreymaR
Copy link
Owner

DreymaR commented Dec 6, 2021

It seems we have different goals then.

What I do is overwrite some files in the xkb dir. I keep a backup of the files I overwrite, and with the restore option I can reinstate the original files.

Neither I nor the xkb install is concerned with whatever else may be in that dir, as people may have their own files (like my symbols/extend file). I would not want to overwrite anything except the files I have changed, when restoring.

So basically, if you want to delete the backup dir then do so manually. The xkb install will only write what it needs, and so will my install. None of us want to replace the whole directory because that might ruin someone else's files.

Meanwhile, I don't see how the backup dir(s) my script made could possibly be a problem. It's a very small directory, it does no harm that I can see.

What you're asking me is to create a purge option to remove everything. Sure, that's possible but I don't have the time for it now.

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