title: Get the list of dependencies for a Debian package on a non-native host
body: <p>I'm maintaining and publishing an open source package which needs to be built for Windows and Linux. I've chosen to cross-compile with mingw, and used Debian packages for building and maintaining the binaries for my Windows packages. That is, I've defined Debian architectures mingw-i686 and mingw-amd64, massaged slight modifications into dpkg-cross and some Debian install scripts to account for the PE naming scheme (*.dll, *.dll.a instead of <em>.so.</em> and *.so), and started building.</p>
  
  <p>That went very well, and until recently I could easily build a Windows setup using Inno Setup from an installation schedule, i.e. a list of .deb's that need to be installed for my package. This list was generated by a chroot-ed apt-get (with <code>--print-uris</code>) and looked like:</p>
  
  <pre><code>/projects/www/debian/dev/pool/dists/experimental/main/base/libfreetype6_2.4.4-1+mingw.1_mingw-amd64.deb
  /projects/www/debian/dev/pool/dists/experimental/main/base/libwxmsw2.8_2.8.10.1-3.1_mingw-amd64.deb
  [...]
  </code></pre>
  
  <p>Basically, I was using apt to resolve the dependencies and Inno Setup to do the installation.</p>
  
  <p>Of course, there is no real debian system for mingw-i686, so I couldn't run apt natively. I had hacked a solution by putting the necessary files into a directory and using <code>apt-get -o RootDir=</code> to change apt's root into this directory. This worked since apt-get never really chrooted into this directory and only looked for its databases there.</p>
  
  <p>Lately, a new apt version was pushed into Debian testing, and this apt version <em>does</em> actually chroot into the RootDir. So, my RootDir solution got impracticable, it would be quite a lot of work to set up a proper chroot.</p>
  
  <p>Does anyone have an idea how I could get the package list any other way? That is, get a list of .deb's and all their dependencies for a specific package on a non-native architecture? </p>