Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

PPA's are normally disabled when you upgrade, and must be re-enabled manually. I upgraded to 12.04 about a month ago and I just noticed that while my other PPAs had all been disabled, the Google PPAs were not disabled. Why is this?

share|improve this question
Can you provide related sources.list entries? – jasmines May 31 '12 at 14:13
@jasmines sorry, I already reenabled/uncommented all the other disabled ones. This is the default behavior in Ubuntu so it should be simple to reproduce. – adempewolff May 31 '12 at 14:18
@irrationalJohn what I meant by that was that anyone who had at least one google PPA and at least one other PPA enabled would see this behavior after a distro upgrade. For someone who has already upgraded and manually reenabled the other PPAs (like me) they would need to upgrade again to reproduce. All my machines are already 12.04 and I don't feel like upgrading any to a 12.10 alpha or I would reproduce it myself to provide the files. – adempewolff May 31 '12 at 14:31
up vote 10 down vote accepted

(Credit to Jorge Castro for this answer)

The Google packages install a cron job in /etc/cron.daily/ for custumizing the repository configuration and reenabling the source after a release upgrade.

Each Google package will put its own script (or a link to a script) here. For example: google-musicmanager, google-chrome or google-talkplugin (the latter being a symlink to a script at /opt/google/talkplugin/cron/google-talkplugin).

Here is the description from the google-talkplugin script:

# 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".

The script will:

  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. and
  5. # Detect if the repo config was disabled by distro upgrade and enable if necessary.

Here is the portion of the script that detects and reenables the repo config after a release upgrade.

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

  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," \
      LOGGER=$(which logger 2> /dev/null)
      if [ "$LOGGER" ]; then
        "$LOGGER" -t "$0" "Reverted repository modification: $REPOLINE."

And here is the /etc/apt/sources.list.d/google-talkplugin.list file that is created by the script.

# You may comment out this entry, but any other modifications may be lost.
deb stable main
share|improve this answer
I just noticed that something went wrong with this process in the last month and the Google distro was unauthorized and for some reason hasn't reauthorized itself. I'm hoping manually reinstalling the package will reset things. – adempewolff Nov 7 '12 at 13:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.