Comment 6 for bug 1604750

Revision history for this message
James Sinton (jksinton) wrote :

So the problem seems to be with ___update_needed() and the checks for Debian/Ubuntu. After running an upgrade, the updates-available cache file and /var/lib/apt had the exact same modification times (based on ls) whereas /var/lib/apt/lists was older than the updates-available cache file.

I added an echo statement to monitor the return value of the [ FILE1 -nt FILE2 ] checks:
        if $BYOBU_TEST apt-get >/dev/null; then
                # Debian/ubuntu
                [ "/var/lib/apt" -nt "$mycache" ] || [ "/var/lib/apt/lists" -nt "$mycache" ]
                local nt=$?
                echo "updated_needed returns: $nt" >> /home/byobu-user/byobu.log
                return $nt

This is what I get:

updated_needed returns: 1

Again, this was after the upgrade.

Then I tried hardcoding updated_needed to return 0. And, voilĂ  the updates-available cache file updated successfully.