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

Run _write_started_file() only from sage-starts #13988

Closed
jdemeyer opened this issue Jan 22, 2013 · 12 comments
Closed

Run _write_started_file() only from sage-starts #13988

jdemeyer opened this issue Jan 22, 2013 · 12 comments

Comments

@jdemeyer
Copy link

#12205 sort of broke sage-starts. Since it runs Sage code at install time, the sage-started.txt file is written when it shouldn't be.

Solution: create sage-started.txt only from sage-starts.

While we're at it, move that file to $SAGE_LOCAL/etc/sage-started.txt.

Apply:

  1. attachment: 13988_starts_root.patch to $SAGE_ROOT.
  2. attachment: 13988_starts_scripts.patch to $SAGE_LOCAL/bin
  3. attachment: 13988_write_started_file.patch to $SAGE_ROOT/devel/sage

Component: build

Author: Jeroen Demeyer

Reviewer: Volker Braun

Merged: sage-5.7.beta2

Issue created by migration from https://trac.sagemath.org/ticket/13988

@jdemeyer
Copy link
Author

Attachment: 13988_starts_root.patch.gz

@jdemeyer
Copy link
Author

Attachment: 13988_starts_scripts.patch.gz

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

comment:1

Attachment: 13988_write_started_file.patch.gz

@vbraun
Copy link
Member

vbraun commented Jan 29, 2013

comment:2

/etc/ is for configuration files that should be backed up, definitely not time stamps.

I think our long-term goal should be to introduce a /var/cache/sage/<sage-version>/ directory that will contain cached data like the gap workspace and time stamps for the sage install.

But as this ticket shows, its painful to do until we have a unified repository. So I don't mind merging this as a bandaid until we have a better solution in place.

@vbraun
Copy link
Member

vbraun commented Jan 29, 2013

Reviewer: Volker Braun

@jdemeyer
Copy link
Author

comment:3

Replying to @vbraun:

/etc/ is for configuration files that should be backed up, definitely not time stamps.

I think there is little difference between "configuration files" and "time stamps". Ideally, all the files

sage-current-location.txt
sage-flags.txt
sage-started.txt

should be moved to one place and I do think that $SAGE_LOCAL/etc is the best place.

@vbraun
Copy link
Member

vbraun commented Jan 29, 2013

comment:4

There is. The sage-started.txt file is just a cache for a lengthy operation (namely, checking if Sage starts). It is not a configuration file that you want to back up and carry with your if you reimage the system, say. Configuration files must not change if you do not want to change the configuration of Sage.

@jdemeyer
Copy link
Author

comment:5

Fair enough, but the other files I mentioned (sage-current-location.txt and sage-flags.txt) are "configuration files" under this definition, right? And putting these 3 together made sense to me.

@vbraun
Copy link
Member

vbraun commented Jan 29, 2013

comment:6

Well sage-current-location.txt isn't really anything that you can configure, its part of the mechanism to figure out when the install has been relocated. If the caching system would encode SAGE_ROOT in the cache dir, say, then we wouldn't need it at all. There are other ways that the caching system could work, but you don't need an independent way to figure out if you have been relocated. Of course the FHS does't make provisions about relocating binaries ;-)

sage-flags.txt is definitely a configuration file, I'd say.

@vbraun
Copy link
Member

vbraun commented Jan 29, 2013

comment:7

And, of course, /etc is still way better than /lib ;-)

@jdemeyer
Copy link
Author

Merged: sage-5.7.beta2

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

No branches or pull requests

2 participants