Make default arch configurable
This commit is contained in:
parent
5bcd0dee6e
commit
f0d9b684df
|
@ -486,6 +486,7 @@ void ServiceSetup::loadConfigFiles(bool doFirstTimeSetup)
|
||||||
if (iniEntry.first.empty()) {
|
if (iniEntry.first.empty()) {
|
||||||
convertValue(iniEntry.second, "pacman_config_file_path", pacmanConfigFilePath);
|
convertValue(iniEntry.second, "pacman_config_file_path", pacmanConfigFilePath);
|
||||||
convertValue(iniEntry.second, "working_directory", workingDirectory);
|
convertValue(iniEntry.second, "working_directory", workingDirectory);
|
||||||
|
convertValue(iniEntry.second, "default_arch", defaultArch);
|
||||||
convertValue(iniEntry.second, "max_dbs", maxDbs);
|
convertValue(iniEntry.second, "max_dbs", maxDbs);
|
||||||
convertValue(iniEntry.second, "package_cache_limit", packageCacheLimit);
|
convertValue(iniEntry.second, "package_cache_limit", packageCacheLimit);
|
||||||
}
|
}
|
||||||
|
@ -912,6 +913,7 @@ ServiceStatus::ServiceStatus(ServiceSetup &setup)
|
||||||
, config(setup.config.computeStatus())
|
, config(setup.config.computeStatus())
|
||||||
, actions(setup.building.metaInfo)
|
, actions(setup.building.metaInfo)
|
||||||
, presets(setup.building.presets)
|
, presets(setup.building.presets)
|
||||||
|
, defaultArch(setup.defaultArch)
|
||||||
, resourceUsage(setup)
|
, resourceUsage(setup)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ struct LIBREPOMGR_EXPORT ServiceSetup : public LibPkg::Lockable {
|
||||||
std::string pacmanConfigFilePath = "/etc/pacman.conf";
|
std::string pacmanConfigFilePath = "/etc/pacman.conf";
|
||||||
std::filesystem::path initialWorkingDirectory;
|
std::filesystem::path initialWorkingDirectory;
|
||||||
std::string workingDirectory = "workingdir";
|
std::string workingDirectory = "workingdir";
|
||||||
|
std::string defaultArch = "x86_64";
|
||||||
std::string dbPath = "libpkg-1.db";
|
std::string dbPath = "libpkg-1.db";
|
||||||
std::uint32_t maxDbs = 512;
|
std::uint32_t maxDbs = 512;
|
||||||
std::size_t packageCacheLimit = 1000;
|
std::size_t packageCacheLimit = 1000;
|
||||||
|
@ -250,6 +251,7 @@ struct LIBREPOMGR_EXPORT ServiceStatus : public ReflectiveRapidJSON::JsonSeriali
|
||||||
const LibPkg::Status config;
|
const LibPkg::Status config;
|
||||||
const BuildActionMetaInfo &actions;
|
const BuildActionMetaInfo &actions;
|
||||||
const BuildPresets &presets;
|
const BuildPresets &presets;
|
||||||
|
const std::string &defaultArch;
|
||||||
const ResourceUsage resourceUsage;
|
const ResourceUsage resourceUsage;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import * as CustomRendering from './customrendering.js';
|
||||||
import * as GenericRendering from './genericrendering.js';
|
import * as GenericRendering from './genericrendering.js';
|
||||||
import * as Utils from './utils.js';
|
import * as Utils from './utils.js';
|
||||||
|
|
||||||
const status = {repoNames: undefined, defaultArch: 'x86_64'};
|
const status = {repoNames: undefined, defaultArch: undefined};
|
||||||
|
|
||||||
export function queryGlobalStatus(additionalParams)
|
export function queryGlobalStatus(additionalParams)
|
||||||
{
|
{
|
||||||
|
@ -97,6 +97,7 @@ function handleGlobalStatusUpdate(ajaxRequest)
|
||||||
Utils.getAndEmptyElement('package-search-db', {'package-search-db-any': 'keep'}),
|
Utils.getAndEmptyElement('package-search-db', {'package-search-db-any': 'keep'}),
|
||||||
];
|
];
|
||||||
status.repoNames = [];
|
status.repoNames = [];
|
||||||
|
status.defaultArch = responseJson.defaultArch || 'x86_64';
|
||||||
dbStats.forEach(function (dbInfo) {
|
dbStats.forEach(function (dbInfo) {
|
||||||
const repoName = Utils.makeRepoName(dbInfo.name, dbInfo.arch);
|
const repoName = Utils.makeRepoName(dbInfo.name, dbInfo.arch);
|
||||||
status.repoNames.push(repoName);
|
status.repoNames.push(repoName);
|
||||||
|
|
Loading…
Reference in New Issue