Skip to content

Commit

Permalink
Consistently use importdir as patch location
Browse files Browse the repository at this point in the history
  • Loading branch information
planthaber authored and doudou committed Sep 8, 2024
1 parent eff2f5a commit 0331c6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/autobuild/importer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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"))
Expand Down

0 comments on commit 0331c6d

Please sign in to comment.