022-08-26 21:58:59.091 [INFO ] [t.execute string_flag_System upgrade] - upgrading off openHAB
2022-08-26 21:58:59.190 [INFO ] [t.execute string_flag_System upgrade] - upgrading openHAB
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
sudo: a terminal is required to read the password; either use the -S option to read class="afterFrom marked"> from standard input or configure an askpass helper
sudo: a password is required
2022-08-26 21:58:59.281 [INFO ] [t.execute string_flag_System upgrade] - upgrading openHAB
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
sudo: a terminal is required to read the password; either use the -S option to read class="afterFrom marked"> from standard input or configure an askpass helper
sudo: a password is required
The first time you run a sudo command, you have to acknowledge the that message you see there in the logs, whether or not you have it set for NOPASSWD.
Youāll need to run sudo as the openhab user so you can ack that message, or search for some tutorials on how to suppress that message (Iām pretty sure there is one).
Note: if openHAB itself getās upgraded it will stop OH which will kill the apt command itself and likely leave you in a semi-broken state.
Are you sure you are not running it as openhabian? That message above only appears the first time you run sudo as a given user and will continue to show until you acknowledge it by pressing āyā.
But again, if you continue down this path, the first time that openHAB itself gets upgraded youāre going to end up with a broken system.
If that doesnāt change anything, your answer is probably going to be on a general Linux forum and the docs for sudo. Running apt from openHAB like this isnāt something we do because it breaks the system.
Did you configure the first two using any argument in executeCommandLine ?
The third one you defined using arguments but you did not separate the argument by using a command.
I would expect that it needs to be
I personally would like to have full control over the upgrade process. I would like to know if there is any main change in a package that is being installed. In case of an unattended upgrade a package might be upgraded that breaks something. Being aware of the packages that were upgrade you have at least an idea where to search for root causes.
Sometimes there are complex dependencies that I prefer to manually resolve or at least I would like to know the proposals / assumptions the system does.
So wouldnāt it be better to get informed by the system that there is an update available and do it manually ?
which results in ( because of progress ābarā the returned value in a variable might look different )
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
grafana (9.0.2 => 9.1.1)
libc-bin (2.28-10+rpt2+rpi1 => 2.28-10+rpt2+rpi1+deb10u1)
libc-dev-bin (2.28-10+rpt2+rpi1 => 2.28-10+rpt2+rpi1+deb10u1)
libc-l10n (2.28-10+rpt2+rpi1 => 2.28-10+rpt2+rpi1+deb10u1)
libc6 (2.28-10+rpt2+rpi1 => 2.28-10+rpt2+rpi1+deb10u1)
libc6-dbg (2.28-10+rpt2+rpi1 => 2.28-10+rpt2+rpi1+deb10u1)
libc6-dev (2.28-10+rpt2+rpi1 => 2.28-10+rpt2+rpi1+deb10u1)
libcairo-gobject2 (1.16.0-4+rpt1 => 1.16.0-4+rpt1+deb10u1)
libcairo2 (1.16.0-4+rpt1 => 1.16.0-4+rpt1+deb10u1)
libpulse0 (12.2-4+deb10u1+rpi3 => 12.2-4+deb10u1+rpt3)
libtirpc-common (1.1.4-0.4 => 1.1.4-0.4+deb10u1)
libtirpc3 (1.1.4-0.4 => 1.1.4-0.4+deb10u1)
locales (2.28-10+rpt2+rpi1 => 2.28-10+rpt2+rpi1+deb10u1)
multiarch-support (2.28-10+rpt2+rpi1 => 2.28-10+rpt2+rpi1+deb10u1)
tzdata (2021a-0+deb10u5 => 2021a-0+deb10u6)
15 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 99.8 MB of archives.
After this operation, 5,478 kB of additional disk space will be used.
Do you want to continue? [Y/n] N
Abort.
With ( this needs to be put into a file as pipes are not supported in the executeCommandLine parameters )
PS you guys may be interested in my PR below ā¦ although it has been more-or-less abandoned by the core developers as āwonāt do / too difficultā ā¦
I use āunattended-upgradeā (on Ubuntu based OS) since years without any problems. Pinning the Openhab version to the major version - at the moment itās 3..