[ooo-build-commit] .: 3 commits - bin/git-new-workdir bin/setup.in distro-configs/SUSE-11.1.conf.in distro-configs/SUSE-11.2.conf.in download.in Makefile.shared
Thorsten Behrens
thorsten at kemper.freedesktop.org
Sat Sep 4 13:04:11 PDT 2010
Makefile.shared | 2
bin/git-new-workdir | 82 +++++++++++++++++++++++++++++++++++++++
bin/setup.in | 2
distro-configs/SUSE-11.1.conf.in | 1
distro-configs/SUSE-11.2.conf.in | 1
download.in | 15 +++++--
6 files changed, 97 insertions(+), 6 deletions(-)
New commits:
commit 6edca6d9c7a3c968ca5d9cba2301936f31c4bb11
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Sat Sep 4 17:13:17 2010 +0200
Integrated git-new-workdir cloning to download script
* bin/git-new-workdir: stolen from git/contrib, git-new-workdir is
a very nice trick to generate multiple working directories from
the same repo (on the same disk), sharing refs & commits, but
keeping working tree and index separate
* download.in: tweaked download to use lightweight git-new-workdir
instead of git clone, whenever the repo given at --with-git=<repo>
appears to be local - maybe some magic to exclude network-mounted
dirs to be desired here, but otherwise fine.
diff --git a/bin/git-new-workdir b/bin/git-new-workdir
new file mode 100755
index 0000000..3ad2c0c
--- /dev/null
+++ b/bin/git-new-workdir
@@ -0,0 +1,82 @@
+#!/bin/sh
+
+usage () {
+ echo "usage:" $@
+ exit 127
+}
+
+die () {
+ echo $@
+ exit 128
+}
+
+if test $# -lt 2 || test $# -gt 3
+then
+ usage "$0 <repository> <new_workdir> [<branch>]"
+fi
+
+orig_git=$1
+new_workdir=$2
+branch=$3
+
+# want to make sure that what is pointed to has a .git directory ...
+git_dir=$(cd "$orig_git" 2>/dev/null &&
+ git rev-parse --git-dir 2>/dev/null) ||
+ die "Not a git repository: \"$orig_git\""
+
+case "$git_dir" in
+.git)
+ git_dir="$orig_git/.git"
+ ;;
+.)
+ git_dir=$orig_git
+ ;;
+esac
+
+# don't link to a configured bare repository
+isbare=$(git --git-dir="$git_dir" config --bool --get core.bare)
+if test ztrue = z$isbare
+then
+ die "\"$git_dir\" has core.bare set to true," \
+ " remove from \"$git_dir/config\" to use $0"
+fi
+
+# don't link to a workdir
+if test -L "$git_dir/config"
+then
+ die "\"$orig_git\" is a working directory only, please specify" \
+ "a complete repository."
+fi
+
+# don't recreate a workdir over an existing repository
+if test -e "$new_workdir"
+then
+ die "destination directory '$new_workdir' already exists."
+fi
+
+# make sure the links use full paths
+git_dir=$(cd "$git_dir"; pwd)
+
+# create the workdir
+mkdir -p "$new_workdir/.git" || die "unable to create \"$new_workdir\"!"
+
+# create the links to the original repo. explicitly exclude index, HEAD and
+# logs/HEAD from the list since they are purely related to the current working
+# directory, and should not be shared.
+for x in config refs logs/refs objects info hooks packed-refs remotes rr-cache svn
+do
+ case $x in
+ */*)
+ mkdir -p "$(dirname "$new_workdir/.git/$x")"
+ ;;
+ esac
+ ln -s "$git_dir/$x" "$new_workdir/.git/$x"
+done
+
+# now setup the workdir
+cd "$new_workdir"
+# copy the HEAD from the original repository as a default branch
+cp "$git_dir/HEAD" .git/HEAD
+# checkout the branch (either the same as HEAD from the original repository, or
+# the one that was asked for)
+git checkout -f $branch
diff --git a/download.in b/download.in
index 3d21a3a..47f1512 100755
--- a/download.in
+++ b/download.in
@@ -267,11 +267,18 @@ sub source_file_ooo($)
my $tag = '@CVSTAG@';
if ( '@OOO_GIT@' ne "" ) {
- $op = "cloning";
- $op = "updating" if ( -d "@CLONEDIR@/$what" );
- print "* $op from " . '@OOO_GIT@' . "/$what\n";
+ if ( -d "@CLONEDIR@/$what" ) {
+ print "* repo already there, skipping " . '@OOO_GIT@' . "/$what\n";
+ } else {
+ if ( -d '@OOO_GIT@' . "/$what" ) {
+ print "* git-new-workdir from " . '@OOO_GIT@' . "/$what\n";
+ system( "cd @CLONEDIR@ ; @TOOLSDIR@/bin/git-new-workdir " . '@OOO_GIT@' . "/$what " . '@CLONEDIR@' . "/$what" ) && exit 1;
+ } else {
+ print "* cloning from " . '@OOO_GIT@' . "/$what\n";
+ system( "cd @CLONEDIR@ ; git clone " . '@OOO_GIT@' . "/$what " ) && exit 1;
+ }
+ }
- system( "cd @CLONEDIR@ ; if [ -d $what ] ; then cd $what ; git fetch -t origin ; else git clone " . '@OOO_GIT@' . "/$what ; fi" ) && exit 1;
system( "cd @CLONEDIR@/$what ; git status | grep '^# Your branch is'" );
system( "for file in `cd git-hooks ; echo *`
do
commit 7153c8f44a8b6c5839dde5d3612053984942a9a3
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Sat Sep 4 16:45:09 2010 +0200
Not using junit on opensuse because it is too old
diff --git a/distro-configs/SUSE-11.1.conf.in b/distro-configs/SUSE-11.1.conf.in
index 6cd100c..9a88b8d 100644
--- a/distro-configs/SUSE-11.1.conf.in
+++ b/distro-configs/SUSE-11.1.conf.in
@@ -43,3 +43,4 @@
--with-system-xml-apis
--with-system-xrender-headers
--without-myspell-dicts
+--without-junit
diff --git a/distro-configs/SUSE-11.2.conf.in b/distro-configs/SUSE-11.2.conf.in
index b9ff2f8..c36f132 100644
--- a/distro-configs/SUSE-11.2.conf.in
+++ b/distro-configs/SUSE-11.2.conf.in
@@ -41,3 +41,4 @@
--with-system-xml-apis
--with-system-xrender-headers
--without-myspell-dicts
+--without-junit
commit ae93ab4ebc8d2e34414ada0a90b2d1168e7082f0
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Fri Aug 27 01:14:40 2010 +0200
Cleanup debug output, cleansed setup sed line
* Makefile.shared: removed echo
* bin/setup.in: completelangiso sed script looked weird and broke
here, so made last statement match only first occurence of
completelangiso
diff --git a/Makefile.shared b/Makefile.shared
index 70d0b22..c5f74dd 100644
--- a/Makefile.shared
+++ b/Makefile.shared
@@ -74,8 +74,8 @@ patch.list:
CURRTAG=$(CVSTAG); test -f $(OOBUILDDIR)/.tag && CURRTAG=`cat $(OOBUILDDIR)/.tag`; \
chmod +x $(TOOLSDIR)/patches/apply.pl && $(TOOLSDIR)/patches/apply.pl $(APPLY_DIR) $(OOBUILDDIR) $$FLAGS --dry-run --quiet --tag=$$CURRTAG
+refresh: $(STAMP_DIR)/refresh
$(STAMP_DIR)/refresh : $(CLONEDIR)/repos_changed
- echo blah
echo $(OOO_GIT)
if test "z$(OOO_GIT)" != "z" ; then \
$(TOOLSDIR)/bin/transform --revert $(TOOLSDIR) $(OOBUILDDIR) ; \
diff --git a/bin/setup.in b/bin/setup.in
index d0d56f4..fd59b6d 100755
--- a/bin/setup.in
+++ b/bin/setup.in
@@ -181,7 +181,7 @@ if test -f $solenv_dir/inc/postset.mk ; then
# + removes backslashes
# + removes en-US; we want to put it on the beginning
# + prints just the section starting with 'completelangiso=' and ending with the " at the end of line
- eval $(sed -n 's/=/="/;s/\([^\\]\)$/\1"/;s/\\//;s/en-US//;/^completelangiso=/,/"$/p' $solenv_dir/inc/postset.mk)
+ eval $(sed -n 's/=/="/;s/\([^\\]\)$/\1"/;s/\\//;s/en-US//;/^completelangiso/p' $solenv_dir/inc/postset.mk)
ALL_LANGS="en-US $completelangiso"
OOO_LANGS_LIST=`echo $OOO_LANGS | sed -e "s|ALL|$ALL_LANGS|g"`
fi
More information about the ooo-build-commit
mailing list