Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Apple > Operating Systems

This chapter is from the book

This chapter is from the book

Understanding Image, Installer Package, and Receipt Files

The previous sections of this chapter made occasional reference to receipt, image, and package files, which I refer to elsewhere in this book as well. This section provides essential background on exactly what these files are and how they work.

Image (.dmg) files

Many files that you download from the Web (in fact, almost all Apple files and a healthy minority of non-Apple files) arrive in the form of image files. These files typically have names that end in .dmg (also called a UDIF format). However, you may see image files that end in .img; these are carryovers from an image format originally used in Mac OS 9. Over the past few years, .img files have begun to disappear from the Mac OS X scene; thus, I'm omitting further coverage of them from this book. Some image files may be self-mounting (with an .smi extension) and thus should work even if a mounting application is not available.

Note: For a more technical background on the history and nature of disk-image formats, launch Terminal and type man hdiutil. Then press Return until you reach the sections on compatibility and history.

If you double-click an image file, the image file will mount (more technically referred to as attach). That is, a virtual volume appears, much as if you had mounted some sort of removable media, such as a CD. This generally happens thanks to Mac OS X's DiskImageMounter, a background utility that handles disk-image mounting, although some third-party software, such as StuffIt Deluxe, can also mount image files.

Note: When downloading software from the Web, the image file may self-mount and the original .dmg file may be automatically moved to the Trash, as discussed in "Technically Speaking: Internet-Enabled Disk Images," later in this chapter.

The name of the mounted image may differ from the .dmg file itself, though there's usually some similarity. Double-click the mounted image's icon, if a new Finder window doesn't automatically open, to view its contents and access it from the Finder.

For Apple software updates, the contents of the mounted volume will typically be a package (.pkg) file. A Read Me file or other documentation may also be included. For third parties, the contents may similarly be a .pkg file or a separate third-party installer utility. A VISE Installer is currently the most popular alternative to .pkg files; it makes no use of Apple's Installer utility. Alternatively, the disk image may contain a fully functional version of the software in question, sans installer.

If the image contains an installer package file or some other form of install utility, the next step is to launch the install package or utility. Typically, you can do this by double-clicking the file directly from the image. If this does not work, try copying the file to your hard drive first.

When you've finished doing what you need to do, you unmount the virtual volume (by dragging the Volume icon to the Trash or by clicking the Eject icon next to the image's name in the sidebar of a Finder window). You can also delete any install software you dragged to your drive, as well as the downloaded image file itself (if you don't want to save it as a backup).

If the image file contains a fully functional newer version of the software in question rather than an installer, you simply replace the previous version of that software on your hard drive with the new version on the image.

Note: As I discuss later in this chapter, you can use Disk Utility to create image files—a convenient way to make exact copies of folders, discs, and other items you want to transfer over the Internet.

03fig17.jpg

Figure 3.17 The DiskImageMounter application, highlighted in the CoreServices window.

03fig18.jpg

Figure 3.18 From image file to package file in three steps: left, an image file downloaded from the Web; middle, the virtual volume that appears when you mount the image; right, the package file contained in the volume.

Image files vs. compressed files

When you download software from the Internet, it often arrives in compressed and/or encoded format. Such files typically have a .zip, .sit, .sitx, .bin, .gz, or .tgz suffix. In this case, the first step is to decompress and/or decode the file. You do this either via Mac OS X's "built-in" decompressing software or (if Mac OS X's software is not up to the task) via third-party software such as Stuffit Expander. In many cases, your Web browser is preconfigured to automatically launch Expander if needed.

