mirror of
				https://github.com/containers/podman.git
				synced 2025-10-31 18:08:51 +08:00 
			
		
		
		
	 7c8c945496
			
		
	
	7c8c945496
	
	
	
		
			
			Pull in updates made to the filters code for images. Filters now perform an AND operation except for th reference filter which does an OR operation for positive case but an AND operation for negative cases. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
		
			
				
	
	
		
			29 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
| //go:build !remote
 | |
| 
 | |
| package libimage
 | |
| 
 | |
| import (
 | |
| 	"github.com/containers/common/libimage/define"
 | |
| 	"github.com/containers/common/libimage/platform"
 | |
| )
 | |
| 
 | |
| // PlatformPolicy controls the behavior of image-platform matching.
 | |
| // Deprecated: new code should use define.PlatformPolicy directly.
 | |
| type PlatformPolicy = define.PlatformPolicy
 | |
| 
 | |
| const (
 | |
| 	// Only debug log if an image does not match the expected platform.
 | |
| 	// Deprecated: new code should reference define.PlatformPolicyDefault directly.
 | |
| 	PlatformPolicyDefault = define.PlatformPolicyDefault
 | |
| 	// Warn if an image does not match the expected platform.
 | |
| 	// Deprecated: new code should reference define.PlatformPolicyWarn directly.
 | |
| 	PlatformPolicyWarn = define.PlatformPolicyWarn
 | |
| )
 | |
| 
 | |
| // NormalizePlatform normalizes (according to the OCI spec) the specified os,
 | |
| // arch and variant. If left empty, the individual item will be normalized.
 | |
| // Deprecated: new code should call libimage/platform.Normalize() instead.
 | |
| func NormalizePlatform(rawOS, rawArch, rawVariant string) (os, arch, variant string) {
 | |
| 	return platform.Normalize(rawOS, rawArch, rawVariant)
 | |
| }
 |