How to Patch a Buggy Package with ZZ/OSS Installer

I had to do, what developers really don’t like: patching a third-party class package due to a bug for the forthcoming release of one of our software products.

The package I had to patch is PEAR::Archive_Tar because of a yet unfixed bug I have reported some time ago. The application depending on that package is the forthcoming release of ZZ/OSS Installer. I was able to use the installer itself to apply the patch due to the fact that the ZZ/OSS Installer is itself developed and installed with the ZZ/OSS Installer – I love russian doll architectures :).

Creating and applying the patch was as simple as:
1. Fix the bug in Tar.php.
2. Put the fixed Tar.php in a package called com.zzoss.pear.archive_tar.patch.
3. Make sure in the deps element of the package.xml that the patch package has a dependency on the PEAR::Archive_Tar package.
4. Add this package to the application.xml of the next ZZ/OSS Installer release.

What happens when installing the application with the ZZ/OSS Installer is that the Tar.php file from PEAR::Archive_Tar gets overwritten by the fixed Tar.php from com.zzoss.pear.archive_tar.patch, because of the dependency definition.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s