Почему google PPA включается после обновления до новой версии?

PPA обычно отключаются при обновлении и должны быть повторно включены вручную. Я обновился до 12.04 около месяца назад и только что заметил, что, хотя все мои другие PPA были отключены, Google PPA были не отключены. Почему это?

9
задан 31 May 2012 в 19:42

1 ответ

(Кредит Jorge Castro для этого ответа)

Пакеты Google устанавливают задание крона в /etc/cron.daily/ для custumizing конфигурация репозитория и перевключение источника после обновления версии.

Каждый пакет Google поместит свой собственный сценарий (или ссылка на сценарий) здесь. Например: google-musicmanager, google-chrome или google-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
11
ответ дан 31 May 2012 в 19:42

Другие вопросы по тегам:

Похожие вопросы: