jotapesse
2016-03-07 03:11 deepin
https://bbs.deepin.org/post/30778
It shows 5.0.14 as being installed because at the time of upgrading the system that was the newest ...
Hi @dance707 thanks for your feedback. Good find.
In my case I currently have:
- $ apt-cache policy virtualbox
- virtualbox:
- Installed: 5.0.14-dfsg-2+b1
- Candidate: 5.0.16-dfsg-2
- Version table:
- 5.0.16-dfsg-2 500
- 500 http://ftp.pt.debian.org/debian sid/contrib amd64 Packages
- *** 5.0.14-dfsg-2+b1 100
- 100 /var/lib/dpkg/status
- 5.0.12-dfsg-2 990
- 990 http://packages.deepin.com/deepin unstable/contrib amd64 Packages
Because:
1. There are a lot of locked/failed source list update atempts, I have to frequently kill apt-get to update it on the command line;
2. The frequent source list update fails seem to be related to slow repositories/mirror connections or Official CDN response mechanism;
3. Control Center seems to blindly dist-upgrade with no regard for previous failed source list update attempts;
4. With a failed Deepin source list update, APT will use the remaining and only Debian source list but it will lack any higher priority packages (Deepin) to compare and thus will use Debian's resulting in undesired packages being upgraded from Debian.
Conclusion: My proposed how to procedure is highly dependent on proper APT source list updates. Deepin's source list updates are somewhat troublesome currently (slow response/bad mirror connections/bad CDN mechanism). Currently, this must be human verified at the command line. So, in order to not have any undesired package upgraded from Debian you are required to totally refrain from using Deepin's Control Center updates and opt to do it at the command line. From the command line with proper source list update and policy check you sould be safe. I'll update the how to with this findings.
Request: Perhaps Deepin team can see if it can improve Control Center's update/CDN mechanism to support this alternative Debian repositories procedure in the future? Probably a check if Deepin's source list was updated properly and a refusal to upgrade in case of failed update would suffice. Better yet, integrate this alternative in Control Center as an advanced option, as well as automatic updates (Debian unattended-upgrades). I'll suggest this by Deepin user Feedback.
Reply Like 0 View the author
Deepin 15.x is based of Debian Sid (unstable), that means it uses Debian as a base system and is developed on top of it. It also means we may use/install Debian original packages with a reasonable assurance of compatibility with the Deepin system/desktop packages. The best way to do it is to setup APT to use the original Debian repositories simultaneously with Depin repository, while maintaining Deepin's packages with default higher priority. Debian APT makes this easy with APT settings or package pinning.
Why? Imagine you want to install an updated version of a package/application that has its version frozen in Deepin repository. In example, at the time of this writing, there is a newer version of libreoffice available in Debian Sid:
Disclaimer: ⚠ Danger: Use this procedure at your own risk. Recommended only for advanced users. Valid only for Deepin 15.x release. Although installing Debian original packages guarantees a very high compatibility with Deepin (Debian based) packages, there is a potencial risk for breakage. You may compromise your system by installing other packages than those from Deepin repository. This procedure has worked for me but it may fail for you. Be sure to follow the following steps completely and verify that it's working before trying to install packages or upgrade your system. If you do not accept the risk do not try it. You have been warned.
Disclaimer #2: ⚠ Warning: Currently there are issues with upgrades if the Deepin source list was not updated succcessfully (failed attempts/bad connections/bad CDN mechanism). Also from Control Center issued updates. It will result in undesired package upgrades from Debian which may compromise your system stability. If you wish to procede and use this how to you are advised to totally refrain from using Control Center Updates (stop using it completely) and always update from the command line and check the successful source list update and policy update before any install/upgrade. View more information at https://bbs.deepin.org/post/30778.
1. Add Debian Official repositories source list:
Create the file /etc/apt/sources.list.d/debian.list
2. Setup either APT Default-Release or APT package pinning:
Either option will work, the first option should work until the end of life of 'Deepin 15.x' (release version 2015), the second will work indefinitely (while Deepin maintains the same package/repository origin name 'Linux Deepin'). Choose either 2.1 or 2.2 option procedure, not both:
2.1. (Option) APT Default-Release:
Create the file /etc/apt/apt.conf.d/90deepin
2.2. (Option) APT Package Pinning:
Create the file /etc/apt/preferences
3. Test APT package policy:
You should always test if your APT settings are taking effect in the APT policy, at any time. Always update APT first, then check policy, then install or upgrade packages (if you wish). You should get a priority value of 990 for Deepin repository packages and priority 500 for Debian repository. This means that, by default, only Deepin packages will be installed or upgraded.
4. Install Deepin packages:
To install any packages from the Deepin repository you don't have to anything different. Either from Deepin Store, Synaptic or using the command line, in example:
5. Install (or upgrade to) Debian packages:
You may now upgrade a currently installed or install a new package. All needed newer version dependencies, if required, will also be installed from Debian repository. Use:
That's it. Always update and verify your APT policy first, then install or upgrade from the command line. The use of Control Center System Updates is not recommended! Have fun! :-)