After working with the debian packaging system (and surely it knows which directories the files go to), it seems like it should be straightforward to calculate which filesystem each file in a package goes on.