[Advanced] How to: Use Debian repositories simultaneously with Deepin 15.x
Tofloor
poster avatar
jotapesse
deepin
2016-03-04 14:31
Author
Edited by jotapesse at 2016-3-6 20:37

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:
  1. $ apt-cache policy libreoffice
  2. libreoffice:
  3.   Installed: 1:5.1.0~rc2-1deepin1
  4.   Candidate: 1:5.1.0~rc2-1deepin1
  5.   Version table:
  6.     1:5.1.1~rc1-1 500
  7.       500 http://ftp.debian.org/debian sid/main amd64 Packages
  8. *** 1:5.1.0~rc2-1deepin1 990
  9.       990 http://packages.deepin.com/deepin unstable/main amd64 Packages
  10.       100 /var/lib/dpkg/status
Copy the Code

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
  1. $ sudo nano /etc/apt/sources.list.d/debian.list
Copy the Code
with the following content:
  1. # Debian Sid/Unstable Official repositories

  2. deb http://ftp.debian.org/debian sid main contrib non-free
  3. deb-src http://ftp.debian.org/debian sid main contrib non-free
Copy the Code

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
  1. $ sudo nano /etc/apt/apt.conf.d/90deepin
Copy the Code
with the following content:
  1. // APT configuration
  2. // Deepin Default Release
  3. APT::Default-Release "2015";
Copy the Code

2.2. (Option) APT Package Pinning:
Create the file /etc/apt/preferences
  1. $ sudo nano /etc/apt/preferences
Copy the Code
with the following content:
  1. # APT preferences
  2. # Deepin Package Pinning
  3. Package: *
  4. Pin: release o=Linux Deepin
  5. Pin-Priority: 990
Copy the Code

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.
  1. $ apt-cache policy
  2. Package files:
  3. 100 /var/lib/dpkg/status
  4.      release a=now
  5. 500 http://ftp.debian.org/debian sid/non-free i386 Packages
  6.      release o=Debian,a=unstable,n=sid,l=Debian,c=non-free,b=i386
  7.      origin ftp.debian.org
  8. 500 http://ftp.debian.org/debian sid/non-free amd64 Packages
  9.      release o=Debian,a=unstable,n=sid,l=Debian,c=non-free,b=amd64
  10.      origin ftp.debian.org
  11. 500 http://ftp.debian.org/debian sid/contrib i386 Packages
  12.      release o=Debian,a=unstable,n=sid,l=Debian,c=contrib,b=i386
  13.      origin ftp.debian.org
  14. 500 http://ftp.debian.org/debian sid/contrib amd64 Packages
  15.      release o=Debian,a=unstable,n=sid,l=Debian,c=contrib,b=amd64
  16.      origin ftp.debian.org
  17. 500 http://ftp.debian.org/debian sid/main i386 Packages
  18.      release o=Debian,a=unstable,n=sid,l=Debian,c=main,b=i386
  19.      origin ftp.debian.org
  20. 500 http://ftp.debian.org/debian sid/main amd64 Packages
  21.      release o=Debian,a=unstable,n=sid,l=Debian,c=main,b=amd64
  22.      origin ftp.debian.org
  23. 990 http://packages.deepin.com/deepin unstable/non-free i386 Packages
  24.      release v=2015,o=Linux Deepin,n=unstable,l=Deepin,c=non-free,b=i386
  25.      origin packages.deepin.com
  26. 990 http://packages.deepin.com/deepin unstable/non-free amd64 Packages
  27.      release v=2015,o=Linux Deepin,n=unstable,l=Deepin,c=non-free,b=amd64
  28.      origin packages.deepin.com
  29. 990 http://packages.deepin.com/deepin unstable/contrib i386 Packages
  30.      release v=2015,o=Linux Deepin,n=unstable,l=Deepin,c=contrib,b=i386
  31.      origin packages.deepin.com
  32. 990 http://packages.deepin.com/deepin unstable/contrib amd64 Packages
  33.      release v=2015,o=Linux Deepin,n=unstable,l=Deepin,c=contrib,b=amd64
  34.      origin packages.deepin.com
  35. 990 http://packages.deepin.com/deepin unstable/main i386 Packages
  36.      release v=2015,o=Linux Deepin,n=unstable,l=Deepin,c=main,b=i386
  37.      origin packages.deepin.com
  38. 990 http://packages.deepin.com/deepin unstable/main amd64 Packages
  39.      release v=2015,o=Linux Deepin,n=unstable,l=Deepin,c=main,b=amd64
  40.      origin packages.deepin.com
