降级保护措施
Tofloor
poster avatar
tmacy
deepin
2018-09-05 21:35
Author
本帖最后由 tmacy 于 2018-9-5 13:59 编辑

我常用code,一般会添加一个微软的软件源,而不是用deepin的仓库。防止降级可以在/etc/apt/preferences.d/目录下复制一份deepin配置,修改为如下内容
  1. Package: *
  2. Pin: origin "packages.microsoft.com"
  3. Pin-Priority: 1002
Copy the Code


另外单独安装的包可以使用apt-mark设定为保留

  1. sudo apt-mark hold cocomusic google-chrome-stable                  
Copy the Code

今天chrome更新了正式版看着很帅!!

Reply Favorite View the author
All Replies
avatar
doooooit
deepin
2018-09-06 17:39
#1
今天 update 提示 code 需要降级,用了你的方法解决,谢谢。
Reply View the author
avatar
so******xl@sohu.com
deepin
2018-09-08 00:34
#2
有没有什么办法让自己添加的源优先级更高,upgrade的时候code,chrome和teamviewer总是被降级
Reply View the author
avatar
14******70@qq.com
deepin
2018-09-09 08:24
#3
https://bbs.deepin.org/post/168484
有没有什么办法让自己添加的源优先级更高,upgrade的时候code,chrome和teamviewer总是被降级 ...

Pin-Priority 就是控制优先级的。
Reply View the author
avatar
tmacy
deepin
2018-09-10 05:08
#4
https://bbs.deepin.org/post/168484
有没有什么办法让自己添加的源优先级更高,upgrade的时候code,chrome和teamviewer总是被降级 ...

我不就是贴了解决方案么?你没看?
Reply View the author
avatar
ziranren
deepin
2018-09-13 07:49
#5
灰常感谢

我在/etc/apt/preferences.d单独建了个chrome的文件
被锁定的软件包:
     google-chrome-stable -> 69.0.3497.92-1 ,其优先级为 1002
     sublime-text -> 3176 ,其优先级为 1002
Reply View the author
avatar
tmacy
deepin
2018-09-13 17:42
#6
https://bbs.deepin.org/post/168484
灰常感谢

我在/etc/apt/preferences.d单独建了个chrome的文件

贴一下配置看看
Reply View the author
avatar
ziranren
deepin
2018-09-15 06:35
#7

#/etc/apt/preferences.d/chrome
Package: google-chrome-stable
Pin: origin "dl.google.com"
Pin-Priority: 1002

#/etc/apt/sources.list.d/google-chrome.list
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main


Reply View the author
avatar
tmacy
deepin
2018-09-17 03:43
#8
https://bbs.deepin.org/post/168484
#/etc/apt/preferences.d/chrome
Package: google-chrome-stable
Pin: origin "dl.google.com"

不错!!不过chrome一般升级不算频繁吧?我直接安装deb包了。
Reply View the author
avatar
cosct
deepin
2018-10-19 22:55
#9
为啥我添加了一份vscode的设置,先update再upgrade不会被降级,但是只要执行了更新界面的检查更新再upgrade就会被降级呢。。。难道那个检查更新不是执行的sudo apt update么
Reply View the author
avatar
tmacy
deepin
2018-10-23 04:32
#10
https://bbs.deepin.org/post/168484
为啥我添加了一份vscode的设置,先update再upgrade不会被降级,但是只要执行了更新界面的检查更新再upgrade ...

还没有看过代码,但是确实可能不是简单地执行命令,很有可能配置没有读取完整。
Reply View the author
avatar
tmacy
deepin
2018-10-23 04:41
#11
Reply View the author
avatar
HualetWang
deepin
2018-10-27 08:05
#12
https://bbs.deepin.org/post/168484
为啥我添加了一份vscode的设置,先update再upgrade不会被降级,但是只要执行了更新界面的检查更新再upgrade ...

你是怎么加的?
Reply View the author
avatar
cosct
deepin
2018-10-27 19:30
#13

在/etc/apt/preferences.d下直接新建一个vscode的文件:
手动运行sudo apt update && sudo apt upgrade,vscode不会降级,我没有加chrome的文件所以chrome会降级:

在更新界面中运行检查更新,提示系统已是最新,然后运行sudo apt upgrade,vscode会提示会被降级:


Reply View the author
avatar
HualetWang
deepin
2018-10-27 20:06
#14
https://bbs.deepin.org/post/168484
在/etc/apt/preferences.d下直接新建一个vscode的文件:
手动运行sudo apt update && sudo apt upgrade,v ...

这么奇怪 文件还在么
Reply View the author
avatar
cosct
deepin
2018-10-27 20:49
#15
本帖最后由 wjkz 于 2018-10-27 12:58 编辑
https://bbs.deepin.org/post/168484
这么奇怪 文件还在么

/etc/apt/preferences.d 一共四个文件 1.zip








Reply View the author