MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.85k stars 495 forks source link

DietPi-Software | Improve verbosity of apt errors #791

Closed Fourdee closed 7 years ago

Fourdee commented 7 years ago

https://github.com/Fourdee/DietPi/issues/785#issuecomment-283956636

Fourdee commented 7 years ago

Adding:

${PIPESTATUS[0]}

Screen:

Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package proftpd-basicmon

Tee log:

root@DietPi:~# cat /var/log/dietpi-software_apt.log
Reading package lists...
Building dependency tree...
Reading state information...

🈯️ Capture stderr in output:

2>&1 | tee "$FP_APT_LOG"

Really want to put the log into the whiptail menu, with scrollbar, but scrollbar is never drawn correctly, ESC/TAB+ENTER required to exit may confuse user:

whiptail --title "Error" --textbox /dev/stdin 16 70 <<< $ERROR_TEXT --scrolltext

image


Fourdee commented 7 years ago

Ideally, wanted to print log contents in whiptail menu with scroll bars, however, scroll bar never renders correctly (bug in whiptail?), and, ESC/TAB+ENTER to exit is non standard, may confuse user.

We may need to look at moving to dialog in the future.

Completed.