Copy the Code
You may check the policy for a specific package, check the example for libreoffice on the top of the post. The same priority values should be visible and there may be different versions available. Deepin packages sould always be the default candidates to install or upgrade, even if their version is lower (unless a Debian package was installed as explained in 5.).

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:
  1. $ sudo apt-get install libreoffice
Copy the Code

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:
  1. $ sudo apt-get -t sid install libreoffice
Copy the Code

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! :-)



Reply Favorite View the author
All Replies
1 / 3
To page
thoi
deepin
2017-07-05 16:51
#1
Edited by thoi at 2017-7-5 08:57

I followed the same choosing option 2.2 and when I try to update/upgrade deepin-version VLC(2.2.4) to debian-sid version 2.2.6 using the command sudo apt-get -t sid install vlc, it tries to remove deepin software saying
"The following packages will be REMOVED:
  dde dde-desktop dde-disk-mount-plugin dde-file-manager dde-qt5integration dde-trash-plugin deepin-movie libdde-file-manager qml-module-qtav"

So, now I am confused how to update/upgrade the VLC.....or may be other softwares........
Note: When executing the command apt-cache policy, I got this result without Debian priority, as mentioned in the discussion(like debian priority is 500).
Package files:
100 /var/lib/dpkg/status
     release a=now
990 http://packages.deepin.com/deepin panda/main i386 Packages
     release v=2015,o=Linux Deepin,a=panda,n=unstable,l=Deepin,c=main,b=i386
     origin packages.deepin.com
990 http://packages.deepin.com/deepin panda/main amd64 Packages
     release v=2015,o=Linux Deepin,a=panda,n=unstable,l=Deepin,c=main,b=amd64
     origin packages.deepin.com
990 http://packages.deepin.com/deepin panda/contrib i386 Packages
     release v=2015,o=Linux Deepin,a=panda,n=unstable,l=Deepin,c=contrib,b=i386
     origin packages.deepin.com
990 http://packages.deepin.com/deepin panda/contrib amd64 Packages
     release v=2015,o=Linux Deepin,a=panda,n=unstable,l=Deepin,c=contrib,b=amd64
     origin packages.deepin.com
990 http://packages.deepin.com/deepin panda/non-free i386 Packages
     release v=2015,o=Linux Deepin,a=panda,n=unstable,l=Deepin,c=non-free,b=i386
     origin packages.deepin.com
990 http://packages.deepin.com/deepin panda/non-free amd64 Packages
     release v=2015,o=Linux Deepin,a=panda,n=unstable,l=Deepin,c=non-free,b=amd64
     origin packages.deepin.com
Pinned packages:
Reply View the author
thoi
deepin
2017-07-05 17:00
#2
I followed the same choosing option 2.2 and when I try to update/upgrade deepin-version VLC(2.2.4) to debian-sid version 2.2.6 using the command sudo apt-get -t sid install vlc, it tries to remove deepin software saying
"The following packages will be REMOVED:
  dde dde-desktop dde-disk-mount-plugin dde-file-manager dde-qt5integration dde-trash-plugin deepin-movie libdde-file-manager qml-module-qtav"

So, now I am confused how to update/upgrade the VLC.....or may be other softwares........
Reply View the author
thoi
deepin
2017-07-05 17:03
#3
I forgot to mention this, when I execute the command "apt-cache policy", I got this result without any information about debian priority(like 500)
Package files:
100 /var/lib/dpkg/status
     release a=now
990 http://packages.deepin.com/deepin panda/main i386 Packages
     release v=2015,o=Linux Deepin,a=panda,n=unstable,l=Deepin,c=main,b=i386
     origin packages.deepin.com
990 http://packages.deepin.com/deepin panda/main amd64 Packages
     release v=2015,o=Linux Deepin,a=panda,n=unstable,l=Deepin,c=main,b=amd64
     origin packages.deepin.com
990 http://packages.deepin.com/deepin panda/contrib i386 Packages
     release v=2015,o=Linux Deepin,a=panda,n=unstable,l=Deepin,c=contrib,b=i386
     origin packages.deepin.com
