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

datalad deb-bootstrap-builder only supports Debian/Linux #103

Open
jsheunis opened this issue Jul 12, 2022 · 5 comments
Open

datalad deb-bootstrap-builder only supports Debian/Linux #103

jsheunis opened this issue Jul 12, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@jsheunis
Copy link
Contributor

Should I be able to complete all the steps outlined in this comment on a mac? These steps work fine:

datalad deb-new-distribution mystuff
cd mystuff
# give the builder dataset a "globally" accessible URL for this demo
datalad subdatasets --set-property url $(pwd)/builder builder

# configure and create a builder
datalad deb-configure-builder -d builder dockerbase=debian:bullseye

but getting an error when running this:

>> datalad deb-bootstrap-builder -d builder 
[ERROR  ] [Errno 2] No such file or directory: 'dpkg-architecture' (FileNotFoundError)

>> datalad --dbg deb-bootstrap-builder -d builder 
Traceback (most recent call last):
  File "/Users/jsheunis/opt/miniconda3/envs/debian/bin/datalad", line 8, in <module>
    sys.exit(main())
  File "/Users/jsheunis/opt/miniconda3/envs/debian/lib/python3.9/site-packages/datalad/cli/main.py", line 140, in main
    _run(cmdlineargs)
  File "/Users/jsheunis/opt/miniconda3/envs/debian/lib/python3.9/site-packages/datalad/cli/main.py", line 164, in _run
    ret = _run_with_debugger(namespace) \
  File "/Users/jsheunis/opt/miniconda3/envs/debian/lib/python3.9/site-packages/datalad/cli/main.py", line 177, in _run_with_debugger
    return cmdlineargs.func(cmdlineargs)
  File "/Users/jsheunis/opt/miniconda3/envs/debian/lib/python3.9/site-packages/datalad/cli/exec.py", line 107, in call_from_parser
    ret = list(ret)
  File "/Users/jsheunis/opt/miniconda3/envs/debian/lib/python3.9/site-packages/datalad/interface/utils.py", line 357, in generator_func
    for r in _process_results(
  File "/Users/jsheunis/opt/miniconda3/envs/debian/lib/python3.9/site-packages/datalad/interface/utils.py", line 544, in _process_results
    for res in results:
  File "/Users/jsheunis/Documents/psyinf/datalad-debian/datalad_debian/bootstrap_builder.py", line 81, in __call__
    binarch = Runner().run(
  File "/Users/jsheunis/opt/miniconda3/envs/debian/lib/python3.9/site-packages/datalad/runner/runner.py", line 184, in run
    results_or_iterator = self.threaded_runner.run()
  File "/Users/jsheunis/opt/miniconda3/envs/debian/lib/python3.9/site-packages/datalad/runner/nonasyncrunner.py", line 307, in run
    return self._locked_run()
  File "/Users/jsheunis/opt/miniconda3/envs/debian/lib/python3.9/site-packages/datalad/runner/nonasyncrunner.py", line 355, in _locked_run
    self.process = subprocess.Popen(self.cmd, **kwargs)         # nosec
  File "/Users/jsheunis/opt/miniconda3/envs/debian/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/Users/jsheunis/opt/miniconda3/envs/debian/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'dpkg-architecture'

> /Users/jsheunis/opt/miniconda3/envs/debian/lib/python3.9/subprocess.py(1821)_execute_child()
-> raise child_exception_type(errno_num, err_msg, err_filename)

Originally posted by @jsheunis in #12 (comment)

@mih
Copy link
Contributor

mih commented Jul 12, 2022

No, a mac won't work. AFAIK there is no singularity for mac. In addition to that, we use dpkg-architecture to give us the correct architecture name. So ATM we are limited to Debian-based system for this particular command.

The dpkg-architecture call could be avoided via a dedicated option to provide an architecture label. This would broaden compatibility to Linux.

@mih mih changed the title Error running datalad deb-bootstrap-builder -d builder datalad deb-bootstrap-builder only supports Debian/Linux Jul 12, 2022
@mih mih added the enhancement New feature or request label Jul 12, 2022
@christian-monch
Copy link
Contributor

I would suggest to close this issue as "won't fix"

@mih
Copy link
Contributor

mih commented Jul 15, 2022

Yes, this or an option. The latter would bring RHEL systems into the list of supported platforms. Not a small community

@aqw
Copy link
Contributor

aqw commented Jul 15, 2022

I like the idea of adding an option flag. Relatively low effort cost for a nice win.

Test for the availability of dpkg-architecture in PATH. If it's not present, inform the user that they can use the --dpkg-architecture flag to pass it in manually, and exit.

@mih
Copy link
Contributor

mih commented Jul 15, 2022

We can also just run this if the value was given and try-except the execution to give that message only when it fails. A bit cheaper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants