10.6: Installer packages not leaving receipts in /Library/Receipts
I ran into an puzzle recently on 10.6.x, where I noticed that installer packages were not leaving a receipt behind in /Library/Receipts. This was weird because, from pretty much Mac OS X 10.0.0 – 10.5.8, here’s how Installer.app generally worked:
The installation process in Mac OS X Server centers around the Installer.app located in /System/Administration. The Installer.app installs groups of files called packages. All packages end in the .pkg or .mpkg extensions. A .pkg extension indicates a single package where as a .mpkg extension signifies multiple packages to be installed. Once a package is installed a receipt is created to keep track of the files installed and to remove the package if needed. All receipts are stored in the /Local/Library/Receipts directory. (This was changed to /Library/Receipts in later version of the OS once /Local was dropped.)
In 10.6.x, this Installer.app behavior had changed, so that receipts were no longer being stored in /Library/Receipts. But where? Fortunately, when I asked in the AFP548 forums, somebody was able to tell me.
“Apple changed the location. It is now /var/db/receipts. The naming scheme has also changed to the com/net/org.companyname…plist format as well.”
When I checked /var/db/receipts, there were a series of .bom and .plist files which corresponded to the installer packages I’d been installing. So on the plus side, no bug; Installer’s receipt-generating behavior. Down side? All that re-install documentation that folks put together with regards to removing receipts before re-installing something (including Apple’s documentation) will need to be updated for 10.6.x. That’ll definitely cause some confusion.
I discovered that Apple has actually changed this in 10.5.x as well. In the span of three reference releases (10.4, 10.5, and 10.6) Apple changed the receipt format three times. In 10.4.x and earlier, the Installer.app behavior was to store receipts in /Library/Receipts. In 10.5.x, the receipt database was an Sqlite3 database, stored in /Library/Receipts/db/ or ~/Library/Receipts/db/ for packages installed inside your home directory. In 10.6.x, the receipt files and BOM files are now stored as files (not in a database) at /var/db/receipts. This is when the installer package is the newer flat format. For the older bundle format, the receipt bundles are still stored in /Library/Receipts.