fix(stdlib): fixed apt package promises
The installed packages list failed to recognise packages when the architecture name is part of the package's name
This commit is contained in:
		
					parent
					
						
							
								24c4bde14a
							
						
					
				
			
			
				commit
				
					
						9d68556f0e
					
				
			
		
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -64,6 +64,9 @@ func packages_list() {
 | 
			
		|||
			slog.Error("dpkg-query", "error", "parsing error: no version after name")
 | 
			
		||||
			os.Exit(1)
 | 
			
		||||
		}
 | 
			
		||||
		if strings.Contains(name, ":") { // some packages are named with the arch like something:amd64
 | 
			
		||||
			name = strings.Split(name, ":")[0] // in this case we want only the name
 | 
			
		||||
		}
 | 
			
		||||
		packages[name] = s.Text()
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue