(Nous remercions Jorge Castro pour cette réponse)
Les packages Google installent une tâche cron /etc/cron.daily/
pour personnaliser la configuration du référentiel et réactiver la source après une mise à niveau de version.
Chaque package Google mettra son propre script (ou un lien vers un script) ici. Par exemple: google-musicmanager
, google-chrome
ou google-talkplugin
(ce dernier étant un lien symbolique vers un script à /opt/google/talkplugin/cron/google-talkplugin
).
Voici la description du script 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".
Le script:
# 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.
et
# Detect if the repo config was disabled by distro upgrade and enable if necessary.
Voici la partie du script qui détecte et réactive la configuration du référentiel après une mise à niveau de version.
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
}
Et voici le /etc/apt/sources.list.d/google-talkplugin.list
fichier créé par le script.
### 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