updates_available doesn't work when using pkcon

Bug #1255493 reported by kealthou on 2013-11-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu
Medium
Dustin Kirkland 

Bug Description

Replace

flock -xn "$flock" pkcon get-updates -p | grep -c '^Package' >"$mycache" 2>/dev/null &

with

LC_ALL=C flock -xn "$flock" pkcon get-updates -p | awk '/^Results:$/ { start=NR }; /^Security/ { security++ }; END { if (!/There are no updates available at this time./) { print NR-start, security }}' > "$mycache" 2>/dev/null &

It's a bit ugly-looking.

Dustin Kirkland  (kirkland) wrote :

I don't have a pkcon setup to test this, but it looks reasonable to me. Please confirm here if this committed change works for you.

Committed revision 2255.

Changed in byobu:
importance: Undecided → Medium
status: New → Fix Committed
assignee: nobody → Dustin Kirkland  (kirkland)
Dustin Kirkland  (kirkland) wrote :

Oh, and thanks ;-)

kealthou (kealthou) wrote :

I confirmed it's working.

I should've given this first. Below are instances of how "pkcon get-updates" outputs. I hope this helps if you should improve updates_available for pkcon.

When there are updates available:

$ LC_ALL=C pkcon get-updates -p
Transaction: Getting updates
Status: Waiting in queue
Status: Starting
Status: Getting information
Results:
Bug fix gdb-7.6.1-46.fc19.x86_64
Bug fix ibus-1.5.4-2.fc19.x86_64
Bug fix ibus-gtk2-1.5.4-2.fc19.x86_64
Bug fix ibus-gtk3-1.5.4-2.fc19.x86_64
Bug fix ibus-libs-1.5.4-2.fc19.x86_64
Bug fix ibus-setup-1.5.4-2.fc19.noarch
Security python3-3.3.2-8.fc19.x86_64
Security python3-libs-3.3.2-8.fc19.x86_64

When there are no updates available:

$ LC_ALL=C pkcon get-updates -p
Transaction: Getting updates
Status: Waiting in queue
Status: Starting
Status: Getting information
Results:
There are no updates available at this time.

Changed in byobu:
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