build,json: store arch_packages in profiles.json
The `arch_packages` contains the supported package architecture. Previously it was necessary to parse the `Packages` index for the line `Architecture:`, requiring both an additional parser and file download. Signed-off-by: Paul Spooren <mail@aparcar.org>
This commit is contained in:
		
				
					committed by
					
						
						Daniel Golle
					
				
			
			
				
	
			
			
			
						parent
						
							9858a8c582
						
					
				
				
					commit
					f09b9319c6
				
			@@ -33,19 +33,22 @@ for json_file in work_dir.glob("*.json"):
 | 
				
			|||||||
            )
 | 
					            )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
output["default_packages"] = run(
 | 
					default_packages, output["arch_packages"] = run(
 | 
				
			||||||
    [
 | 
					    [
 | 
				
			||||||
        "make",
 | 
					        "make",
 | 
				
			||||||
        "--no-print-directory",
 | 
					        "--no-print-directory",
 | 
				
			||||||
        "-C",
 | 
					        "-C",
 | 
				
			||||||
        f"target/linux/{output['target'].split('/')[0]}",
 | 
					        f"target/linux/{output['target'].split('/')[0]}",
 | 
				
			||||||
        "val.DEFAULT_PACKAGES",
 | 
					        "val.DEFAULT_PACKAGES",
 | 
				
			||||||
 | 
					        "val.ARCH_PACKAGES",
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
    capture_output=True,
 | 
					    capture_output=True,
 | 
				
			||||||
    check=True,
 | 
					    check=True,
 | 
				
			||||||
    env=environ.copy().update({"TOPDIR": Path().cwd()}),
 | 
					    env=environ.copy().update({"TOPDIR": Path().cwd()}),
 | 
				
			||||||
    text=True,
 | 
					    text=True,
 | 
				
			||||||
).stdout.split()
 | 
					).stdout.splitlines()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					output["default_packages"] = default_packages.split()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if output:
 | 
					if output:
 | 
				
			||||||
    output_path.write_text(json.dumps(output, sort_keys=True, separators=(",", ":")))
 | 
					    output_path.write_text(json.dumps(output, sort_keys=True, separators=(",", ":")))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user