990 http://packages.deepin.com/deepin panda/contrib amd64 Packages
     release v=2015,o=Linux Deepin,a=panda,n=unstable,l=Deepin,c=contrib,b=amd64
     origin packages.deepin.com
990 http://packages.deepin.com/deepin panda/non-free i386 Packages
     release v=2015,o=Linux Deepin,a=panda,n=unstable,l=Deepin,c=non-free,b=i386
     origin packages.deepin.com
990 http://packages.deepin.com/deepin panda/non-free amd64 Packages
     release v=2015,o=Linux Deepin,a=panda,n=unstable,l=Deepin,c=non-free,b=amd64
     origin packages.deepin.com
Pinned packages:
Reply View the author
jotapesse
deepin
2016-03-04 15:35
#4
Edited by jotapesse at 2016-3-3 23:55

I added this how to as a contribution to Deepin wiki, under the sections:
System Management > Software Management > Software Instalation > How to: Use Debian repositories simultaneously with Deepin 15.x
Reply View the author
tristar
deepin
2016-03-04 15:53
#5
Thank you !
Reply View the author
jotapesse
deepin
2016-03-04 15:56
#6

You're welcome! :-)
Reply View the author
dance707
deepin
2016-03-04 20:00
#7
I think there is problems with this method. I tested your 2.1 option to check out different web browsers. Latter in the evening I did a sudo apt-get upgrade and a package upgraded to a SID version from a Deepin version that I did not want done.
Reply View the author
jotapesse
deepin
2016-03-05 02:02
#8
Edited by jotapesse at 2016-3-4 10:03
https://bbs.deepin.org/post/30778
I think there is problems with this method. I tested your 2.1 option to check out different web brow ...

I'm sorry, but I can't replicate your issue. I just checked and I got:
  1. $ apt-cache policy xserver-xorg-video-intel
  2. xserver-xorg-video-intel:
  3.   Installed: 2:2.99.917-2
  4.   Candidate: 2:2.99.917-2
  5.   Version table:
  6.     2:2.99.917+git20160218-1 500
  7.     500 http://ftp.pt.debian.org/debian sid/main amd64 Packages
  8. *** 2:2.99.917-2 990
  9.     990 http://packages.deepin.com/deepin unstable/main amd64 Packages
  10.     100 /var/lib/dpkg/status
Copy the Code
You must have done something different. The Debian package has lower priority (500) than the Deepin's package (990). The Debian package will never be candidate to install/upgrade. Unless you have installed or upgraded this package (or any other package that requires this package as a dependency) by using: sudo apt-get -t sid install... In that case, apt-get will upgrade all dependencies packages to the versions required by the original upgraded package.
Reply View the author
dance707
deepin
2016-03-05 02:16
#9
https://bbs.deepin.org/post/30778
I'm sorry, but I can't replicate your issue. I just checked and I got:You must have done something  ...

It tested on my workstation and it works just  fine. Its that one of my computers it did not. The computer that did not work okay seems to be experiencing the same bug that has been reported in the forum often where the Deepin Store locks up for no apparent reason. While it is a nice tutorial and every thing looks okay. I am concerned the possible unforeseen consequences of using this method on systems that the user may not be aware of possible problems. And how we respond in the forum to help users.
Reply View the author
dance707
deepin
2016-03-05 02:33
#10
https://bbs.deepin.org/post/30778
It tested on my workstation and it works just  fine. Its that one of my computers it did not. The  ...

And by the way I did not do something different I even tested the APT policy . I got the message from Cxbii in the Chinese forum that system can be updated normally and simply updated the system.
Reply View the author
jotapesse
deepin
2016-03-05 03:09
#11
https://bbs.deepin.org/post/30778
And by the way I did not do something different I even tested the APT policy . I got the message f ...

I'm sorry, I really can't explain it otherwise. If you haven't upgraded that package or a different package that requires that package as a dependency (inadvertently), I can only think of a remote possibility: that at some point there was a failure in the update of the Deepin source list and apt-get reverted to the remaining (and only) Debian source list and had that package as the only upgrade candidate. That's why we should always check and confirm apt-cache policy before any install/upgrade, but you did that.

I have been using this method for many months, even before with Debian and using simultaneously Stable, Testing, Unstable and Experimental repositories. As long as the policy stands, the candidates to install/upgrade will be the default release, unless explicitly told otherwise.

