auto-apt update and updatedb commands fail on 0.3.23

Bug #1300991 reported by iw2snl on 2014-04-01
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
auto-apt (Ubuntu)
Undecided
Unassigned
Trusty
Undecided
Unassigned

Bug Description

[Impact]
* auto-apt fails to update its local database of package information.
  - Due to this, auto-apt is unusable in Trusty (and Saucy).
* The new version 0.3.24 fixes this bug, LP: #1300987 and a dpkg warning about an
  obsolete argument.

[Test Case]
* Run the commands 'sudo auto-apt update' and 'sudo auto-apt updatedb'.
  - With version 0.3.23, the local database is not updated and the commands print
    'put: 0 files, 0 entries done (xx seconds)' or similar.
  - With the new version 0.3.24, the local database is successfully updated. The
    commands take a lot more time to complete and display more output.

[Regression Potential]
* auto-apt is already non-functional in Trusty (and Saucy), therefore there is no
  regression potential.

[Other Info]
* The original bug report for Saucy follows:

1)Description: Ubuntu 13.10
Release: 13.10

Note: Actually Kubuntu 13.10

2)auto-apt:
  Installed: 0.3.23
  Candidate: 0.3.23
  Version table:
 *** 0.3.23 0
        500 http://md.archive.ubuntu.com/ubuntu/ saucy/universe amd64 Packages
        100 /var/lib/dpkg/status

3) $ sudo auto-apt update
     $ sudo auto-apt updatedb
Both commands should update the databases

4) $ sudo auto-apt update
     $ sudo auto-apt updatedb
Both commands output:
put: 0 files, 0 entries done (xx seconds)
where xx is about 10 seconds.
And, no update is performed.

5) The bug is caused by line 145 in /usr/bin/auto-apt
 sed -ne 's=^[[:space:]][[:space:]]*deb[[:space:]][[:space:]]*\([^:[:space:]]*\):\([^[:space:]]*\)[[:space:]][[:space:]]*\([^[:space:]]*\)[[:space:]][[:space:]]*.*=\1 \2/dists/\3=p' |

i.e. by the one trailing space in the beginning ^[[:space:]][[:space:]]*deb
At least my /etc/apt/sources.list doesn't contain any trailing spaces, which causes the sed to return 0 sources and no update is performed by auto-apt.

6) A workaround (or maybe a fix) is to delete the first trailing space [[:space:]] so the line should look like
sed -ne 's=^[[:space:]]*deb[[:space:]][[:space:]]*\([^:[:space:]]*\):\([^[:space:]]*\)[[:space:]][[:space:]]*\([^[:space:]]*\)[[:space:]][[:space:]]*.*=\1 \2/dists/\3=p' |

iw2snl (iw2snl) on 2014-04-01
description: updated
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in auto-apt (Ubuntu):
status: New → Confirmed
Bruno Nova (brunonova) wrote :

I confirm this bug (in Ubuntu 13.10).
I also confirm that the workaround provided by the bug reporter works (thanks iw2snl!).

Actually, I think the workaround is indeed the fix for this bug.
According to this commit here: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/auto-apt/trusty/revision/6
the two trailing spaces were added to "allow spaces in sources.list".
However, the first space doesn't make sense, as that "[[:space:]][[:space:]]*" regex means "1 or more spaces".

Another thing (another bug):
The auto-apt commands also output a warning of the sort "dpkg warning obsolete option '--print-installation-architecture' please use '--print-architecture' instead".

iw2snl (iw2snl) wrote :

>> According to this commit here: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/auto-apt/trusty/revision/6
>> the two trailing spaces were added to "allow spaces in sources.list".
>> However, the first space doesn't make sense, as that "[[:space:]][[:space:]]*" regex means "1 or more spaces".
I totally agree.

>> Another thing (another bug):
>> The auto-apt commands also output a warning of the sort "dpkg warning obsolete option '--print-installation-architecture'
>> please use '--print-architecture' instead".

