-
Notifications
You must be signed in to change notification settings - Fork 395
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
fix aliases #1360
base: dev
Are you sure you want to change the base?
fix aliases #1360
Conversation
Rewrite to get rid of dependency on detection of "source" or "non source" invocation of this script, which is not necessary. Tested on a new install.
Remove arguments from oref0-log-shortcuts function, which is no longer needed after rewrite of that script.
I believe I fixed it.. |
This is failing unit tests:
|
I changed the contents of the .bash_profile to include the aliases. |
Scott, ~.bash_profile before: GOROOT=/usr/local/go After: GOROOT=/usr/local/go Note that this line: "source /etc/skel/.profile" I did see a typo in the "edison-battery" alias, so I'll change that and create another PR. Anyway, I'm not seeing any issues with the before and after. Do you see any problems? Let me know how I can help resolve the failed tests issues. Regards, Dave |
Fixed typos on "alias edison-battery=" lines
I went back and looked at the test that failed:
Consequently, the existing software would have removed and added it back in, as does my code, and failed the test. I didn't intend to rewrite the list of aliases. But I could. ;-) So I think the list of aliases should be reviewed, since this alias does not appear to be obsolete. Another thing I noticed is that there are more old aliases in the code still. One of the aliases in the new list uses the nano editor, but when invoked the VI editor pulls up the file. Dave Test code excerpt: tests/bash-util-functions.test.shActual: This line doesn't get removed The line below this should be removed The line below this should be removed source "/root/src/oref0/bin/oref0-log-shortcuts.sh" |
I’m fine with either fixing or removing the broken test. If you can fix it to actually check if the alises get installed, great. If you can’t figure out a way to do that, removing the useless test would allow us to proceed with fixing the problem it failed to catch. |
Ok, I just removed the old useless tests that never caught the fact that aliases were broken. This is ready to test on an actual rig. |
Updated to this and ran oref0-runagain on a rig without aliases, and it updated .bash_profile, but doesn't seem to cause .bash_profile to be called by .profile. |
Not sure if this is related to my non-standard .bashrc or something else. If anyone is setting up a new rig and wants to test it there, that's probably cleaner. |
I found this... |
I did a install on a newly flashed rig, I ran the standard installation script, then did a git checkout dev, and install with:
Then I ran the setup complete - answering yes. I'm really confused why no .bash_profile file was created in setup since the -> touch "$HOME/.bash_profile" <- line is still in the setup script at line 1071? |
Sounds like you installed openaps:dev instead of Dave9111:dev. You'll want to do something like:
|
Oops... I misunderstood. However, I'm still wondering why .bash_profile wasn't created? I think I'll try and trap an error by pausing setup just after the touch line. |
Scott, On a newly flashed rig. Running my dev fork, I am getting hung up in the setup script. I'm getting stuck at about line 862 in oref0-setup.sh. So its not making it to the location (about 1072) where the shortcuts are added. I don't know why. nightscout is there.. If I run nightscout from the command line it gives me a list of options. Any idea why this is dying? I think this is why the .bash_profile file was not being created previously. I never installed master, only dev. So perhaps there is something missing in dev, that is being setup in master. ?? These are the last few lines in the screen output. Removing any existing ns device: |
After I figured out what to do to get an installation with the python issues, this dev version installs cleanly and updates the .bash_profile properly with the aliases. No failed tests, all looks good! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oref0-setup exits prematurely after:
Adding OpenAPS log shortcuts
Clearing retrieved apt packages to free space.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Also tried it on another rig and confirmed this is a problem with the branch, not with the rig.
Do you want to try to get this fixed up for 0.7.2-dev, or should we close it out? |
This fixes the "no convenience aliases work" networklog, pumploop-log, cat-wifi, etc, issue.
Removed dependency of detection of "sourced" vs "non sourced" script invocation which is not needed and known to be unreliable.
Aliases are written directly into the ~/.bash_profile file so they are easily altered by rig users.
Custom aliases will not be removed or overwritten on subsequent setups.
Repeat setups will not create duplicate aliases.
Tested on a new local install of DEV on an Edison rig.