Monday, July 28, 2008

One off patches, conflicts and merges

So you are applying one of the zillion patches on top of and you hit the following error


ApplySession applying interim patch '6338357' to OH
Interim patch 6338357 has File Conflict with patch(es) [ 5399670 ]
in OH /opt/oracle/product/10.2.0/db_1


Wouldn't it be nice if you could check for conflicts before you apply a patch
Here is one way to do the same

1. You can check which source code file is being modified by doing the following

cd 6338357/etc/config
cat actions | grep .o
oracle.rdbms version="" opt_req="R"
archive name="libserver10.a" path="%ORACLE_HOME%/lib" object_name="lib/libserver10.a/kelt.o"
make change_dir="%ORACLE_HOME%/rdbms/lib" make_file="" make_target="ioracle"

2. Then go to the $ORACLE_HOME/.patch_storage and see if any of the previous patches have modified the same file

bart:TEST:/opt/oracle/product/10.2.0/db_1/.patch_storage> find . -name 'kelt.o' -print

So this clearly shows that Patch 5399670 was previously applied which modified the same source code file and you need a merge patch for both bugs (5399670 and 6338357)


Frits Hoogland said...

Hi fairlie! I've written about opatch and how to 'dissect' an opatch, perhaps that's a nice addition to your story?

(the 5399670 patch included the same object file, the patch itself was done against the source code by development obviously)

odenysenko said...

Nice post.

It was the only way to check conflicts with old opatch.
Now we can use another way described in
Note:458485.1 How to find whether the one-off Patches will conflict or not?
Note:459360.1 How To Do The Prerequisite/Conflicts Checks Using OUI(Oracle Universal Installer) And Opatch Before Applying/Rolling Back A Patch

Fairlie Rego said...

Thanks It was a good read