Oh, you can fix this by fixing line 132 in /usr/bin/auto-apt:
From:
ARCH=$(dpkg --print-installation-architecture)

To:
ARCH=$(dpkg --print-architecture)

That was just a warning, so I didn't report any bug yet : ) .

Bruno Nova (brunonova) wrote :

I've linked a branch that fixes this bug, bug #1300987 and the warning I mentioned in this bug.

Thanks iw2snl! Your workarounds/fixes for this bug and the warning work great!

iw2snl (iw2snl) wrote :

Thanks for YOUR fix : ) ! My fixes were quite minor.

Hope, these bug reports get noticed soon.

Bruno Nova (brunonova) wrote :

Good news, the fixes where uploaded to Debian and will be synced to the development version of Ubuntu (Utopic)!

Now I'll see if I can get the updated package backported to Trusty.

Bruno Nova (brunonova) on 2014-05-01
tags: added: trusty
Bruno Nova (brunonova) on 2014-05-01
tags: added: saucy
Bruno Nova (brunonova) on 2014-05-01
description: updated
Bruno Nova (brunonova) on 2014-05-01
description: updated
Bruno Nova (brunonova) on 2014-05-01
Changed in auto-apt (Ubuntu):
status: Confirmed → Fix Released
Bruno Nova (brunonova) wrote :

Ubuntu Sponsors, could you "backport" version 0.3.24 of auto-apt to trusty-proposed?
That version of the package fixes both this bug and LP: #1300987.
auto-apt is not functional in the current version 0.3.23.

Important note: 0.3.24 was uploaded to Debian and will, eventually, be synced into Utopic.
It is not yet available there.

Bruno Nova (brunonova) wrote :

Ok, version 0.3.24 is now available in Utopic (found it here: https://launchpad.net/ubuntu/+source/auto-apt).
It may now be "backported" to Trusty.

iw2snl (iw2snl) wrote :

Yeah, that's cool. Thanks for the work : ) .

Robie Basak (racb) wrote :

Uploaded to trusty-proposed. Unsubscribing sponsors. Now awaiting SRU team approval. Thank you for your work!

Changed in auto-apt (Ubuntu Trusty):
status: New → Triaged

Hello iw2snl, or anyone else affected,

Accepted auto-apt into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/auto-apt/0.3.23ubuntu0.14.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in auto-apt (Ubuntu Trusty):
status: Triaged → Fix Committed
tags: added: verification-needed
Bruno Nova (brunonova) wrote :

I've installed the updated auto-apt package, version 0.3.23ubuntu0.14.04.1 from trusty-proposed, in a Ubuntu 14.04 virtual machine (I'm still using 13.10).
This version seems to work correctly. The auto-apt commands mentioned in the description work fine and without filling the RAM.

I've also tested using auto-apt to "help me" install 'nano' from source ('auto-apt run ./configure').
It installed all required dependencies. After that, 'make' compiled the program without problems.

tags: added: verification-done
removed: verification-needed

The verification of the Stable Release Update for auto-apt has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package auto-apt - 0.3.23ubuntu0.14.04.1

---------------
auto-apt (0.3.23ubuntu0.14.04.1) trusty; urgency=medium

  * No change rebuild from Debian auto-apt 0.3.24, which fixes only these bugs:
    - Patches supplied by Bruno Nova, with thanks.
    - Plug a memory leak caused by not freeing lines read from stdin. (LP:
      #1300987)
    - Use dpkg --print-architecture instead of deprecated dpkg
      --print-installation-architecture (the latter causes a warning). (LP:
      #1300991)
    - Accept no leading spaces at the start of a line in sources.list. (LP:
      #1300991)
 -- Robie Basak <email address hidden> Tue, 03 Jun 2014 13:32:35 +0000

Changed in auto-apt (Ubuntu Trusty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers