I'm creating a Debian package that has a few dependencies not found in the official repositories. Simply specifying these other packages as dependencies doesn't cut it, as their installations alone involve running apt-get update and adding source repositories (which aren't mine) to /etc/apt/sources.list.d.
More: one of these packages is Dart language SDK - which you can only install by grabbing their deb and using dpkg, or by adding one of Google's repos. My goal is really just finding a balance between minimizing the number of steps involved in my package's installation and clean package deployment.
So I'd like for my package's pre-installation script to add these sources and then run apt-get update, but the main problem is that when the package is open and being installed it puts a lock on dpkg. So is it possible to achieve what I'm after directly, or what other options/workarounds are there?