Update Debian "libs preserving" code to match Alpine (using "ldd" and "apt-mark" to auto-determine necessary dependencies)