The problem is the python posixpath's basename() when run as sudo is None.
Pybombs depends on that for the initial config.

A solution without changing the way pybombs does this is just to run
./pybombs config without root, then do your sudo pybombs install.


On Fri, Mar 13, 2015 at 12:02 PM, Richard Bell <richard.be...@gmail.com>
wrote:

> I forgot to answer one of your previous questions. Yes the error occurs
> before I have a chance to enter anything for the prefix. I have no control
> over it.
>
> v/r,
> Rich
>
> On Fri, Mar 13, 2015 at 10:00 AM, Richard Bell <richard.be...@gmail.com>
> wrote:
>
>> Marcus,
>>
>> I deleted the pybombs folder and re-cloned pybombs from remote. When
>> running 'sudo ./pybombs install gnuradio' I still get the same error output
>> when it reachees the prefix portion.
>>
>> Also, I want to make sure I understand your following directions. To
>> install gnuradio on a computer so all user accounts have access to it, I
>> should do the following:
>>
>> 1) Install the base gnuradio framework to /usr/local/bin
>> 2) Have users install custom modules they want to their local home
>> directories
>>
>> v/r,
>> Rich
>>
>> On Thu, Mar 12, 2015 at 3:12 PM, Marcus Müller <marcus.muel...@ettus.com>
>> wrote:
>>
>>>  If I install it without sudo to a local account directory, how will
>>> other users be able to access the install? Is it simply a matter of setting
>>> up the environment variables correctly?
>>>
>>> The idea is to install GNU Radio globally, and let users handle their
>>> own modules in their own home directories. So you'd install GNU Radio with
>>> sudo as root into /usr/local, and each user installs private modules into
>>> /home/<user>/prefix
>>>
>>> When does the error you paste below occur? Before you get the chance to
>>> enter /usr/local as prefix, or after?
>>> Anyway, I'd recommend deleting your pybombs folder and cloning it
>>> cleanly again, running pybombs without root. It should ask you for the
>>> prefix. after that, it should print a warning that you should re-run it
>>> with sudo. Do that. Does the error still occur?
>>>
>>> Greetings,
>>> Marcus
>>>
>>>
>>>
>>>
>>> On 03/12/2015 11:02 PM, Richard Bell wrote:
>>>
>>>   Thanks for responding MarcusM,
>>>
>>>  I can't execute 'sudo ./pybombs install gnuradio' at all, because it
>>> fails with the following output:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *rbell@polarcode1:~/Documents/gnuradio/pybombs$ sudo ./pybombs install
>>> gnuradio Initializing config file... Username for GIT access gituser
>>> [root]: Directory of git cache repository gitcache []: Install Prefix
>>> Traceback (most recent call last):   File "./pybombs", line 25, in <module>
>>>     from mod_pybombs import verbosity as v   File
>>> "/home/rbell/Documents/gnuradio/pybombs/mod_pybombs/__init__.py", line 22,
>>> in <module>     from globals import *;   File
>>> "/home/rbell/Documents/gnuradio/pybombs/mod_pybombs/globals.py", line 48,
>>> in <module>     config_init(config);   File
>>> "/home/rbell/Documents/gnuradio/pybombs/mod_pybombs/cfg.py", line 70, in
>>> config_init     if os.path.basename(pwd)=="pybombs":   File
>>> "/usr/lib/python2.7/posixpath.py", line 121, in basename     i =
>>> p.rfind('/') + 1 AttributeError: 'NoneType' object has no attribute 'rfind'
>>> rbell@polarcode1:~/Documents/gnuradio/pybombs$ *
>>>
>>>  If I install it without sudo to a local account directory, how will
>>> other users be able to access the install? Is it simply a matter of setting
>>> up the environment variables correctly?
>>>
>>>  v/r,
>>>  Rich
>>>
>>> On Thu, Mar 12, 2015 at 2:49 PM, Marcus Müller <marcus.muel...@ettus.com
>>> > wrote:
>>>
>>>>  Hi Richard,
>>>> no, not completely.
>>>> instead of 1) you should cd somewhere in your home directory, where you
>>>> have write access
>>>> 2) - 3) are correct. Choose /usr/local/ as prefix
>>>> 5) could also be done by copying over setup_env.sh to
>>>> /etc/profile.d/50-setup-gnuradio-paths
>>>>
>>>> 6) is normal and should not result in errors.
>>>>
>>>> If normal users (including) want to install their own OOT modules,
>>>> they'd use a local clone of pybombs, setting that gnuradio is already
>>>> installed, and install their modules into a user-prefix (e.g.
>>>> /home/user/prefix).
>>>>
>>>> Greetings,
>>>> Marcus
>>>>
>>>>
>>>>
>>>> On 03/12/2015 10:43 PM, Richard Bell wrote:
>>>>
>>>>       Hi all,
>>>>
>>>>  I'm setting up a new shared laptop with multiple users who want to use
>>>> GNU Radio. I'm not sure how to set this up correctly.
>>>>
>>>>  Should I do it this way:
>>>>
>>>>  1) cd /usr/local/bin
>>>>  2) git clone https://github.com/pybombs/pybombs.git && cd pybombs
>>>>  3) sudo ./pybombs install gnuradio (sudo needed to give permission to
>>>> create files here)
>>>>  4) ./pybombs env
>>>>
>>>>  5) Then instead of sourcing the setup_env.sh file from .bashrc, I will
>>>> source it from /etc/profile.
>>>>
>>>>  6) Finally, and this is the part I'm most unsure of, since I used sudo
>>>> ./pybombs install gnuradio, root owns these files. If I remember correctly,
>>>> this caused issues for me in the past trying to run gnuradio from a
>>>> non-root account. How should I handle this?
>>>>
>>>>  Thanks a lot,
>>>>  Rich
>>>>
>>>>
>>>>  _______________________________________________
>>>> Discuss-gnuradio mailing 
>>>> listDiscuss-gnuradio@gnu.orghttps://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Discuss-gnuradio mailing list
>>>> Discuss-gnuradio@gnu.org
>>>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>>>
>>>>
>>>
>>>
>>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to