(이 답변에 대해 Jorge Castro에게 감사드립니다)
Google 패키지 /etc/cron.daily/
는 리포지토리 구성을 사용자 정의하고 릴리스 업그레이드 후 소스를 다시 활성화하기 위해 cron 작업을 설치합니다 .
각 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".
스크립트는 :
# Install the repository signing key
# Update the Google repository if it's not set correctly.
# Add the Google repository to the apt sources.
# Remove our custom sources list file.
과
# 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