This is with slink's dpkg. For reasons I don't understand, some packages don't get set by --set-selections and no explanation is given. Currently I've only noticed this with libpng2-dev, librx1g-dev and zlib1g-dev. Example:
flanders:/usr/local# dpkg --get-selections |grep png libpng0g install libpng2 install pnmtopng install flanders:/usr/local# echo libpng2-dev install |dpkg --set-selections flanders:/usr/local# dpkg --get-selections |grep png libpng0g install libpng2 install pnmtopng install I've had similar problems when missing dependancies were at issue, but that doesn't seem to be the case here: flanders:/usr/local# apt-get install -d libpng2-dev Reading Package Lists... Done Building Dependency Tree... Done The following extra packages will be installed: zlib1g-dev The following NEW packages will be installed: libpng2-dev zlib1g-dev 0 packages upgraded, 2 newly installed, 0 to remove and 21 not upgraded. 2 packages not fully installed or removed. Need to get 0B/264kB of archives. After unpacking 829kB will be used. Do you want to continue? [Y/n]