Mercurial > gub
changeset 3425:6ec2f3d0bb59
installer-builder fixes.
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Fri, 04 May 2007 09:39:34 +0200 |
parents | a38bed03e001 |
children | 632f2ab3cdaf |
files | bin/cygwin-packager bin/gpkg bin/gub bin/installer-builder compilers.make gub.make gub/context.py gub/gup.py gub/installer.py gub/settings.py lilypond.make mingit.make test-lily/dist-check.py |
diffstat | 13 files changed, 82 insertions(+), 61 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/cygwin-packager Fri May 04 00:01:24 2007 +0200 +++ b/bin/cygwin-packager Fri May 04 09:39:34 2007 +0200 @@ -315,6 +315,8 @@ action='append', help='set branch for package') + p.add_option ('-v', '--verbose', action='count', dest='verbose', default=0) + (options, args) = p.parse_args () if len (args) != 1: p.print_help () @@ -322,9 +324,9 @@ return (options, args) def main (): - (options, commands) = parse_command_line () - platform = 'cygwin' - settings = gub.settings.get_settings (platform) + (options, commands) = parse_command_line () + options.platform = 'cygwin' + settings = gub.settings.Settins (options) # We want to be able to specify a build number for cygwin packages # that are not distributed on lp.org settings.build = options.build
--- a/bin/gpkg Fri May 04 00:01:24 2007 +0200 +++ b/bin/gpkg Fri May 04 09:39:34 2007 +0200 @@ -185,6 +185,7 @@ platform = options.platform target_manager.read_package_headers ('uploads/%(platform)s/' % locals (), branch_dict) + target_manager.read_package_headers ('uploads/%(platform)s/cross/' % locals (), branch_dict) if options.command: commands = Command (target_manager, options)
--- a/bin/gub Fri May 04 00:01:24 2007 +0200 +++ b/bin/gub Fri May 04 09:39:34 2007 +0200 @@ -128,6 +128,7 @@ # FIXME: put all these functions that take manager, settings, specs, deps # into a 'builder' class? + def pkg_checksum_valid (manager, spec, pkg): name = pkg.name () pkg_dict = manager.package_dict (name)
--- a/bin/installer-builder Fri May 04 00:01:24 2007 +0200 +++ b/bin/installer-builder Fri May 04 09:39:34 2007 +0200 @@ -74,7 +74,6 @@ default=[], dest="settings", help="extra overrides for settings") - p.add_option ('-p', '--target-platform', action='store', dest='platform', @@ -83,6 +82,8 @@ help='select target platform', choices=gub.settings.platforms.keys ()) + p.add_option ('-v', '--verbose', action='count', dest='verbose', default=0) + (options, args) = p.parse_args () if not options.platform: @@ -98,6 +99,8 @@ install_manager = gup.PackageDictManager (settings.os_interface) install_manager.read_package_headers (settings.gub_uploads, settings.branch_dict) + install_manager.read_package_headers (settings.cross_gub_uploads, + settings.branch_dict) ## can't interrogate installer yet, because version is not known yet. file = installer.installer_checksum_file @@ -125,6 +128,8 @@ install_manager.include_build_deps = False install_manager.read_package_headers (settings.gub_uploads, settings.branch_dict) + install_manager.read_package_headers (settings.cross_gub_uploads, + settings.branch_dict) def get_dep (x): return install_manager.dependencies (x) @@ -135,7 +140,7 @@ # WTF is gcc-runtime? Add to package dependencies, if necessary if not settings.is_distro: - package_names += ["gcc-runtime"] + package_names += ["cross/gcc-runtime"] for a in package_names: install_manager.install_package (a) @@ -207,7 +212,7 @@ def main (): (options, commands) = parse_command_line () - settings = gub.settings.get_settings (options.platform) + settings = gub.settings.Settings (options) settings.set_branches (options.branches) for s in options.settings:
--- a/compilers.make Fri May 04 00:01:24 2007 +0200 +++ b/compilers.make Fri May 04 09:39:34 2007 +0200 @@ -9,7 +9,8 @@ # GUB_CROSS_DISTCC_HOSTS - hosts with matching cross compilers # GUB_DISTCC_ALLOW_HOSTS - which distcc daemons may connect. # GUB_NATIVE_DISTCC_HOSTS - hosts with matching native compilers -# LOCAL_GUB_BUILDER_OPTIONS - esp.: --verbose, --keep [--force-package] +# LOCAL_GUB_OPTIONS - esp.: --verbose, --keep [--force-package] +# LOCAL_GUB_BUILDER_OPTIONS - deprecated ifeq ($(CWD),) $(error Must set CWD) @@ -48,13 +49,13 @@ ln -s $(CWD)/gub/distcc.py target/native-distcc/bin/$(notdir $(binary)) && ) true # Find out if we need cross/gcc or glibc as topmost cross compile target -#gcc_or_glibc = $(shell $(GUB_BUILDER) -p $(1) --inspect=version glibc > /dev/null 2>/dev/null && echo glibc || echo cross/gcc) +#gcc_or_glibc = $(shell $(GUB) -p $(1) --inspect=version glibc > /dev/null 2>/dev/null && echo glibc || echo cross/gcc) # URG gcc_or_glibc = $(shell if echo $(1) | grep linux > /dev/null 2>/dev/null; then echo glibc; else echo cross/gcc; fi) cross-compilers: - $(foreach p, $(PLATFORMS),$(call INVOKE_GUB_BUILDER, $(p)) $(call gcc_or_glibc, $(p)) && ) true + $(foreach p, $(PLATFORMS),$(call INVOKE_GUB, $(p)) $(call gcc_or_glibc, $(p)) && ) true cross-distccd: -$(if $(wildcard log/$@.pid),kill `cat log/$@.pid`, true) @@ -80,12 +81,12 @@ bootstrap: bootstrap-git download-local local cross-compilers local-cross-tools download bootstrap-git: - $(GUB_BUILDER) $(LOCAL_GUB_BUILDER_OPTIONS) -p local git + $(GUB) $(LOCAL_GUB_OPTIONS) -p local git local-cross-tools: ifneq ($(filter mingw,$(PLATFORMS)),) ifneq ($(BUILD_PLATFORM),linux-64) - $(GUB_BUILDER) $(LOCAL_DRIVER_OPTIONS) -p local nsis + $(GUB) $(LOCAL_GUB_OPTIONS) -p local nsis endif endif
--- a/gub.make Fri May 04 00:01:24 2007 +0200 +++ b/gub.make Fri May 04 09:39:34 2007 +0200 @@ -6,28 +6,34 @@ ## must always have one host. GUB_DISTCC_ALLOW_HOSTS=127.0.0.1 -GUB_BUILDER = $(PYTHON) bin/gub -GUP_MANAGER = $(PYTHON) bin/gpkg +GUB = $(PYTHON) bin/gub +GPKG = $(PYTHON) bin/gpkg INSTALLER_BUILDER = $(PYTHON) bin/installer-builder CYGWIN_PACKAGER = $(PYTHON) bin/cygwin-packager -INVOKE_GUB_BUILDER=$(GUB_BUILDER)\ +ifneq ($(LOCAL_GUB_BUILDER_OPTIONS),) +$(warning LOCAL_GUB_BUILDER_OPTIONS is deprecated, use LOCAL_GUB_OPTIONS) +LOCAL_GUB_OPTIONS += LOCAL_GUB_BUILDER_OPTIONS +endif + +INVOKE_GUB=$(GUB)\ --target-platform $(1)\ $(foreach h,$(GUB_NATIVE_DISTCC_HOSTS), --native-distcc-host $(h))\ $(foreach h,$(GUB_CROSS_DISTCC_HOSTS), --cross-distcc-host $(h))\ - $(GUB_BUILDER_OPTIONS)\ - $(LOCAL_GUB_BUILDER_OPTIONS) - + $(GUB_OPTIONS)\ + $(LOCAL_GUB_OPTIONS) -INVOKE_GUP=$(GUP_MANAGER)\ +INVOKE_GUP=$(GPKG)\ --platform $(1)\ - $(GUP_OPTIONS) + $(GPKG_OPTIONS)\ + $(LOCAL_GPKG_OPIONS) INVOKE_INSTALLER_BUILDER=$(INSTALLER_BUILDER)\ --target-platform $(1)\ - $(INSTALLER_BUILDER_OPTIONS) + $(INSTALLER_BUILDER_OPTIONS)\ + $(LOCAL_INSTALLER_BUILDER_OPTIONS) -BUILD=$(call INVOKE_GUB_BUILDER,$(1)) $(2)\ +BUILD=$(call INVOKE_GUB,$(1)) $(2)\ && $(call INVOKE_INSTALLER_BUILDER,$(1)) build-all $(PACKAGE) BUILD_PLATFORM = $(shell $(PYTHON) bin/build-platform)
--- a/gub/context.py Fri May 04 00:01:24 2007 +0200 +++ b/gub/context.py Fri May 04 09:39:34 2007 +0200 @@ -138,9 +138,12 @@ return self.os_interface.file_sub (substs, self.expand (name, env), to_name, must_succeed, use_re=use_re) - def log_command (self, str, env={}): + def command (self, str): + self.os_interface.command (str) + + def log (self, str, env={}): str = self.expand (str, env) - self.os_interface.command (str) + self.os_interface.log (str) def read_pipe (self, cmd, env={}, ignore_errors=False): dict = self.get_substitution_dict (env)
--- a/gub/gup.py Fri May 04 00:01:24 2007 +0200 +++ b/gub/gup.py Fri May 04 09:39:34 2007 +0200 @@ -217,7 +217,7 @@ suffix = d['vc_branch'] print 'ignoring header: ' + package_hdr branch = branch_dict[d['basename']] - print 'branch: %(branch)s, suffix: %(suffix)s' % locals () + print 'branch: %(branch)s, expecting: %(suffix)s' % locals () return elif d['vc_branch']: sys.stdout.write ('No branch for package %s, ignoring header: %s\n' % (d['basename'], package_hdr)) @@ -255,7 +255,6 @@ def read_package_headers (self, s, branch_dict): if os.path.isdir (s) and not s.endswith ('/'): s += '/' - for f in glob.glob ('%(s)s*hdr' % locals ()): self.register_package_header (f, branch_dict)
--- a/gub/installer.py Fri May 04 00:01:24 2007 +0200 +++ b/gub/installer.py Fri May 04 09:39:34 2007 +0200 @@ -3,7 +3,7 @@ import time from gub import context -from gub import darwintools +from gub import darwin from gub import gup from gub import targetpackage @@ -157,7 +157,7 @@ def __init__ (self, settings): Installer.__init__ (self, settings) self.strip_command += ' -S ' - self.rewirer = darwintools.Rewirer (self.settings) + self.rewirer = darwin.Rewirer (self.settings) def use_install_root_manager (self, package_manager): tarball = package_manager.package_dict ('darwin-sdk')['split_ball'] @@ -222,7 +222,7 @@ self.system ('cd %(darwin_bundle_dir)s/../ && tar cjf %(bundle_zip)s LilyPond.app', locals ()) - self.log_command ("Created %(bundle_zip)s\n", locals()) + self.info ("Created %(bundle_zip)s\n", locals()) self.write_checksum () class MingwRoot (Installer):
--- a/gub/settings.py Fri May 04 00:01:24 2007 +0200 +++ b/gub/settings.py Fri May 04 09:39:34 2007 +0200 @@ -42,18 +42,19 @@ elif self.platform == 'mingw': self.target_gcc_flags = '-mwindows -mms-bitfields' - self.set_branches (options.branches) - self.build_source = options.build_source - self.cpu_count = options.cpu_count - self.set_distcc_hosts (options) - self.lilypond_versions = options.lilypond_versions - self.options = options ##ugh + try: + self.options = options ##ugh + self.set_branches (options.branches) + self.build_source = options.build_source + self.lilypond_versions = options.lilypond_versions + self.cpu_count = options.cpu_count + self.set_distcc_hosts (options) + except: + pass - #urg self.verbose = self.options.verbose - self.os = re.sub ('[-0-9].*', '', self.platform) - + self.target_architecture = platforms[self.platform] self.cpu = self.target_architecture.split ('-')[0] self.build_source = False
--- a/lilypond.make Fri May 04 00:01:24 2007 +0200 +++ b/lilypond.make Fri May 04 09:39:34 2007 +0200 @@ -41,10 +41,12 @@ LILYPOND_LOCAL_BRANCH=$(LILYPOND_BRANCH_FILEIFIED)-git.sv.gnu.org-lilypond.git -GUB_BUILDER_OPTIONS =\ +GUILE_LOCAL_BRANCH=branch_release-1-8-lilypond.org-vc-guile.git + +GUB_OPTIONS =\ --branch lilypond=$(LILYPOND_BRANCH):$(LILYPOND_LOCAL_BRANCH) -GUP_OPTIONS =\ +GPKG_OPTIONS =\ --branch guile=$(GUILE_LOCAL_BRANCH) \ --branch lilypond=$(LILYPOND_LOCAL_BRANCH) @@ -76,7 +78,7 @@ $(PYTHON) gub/with-lock.py --skip $(LILYPOND_VERSIONS).lock $(MAKE) unlocked-update-versions download: - $(foreach p, $(PLATFORMS), $(call INVOKE_GUB_BUILDER,$(p)) --stage=download lilypond && ) true + $(foreach p, $(PLATFORMS), $(call INVOKE_GUB,$(p)) --stage=download lilypond && ) true $(MAKE) downloads/genini rm -f target/*/status/lilypond* rm -f log/lilypond-$(LILYPOND_VERSION)*.*.test.pdf @@ -113,7 +115,7 @@ cygwin-libtool: rm -f uploads/cygwin/setup.ini - $(call INVOKE_GUB_BUILDER,cygwin) --build-source libtool + $(call INVOKE_GUB,cygwin) --build-source libtool cygwin-libtool-installer: $(CYGWIN_PACKAGER) libtool @@ -122,19 +124,19 @@ rm -f uploads/cygwin/setup.ini rm -rf target/cygwin/ $(call INVOKE_GUP, cygwin) install gcc - $(call INVOKE_GUB_BUILDER,cygwin) --build-source fontconfig + $(call INVOKE_GUB,cygwin) --build-source fontconfig cygwin-fontconfig-installer: $(CYGWIN_PACKAGER) fontconfig cygwin-guile: - $(call INVOKE_GUB_BUILDER,cygwin) --build-source libtool guile + $(call INVOKE_GUB,cygwin) --build-source libtool guile cygwin-guile-installer: $(CYGWIN_PACKAGER) guile cygwin-lilypond: - $(call INVOKE_GUB_BUILDER,cygwin) --build-source libtool guile fontconfig lilypond + $(call INVOKE_GUB,cygwin) --build-source libtool guile fontconfig lilypond cygwin-lilypond-installer: $(CYGWIN_PACKAGER) --branch lilypond=$(LILYPOND_LOCAL_BRANCH) lilypond @@ -224,13 +226,13 @@ # -netpbm: website download-local: - $(GUB_BUILDER) $(LOCAL_GUB_BUILDER_OPTIONS) \ + $(GUB) $(LOCAL_GUB_OPTIONS) \ -p local --stage=download \ $(locals) local: cd librestrict && make -f GNUmakefile - $(GUB_BUILDER) $(LOCAL_GUB_BUILDER_OPTIONS) -p local \ + $(GUB) $(LOCAL_GUB_OPTIONS) -p local \ $(locals) @@ -279,10 +281,10 @@ && touch $(call SIGNATURE_FUNCTION,$@) ; fi unlocked-doc-build: - $(GUP_MANAGER) -p $(BUILD_PLATFORM) remove lilypond + $(GPKG) -p $(BUILD_PLATFORM) remove lilypond ## force update of srcdir. - $(GUB_BUILDER) --branch lilypond=$(LILYPOND_BRANCH):$(LILYPOND_LOCAL_BRANCH) \ + $(GUB) --branch lilypond=$(LILYPOND_BRANCH):$(LILYPOND_LOCAL_BRANCH) \ -p $(BUILD_PLATFORM) --stage untar lilypond unset LILYPONDPREFIX LILYPOND_DATADIR \
--- a/mingit.make Fri May 04 00:01:24 2007 +0200 +++ b/mingit.make Fri May 04 09:39:34 2007 +0200 @@ -12,9 +12,9 @@ include gub.make include compilers.make -GUP_OPTIONS=--branch git=$(MINGIT_LOCAL_BRANCH) +GPKG_OPTIONS=--branch git=$(MINGIT_LOCAL_BRANCH) -GUB_BUILDER_OPTIONS=\ +GUB_OPTIONS=\ --branch git=$(MINGIT_BRANCH):$(MINGIT_LOCAL_BRANCH) INSTALLER_BUILDER_OPTIONS=\ @@ -24,17 +24,17 @@ all: $(PLATFORMS) download: - $(foreach p, $(PLATFORMS), $(call INVOKE_GUB_BUILDER,$(p)) download git && ) true + $(foreach p, $(PLATFORMS), $(call INVOKE_GUB,$(p)) download git && ) true bootstrap: bootstrap-git download-local local cross-compilers local-cross-tools download download-local: - $(GUB_BUILDER) $(LOCAL_GUB_BUILDER_OPTIONS) -p local\ + $(GUB) $(LOCAL_GUB_OPTIONS) -p local\ --stage=download \ git pkg-config nsis icoutils local: - $(GUB_BUILDER) $(LOCAL_GUB_BUILDER_OPTIONS) -p local git + $(GUB) $(LOCAL_GUB_OPTIONS) -p local git mingw:
--- a/test-lily/dist-check.py Fri May 04 00:01:24 2007 +0200 +++ b/test-lily/dist-check.py Fri May 04 09:39:34 2007 +0200 @@ -1,16 +1,16 @@ #!/usr/bin/python -import re -import sys -import os import glob import optparse - -sys.path.insert (0, os.path.split (sys.argv[0])[0] + '/../lib/') +import os +import re +import sys +import tempfile -import repository -import tempfile -import misc +sys.path.insert (0, os.path.split (sys.argv[0])[0] + '/..') + +from gub import repository +from gub import misc def parse_options (): p = optparse.OptionParser ()