Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistently use importdir as patch location #128

Merged
merged 1 commit into from
Sep 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading