ooo-build r13368 - in trunk: . bin
- From: jannieuw svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r13368 - in trunk: . bin
- Date: Wed, 23 Jul 2008 15:51:54 +0000 (UTC)
Author: jannieuw
Date: Wed Jul 23 15:51:54 2008
New Revision: 13368
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13368&view=rev
Log:
2008-07-23 Jan Nieuwenhuizen <janneke gnu org>
* Makefile.shared:
* configure.in: Add --with-git support through bin/gob for working
with a simple local repository.
* bin/gob: Fix support for --with-git. Do not ignore localize.sdf
files. Support using any [Section] as --distro parameter.
Modified:
trunk/ChangeLog
trunk/Makefile.shared
trunk/bin/gob
trunk/configure.in
Modified: trunk/Makefile.shared
==============================================================================
--- trunk/Makefile.shared (original)
+++ trunk/Makefile.shared Wed Jul 23 15:51:54 2008
@@ -11,6 +11,7 @@
unpack : $(OOBUILDDIR)/unpack $(top_srcdir)/bin/unpack
$(OOBUILDDIR)/unpack :
$(TOOLSDIR)/bin/transform --revert $(TOOLSDIR) $(OOBUILDDIR)
+ -test -n "$(OOO_GIT)" && $(TOOLSDIR)/bin/gob --build-dir=$(OOBUILDDIR) prepare
if test -d $(OOBUILDDIR)/applied_patches ; then \
FLAGS="--distro=$(DISTRO)"; \
if test -d $(OOBUILDDIR)/binfilter ; then \
@@ -37,6 +38,7 @@
chmod +x $(TOOLSDIR)/patches/apply.pl && $(TOOLSDIR)/patches/apply.pl $(APPLY_DIR) $(OOBUILDDIR) $$FLAGS -f -R ; \
fi
cd $(top_srcdir)/bin ; ./unpack
+ -test -n "$(OOO_GIT)" && $(TOOLSDIR)/bin/gob --build-dir=$(OOBUILDDIR) postpare
rm -f $(STAMP_DIR)/build $(STAMP_DIR)/patch.apply \
$(STAMP_DIR)/artwork.install
touch $@
@@ -90,13 +92,14 @@
fi
$(TOOLSDIR)/bin/transform --revert $(TOOLSDIR) $(OOBUILDDIR)
+ -test -n "$(OOO_GIT)" && $(TOOLSDIR)/bin/gob --build-dir=$(OOBUILDDIR) prepare
FLAGS="--distro=$(DISTRO)"; \
if test -d $(OOBUILDDIR)/binfilter ; then \
FLAGS="$$FLAGS --distro=Binfilter"; \
fi ; \
- if test -d $(OOBUILDDIR)/zlib; then \
- FLAGS="$$FLAGS --distro=System"; \
- fi ; \
+ if test -d $(OOBUILDDIR)/zlib; then \
+ FLAGS="$$FLAGS --distro=System"; \
+ fi ; \
if test -d $(OOBUILDDIR)/sdk_oo ; then \
FLAGS="$$FLAGS --distro=Sdk"; \
fi ; \
@@ -113,7 +116,9 @@
FLAGS="$$FLAGS --pieces --distro=Piece"; \
fi ; \
chmod +x $(TOOLSDIR)/patches/apply.pl && $(TOOLSDIR)/patches/apply.pl $(APPLY_DIR) $(OOBUILDDIR) $$FLAGS --tag=$(CVSTAG) ;
+ -test -n "$(OOO_GIT)" && $(TOOLSDIR)/bin/gob --build-dir=$(OOBUILDDIR) postpare
$(TOOLSDIR)/bin/transform --apply $(TOOLSDIR) $(OOBUILDDIR)
+ -test -n "$(OOO_GIT)" && cd $(OOBUILDDIR) && git-commit -am 'Font munging.'
$(TOOLSDIR)/bin/fix-deps $(OOBUILDDIR)
rm -f $(STAMP_DIR)/build
touch $@
Modified: trunk/bin/gob
==============================================================================
--- trunk/bin/gob (original)
+++ trunk/bin/gob Wed Jul 23 15:51:54 2008
@@ -299,7 +299,6 @@
CVS
TAGS
\#*
-localize.sdf
unxlng*.pro
config_office/autom4te.cache/
config_office/config.log
@@ -414,7 +413,7 @@
return re.search ('\nRevision: ([0-9]+)', read_pipe ('svn info')).group (1)
class Git:
- def __init__ (self, dir, patched):
+ def __init__ (self, dir, patched, clean=False):
self.dir = dir
self.patched = patched
self.scratch = 'work/scratch'
@@ -425,21 +424,22 @@
if not os.path.exists (self.dir):
drink = Setup ().get ('DRINK', 'tea')
print >> sys.stderr, 'Unpacking source tree - [ go and have some %(drink)s ] ...' % locals ()
- system ('make unpack')
+ system ('cd bin && ./unpack')
if not os.path.isdir (dir + '/.git'):
create_gitignores (dir)
drink = Setup ().get ('DRINK')
print >> sys.stderr, 'Creating GIT archive - [ go and have some %(drink)s ] ...' % locals ()
self.system ('git-init')
svn_revision = get_svn_revision ()
- self.commit ('Initial svn:r%(svn_revision)s unpatched' % locals ())
+ self.commit ('Initial svn:r%(svn_revision)s unpatched.' % locals ())
self.system ('git-branch %(pristine)s' % self.__dict__)
self.system ('git-tag gob-%(workspace)s-%(milestone)s %(pristine)s' % self.__dict__)
self.system ('git-branch pristine')
self.system ('git-gc')
- if self.is_modified ():
- self.system ('git reset --hard HEAD')
- self.system ('git clean -f')
+ if clean:
+ if self.is_modified ():
+ self.system ('git reset --hard HEAD')
+ self.system ('git clean -df')
if self.has_branch (self.patched):
self.checkout (self.patched)
else:
@@ -611,6 +611,7 @@
self.string = s
m = re.match ('[[\s]*(.*[^\s])\s*\]', self.string)
self.tag = m.group (1).replace (' ', '')
+ self.name = re.sub ('[^\w].*', '', self.tag)
m = re.search ('\n(SectionOwner)\s*=>\s*(.*[^\s])', self.string)
self.owner = ''
if m:
@@ -646,12 +647,16 @@
del self.master[i]
expanded += self.distro.get (i, [i])
self.master[distro[0]] = self.distro[distro[0]] = expanded
+ # convenience: add sections as distro
+ #self.distro.update (dict (map (lambda x: (x.name, x.name), self.get_sections ())))
def get_section_strings (self):
return map (lambda x: '[' + x, self.sections_string.split ('\n[')[1:])
def get_sections (self):
return map (Section, self.get_section_strings ())
def get_distro (self, distro_name):
def section_in_distro (section):
+ if distro_name not in self.distro.keys ():
+ return distro_name == section.name
m = re.search ('(\w+).*(<=|<|==|!=|>=|>)%(workspace)s-m([0-9]+)'
% self.__dict__, section.tag)
if m:
@@ -709,7 +714,7 @@
and (self.options.milestone not in ['19', '21']
or self.options.workspace != 'dev300')):
raise SystemFailed ('Export only supported for dev300-m19, dev300-m21. Use --force to override')
- git = Git (self.options.build_dir, self.options.patched)
+ git = Git (self.options.build_dir, self.options.patched, clean=True)
patches = self.get_patches ()
branches = self.get_branches ()
for patch in self.get_patches ():
@@ -941,6 +946,7 @@
options = set_option_defaults (parse_options ())
apply_file = options.apply_dir + '/apply'
apply = Apply (apply_file, options.workspace, options.milestone)
+ print options
Command.__dict__[options.command] (Command (apply, options))
if __name__ == '__main__':
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Wed Jul 23 15:51:54 2008
@@ -346,6 +346,11 @@
Example: --with-drink=coffee],
,)
+AC_ARG_WITH(git,
+[
+ --with-git Use GIT to manage your patches],
+,)
+
dnl
dnl Items here only to make --help work nicely:
dnl
@@ -1144,6 +1149,19 @@
fi
AC_MSG_RESULT([$build_product])
+AC_MSG_CHECKING([whether to use GIT])
+if test -z "$with_git" -o "$with_git" = "no"; then
+ unset OOO_GIT
+ AC_MSG_RESULT([no])
+else
+ OOO_GIT=git
+ if test "z$with_git" != "zyes"; then
+ OOO_GIT=$with_git
+ fi
+ AC_MSG_RESULT([$OOO_GIT])
+fi
+AC_SUBST(OOO_GIT)
+
UPSTREAM_NAME=
UPSTREAM_SOURCE=
UPSTREAM_URI=
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]