pimoroni / get

Install and helper scripts for Raspbian on the Raspberry Pi
Other
9 stars 7 forks source link

Doesn't detect "reboot needed" from nested scripts #38

Closed lurch closed 8 years ago

lurch commented 8 years ago

Bit hard to explain, so let me show you by example:

  1. Fresh Jessie install on (micro) SD card
  2. Purchased DrumHat
  3. Fitted DrumHAT on Pi, and then booted up Pi
  4. Browse to http://shop.pimoroni.com/products/drum-hat as instructed on DrumHat packaging (BTW I can confirm the Drum HAT works on the RPi3, if you want to update your product-description)
  5. Follow the link to https://github.com/pimoroni/drum-hat
  6. Run the install instructions curl -sSL get.pimoroni.com/drumhat | bash (install appears to run fine)
  7. Try running the drums.py example
  8. Get a nasty-looking Python error
  9. Scroll back through the terminal history, and see that the drumhat installer actually also called the i2c installer, and the i2c installer needed a reboot
  10. Reboot the Pi, and the drums.py example now works!

It would be nice in this example if the i2c installer could communicate "back up" to the drumhat installer (in step 6) that a change that requires a reboot was made, so that at the end of the drumhat installation it could prompt the user that a reboot is required.

RogueM commented 8 years ago

Yep, on the TODO list! I'll probably throw in a temporary band aid until I get time to do this properly though...

RogueM commented 8 years ago

band aid in place, i.e all scripts will now pause after calling the hardware check/enablers to give users a chance to catch the 'reboot required' messages. Just a temporary solution but should help some.

RogueM commented 8 years ago

band aid didn't work so I bit the bullet and brainstormed the most logical way to do it.

Whether or not I did it in a way that makes sense I'm not sure but due to changes desirable after reviewing issue #41 it seemed that passing around variables was unnecessary and weak.

... it may not behave as expected in all figure cases but by large it should, and where it does not it should just bring back the annoyances of the previous system, nothing worst.

RogueM commented 8 years ago

this should be taken care of now.