-
Notifications
You must be signed in to change notification settings - Fork 13
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
Unable to save read information in informant.dat #2
Comments
Currently informant defaults to persisting information in It should probably be switched to save in If you don't want to run with I'll get around to changing the program so that it doesn't default to requiring superuser. |
I remember the design choice for using I originally designed it this way because of having it run as a pacman hook. When pacman is running the hook it needs to access the information on what news items have been read, I felt that this wasn't an issue for this program because one would need superuser access to the system to run pacman updates anyway. That said a useability improvement could be making a group for |
Would you be open to a PR which creates such a group upon installing the package, and prompts the user to add themselves to it? Or, how about just making |
@codeclem I would be interested in such a PR. The installation stuff is currently done in the PKGBUILD so you'd have to fork the git tree in the AUR for that. I'd prefer adding an That said, with the activity on here today it looks like I have some work to do tonight. If you have time to do a PR before about 5pm EST then go for it, if not I'll include it in what I'm doing tonight. |
As of the latest AUR version |
I have installed
|
@markusressel: Did you re-login with your user after adding it to the |
The output of For clarification: I tested this on a manjaro installation. I plan to switch all of my devices to a plain arch installation and already have it on others, but this is the device I have at hand right now and it is not a plain arch. |
Yes, even if there are some hacky ways to avoid this it's the simplest solution to just completely log off the user once. Changes of a user's groups only take effect when logging in (you can check by running |
Thank you, after a relog it works. |
I fixed this issue by modifying |
The reason I recommend the When the pacman runs the hook the script (unless I'm mistaken) will be executing as root (or at least as euid 0). It didn't seem appropriate to me for a system utility to have it's save data in a user directory. Other than modifying the script after it's installed to hard code the user folder I didn't see a clean way to determine the user's home directory (as the hook would evaluate It's a bit weird trying to figure out the default behavior of something like this, as it can run as a system utility (pacman hook) or standalone by a user. Should multi-user systems be considered? Are all users that would use If anyone has better recommendations for default behaviors, or finds I'm incorrect about something I'm open to changing it. |
Personally I am fine with the |
#17 probably fixes this issue. I tested it with and without UPDATE: |
@bradford-smith94 You can close my PR if you don't like the way I fixed it. I don't mind. |
@b00f I'm not completely against your solution in #17, I'm sorry if any of my comments (or the time it takes me to get around to responding) may have given you that impression. In some ways I think the solution you submitted is better than what we currently have, for example if anyone is running a multi-user Arch system in which there are multiple people with permissions to update packages this would allow them to each save a separate copy of what news items have been read by default (without needing to use the file option). There is one case which I think the current code handles better, if a user switches to root to update packages. I believe the solution in #17 would look for I'm guessing that a single-user/single-admin system where the user may switch to root occasionally is a more common use case for Arch than a multi-user/multi-admin system, so I would lean more toward the current solution than #17 I'm not completely sure what the default behavior should be. I think |
None of the solutions can cover all the possibilities. But I can say most of the users are single-user/single-admin and they use "When in doubt, use brute force" |
On running
informant read 0
on first use it returns the following error:ERROR: Unable to save read information, please re-run with correct permissions to access "/var/cache/informant.dat".
The text was updated successfully, but these errors were encountered: