Difference between revisions of "Upgrading packages"

From Openembedded.org
Jump to: navigation, search
(Tweak formatting, update and extend a bit)
Line 1: Line 1:
Different layers have different policies for keeping versions of software around. Oe-Core for example is fairly agressive about having one, good, recent version of the software than many older versions. Other layers may have different policies.
+
Different layers have different policies for keeping versions of software around. OE-Core for example is fairly agressive about having one, good, recent version of the software than many older versions. Other layers may have different policies.
  
 
There are two cases we need to consider:
 
There are two cases we need to consider:
Line 6: Line 6:
 
# You don't.
 
# You don't.
  
= You do not need to keep the last version of the package =
+
= If you do not need to keep the last version of the package =
  
# Use "[http://www.kernel.org/pub/software/scm/git/docs/git-mv.html <u>git-mv</u>] packages/$pkg/$file_v1.bb packages/$pkg/$file_v2.bb"
+
# Use [http://www.kernel.org/pub/software/scm/git/docs/git-mv.html <u>git mv</u>] recipes-xyz/recipename/recipename_1.0.bb recipes-xyz/recipename/recipename_2.0.bb
# make <u>further changes</u> to packages/$pkg/$file_v2.bb as appropriate.
+
# Make <u>further changes</u> to recipes-xyz/recipename/recipename_2.0.bb as appropriate.
# At the very minimum do a <u>compilation test</u> "bitbake $file" to make sure the new package does at least fetch and compile.
+
# At the very minimum do a <u>compilation test</u> "bitbake <basename>" to make sure the new package does at least fetch and compile.
# inspect the output of "<u>git diff</u> packages/$pkg/".  Is this really what you want to commit?
+
# Consider using buildhistory to check for changes between the versions.
 +
# Inspect the output of "<u>git diff</u> recipes-xyz/recipename/".  Is this really what you want to commit?
 
# Final step, <u>publish your work</u>.  "git commit packages/$pkg/ && git push".
 
# Final step, <u>publish your work</u>.  "git commit packages/$pkg/ && git push".
  
= You do want to keep the last version of the package =
+
= If you do want to keep the last version of the package =
  
 
Same as above, except instead of the first step:
 
Same as above, except instead of the first step:
  
  cp packages/$pkg/$file_v1.bb packages/$pkg/$file_v2.bb
+
  cp recipes-xyz/recipename/recipename_1.0.bb recipes-xyz/recipename/recipename_2.0.bb
  git-add packages/$pkg/$file_v2.bb
+
  git add recipes-xyz/recipename/recipename_2.0.bb
  
 
[[Category:Policy]]
 
[[Category:Policy]]

Revision as of 13:07, 5 June 2014

Different layers have different policies for keeping versions of software around. OE-Core for example is fairly agressive about having one, good, recent version of the software than many older versions. Other layers may have different policies.

There are two cases we need to consider:

  1. You do want to keep the version of the bb file that is in OE now (somebody else needs this particular version)
  2. You don't.

If you do not need to keep the last version of the package

  1. Use git mv recipes-xyz/recipename/recipename_1.0.bb recipes-xyz/recipename/recipename_2.0.bb
  2. Make further changes to recipes-xyz/recipename/recipename_2.0.bb as appropriate.
  3. At the very minimum do a compilation test "bitbake <basename>" to make sure the new package does at least fetch and compile.
  4. Consider using buildhistory to check for changes between the versions.
  5. Inspect the output of "git diff recipes-xyz/recipename/". Is this really what you want to commit?
  6. Final step, publish your work. "git commit packages/$pkg/ && git push".

If you do want to keep the last version of the package

Same as above, except instead of the first step:

cp recipes-xyz/recipename/recipename_1.0.bb recipes-xyz/recipename/recipename_2.0.bb
git add recipes-xyz/recipename/recipename_2.0.bb