如何在 Ubuntu 20.04 中使用 18.04 存储库中的 Firefox 以使用全局菜单?

Arc*_*ahi 4 apt firefox repository globalmenu 20.04

Ubuntu 18.04 中的 Firefox 有一个特殊补丁来启用global menu,该补丁在后续版本中被删除。我想在 20.04 中安装该版本。一种方法是获取 .deb 文件并运行sudo apt-mark hold firefox. 但是,当发布新版本时,我将不得不手动应用更新。

有没有办法进行配置,apt以便仅从 18.04 存储库安装(和更新)firefox,而从 20.04 存储库安装所有其他软件?

(虽然在 Unity 停产时全局菜单补丁被删除,但由于 KDE Plasma 的全局菜单功能,全局菜单非常活跃)。

nob*_*ody 10

/etc/apt/sources.list.d/加仿生源,所以它会更容易将其取出。为此,请创建/etc/apt/sources.list.d/bionic.list具有以下内容的文件。

deb http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
Run Code Online (Sandbox Code Playgroud)

创建 /etc/apt/preferences.d/bionic.pref

#preference for firefox from bionic
    
Explanation: Allow installing firefox from bionic
Package: firefox
Pin: release a=bionic-updates
Pin-Priority: 1101

Explanation: Avoid other packages from the bionic repo.
Package: *
Pin: release a=bionic
Pin-Priority: 1
Run Code Online (Sandbox Code Playgroud)

与..一起处理

sudo apt update
Run Code Online (Sandbox Code Playgroud)

第一次模拟,因为我不知道您的系统中是否包含某些 ppa。

apt -s full-upgrade
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be DOWNGRADED:
  firefox
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Inst firefox [84.0+build3-0ubuntu0.20.04.1] (84.0+build3-0ubuntu0.18.04.1 Ubuntu:18.04/bionic [amd64])
Conf firefox (84.0+build3-0ubuntu0.18.04.1 Ubuntu:18.04/bionic [amd64])
Run Code Online (Sandbox Code Playgroud)

然后运行sudo apt full-upgrade 以从 Ubuntu 18.04 安装 firefox。

  • 我编辑了你的答案以使用“bionic-updates”,它有 Firefox 84。“bionic”有 v59。全局菜单也有效。 (2认同)