mirror of
https://github.com/containers/skopeo.git
synced 2025-09-13 21:40:31 +00:00
Anyone running (vndr) currently ends up with failing tests in OCI schema validation because gojsonschema has fixed its "$ref" interpretation, exposing inconsistent URI usage inside image-spec/schema. So, this runs (vndr), and uses mtrmac/image-spec:id-based-loader ( https://github.com/opencontainers/image-spec/pull/739 ) to make the tests pass again. As soon as that PR is merged we should revert to using the upstream image-spec repo again.
21 lines
387 B
Go
21 lines
387 B
Go
// +build linux solaris
|
|
|
|
package storage
|
|
|
|
import (
|
|
"time"
|
|
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
// TouchedSince indicates if the lock file has been touched since the specified time
|
|
func (l *lockfile) TouchedSince(when time.Time) bool {
|
|
st := unix.Stat_t{}
|
|
err := unix.Fstat(int(l.fd), &st)
|
|
if err != nil {
|
|
return true
|
|
}
|
|
touched := time.Unix(st.Mtim.Unix())
|
|
return when.Before(touched)
|
|
}
|