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

Jerome BENOIT calculus at rezozer.net
Sun Dec 18 15:18:43 UTC 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hello, thanks for the precision.

On 18/12/16 10:09, Ximin Luo wrote:
> Control: retitle -1 Document SYMPOW_CACHEDIR better and automatically try to create it
> 
> Jerome BENOIT:
>> Hello SymPow enthusiasts,
>>
>> On 17/12/16 15:46, Jerome BENOIT wrote:
>>>> It would be good if sympow could automatically create SYMPOW_CACHEDIR
>>>>> if it doesn't exist. Otherwise, I would have to add this logic to
>>>>> Sage, which seems a bit unclean.
>>> I not so sure that it is a good idea to create SYMPOW_CACHEDIR on the fly.
>>> Not that if SYMPOW_CACHEDIR does not exist, an appropraite message is printed.
>>
>>>>
>> I am on my way to add a mechanism to create SYMPOW_CACHEDIR on the fly
>> (that may avoid to add a dirty trick on Sage).
>>
> 
> Hey, thanks for this. To explain in some more detail: at the moment I have to patch Sage like this:
> 
> sage/src/sage/lfunctions/sympow.py:
> -        cmd = 'sympow %s'%args
> +        cmd = 'env HOME="%s" sympow %s' % (DOT_SAGE, args)
> 
> Setting HOME is ugly, it would be nicer to do this instead:
> 
> -        cmd = 'sympow %s'%args
> +        cmd = 'env SYMPOW_CACHEDIR="%s" sympow %s' % (os.path.join(DOT_SAGE, "sympow"), args)
> 
> However I can't, because sympow does not automatically create SYMPOW_CACHEDIR. I would have to do this instead:
> 
> -        cmd = 'sympow %s'%args
> +        cmd = 'mkdir "{0}" && env SYMPOW_CACHEDIR="{0}" sympow {1}'.format(os.path.join(DOT_SAGE, "sympow"), args)
> 
> Note, it's not necessary to create all the parent directories like what `mkdir -p` does. That is, if `dirname $SYMPOW_CACHEDIR` does not exist, I think it's fine that sympow fails - because there is no way to know what permissions (etc) to create parent directories with, it is a sysadmin and local policy issue, and it means there is a bug somewhere else.
> 
> However if `dirname $SYMPOW_CACHEDIR` does exist, then sympow should try to create SYMPOW_CACHEDIR inside it - it "controls" this directory, so it knows what permissions to use.
> 
> So actually, I think there is no bug in sympow regarding non-existent HOME. It is OK to fail, if HOME does not exist and SYMPOW_CACHEDIR is not set. It is better that during tests, SYMPOW_CACHEDIR is set explicitly in a Makefile, or by the parent process (Sage) which already has a "directory for testing" (DOT_SAGE).
> 

I am working on it. It would be something like:

cmd = 'env SYMPOW_CACHEDIR="%s///" sympow %s' % (os.path.join(DOT_SAGE, "sympow"), args)

(Note the magic triplet `///').
Please give one more night: I want to implement something consistent and solid.

Nevertheless, if it is a just building issue/feature, have you consider to just MKDIR_P in in d/rules ?

For the recoard, the issue is not bug but sbuild feature:

https://lists.debian.org/debian-devel/2016/02/msg00454.html


Thanks,
Jerome


> X
> 

- -- 
Jerome BENOIT | calculus+at-rezozer^dot*net
https://qa.debian.org/developer.php?login=calculus@rezozer.net
AE28 AE15 710D FF1D 87E5  A762 3F92 19A6 7F36 C68B
-----BEGIN PGP SIGNATURE-----

iQQcBAEBCgAGBQJYVqjTAAoJED+SGaZ/NsaLLMUgAIFf3MAimyMmeyRIGahuuUyr
fIVA/Md19NFkzTT+scRKDKzKbf0Twcr8JzgHU2C44D6mNIQ5XuM6SeI856jPYn3d
3Do5qtU3BdH9zbYUyxVdGXTMxovUYUg+zKxGNV0SWdmizL+Zy2BimKRreauHcdHF
0A8o9QLUSYyRSM+JWXNEfEqWkrYhZIzC0eELbUDoX9M5tjEP9EOYUsPQ4ztiyGqI
mUbMVjLIVfkGgyNaeZD4kzm4dPu2sd11qAqWmo9A8lFwt/QnAbALZYUtLza2dWwm
LMWevc0lP9U7rBKSshtJHzEmGZXdTiX33xXU9tsWK3lXlsK1fIOEWhGeSXyXztYb
Fq1MvsUGR41xIj00U306YKrG1pHR2v+NnapsRNstdGcwcS6FworMAvOOu+ryqje3
kj5pDNVnX8U5ZmfhU9NVHKHdoHYqHdoCeYATzE6LWCkTsdHwHlNgl6kOWwaS/3Ck
E2u+xbl5XgiJdFRbllHfvZRbF3SPgQ0ngbxqMfa4aSsG74e1UHpHQ0E/wAByicJa
FCxrgE5PpulObK7ydNZuOtRPgStQWsHNQR7UBetvFbWDGXIJ93xwQxtO0EI6rZ+P
o2tpbfRrktYHsAG3IqjBTnQc/nvnoGW1SwwVf9qIiD+XfcMPVtT4yaNwJD4LRSWe
uZ/AF4LX8FpkcFREsPhlxCJ+Xyleg31j7ovLZ6Z0IA0iiZuB1clxiJ5PKPUbd5UV
Rf7Qoz0O36FU+Cs7s3vmXFrdSFtHArZSAoQaiUTijq33OCK//+8G/0eIhEf+n7Li
6MfHF/UfQrEyyeBHgQfyFtKj7cbWDJe4CYaCxMOHqGszN4A6dg8jldVGQ1sLsuhf
43AaOTUBV3OoUYWVss+bAnkQnuVYL/oqkGwnFac5pG17T25YO82eRzUhZ7Cu8YC+
vCrqBHoDBhs0BcwmOmLunTZkwZMvDpywQ9AvoVEINv8H4ot4rQ8mYdZ80hK6acP4
CMIUKUTv6l42Htey0TLBW9T7quMtD7xZPRQhc++TTDGByZEny8IAStz/nlRmvJQd
amvbVV8cBtde7MpYp4orVRU67cIch+aegqV2u/Yl0T89J9RoEJfdE7SM2oju+z/S
/dNKlJENbmeoATy6CI1xDkDnDdp2nZ12Ch8mhywp8oDcrbY1JDFn7D5+qmauWIyq
M+a+D7dlv4YnnGuFjmjx9bqRBIVlUKFp7kp+yBR/I+U+5LST80ijI1rfV6Disk4/
yo+43VKqOLWlU8dkyuDHyUlarp0GrNdYVm/BDXt/V46H3tbnwLJLI85+TNOyh5qr
cgYiSVlCaAYsXNP5mADSku9ipwpkctuAZnp7MEdZTsltTDOvzH+tuqdN7kE03O0=
=Q8kS
-----END PGP SIGNATURE-----



More information about the Debian-science-sagemath mailing list