>-----Original Message----- >From: Cooper Jr., Franklin >Sent: Friday, October 25, 2013 3:50 PM >To: Maupin, Chase; [email protected] >Subject: RE: [meta-arago] [PATCH] sourceipk: Fix git repo in >copied sources not original sources > > >Acked-by: Franklin Cooper Jr. <[email protected]> > >Thanks for this!
You gave a good hint :) > >> -----Original Message----- >> From: [email protected] [mailto:meta-arago- >> [email protected]] On Behalf Of Maupin, Chase >> Sent: Friday, October 25, 2013 3:32 PM >> To: [email protected] >> Subject: [meta-arago] [PATCH] sourceipk: Fix git repo in copied >sources not >> original sources >> >> * Fix the adjust_git function to be called after the copy of >> the original sources to the tmp_dir and to modify the git >> sources in the copy rather than the original. >> * This also fixes an issue when trying to preserve the git >> repository for the kernel where the following would happen: >> 1. sourceipk would run the first time and fix the git >> remote url in the ${S} directory >> 2. during the compile phase the copy-defconfig functionality >> would try to re-package the sources. >> 3. At this point the "old" directory found by sourceipk >> class would be a git:// url instead of a directory on >> the build system that pointed into the DL_DIR. >> 4. This would fail the -d check and go into the else >> statement which would do rm -rf .git >> 5. The .git directory would not be preserved. >> >> Signed-off-by: Chase Maupin <[email protected]> >> --- >> meta-arago-distro/classes/sourceipk.bbclass | 8 +++++--- >> 1 files changed, 5 insertions(+), 3 deletions(-) >> >> diff --git a/meta-arago-distro/classes/sourceipk.bbclass b/meta- >arago- >> distro/classes/sourceipk.bbclass >> index dbe0b70..b6ab37d 100644 >> --- a/meta-arago-distro/classes/sourceipk.bbclass >> +++ b/meta-arago-distro/classes/sourceipk.bbclass >> @@ -65,7 +65,7 @@ adjust_git() { >> >> orig_dir="$PWD" >> >> - cd ${S} >> + cd $tmp_dir/${SRCIPK_INSTALL_DIR} >> >> if [ -d ".git" ] >> then >> @@ -122,8 +122,6 @@ sourceipk_do_create_srcipk() { >> if [ ${CREATE_SRCIPK} != "0" ] >> then >> >> - adjust_git >> - >> tmp_dir="${WORKDIR}/sourceipk-tmp" >> srcipk_dir="${WORKDIR}/sourceipk-data" >> mkdir -p $tmp_dir/CONTROL >> @@ -174,6 +172,10 @@ sourceipk_do_create_srcipk() { >> cp ${FILE} $tmp_dir/${SRCIPK_INSTALL_DIR}/ >> fi >> >> + # Adjust the git repository if there is one. Do this >adjustment >> + # here so we don't have to modify the original sources. >> + adjust_git >> + >> #Write the data tarball >> tar -C $tmp_dir --owner=0 --group=0 -czf >$srcipk_dir/data.tar.gz . >> >> -- >> 1.7.0.4 >> >> _______________________________________________ >> meta-arago mailing list >> [email protected] >> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago _______________________________________________ meta-arago mailing list [email protected] http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
