cling icon indicating copy to clipboard operation
cling copied to clipboard

cpt.py on non-Ubuntu/RedHat-linux

Open sgsaenger opened this issue 5 years ago • 2 comments

I'm having trouble executing ./cpt.py --last-stable pkg on arch linux:

  • https://github.com/root-project/cling/blob/758b053e64c84baca0f5094d7d4d7d84e7f7cf60/tools/packaging/cpt.py#L2318 and https://github.com/root-project/cling/blob/758b053e64c84baca0f5094d7d4d7d84e7f7cf60/tools/packaging/cpt.py#L2423 use the deprecated platform.dist() which has been removed somewhen in python 3 and thus crashes. You already have a DIST variable populated from distro.linux_distribution()[0], is there any reason this cannot be reused for checking for redhat?
  • The block https://github.com/root-project/cling/blob/758b053e64c84baca0f5094d7d4d7d84e7f7cf60/tools/packaging/cpt.py#L2378-L2381 in the general 'last-stable' handling block will enforce the "with_binary_llvm" setting, which is expected to trigger the download_llvm_binary which would then set global llvm_flags. However, this check happens before the enforcing of the value, so none of this is actually triggered unless the user specifies the commandline flag anyways. Further, the compile_for_binary function that is subsequently used depends on llvm_flags and will thus fail. I'm not sure of the purpose and semantics of this, but given that download_llvm_binary currently only supports ubuntu/macos, this overriding should probably
    • be moved before the download_llvm_binary call in line 2244
    • depend on download_llvm_binary being usable in the first place
    • be documented somewhere

sgsaenger avatar Sep 22 '20 11:09 sgsaenger

Thanks for pointing out those rather serious bugs! I am hoping to do a cleanup sweep through cpt in the very near future, where I'll try and fix these issues :)

For now, you can use --current-dev=tar just to get things working.

reikdas avatar Sep 22 '20 13:09 reikdas