I have a script that uses apt heavily and currently it faces a locking issue, as:
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
I want that apt tries to get the lock other than aborting. Is it possible?