升级到新版本后,为什么要重新启用google PPA?


9

PPA通常在升级时被禁用,并且必须手动重新启用。我大约一个月前升级到12.04,我只是注意到虽然我所有其他PPA都已被禁用,但Google PPA 并未被禁用。为什么是这样?


您可以提供相关的source.list条目吗?
茉莉花2012年

@jasmines对不起,我已经重新启用/取消对所有其他残疾人的注释。这是Ubuntu中的默认行为,因此复制起来应该很简单。
adempewolff 2012年

@irrationalJohn我的意思是,至少启用了一个Google PPA和至少一个其他PPA的任何人在发行版升级后都会看到此行为。对于已经升级并手动重新启用其他PPA(例如我)的用户,他们将需要再次升级才能重现。我所有的机器都已经是12.04了,我不想升级到12.10 Alpha,否则我会自己复制它来提供文件。
adempewolff 2012年

Answers:


11

(此答案的来源为Jorge Castro)

Google软件包在其中安装了cron作业,/etc/cron.daily/用于确定存储库配置并在版本升级后重新启用源。

每个Google软件包都将在此处放置自己的脚本(或脚本的链接)。例如:google-musicmanagergoogle-chromegoogle-talkplugin(后者是指向的脚本的符号链接/opt/google/talkplugin/cron/google-talkplugin)。

这是google-talkplugin脚本的描述:

# This script is part of the google-talkplugin package.
#
# It creates the repository configuration file for package updates, and it
# monitors that config to see if it has been disabled by the overly aggressive
# distro upgrade process (e.g.  intrepid -> jaunty). When this situation is
# detected, the respository will be re-enabled. If the respository is disabled
# for any other reason, this won't re-enable it.
#
# This functionality can be controlled by creating the $DEFAULTS_FILE and
# setting "repo_add_once" and/or "repo_reenable_on_distupgrade" to "true" or
# "false" as desired. An empty $DEFAULTS_FILE is the same as setting both values
# to "false".

该脚本将:

  1. # Install the repository signing key
  2. # Update the Google repository if it's not set correctly.
  3. # Add the Google repository to the apt sources.
  4. # Remove our custom sources list file.
  5. # Detect if the repo config was disabled by distro upgrade and enable if necessary.

这是脚本的一部分,用于在发行版升级后检测并重新启用repo配置。

handle_distro_upgrade() {
  if [ ! "$REPOCONFIG" ]; then
    return 0
  fi

  find_apt_sources
  SOURCELIST="$APT_SOURCESDIR/google-talkplugin.list"
  if [ -r "$SOURCELIST" ]; then
    REPOLINE=$(grep -E "^[[:space:]]*#[[:space:]]*$REPOCONFIG[[:space:]]*# disabled on upgrade to .*" "$SOURCELIST")
    if [ $? -eq 0 ]; then
      sed -i -e "s,^[[:space:]]*#[[:space:]]*\($REPOCONFIG\)[[:space:]]*# disabled on upgrade to .*,\1," \
        "$SOURCELIST"
      LOGGER=$(which logger 2> /dev/null)
      if [ "$LOGGER" ]; then
        "$LOGGER" -t "$0" "Reverted repository modification: $REPOLINE."
      fi
    fi
  fi
}

这是/etc/apt/sources.list.d/google-talkplugin.list脚本创建的文件。

### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb http://dl.google.com/linux/talkplugin/deb/ stable main

我只是注意到上个月此过程出现了问题,并且Google发行版未经授权,并且由于某种原因没有对其自身进行授权。我希望手动重新安装该软件包将重置东西。
adempewolff 2012年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.