@@ -62,6 +62,7 @@ type Package struct {
6262 Path string // Path to the build spec
6363 Sources []source.Source // Each package has 0 or more sources that we fetch
6464 CanNetwork bool // Only applicable to ypkg builds
65+ CanCCache bool // Flag to enable (s)ccache
6566}
6667
6768// YmlPackage is a parsed ypkg build file.
@@ -71,6 +72,9 @@ type YmlPackage struct {
7172 Release int `yaml:"release"`
7273 Networking bool `yaml:"networking"` // If set to false (default) we disable networking in the build
7374 Source []map [string ]string `yaml:"source"`
75+
76+ // Disable (s)ccache for this build.
77+ CCache bool `yaml:"ccache"`
7478}
7579
7680// XMLUpdate represents an update in the package history.
@@ -209,7 +213,7 @@ func NewYmlPackage(path string) (*Package, error) {
209213func NewYmlPackageFromBytes (by []byte ) (* Package , error ) {
210214 var err error
211215
212- ypkg := & YmlPackage {Networking : false }
216+ ypkg := & YmlPackage {Networking : false , CCache : true }
213217 if err = yaml .Unmarshal (by , ypkg ); err != nil {
214218 return nil , err
215219 }
@@ -220,6 +224,7 @@ func NewYmlPackageFromBytes(by []byte) (*Package, error) {
220224 Release : ypkg .Release ,
221225 Type : PackageTypeYpkg ,
222226 CanNetwork : ypkg .Networking ,
227+ CanCCache : ypkg .CCache ,
223228 }
224229
225230 for _ , row := range ypkg .Source {
0 commit comments