All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Maupin, Chase" <chase.maupin@ti.com>
To: "Cooper Jr., Franklin" <fcooper@ti.com>,
	"meta-arago@arago-project.org" <meta-arago@arago-project.org>
Subject: Re: [PATCH 2/6 v2] sourceipk: Add ability to preserve Git	repository
Date: Fri, 30 Aug 2013 15:05:02 +0000	[thread overview]
Message-ID: <7D46E86EC0A8354091174257B2FED101596F8144@DLEE11.ent.ti.com> (raw)
In-Reply-To: <1377633092-29917-2-git-send-email-fcooper@ti.com>

Acked-by: Chase Maupin <chase.maupin@ti.com>


>-----Original Message-----
>From: meta-arago-bounces@arago-project.org [mailto:meta-arago-
>bounces@arago-project.org] On Behalf Of Cooper Jr., Franklin
>Sent: Tuesday, August 27, 2013 2:51 PM
>To: meta-arago@arago-project.org
>Cc: Cooper Jr., Franklin
>Subject: [meta-arago] [PATCH 2/6 v2] sourceipk: Add ability to
>preserve Git repository
>
>* When a git repository is unpacked the repository located in the
>WORKDIR is
>  cloned from the git repository located in the downloads
>directory.
>* Various references and settings are set within the repo which
>makes it
>  impossible for the git repository packaged by sourceipk to be
>useable on any
>  computer other than the original computer that the sourceipk was
>created in.
>* This patch allows the git repository to be preserved and fixed
>up to become
>  a fully functional portable git repository.
>
>Signed-off-by: Franklin S. Cooper Jr <fcooper@ti.com>
>---
>Version 2 changes:
>Fix commit message typo and add comment removal to this patch.
>
> meta-arago-distro/classes/sourceipk.bbclass |   35
>+++++++++++++++++++++++----
> 1 files changed, 30 insertions(+), 5 deletions(-)
>
>diff --git a/meta-arago-distro/classes/sourceipk.bbclass b/meta-
>arago-distro/classes/sourceipk.bbclass
>index 1844ff3..1ea0577 100644
>--- a/meta-arago-distro/classes/sourceipk.bbclass
>+++ b/meta-arago-distro/classes/sourceipk.bbclass
>@@ -59,17 +59,42 @@ SRCIPK_SECTION ?= "${SECTION}"
> # Default SRCIPK_INCLUDE_EXTRAFILES is to include the extra files
> SRCIPK_INCLUDE_EXTRAFILES ?= "1"
>
>-# Remove git repositories before packaging up the sources
>-clear_git() {
>+SRCIPK_PRESERVE_GIT ?= "false"
>+
>+adjust_git() {
>+
>+    orig_dir="$PWD"
>
>     cd ${S}
>
>     if [ -d ".git" ]
>     then
>-        rm -rf .git
>+
>+        # Grab path to cloned local repository
>+        old=`git remote -v | grep "(fetch)" | cut -d ' ' -f 1   |
>cut -c 7- | tr -d ' '`
>+
>+        if [ -d $old -a "${SRCIPK_PRESERVE_GIT}" = "true" ]
>+        then
>+            cd $old
>+
>+            # Grab actual url used to create the repository
>+            orig=`git remote -v | grep "(fetch)" | cut -d ' ' -f
>1   | cut -c 7- | tr -d ' '`
>+
>+            cd -
>+
>+            git remote set-url origin $orig $old
>+
>+            # Repackage the repository so its a proper clone of
>the original (remote) git repository
>+            git repack -a -d
>+            rm .git/objects/info/alternates
>+
>+        else
>+            rm -rf .git
>+        fi
>+
>     fi
>
>-    cd -
>+    cd $orig_dir
>
> }
>
>@@ -97,7 +122,7 @@ sourceipk_do_create_srcipk() {
>     if [ ${CREATE_SRCIPK} != "0" ]
>     then
>
>-        clear_git
>+        adjust_git
>
>         tmp_dir="${WORKDIR}/sourceipk-tmp"
>         srcipk_dir="${WORKDIR}/sourceipk-data"
>--
>1.7.0.4
>
>_______________________________________________
>meta-arago mailing list
>meta-arago@arago-project.org
>http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


  reply	other threads:[~2013-08-30 15:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27 19:51 [PATCH 1/6 v2] gst-plugins-bad: Use new PACKAGECONFIG feature Franklin S. Cooper Jr
2013-08-27 19:51 ` [PATCH 2/6 v2] sourceipk: Add ability to preserve Git repository Franklin S. Cooper Jr
2013-08-30 15:05   ` Maupin, Chase [this message]
2013-08-27 19:51 ` [PATCH 3/6 v2] board-port-labs-linux: Create new recipe using new sourceipk.bbclass feature Franklin S. Cooper Jr
2013-08-30 15:05   ` Maupin, Chase
2013-09-04 22:47   ` Denys Dmytriyenko
2013-09-05  0:36     ` Cooper Jr., Franklin
2013-08-27 19:51 ` [PATCH 4/6 v2] board-port-labs-u-boot: " Franklin S. Cooper Jr
2013-08-30 15:06   ` Maupin, Chase
2013-08-27 19:51 ` [PATCH 5/6 v2] packagegroup-arago-tisdk-amsdk-sdk-host: Use new board-port-labs recipe Franklin S. Cooper Jr
2013-08-30 15:06   ` Maupin, Chase
2013-08-27 19:51 ` [PATCH 6/6] board-port-labs: Remove old " Franklin S. Cooper Jr
2013-08-30 15:06   ` Maupin, Chase
2013-08-30 15:03 ` [PATCH 1/6 v2] gst-plugins-bad: Use new PACKAGECONFIG feature Maupin, Chase
2013-08-30 15:44   ` Cooper Jr., Franklin
2013-09-03 17:31     ` Denys Dmytriyenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7D46E86EC0A8354091174257B2FED101596F8144@DLEE11.ent.ti.com \
    --to=chase.maupin@ti.com \
    --cc=fcooper@ti.com \
    --cc=meta-arago@arago-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.