I'll be upgrading my troubled system today and I'll report back if the same issue occurs.
Reply View the author
jotapesse
deepin
2016-03-05 03:17
#12
https://bbs.deepin.org/post/30778
It tested on my workstation and it works just  fine. Its that one of my computers it did not. The  ...

Your concerns are valid. That's why I wrote the "Disclaimer: /!\ Danger: Use this procedure at your own risk." This is an advanced method and has an associated risk for potential failure, although it's well tested and used for a long time. If one does not accept that risk then it should not try it.
Reply View the author
dance707
deepin
2016-03-05 03:25
#13
https://bbs.deepin.org/post/30778
Your concerns are valid. That's why I wrote the "Disclaimer: /!\ Danger: Use this procedure at you ...

I understand . And it is a very nice tutorial. I am just reporting what happened to me on the system where apt often seems to be locked up for no apparent reason.
Reply View the author
jotapesse
deepin
2016-03-05 03:33
#14
https://bbs.deepin.org/post/30778
I understand . And it is a very nice tutorial. I am just reporting what happened to me on the syst ...

And I appreciate your feedback. Failed/locked APT and consequently a failed source list update can give that undesired result. I have experienced that failed APT update but always verified it on the policy. Retrying the APT update until it succeeds (no errors at all) and confirming it on the policy always gave me the expected result.
Reply View the author
dance707
deepin
2016-03-05 03:41
#15
https://bbs.deepin.org/post/30778
And I appreciate your feedback. Failed/locked APT and consequently a failed source list update can ...

Yes and if they are updating from the control panel they would not know and maybe forgot the instructions they read in Wiki.
Reply View the author
jotapesse
deepin
2016-03-05 03:56
#16
https://bbs.deepin.org/post/30778
Yes and if they are updating from the control panel they would not know and maybe forgot the instr ...

True. A careless/unsavvy/unaware user may contribute to failure of it's system. And..? This is the beauty of GNU/Linux. I have done it many times :-) You are given the option and freedom of choice. Since you opted and accepted the risk to change the system you also took on you the responsibility. We can only provide the best information as possible (and that's a lot). The choice is on the user.

Reply View the author
jotapesse
deepin
2016-03-05 09:14
#17
https://bbs.deepin.org/post/30778
I'm sorry, I really can't explain it otherwise. If you haven't upgraded that package or a differen ...

https://bbs.deepin.org/user/40166 Happy to report that after upgrading my troubled system with latest upgrades, everything worked fine. So your reported issue should be probably related to a failed/bad APT sources lists update / policy update.
  1. $ apt-cache policy xserver-xorg-video-intel
  2. xserver-xorg-video-intel:
  3.   Installed: 2:2.99.917-2
  4.   Candidate: 2:2.99.917-2
  5.   Version table:
  6.      2:2.99.917+git20160218-1 500
  7.         500 http://ftp.pt.debian.org/debian sid/main amd64 Packages
  8. *** 2:2.99.917-2 990
  9.         990 http://packages.deepin.com/deepin unstable/main amd64 Packages
  10.         100 /var/lib/dpkg/status
Copy the Code
Reply View the author
dance707
deepin
2016-03-05 10:11
#18
https://bbs.deepin.org/post/30778
@dance707 Happy to report that after upgrading my troubled system with latest upgrades, everything ...

Good to hear yours working better on the boot fixes. We are still waiting for them to push the other patches.
Reply View the author
dance707
deepin
2016-03-06 23:09
#19
https://bbs.deepin.org/post/30778
@dance707 Happy to report that after upgrading my troubled system with latest upgrades, everything ...

Just to let you know on a third system I did updates on it also installed a Sid package I had not requested.  I had not installed anything at all and followed the instructions. The apt on third system did not seem to have any trouble before. I do not think the priorities function is working correctly.
Reply View the author
dance707
deepin
2016-03-06 23:44
#20
https://bbs.deepin.org/post/30778
Just to let you know on a third system I did updates on it also installed a Sid package I had not  ...

It shows 5.0.14 as being installed because at the time of upgrading the system that was the newest version.  5.0.16 was just added to Sid today. Users should also be aware even if this method works for them there are certain things that will not function correctly even on a clean reinstall of the root partition.
Reply View the author
1 / 3
To page