[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Asking for popularity-contest participation at install time



As some of you remember, the popularity-contest question fell out of
the installer when tasksel was rewritten.  We should try to get it
back into the installer.

Here is a proposed patch for base-config to enable it again.

It checks to see if popularity-contest was already installed during
the tasksel run, and if not, installs it (asking the participation
question in the process), and then purge it if the answer was no.

Comments?

Index: lib/menu/pkgsel
===================================================================
--- lib/menu/pkgsel     (revisjon 1579)
+++ lib/menu/pkgsel     (arbeidskopi)
@@ -26,13 +26,6 @@
        ln -sf /bin/true /usr/bin/scrollkeeper-update
        ln -sf /bin/true /usr/bin/scrollkeeper-rebuilddb

-       # Make popularity-contest be selected for installation by default. It
-       # lets the user choose whether or not to enable it. We need more
-       # people using this so we can hope to get better data about who is
-       # using what packages in debian.
-       # (Doesn't work with new tasksel.)
-       #echo popularity-contest install | dpkg --set-selections
-
        # X needs some packages installed before its debconf config is run
        # to make it do hardware autodetection. The only way to make sure these
        # are installed properly is to install them now, before packages are
@@ -56,6 +49,20 @@
                fi
        fi

+       # Install popularity-contest if not already installed to ask
+       # if the user want to participate.  If the user say no, remove
+       # it again.
+       # It lets the user choose whether or not to enable it. We need
+       # more people using this so we can hope to get better data
+       # about who is using what packages in debian.
+       if ! dpkg --get-selections | grep 'popularity-contest' | grep -q install; then
+               apt-get install popularity-contest
+               if debconf-save-answers |grep popularity-contest/participate |
+                   grep -q false ; then
+                   dpkg --purge popularity-contest
+               fi
+       fi
+
        if [ "$KEEP_BASE_DEBS" != yes ]; then
                apt-get -f clean || true
        fi



Reply to: