diff --git a/lib/autobuild/importer.rb b/lib/autobuild/importer.rb index b45fd390..37a53dd4 100644 --- a/lib/autobuild/importer.rb +++ b/lib/autobuild/importer.rb @@ -540,10 +540,10 @@ def parse_patch_list(package, patches_file) File.readlines(patches_file).map do |line| line = line.rstrip if line =~ /^(.*)\s+(\d+)$/ - path = File.expand_path($1, package.srcdir) + path = File.expand_path($1, package.importdir) level = Integer($2) else - path = File.expand_path(line, package.srcdir) + path = File.expand_path(line, package.importdir) level = 0 end [path, level, File.read(path)] @@ -618,7 +618,7 @@ def save_patch_state(package, cur_patches) File.open(patchlist(package), 'w') do |f| patch_state = cur_patches.map do |path, level| path = Pathname.new(path). - relative_path_from(Pathname.new(package.srcdir)).to_s + relative_path_from(Pathname.new(package.importdir)).to_s "#{path} #{level}" end f.write(patch_state.join("\n"))