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



190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# File 'lib/debci/html.rb', line 190

def link_latest(hist)
  package = hist.package
  suite = hist.suite
  arch = hist.arch
  job = hist.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