autobuild 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ == Version 1.3.2
2
+ * fix stupid issues with the genom package
3
+ * import caller's environment instead of erasing it.
4
+
1
5
  == Version 1.3.1
2
6
  * 1.3.* now depend on utilrb, add it to the gem dependency list
3
7
 
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ Hoe.spec 'autobuild' do
7
7
  self.summary = 'Rake-based utility to build and install multiple packages with dependencies'
8
8
  self.description = self.paragraphs_of('README.txt', 2..5).join("\n\n")
9
9
  self.url = self.paragraphs_of('README.txt', 1).first.split(/\n/)[1..-1].map { |s| s.gsub('* ', '') }
10
- self.changes = self.paragraphs_of('Changes.txt', 0..1).join("\n\n")
10
+ self.changes = self.paragraphs_of('Changes.txt', 0..2).join("\n\n")
11
11
 
12
12
  self.extra_deps <<
13
13
  ['rake', '>= 0.7.0'] <<
@@ -15,10 +15,6 @@ DEFAULT_HTTP_PORT = 2000
15
15
  conffile, *packages = Autobuild.commandline(ARGV)
16
16
  Autobuild.packages = packages
17
17
 
18
- Autobuild.env_set 'PATH', *(ENV['PATH'].split(":"))
19
- Autobuild.env_set 'RUBYLIB', *(ENV['PATH'].split(":"))
20
- Autobuild.env_set 'PKG_CONFIG_PATH', *(ENV['PATH'].split(":"))
21
-
22
18
  # make conffile an absolute path since daemonize mode makes
23
19
  # / the current directory
24
20
  conffile = File.expand_path(conffile, Dir.pwd)
@@ -1,5 +1,5 @@
1
1
  module Autobuild
2
- VERSION = "1.3.1" unless defined? Autobuild::VERSION
2
+ VERSION = "1.3.2" unless defined? Autobuild::VERSION
3
3
  end
4
4
 
5
5
  require 'autobuild/config'
@@ -6,12 +6,17 @@ module Autobuild
6
6
 
7
7
  # Set a new environment variable
8
8
  def self.env_set(name, *values)
9
- environment.delete(name)
9
+ environment[name] = nil
10
10
  env_add(name, *values)
11
11
  end
12
12
  # Adds a new value to an environment variable
13
13
  def self.env_add(name, *values)
14
- set = environment[name]
14
+ set = if environment.has_key?(name)
15
+ environment[name]
16
+ else
17
+ ENV[name].split(':')
18
+ end
19
+
15
20
  if !set
16
21
  set = Array.new
17
22
  elsif !set.respond_to?(:to_ary)
@@ -66,8 +66,8 @@ module Autobuild
66
66
 
67
67
  # Raises ConfigException if the current directory is not a git
68
68
  # repository
69
- def validates_git_repository
70
- if !File.directory?('.git')
69
+ def validate_srcdir(package)
70
+ if !File.directory?(File.join(package.srcdir, '.git'))
71
71
  raise ConfigException, "#{Dir.pwd} is not a git repository"
72
72
  end
73
73
  end
@@ -76,9 +76,8 @@ module Autobuild
76
76
  # ID on success, nil on failure. Expects the current directory to be the
77
77
  # package's source directory.
78
78
  def fetch_remote(package)
79
+ validate_srcdir(package)
79
80
  Dir.chdir(package.srcdir) do
80
- validates_git_repository
81
-
82
81
  Subprocess.run(package.name, :import, Autobuild.tool('git'), 'fetch', repository, branch)
83
82
  if File.readable?( File.join('.git', 'FETCH_HEAD') )
84
83
  fetch_commit = File.readlines( File.join('.git', 'FETCH_HEAD') ).
@@ -93,6 +92,7 @@ module Autobuild
93
92
  # Returns a Importer::Status object that represents the status of this
94
93
  # package w.r.t. the root repository
95
94
  def status(package)
95
+ validate_srcdir(package)
96
96
  Dir.chdir(package.srcdir) do
97
97
  remote_commit = fetch_remote(package)
98
98
  if !remote_commit
@@ -166,8 +166,8 @@ module Autobuild
166
166
  end
167
167
 
168
168
  def update(package)
169
+ validate_srcdir(package)
169
170
  Dir.chdir(package.srcdir) do
170
- validates_git_repository
171
171
  fetch_commit = fetch_remote(package)
172
172
  if !fetch_commit
173
173
  return
@@ -121,7 +121,7 @@ module Autobuild
121
121
  file genomstamp => genom_dependencies
122
122
  file genomstamp => srcdir do
123
123
  Dir.chdir(srcdir) do
124
- Autobuild.progress "generating GenoM files for #{package.name}"
124
+ Autobuild.progress "generating GenoM files for #{name}"
125
125
  Subprocess.run(name, 'genom', *cmdline)
126
126
  end
127
127
  end
@@ -131,7 +131,7 @@ module Autobuild
131
131
  # configure does not depend on the .gen file
132
132
  # since the generation takes care of rebuilding configure
133
133
  # if .gen has changed
134
- Autobuild.progress "generating build system for #{package.name}"
134
+ Autobuild.progress "generating build system for #{name}"
135
135
  Dir.chdir(srcdir) { Subprocess.run(name, 'genom', File.expand_path('autogen')) }
136
136
  end
137
137
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autobuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvain Joyeux
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-15 00:00:00 +02:00
12
+ date: 2009-10-16 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency