Code Monkey home page Code Monkey logo

Comments (18)

CyberShadow avatar CyberShadow commented on June 6, 2024 1

Yes, if you opt in to that with the --skip-inspection switch.

from aconfmgr.

CyberShadow avatar CyberShadow commented on June 6, 2024 1

You can delete it if you don't want to use --skip-inspection. Deleting it will not make aconfmgr run faster without the switch (and it will fail with the switch).

from aconfmgr.

CyberShadow avatar CyberShadow commented on June 6, 2024

Deleting the directory automatically would interfere with the --skip-inspection switch.

Follow-up runs (with better ignore rules) should shrink the directory size, because the relevant subdirectories will be deleted and recreated.

Isn't /tmp a tmpfs on Arch?

from aconfmgr.

ijustlovemath avatar ijustlovemath commented on June 6, 2024

It is. All files are deleted from /tmp on reboot.

from aconfmgr.

thenaterhood avatar thenaterhood commented on June 6, 2024

Yes it is. Maybe a config option somewhere to remove it on exit would be good too.

from aconfmgr.

etcusrvar avatar etcusrvar commented on June 6, 2024

/tmp may default to being tmpfs in some cases, but there's nothing that says it has to be. I have /tmp mounted as a separate file system, just like /, /var, etc.

from aconfmgr.

ijustlovemath avatar ijustlovemath commented on June 6, 2024

Where its physically located on disk or in LVM does not matter. If you
place a file in /tmp and restart, it will be gone. That's decided not at
the user level but at the distro level. I encourage you to try it out.

On Sunday, September 18, 2016, mezzoatic [email protected] wrote:

/tmp may default to being tmpfs in some cases, but there's nothing that
says it has to be. I have /tmp mounted as a separate file system, just like
/, /var, etc.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#3 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AL3tMI6BERZppinb3SOYLbvx8Ppvw7Exks5qrT0_gaJpZM4J_tnj
.

from aconfmgr.

etcusrvar avatar etcusrvar commented on June 6, 2024

@ijustlovemath That's not true. I use Arch, reboot periodically, and /tmp is not cleared on reboot. This is off-topic, and my setup may be different others', but I was just trying to point out that the assumption that /tmp has to be mounted as tmpfs is incorrect.

from aconfmgr.

thenaterhood avatar thenaterhood commented on June 6, 2024

/tmp should be cleared on a reboot unless you've got something set up so it
isn't.

I guess my reason for this could use a little more clarification. What
happened to me on first run was that my /tmp got filled. I had to add a
bunch of ignores before I could do a save, and needed to remove the folder
from /tmp to get things working. Adding a flag to not keep /tmp after
exiting would have saved me a command the first couple times I ran it.

Not a huge deal either way, just something I felt might be a good addition.

On Sun, Sep 18, 2016, 11:06 etcusrvar [email protected] wrote:

@ijustlovemath https://github.com/ijustlovemath That's not true. I use
Arch, reboot periodically, and /tmp is not cleared on reboot. This is
off-topic, and my setup may be different others', but I was just trying to
point out that the assumption that /tmp has to be mounted as tmpfs is
incorrect.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#3 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACdwxPmZBirpbvydUm6sEY9xAG4ROJeWks5qrVNzgaJpZM4J_tnj
.

from aconfmgr.

etcusrvar avatar etcusrvar commented on June 6, 2024

"should be cleared on a reboot unless you've got something set up so it isn't" There's nothing that says /tmp should be cleared on reboot, and yes, it can be set up so it isn't.
I'm not trying to drag this off topic-- I'm indifferent to the topic of keeping or removing /tmp/aconfmgt- . Again, I'm simply trying to point out incorrect assumptions.

from aconfmgr.

ijustlovemath avatar ijustlovemath commented on June 6, 2024

It's the systemd default behavior. Certainly not "should", but "expected".

On Sunday, September 18, 2016, etcusrvar [email protected] wrote:

"should be cleared on a reboot unless you've got something set up so it
isn't" There's nothing that says /tmp should be cleared on reboot, and
yes, it can be set up so it isn't.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#3 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AL3tMNBOmHHaXhvYz7zoAoHZKO4iupafks5qrVfSgaJpZM4J_tnj
.

from aconfmgr.

CyberShadow avatar CyberShadow commented on June 6, 2024

I could add an exit hook that would allow the configuration to clean up the temporary directory on exit.

However, such a solution would not be discoverable, and relies on the user being aware of the problem and the solution only after the problem presents itself. Perhaps it would be better to address the underlying problem directly. To do that, first we should determine what it is.

  • /tmp becoming full and preventing successive commands from working? Then perhaps aconfmgr should warn on exit if free disk space in /tmp is low, or even delete its temporary directory to free up space immediately.
  • The used space under /tmp being an unexpected drain on the system disk space? Then perhaps aconfmgr should warn if /tmp is not a tmpfs, and its temporary directory size exceeds a certain threshold.
  • Something else?

from aconfmgr.

etcusrvar avatar etcusrvar commented on June 6, 2024

My personal preference would be to simply document what files/directories are created in /tmp. You may add a config option to use a different base directory from /tmp, but I don't think even this is needed. When I've run into this situation before with other tools (several AUR helpers come to mind), the tool would simply crash when /tmp was full, and I would manually clean up /tmp, put a symlink in /tmp for the offending file/dir to a location with more space, then run the tool again. If aconfmgr filled up my /tmp, I would do the same thing.

from aconfmgr.

CyberShadow avatar CyberShadow commented on June 6, 2024

My personal preference would be to simply document what files/directories are created in /tmp.

I added a mention to the FILES section of the man page in 68ea74e.

You may add a config option to use a different base directory from /tmp, but I don't think even this is needed.

The temporary directory location can be set by setting the TMPDIR environment variable, e.g. TMPDIR=~/.tmp aconfmgr ....

from aconfmgr.

CyberShadow avatar CyberShadow commented on June 6, 2024

Then perhaps aconfmgr should warn on exit if free disk space in /tmp is low

Implemented in c95a65b.

If there are no further suggestions, I'll consider this issue resolved.

from aconfmgr.

mxmilkiib avatar mxmilkiib commented on June 6, 2024

So, as it stands, after my sudo TMPDIR=/var/aconfmgr/tmp aconfmgr save -c /var/aconfmgr I'm left with (from ncdu ran in /var/aconfmgr);

  174.5 MiB [##########] /tmp
  137.4 MiB [#######   ] /files
...

To be sure, is my understanding that the /tmp directory is only required for a shorter runtime of aconfmgr correct?

from aconfmgr.

mxmilkiib avatar mxmilkiib commented on June 6, 2024

Or just by deleting the tmp dir?

from aconfmgr.

CyberShadow avatar CyberShadow commented on June 6, 2024

BTW, a configuration size in the order of hundreds of MBs sounds atypical. If some of those files shouldn't be in the configuration, you can ignore them (using IgnorePath). If they are modified versions of packaged files, you can use GetPackageOriginalFile and related helpers to patch them from your configuration. If they are binaries of built and installed programs, you could package them into a pacman package.

from aconfmgr.

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.