mirror of
				https://github.com/containers/podman.git
				synced 2025-11-04 08:56:05 +08:00 
			
		
		
		
	Vendor in latest containers/common
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
		
							
								
								
									
										17
									
								
								vendor/github.com/containers/common/libimage/pull.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										17
									
								
								vendor/github.com/containers/common/libimage/pull.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@ -60,6 +60,23 @@ func (r *Runtime) Pull(ctx context.Context, name string, pullPolicy config.PullP
 | 
			
		||||
		options = &PullOptions{}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	defaultConfig, err := config.Default()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	if options.MaxRetries == nil {
 | 
			
		||||
		options.MaxRetries = &defaultConfig.Engine.Retry
 | 
			
		||||
	}
 | 
			
		||||
	if options.RetryDelay == nil {
 | 
			
		||||
		if defaultConfig.Engine.RetryDelay != "" {
 | 
			
		||||
			duration, err := time.ParseDuration(defaultConfig.Engine.RetryDelay)
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				return nil, fmt.Errorf("failed to parse containers.conf retry_delay: %w", err)
 | 
			
		||||
			}
 | 
			
		||||
			options.RetryDelay = &duration
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var possiblyUnqualifiedName string // used for short-name resolution
 | 
			
		||||
	ref, err := alltransports.ParseImageName(name)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user