In some cases, the expanded file will be an image (.dmg) file. If so, the image file will likely mount its virtual volume automatically. (If it doesn't, double-click the image file to mount it.) The resulting software (such as an Installer .pkg file) will now be accessible. You then proceed as described in the previous section.

In many cases, however, the decompressed file will be the "final" software itself, such as an installer or another application. You can use this directly.

Installer package (.pkg) files

A package (also referred to as a bundle) is really a folder in disguise. In this guise, it acts as though it were a single file rather than a folder containing a collection of files. These folders are disguised this way to simplify the user's experience of working with them.

The Installer utility uses one type of package file to install updates. These files typically have a .pkg extension at the end of their name (such as MacOSXUpdateCombo10.3.9.pkg), though you may occasionally see one with an .mpkg extension. This latter type of extension represents a meta-package, which is the first file launched in an installation involving several .pkg files. Launching this file will not result in a successful installation unless all of the additional .pkg files are also in its folder.

One key advantage of this approach to OS updates is that the user sees what looks like a single file rather than the dozens of files scattered among several folders that Mac OS 9 updates typically require. When you double-click this item, it launches the Installer and you're on your way.

03fig19.jpg

Figure 3.19 Inside the Mac OS X 10.4.1 update .pkg file: the Contents folder and the Resources folder.

Receipt files

Receipt files, as their name implies, are used by the OS to maintain a record of what the Installer application has installed. A receipt file is created each time you install new software via a package file. It's stored in a folder called Receipts, located in the root-level Library folder (/Library/Receipts).

When viewed from the Finder, a receipt file appears identical to the matching package file that was used to install the software. In fact, both files have identical names and share the same icon and description ("Installer package") in the Kind line of their Get Info windows. Indeed, if you use the Show Package Contents contextual-menu command to look inside a receipt package, you will see only minor differences between its contents and the contents of its matching Installer package. The biggest difference is that the Archive.pax.gz file, which contains the actual updated software (as noted above in "Technically Speaking: Inside Packages"), is missing from the receipt file. This is why the receipt file is so much smaller than its Installer package sibling—and why you can't use the receipt file to install an update.

In Panther, if you double-click a receipt file, it will initially launch Installer (just as an Installer file would). However, the launch is soon interrupted by an error message stating, "The Installer package {name of file} cannot be opened. The selected package is a receipt." Oddly, Apple appears to have eliminated this helpful alert in Tiger. In Tiger, it lets you go all the way through to where you click the Install button. You then get an error message that says: "There were errors installing the software. Please try installing again." The log files, however, correctly note that the installation failed because the Installer could not extract the appropriate files from the package.

03fig20.jpg

Figure 3.20 The contents of a Receipts folder.

What are receipt files used for?

Receipt files are primarily used by Mac OS X to track the updates you've installed. In theory, this is relevant in several situations:

  • Software Update may use receipt files to determine what software has yet to be installed and, thus, what updates appear in the Software Update window.
  • The Installer application uses receipt files to determine whether a given installation should be listed as a new (full) installation or as an upgrade of an existing one. If it finds a relevant receipt file, it considers the installation to be an upgrade.
  • The Installer application may similarly use these files to check whether a given update can be installed on your computer (that is, it checks to see if the prerequisite software is installed).
  • The First Aid portion of Disk Utility uses the information stored in these receipt files to check the default permissions of files installed by updates so that they can be restored when using Repair Disk Permissions (as described in Chapters 5 and 6).

In reality, however, when I tested the "rules" of how receipts are used, I found the process to be less than completely predictable:

  • In no case did the presence or absence of a receipt file prevent a stand-alone installer from reinstalling an update.
  • A receipt file did sometimes affect whether or not Software Update listed an update, but it did this mainly for non-OS updates (such as for iPod software). For updates of the OS itself, such as an update to Mac OS X 10.3.9, Software Update checks the OS version in a way that does not depend on receipt files. Mainly, it uses information stored in the SystemVersion.plist file, located in /System/Library/CoreServices.

Removing receipt files

If you remove a receipt file in hopes of bypassing Mac OS X's refusal to list or install a given update, don't count on it working. In general, I recommend leaving these receipt files in place; ideally, you want Mac OS X to correctly track what you've installed.

You may, however, occasionally need to remove a receipt file to solve a problem with reinstalling a particular piece of software. For example, suppose you have software such as Apple's Keynote application on your drive. You decide to delete it and reinstall it via a Keynote.pkg file. If the Installer does not permit this reinstall, it's probably because you did not delete the receipt file of the same name from the Receipts folder. If this is the case, follow these steps:

  1. Drag the receipt file for the problem software from its /Library/Receipts folder location to the Trash. (You need to be an administrator to do this.) Do not delete the file just yet: Deleting certain receipt files without successfully reinstalling the same software can cause problems (including failure to start up on restart).
  2. Attempt the problem reinstallation again.
  3. After the software has been successfully reinstalled, a new receipt file is created. You empty the Trash to delete the old receipt file.

If, after doing this, the install still fails, the receipt file is not the cause. Drag the receipt file back to its original location before restarting your Mac. Check for other causes, as described elsewhere in this chapter.

Note: Receipt files are created only by software installed via Apple's Installer utility.

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email ask@peachpit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.peachpit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020