Commit 442ae492 authored by Antonio Terceiro's avatar Antonio Terceiro

Debci::Data::{Export,Import}: use Minitar API present in stretch

parent 00cb20ab
require 'set'
require 'tmpdir'
require 'minitar'
require 'archive/tar/minitar'
require 'thor'
require 'debci'
......@@ -53,7 +53,7 @@ module Debci
def save
File.open(tarball, 'wb') do |f|
Dir.chdir(repo.path) do
Minitar.pack(entries.sort, f)
Archive::Tar::Minitar.pack(entries.sort, f)
end
end
end
......@@ -74,7 +74,7 @@ module Debci
pkgs = Set.new
Dir.mktmpdir do |tmpdir|
Minitar.unpack(tarball, tmpdir)
Archive::Tar::Minitar.unpack(tarball, tmpdir)
Dir.chdir(tmpdir) do
Dir['export/*.json'].each do |json|
jobs = JSON.parse(File.read(json))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment