Comment 1 for bug 112242

Revision history for this message
Harvey Muller (hlmuller) wrote :

I can confirm the bug. To replicate the problem do the following:

1. System > Administration > Software Sources

2. Add new sources.

    a. Uncheck the "Source code" box on the first tab "Ubuntu software" if it is checked. Close, reload. If not checked, proceed to 2.b.

    b. Open Software sources again, and now check the "Source code" box on the "Ubuntu software" tab.

software-properties-gtk will add the following to any new lines it added to /etc/apt/source.list:

    #Added by software-properties

The short term workaround, until /etc/aide/aide.conf.d/31_aide_apt is fixed is to simply remove the offending comments from /etc/apt/sources.list manually.

The long term fix is to correct 31_aide_apt by adding an sed statement which first strips the comments added by software-properties-gtk. I'm attaching a patch which I have tested, and works for me.

This is the text of the patch:
<begin text>
--- 31_aide_apt.old 2007-11-07 10:52:00.000000000 -0500
+++ 31_aide_apt 2007-11-07 10:47:57.000000000 -0500
@@ -18,7 +18,7 @@
   APT_VERS="$(dpkg --status apt | sed -n '/^Version:[[:space:]]/{s/[^[:space:]]\+[[:space:]]\+\([^[:space:]]\+\).*/\1/p;q};')"
 fi

-cat $SOURCESLIST | while read deb uri dist comp; do
+cat $SOURCESLIST | sed 's/ #.*$//' | while read deb uri dist comp; do
   PROTOCOL="$(echo $uri | sed 's|\([^:]\+\).*|\1|')"
   if [ "$PROTOCOL" = "http" ] || [ "$PROTOCOL" = "ftp" ]; then
     HOST="$(echo $uri | sed 's|.*//\([^/[:space:]]\+\).*|\1|')"
<end text>

Best regards,

Harvey