summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2012-02-17 13:01:21 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-08 12:07:57 -0800
commitf7fb723548f7c89173cb92e36262ecf4e2264ebb (patch)
treef1e7d4076f0473c7aca01337b0a2e183413c6fdc /documentation/dev-manual
parent452d2764c9d650d7b7d90579062133b2835b010c (diff)
downloadpoky-f7fb723548f7c89173cb92e36262ecf4e2264ebb.tar.gz
documentation/dev-manual/dev-manual-common-tasks.xml: review comments added
Paul Eggleton's review comments on the "Modifying Temporary Source Code" section have been applied. (From yocto-docs rev: 8f17f9e556e7027d8aba1fe69d614d17cdbcc054) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml76
1 files changed, 48 insertions, 28 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 5fcc69cbd0..9a5160cd9e 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -860,16 +860,16 @@ so that there are some definite steps on how to do this. I need more detail her
860 That directory is defined by the 860 That directory is defined by the
861 <ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-S'>S</ulink> 861 <ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-S'>S</ulink>
862 variable.</para></listitem> 862 variable.</para></listitem>
863 <listitem><para><emphasis>Notify Quilt:</emphasis> 863 <listitem><para><emphasis>Create a New Patch:</emphasis>
864 Before modifying source code, it is important to notify Quilt so it can track changes 864 Before modifying source code, you need to create a new patch.
865 into a new patch file.
866 To create a new patch file, use <filename>quilt new</filename> as below: 865 To create a new patch file, use <filename>quilt new</filename> as below:
867 <literallayout class='monospaced'> 866 <literallayout class='monospaced'>
868 $ quilt new my_changes.patch 867 $ quilt new my_changes.patch
869 </literallayout></para></listitem> 868 </literallayout></para></listitem>
870 <listitem><para><emphasis>Add Files:</emphasis> 869 <listitem><para><emphasis>Notify Quilt and Add Files:</emphasis>
871 After creating the patch, add the files you will be modifying into that patch 870 After creating the patch, you need to notify Quilt about the files you will
872 as follows: 871 be changing.
872 Add the files you will be modifying into the patch you just created:
873 <literallayout class='monospaced'> 873 <literallayout class='monospaced'>
874 $ quilt add file1.c file2.c file3.c 874 $ quilt add file1.c file2.c file3.c
875 </literallayout></para></listitem> 875 </literallayout></para></listitem>
@@ -905,9 +905,11 @@ so that there are some definite steps on how to do this. I need more detail her
905 <para>You can find the resulting patch file in the <filename>patches/</filename> 905 <para>You can find the resulting patch file in the <filename>patches/</filename>
906 subdirectory of the source (<filename>S</filename>) directory.</para></listitem> 906 subdirectory of the source (<filename>S</filename>) directory.</para></listitem>
907 <listitem><para><emphasis>Copy the Patch File:</emphasis> 907 <listitem><para><emphasis>Copy the Patch File:</emphasis>
908 For future builds, you should copy the patch file into the 908 For simplicity, copy the patch file into a directory named <filename>files</filename>,
909 <link linkend='yocto-project-files'>Yocto Project Files</link> metadata and add it 909 which you can create in the same directory as the recipe.
910 into the 910 Placing the patch here guarantees that the Yocto Project build system will find
911 the patch.
912 Next, add the patch into the
911 <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename> 913 <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename>
912 of the recipe. 914 of the recipe.
913 Here is an example: 915 Here is an example:
@@ -933,15 +935,11 @@ so that there are some definite steps on how to do this. I need more detail her
933 "<link linkend='git'>Git</link>" section. 935 "<link linkend='git'>Git</link>" section.
934 </para> 936 </para>
935 937
936 <para> 938 <note>
937 The steps in this section assume that you have already created a local Git repository of 939 This workflow uses Git only for its ability to manage local changes to the source code
938 the <link linkend='yocto-project-files'>Yocto Project Files</link> and have checked them 940 and produce patches independent of any version control used on the Yocto Project
939 out into an appropriate local working branch. 941 Files.
940 If you need more explanation on setting up the Yocto Project Files, see the 942 </note>
941 "<link linkend='getting-setup'>Getting Setup</link>" section.
942 Also, if you need information on Git workflows in general, see the
943 <link linkend='workflows'>Workflows</link> section.
944 </para>
945 943
946 <para> 944 <para>
947 Follow these general steps: 945 Follow these general steps:
@@ -958,6 +956,26 @@ so that there are some definite steps on how to do this. I need more detail her
958 That directory is defined by the 956 That directory is defined by the
959 <ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-S'>S</ulink> 957 <ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-S'>S</ulink>
960 variable.</para></listitem> 958 variable.</para></listitem>
959 <listitem><para><emphasis>Initialize a Git Repository:</emphasis>
960 Use the <filename>git init</filename> command to initialize a new local repository
961 that is based on your source code directory:
962 <literallayout class='monospaced'>
963 $ git init
964 </literallayout></para></listitem>
965 <listitem><para><emphasis>Stage all the files:</emphasis>
966 Use the <filename>git add *</filename> command to stage all the files in the source
967 code directory so that they can be committed:
968 <literallayout class='monospaced'>
969 $ git add *
970 </literallayout></para></listitem>
971 <listitem><para><emphasis>Commit the Source Files:</emphasis>
972 Use the <filename>git commit</filename> command to initially commit all the files in
973 the source code directory:
974 <literallayout class='monospaced'>
975 $ git commit
976 </literallayout>
977 At this point, your Git repository is aware of all the source code files.
978 Any edits you now make to files will be tracked by Git.</para></listitem>
961 <listitem><para><emphasis>Edit the Files:</emphasis> 979 <listitem><para><emphasis>Edit the Files:</emphasis>
962 Make the changes to the temporary source code.</para></listitem> 980 Make the changes to the temporary source code.</para></listitem>
963 <listitem><para><emphasis>Test Your Changes:</emphasis> 981 <listitem><para><emphasis>Test Your Changes:</emphasis>
@@ -979,7 +997,7 @@ so that there are some definite steps on how to do this. I need more detail her
979 section of the Yocto Project Quick Start. 997 section of the Yocto Project Quick Start.
980 </note></para></listitem> 998 </note></para></listitem>
981 <listitem><para><emphasis>See the List of Files You Changed:</emphasis> 999 <listitem><para><emphasis>See the List of Files You Changed:</emphasis>
982 Use the Git <filename>status</filename> command to see what files you have actually edited. 1000 Use the <filename>git status</filename> command to see what files you have actually edited.
983 The ability to have Git track the files you have changed is an advantage that this 1001 The ability to have Git track the files you have changed is an advantage that this
984 workflow has over the Quilt workflow. 1002 workflow has over the Quilt workflow.
985 Here is the Git command to list your changed files: 1003 Here is the Git command to list your changed files:
@@ -987,22 +1005,22 @@ so that there are some definite steps on how to do this. I need more detail her
987 $ git status 1005 $ git status
988 </literallayout></para></listitem> 1006 </literallayout></para></listitem>
989 <listitem><para><emphasis>Stage the Modified Files:</emphasis> 1007 <listitem><para><emphasis>Stage the Modified Files:</emphasis>
990 Use the Git <filename>add</filename> command to stage the changed files so they 1008 Use the <filename>git add</filename> command to stage the changed files so they
991 can be committed as follows: 1009 can be committed as follows:
992 <literallayout class='monospaced'> 1010 <literallayout class='monospaced'>
993 $ git add file1.c file2.c file3.c 1011 $ git add file1.c file2.c file3.c
994 </literallayout></para></listitem> 1012 </literallayout></para></listitem>
995 <listitem><para><emphasis>Commit the Staged Files and View Your Changes:</emphasis> 1013 <listitem><para><emphasis>Commit the Staged Files and View Your Changes:</emphasis>
996 Use the Git <filename>commit</filename> command to commit the changes to the 1014 Use the <filename>git commit</filename> command to commit the changes to the
997 local repository. 1015 local repository.
998 Once you have committed the files, you can use the Git <filename>log</filename> 1016 Once you have committed the files, you can use the <filename>git log</filename>
999 command to see your changes: 1017 command to see your changes:
1000 <literallayout class='monospaced'> 1018 <literallayout class='monospaced'>
1001 $ git commit 1019 $ git commit
1002 $ git log 1020 $ git log
1003 </literallayout></para></listitem> 1021 </literallayout></para></listitem>
1004 <listitem><para><emphasis>Generate the Patch:</emphasis> 1022 <listitem><para><emphasis>Generate the Patch:</emphasis>
1005 Once the changes are committed, you use the Git <filename>format-patch</filename> 1023 Once the changes are committed, use the <filename>git format-patch</filename>
1006 command to generate a patch file: 1024 command to generate a patch file:
1007 <literallayout class='monospaced'> 1025 <literallayout class='monospaced'>
1008 $ git format-patch HEAD~1 1026 $ git format-patch HEAD~1
@@ -1012,12 +1030,14 @@ so that there are some definite steps on how to do this. I need more detail her
1012 <para>At this point, the patch file has all your edits made 1030 <para>At this point, the patch file has all your edits made
1013 to the <filename>file1.c</filename>, <filename>file2.c</filename>, and 1031 to the <filename>file1.c</filename>, <filename>file2.c</filename>, and
1014 <filename>file3.c</filename> files. 1032 <filename>file3.c</filename> files.
1015 You can find the resulting patch file in the <filename>patches/</filename> 1033 You can find the resulting patch file in the current directory.
1016 subdirectory of the source (<filename>S</filename>) directory.</para></listitem> 1034 The patch file ends with <filename>.patch</filename>.</para></listitem>
1017 <listitem><para><emphasis>Copy the Patch File:</emphasis> 1035 <listitem><para><emphasis>Copy the Patch File:</emphasis>
1018 For future builds, you should copy the patch file into the 1036 For simplicity, copy the patch file into a directory named <filename>files</filename>,
1019 <link linkend='yocto-project-files'>Yocto Project Files</link> metadata and add it 1037 which you can create in the same directory as the recipe.
1020 into the 1038 Placing the patch here guarantees that the Yocto Project build system will find
1039 the patch.
1040 Next, add the patch into the
1021 <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename> 1041 <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename>
1022 of the recipe. 1042 of the recipe.
1023 Here is an example: 1043 Here is an example: