[Share Experiences] 关于使用命令行更新时显示更新日志的一个想法
Tofloor
poster avatar
deepin-superuser
deepin
2023-11-17 19:40
Author

有一个思路,不知是否可行

已知检查更新日志的接口是 https://update-platform.uniontech.com/api/v1/systemupdatelogs?platformType=3&isUnstable=2&mainVersion=V23

其中

platformType 3 deepin桌面版 其他的忘了

isUnstable 1 正式版 2 内测版

mainVersion V20 V23 一目了然

返回结果示例

image.png

所以我们应该可以 hook 一下 apt,,在执行完 apt update 后调用一下这个接口,解析并输出更新日志

初步调查了一下,貌似可以写个配置文件放到 /etc/apt/apt.conf.d/ 目录下

欢迎大佬们实现

Reply Favorite View the author
All Replies
神末shenmo
deepin
Spark-App
2023-11-17 19:45
#1

感觉没什么大的必要,而且会导致依赖apt输出的部分应用挂掉(

Reply View the author
deepin-superuser
deepin
2023-11-17 21:53
#2
神末shenmo

感觉没什么大的必要,而且会导致依赖apt输出的部分应用挂掉(

那么换个思路呢 自定义个脚本 不动 apt 配置 以后通过自己的脚本更新

Reply View the author
神末shenmo
deepin
Spark-App
2023-11-17 22:55
#3
deepin-superuser

那么换个思路呢 自定义个脚本 不动 apt 配置 以后通过自己的脚本更新

做一个第三方的系统更新可能可以用到哈哈

Reply View the author
hotime
deepin
2023-11-18 06:36
#4
deepin-superuser

那么换个思路呢 自定义个脚本 不动 apt 配置 以后通过自己的脚本更新

直接定义别名怎么样?

~/.bash_aliases新增如下别名:

alias 检查更新='sudo apt update && curl -s "https://update-platform.uniontech.com/api/v1/systemupdatelogs?platformType=3&isUnstable=2&mainVersion=V23" | jq ".data[].cnLog" | sed -n "s/<[^>]*>/\n/g;p" | sed "/^$/d"'
alias 更新='sudo apt upgrade'

source ~/.bash_aliases使别名生效。

hotime@Miix4:~$ 检查更新
命中:1 https://proposed-packages.deepin.com/beige-testing unstable InRelease
命中:3 https://community-packages.deepin.com/driver-23 driver InRelease   
命中:2 https://community-packages.deepin.com/beige beige InRelease      
命中:4 https://app-store-files.uniontech.com/231117160005699/appstorev23 beige InRelease
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成   
所有软件包均为最新。
"
【功能新增与优化】
【控制中心】
控制中心-声音管理模块新增pulseaudio 和 pipewire 音频框架切换选项,可自行切换音频框架
出于账号安全对deepinid模块中 昵称、手机号、邮箱、第三方账号绑定的功能进行了隐藏,用户修改和使用此类功能需跳转至deepin官网进行操作
deepin ID登录时默认登录方式修改为账号登录
【深度之家】
优化了bug反馈时设备信息采集逻辑
【问题修复】
修复了其它发行版无法使用玲珑的问题
"
Reply View the author
deepin-superuser
deepin
2023-11-19 00:50
#5
hotime

直接定义别名怎么样?

~/.bash_aliases新增如下别名:

alias 检查更新='sudo apt update && curl -s "https://update-platform.uniontech.com/api/v1/systemupdatelogs?platformType=3&isUnstable=2&mainVersion=V23" | jq ".data[].cnLog" | sed -n "s/<[^>]*>/\n/g;p" | sed "/^$/d"'
alias 更新='sudo apt upgrade'

source ~/.bash_aliases使别名生效。

hotime@Miix4:~$ 检查更新
命中:1 https://proposed-packages.deepin.com/beige-testing unstable InRelease
命中:3 https://community-packages.deepin.com/driver-23 driver InRelease   
命中:2 https://community-packages.deepin.com/beige beige InRelease      
命中:4 https://app-store-files.uniontech.com/231117160005699/appstorev23 beige InRelease
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成   
所有软件包均为最新。
"
【功能新增与优化】
【控制中心】
控制中心-声音管理模块新增pulseaudio 和 pipewire 音频框架切换选项,可自行切换音频框架
出于账号安全对deepinid模块中 昵称、手机号、邮箱、第三方账号绑定的功能进行了隐藏,用户修改和使用此类功能需跳转至deepin官网进行操作
deepin ID登录时默认登录方式修改为账号登录
【深度之家】
优化了bug反馈时设备信息采集逻辑
【问题修复】
修复了其它发行版无法使用玲珑的问题
"

666

Reply View the author