麒麟KOS怎么修改更新仓库源

发布时间 2023-07-04 09:55:32作者: minseo

麒麟KOS怎么修改更新仓库源

  1. 修改配置文件
# cat /var/lib/kylin-software-properties/template/kylin-source-update.conf
[Server]
Address=http://archive1.kylinos.cn
Port=59546
FailRetryNo=5
Priority=1000

[Server1]
Address=http://archive1.kylinos.cn
Port=59546
FailRetryNo=5
Priority=500
  1. 删除缓存文件
    改文件内容和上面文件内容一致
# cat /usr/share/kylin-software-properties/template/kylin-source-update.conf
[Server]
Address=http://archive1.kylinos.cn
Port=59546
FailRetryNo=5
Priority=1000

[Server1]
Address=http://archive1.kylinos.cn
Port=59546
FailRetryNo=5
Priority=500
  1. 修改配置文件
# cat /usr/share/kylin-software-center/kylin-software-center.conf
[conf-information]
conf-version = 2

[theme-color]
light = NO
dark = NO
auto = YES

[update-data]
update_app_list = false
update_app_icon = false
update_ads = false
update_ads_img = false
update_download_rank = false
newest_app_list = false
newest_app_img = false
update_source_list = false

[initialize-service]
need_initialize = true

[log-level]
log_level = critical
log_to_next = False

[server-address]
server = https://api.kylinos.cn/api/v1/
kylin_id_path = https://id.kylinos.cn/login?userSource=softwareStore
register_account = https://id.kylinos.cn/registered?userSource=softwareStore
find_pwd = https://id.kylinos.cn/find
kydroid_server =

[function-configuration]
show_kylinID=True
show_popularity = False

[essential-information]
arch =
system_version =
ip=
mac=
serialnumber=
cpu=

[option-settings]
software-store-auto-update = true
software-auto-update = false
notice-software-update = true
restore_path =
package_clean = 0
auto_generate_desktop = true
auto_start = false
  1. 删除缓存文件
~# cat /home/kylin/.cache/uksc/kylin-software-center.conf
[conf-information]
conf-version=2

[essential-information]
arch=amd64
cpu=AMD
gpu=
ip="ROFnbfMdH3dxFjPLEhKD8Q=="
mac="zGzbfxXJ31Dv0JIUdL7AdMj/JGw9pDTu1RudoKzZgc8="
serialnumber=0279025
start_client_time=2023-06-13 07:01:55
startup_time=2023-07-03 17:45:33
system_version=v10 sp1

[function-configuration]
show_kylinID=True
show_popularity=False

[initialize-service]
need_initialize=true

[log-level]
log_level=critical
log_to_next=False

[option-settings]
auto_generate_desktop=true
auto_start=false
max_reboot_time=30
notice-software-update=true
package_clean=0
restore_path=/home/kylin/.cache/uksc/wget_down/deb
software-auto-update=false
software-store-auto-update=true
sync-frequency="30,60"

[server-address]
find_pwd=https://id.kylinos.cn/find
kydroid_server=http://archive2.kylinos.cn/isos/kylin/production/KMRE/custom/partner/kmre/
kylin_id_path="https://id.kylinos.cn/login?userSource=softwareStore"
register_account="https://id.kylinos.cn/registered?userSource=softwareStore"
server=https://api.kylinos.cn/api/v1/

[theme-color]
auto=YES
dark=NO
light=NO

[update-data]
newest_app_img=false
newest_app_list=false
update_ads=false
update_ads_img=false
update_app_icon=false
update_app_list=false
update_download_rank=false
update_source_list=false
  1. 更新
    返回true和接口返回值100代表更新成功,返回0和50代表更新失败
# kylin-source-update
进入kylin-source-update
调用更新源模板接口返回值: true
获取源模板成功,现在开始更新源。
调用更新源接口返回值: 100
此次更新源成功!```

更新成功之后以下文件会自动修改

# cat /etc/apt/sources.list
# 本文件由源管理器管理,会定期检测与修复,请勿修改本文件
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1 main restricted universe multiverse
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-2303-updates main universe multiverse restricted
deb http://archive2.kylinos.cn/deb/kylin/production/PART-V10-SP1/custom/partner/V10-SP1 default all