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

Constructor Details

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

Instance Method Details



166
167
168
169
170
171
172
173
174
175
176
177
# File 'lib/debci/html.rb', line 166

def link_latest(package, suite, arch)
  job = Debci::Job.history(package, 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.symlink?
  link.make_symlink(target)
end