Strange thing I have here, when apt
is locked by something. Respectively, the error codes don't match up. apt update
seems to always return success 0
, whereas apt-get update
returns a proper error code.
vlastimil@vb-nb-mint ~/Development/bash $ sudo apt-get update
Reading package lists... Done
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
vlastimil@vb-nb-mint ~/Development/bash $ echo $?
100
vlastimil@vb-nb-mint ~/Development/bash $ sudo apt update
Reading package lists... Done
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
vlastimil@vb-nb-mint ~/Development/bash $ echo $?
0
apt
's location:
vlastimil@vb-nb-mint ~/Development/bash $ which apt
/usr/local/bin/apt
apt
's version:
vlastimil@vb-nb-mint ~/Development/bash $ apt-show-versions apt
apt:amd64/xenial-updates 1.2.12~ubuntu16.04.1 uptodate
I originally wanted to use apt
for the manual upgrade script, but this changes the situation. Does someone understand error codes and such in order to help me with this?