It sounds like something's wrong with your Mac's "launch services database". There are ways to force that to be rebuilt, but it might be easier to just reset the two entries that aren't working for you. The programs you need are both in /System/Library/CoreServices. To reset the associations for those, for each of ".dmg" and ".pkg" files, pick a file of that type, select the file, then invoke the Finder's menu option File > Get Info. In the resulting window find the section labeled "Open with". The proper value for ".dmg" should be DiskImageMounter. For ".pkg" it should be Installer. If you don't see those values, pull down the "open with" entry and select "Other". In the resulting window navigate to the System folder at the top level of your boot volume, then to Library within that, then to CoreServices within that. Pick the appropriate program for that type, as described above. Then clck on the "Change All" button. Once you've updated one type, do the corresponding operation on the other type.