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

Unhelpful message when trying to install package from source with no source given in recipie #597

Open
software-opal opened this issue Jun 21, 2021 · 0 comments

Comments

@software-opal
Copy link

software-opal commented Jun 21, 2021

Problem:

I'm trying to install hackrf from source because I'm pretty sure the Ubuntu packaged version is out of date(and because I have no idea what I'm doing and am about 7 issues deep in debugging my original issue ... but that's not important). I get this error:

$ pybombs install hackrf --static
[INFO] Prefix Python version is: 3.8.5
[INFO] PyBOMBS Version 2.3.4
[INFO] Phase 1: Creating install tree and installing binary packages:
Install tree:
|
\- hackrf
[INFO] Phase 1 complete: All binary dependencies installed.
[INFO] Phase 2: Recursively installing source packages to prefix:
[INFO] Installing package: hackrf
Traceback (most recent call last):
  File "/usr/local/bin/pybombs", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/pybombs/main.py", line 32, in main
    return dispatch() or 0
  File "/usr/local/lib/python3.8/dist-packages/pybombs/commands/base.py", line 195, in dispatch
    return get_cmd_dict(cmd_list)[args.command](cmd=args.command, args=args).run()
  File "/usr/local/lib/python3.8/dist-packages/pybombs/commands/install.py", line 113, in run
    return not self.install_manager.install(
  File "/usr/local/lib/python3.8/dist-packages/pybombs/install_manager.py", line 138, in install
    if not self.pm.install(pkg, install_type="source", static=static, verify=verify):
  File "/usr/local/lib/python3.8/dist-packages/pybombs/package_manager.py", line 237, in install
    install_result = self._std_package_operation(
  File "/usr/local/lib/python3.8/dist-packages/pybombs/package_manager.py", line 283, in _std_package_operation
    result = getattr(pkgr, operation)(rec, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/pybombs/packagers/source.py", line 438, in install
    assert False
AssertionError

Setup:

I've just installed pybombs using these steps on an Ubuntu 20.04 VM:

sudo apt-get install python3-pip
sudo pip3 install pybombs
pybombs auto-config
pybombs recipes add-defaults

It turns out after digging that the error is caused because the recipie is missing source information(or at least that's what I assume given the source code the error is pointing to): https://github.com/gnuradio/pybombs/blob/master/pybombs/packagers/source.py#L434-L438

It would be nice if the error message was a bit more helpful than 'nope', and so that I don't have to go source code diving to find why the error happened and what I need to do to fix it.

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

No branches or pull requests

1 participant