Class: Debci::HTML::Autopkgtest

Inherits:
Rooted
  • Object
show all
Defined in:
lib/debci/html.rb

Instance Attribute Summary

Attributes inherited from Rooted

#root

Instance Method Summary collapse

Methods inherited from Rooted

#datadir, #initialize, #repository

Constructor Details

This class inherits a constructor from Debci::HTML::Rooted

Instance Method Details



181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/debci/html.rb', line 181

def link_latest(package, suite, arch)
  job = Debci::Job.history(package.name, suite, arch).last
  return unless job

  link = root / suite / arch / package.prefix / package.name / 'latest-autopkgtest'
  autopkgtest = Pathname('../../../../../autopkgtest')
  target = autopkgtest / suite / arch / package.prefix / package.name / job.id.to_s

  # not atomic, but also not a big deal
  link.unlink if link.exist?
  link.make_symlink(target)
end