Updating a Baselibs Component: Difference between revisions
→Importing NCO 4.2.3: Wikified much of the text. |
|||
Line 13: | Line 13: | ||
$ bcvs tag -d Internal-3_3_1 | $ bcvs tag -d Internal-3_3_1 | ||
=== | === Unpack the new library === | ||
First, move to a directory that can contain your "new import", | |||
$ cd / | $ cd /discover/swdev/mathomp4/Baselibs/NewImports | ||
untar the package (from http://nco.sourceforge.net/#Source), | |||
$ tar xzf nco-4.2.3.tar.gz | $ tar xzf nco-4.2.3.tar.gz | ||
and move into the new directory directory: | |||
$ cd nco-4.2.3/ | $ cd nco-4.2.3/ | ||
=== Import the new package === | |||
First, do a dry-run import of the package (note the <tt>-nq</tt>): | |||
$ bcvs -nq import -kk -m 'MAT: import NCO 4.2.3 retrieved 2012-NOV-13 from http://nco.sourceforge.net/#Source' Baselibs/src/nco NCO release-4_2_3 | $ bcvs -nq import -kk -m 'MAT: import NCO 4.2.3 retrieved 2012-NOV-13 from http://nco.sourceforge.net/#Source' Baselibs/src/nco NCO release-4_2_3 | ||
If everything looks okay, then actually import the package: | |||
$ bcvs import -kk -m 'MAT: import NCO 4.2.3 retrieved 2012-NOV-13 from http://nco.sourceforge.net/#Source' Baselibs/src/nco NCO release-4_2_3 | $ bcvs import -kk -m 'MAT: import NCO 4.2.3 retrieved 2012-NOV-13 from http://nco.sourceforge.net/#Source' Baselibs/src/nco NCO release-4_2_3 | ||
Line 40: | Line 42: | ||
cvs -d :ext:mathomp4@progressdirect:/cvsroot/baselibs checkout -j<prev_rel_tag> -jrelease-4_2_3 Baselibs/src/nco | cvs -d :ext:mathomp4@progressdirect:/cvsroot/baselibs checkout -j<prev_rel_tag> -jrelease-4_2_3 Baselibs/src/nco | ||
Note that this command provides helpful information on how to merge this package. You'll want to make a note of the previous release tag. The best way to find this out is via tkcvs, in my opinion. | |||
=== Merging the new package into the tree === | |||
First, check out a new Baselibs tree: | |||
$ cd /discover/swdev/mathomp4/Baselibs | $ cd /discover/swdev/mathomp4/Baselibs | ||
Line 49: | Line 55: | ||
$ bcvs -q checkout -kk Baselibs/src/nco | $ bcvs -q checkout -kk Baselibs/src/nco | ||
Note, I'm not too sure why you do the package checkout right after the full Baselibs checkout (which would checkout the HEAD), but Denis always did this. It can't hurt, though. Note also that we checkout ignoring keywords (<tt>-kk</tt>) which always makes merging easier. | |||
Then, checkout/update to new release: | |||
$ bcvs -nq update -kk -jrel-4_0_3-20100627 -jrelease-4_2_3 Baselibs/src/nco | $ bcvs -nq update -kk -jrel-4_0_3-20100627 -jrelease-4_2_3 Baselibs/src/nco | ||
and remove -nq and run again once satisfied. ''Note: Denis used this style of command, but CVS prefers checkout. Unsure which is better.'' | |||
Move into the new package directory: | |||
$ cd Baselibs/src/nco | $ cd Baselibs/src/nco | ||
and check for conflicts: | |||
$ bcvs -nq upd -kk | grep -r '^[C|M]' | $ bcvs -nq upd -kk | grep -r '^[C|M]' | ||
cvs update: New directory `autom4te.cache' -- ignored | cvs update: New directory `autom4te.cache' -- ignored | ||
Line 105: | Line 113: | ||
M man/ncwa.1 | M man/ncwa.1 | ||
Note in this case that no conflicts were found. If there were conflicts, you should resolve them. When in doubt, I suggest always using '''only''' what the new package contained. The only exceptions might be in Makefiles or other files that might have been edited by Denis or other maintainers to get it to build with the other Baselibs. But, if at all possible, go with the stock library. | |||
Once all is good, commit the changes: | |||
$ bcvs commit -m "MAT: merge new NCO release 4.2.3, no conflicts found" | |||
=== Tagging your new release === | |||
To make your new tag, first do a relative tag at the <tt>src/</tt> level: | |||
$ cd .. | $ cd .. | ||
$ bcvs tag -r GMAO-Baselibs-3_3_0 Internal-3_3_1 | $ bcvs tag -r GMAO-Baselibs-3_3_0 Internal-3_3_1 | ||
Then, for safety's sake, '''untag''' the new library and retag the against the new vendor release tag: | |||
$ cd nco/ | $ cd nco/ | ||
Line 124: | Line 132: | ||
$ bcvs tag -r release-4_2_3 Internal-3_3_1 | $ bcvs tag -r release-4_2_3 Internal-3_3_1 | ||
Next, edit the usual metafiles (<tt>Changelog</tt>, <tt>CONTENTS</tt>, and <tt>VERSION</tt>) as well as any needed make system changes and commit those on the HEAD. Then, push your new tag on those files: | |||
$ bcvs tag -F Internal-3_3_1 ChangeLog CONTENTS VERSION | |||
=== Verify new tag === | |||
The final step is to checkout the new tag and build the Baselibs per usual. My first step is to usually do a <tt>cvscmp</tt> against the old tag to make sure everything looks sane. I then like to do a <tt>diff -r</tt> between the updated library and the stock package that was downloaded from the web. Hopefully, all is well. | |||
If everything works, you can then delete your "before" tag and if all '''really''' works, rename the <tt>Internal</tt> tag with an official <tt>GMAO-Baselibs</tt> tag. | |||
[[Category:Baselibs|Updating]] | [[Category:Baselibs|Updating]] |