[Debian-science-sagemath] Fwd: sagemath_7.4-1_amd64.changes is NEW

Ximin Luo infinity0 at debian.org
Sun Dec 18 19:38:00 UTC 2016


Jerome BENOIT:
> 
> 
>> Nevertheless, if it is a just building issue/feature, have you consider to just MKDIR_P in in d/rules ?
> 
> mkdir -p $(CURDIR)/debian/tmp/DEBIAN/cache/sympow
> 

I could, but I just thought it was a bit unclean and adds complexity that is unnecessary. It also means the directory is different for the tests, than when running sympow from an installed Sage. That is why I preferred to patch Sage, to make things more consistent (less complex) for the user.

I don't see a normal situation where a user, after having set SYMPOW_CACHEDIR, would want sympow to fail if this directory doesn't exist but can be auto-created by sympow. It *may* happen, but I think it's much more common to want the "auto-create" behaviour. (This is what Sage itself does, for DOT_SAGE.)

In general, more common behaviours should require less code to use. That is why I think:

Common: SYMPOW_CACHEDIR=abc sympow # autocreates the directory, fail if its parents don't exist
Uncommon: if [ -d abc ]; then fail; else SYMPOW_CACHEDIR=abc sympow # fail if it doesn't exist

is better than:

Common: test -d abc || mkdir abc && SYMPOW_CACHEDIR=abc sympow # autocreate
Uncommon: SYMPOW_CACHEDIR=abc sympow # fail if it doesn't exist

(And GNUPG does the second behaviour with GNUPGHOME, but GPG is also more security-critical than sympow or Sage).

Anyway, it doesn't matter too much. I am just voicing some "software engineering" opinions. Feel free to choose what you want in the end, I will patch Sage to work with this.

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



More information about the Debian-science-sagemath mailing list