Bug 414368

Summary: pkcon incorrectly assumes no network is available
Product: [Applications] apper Reporter: Eddie <edfoundkdebug>
Component: generalAssignee: Daniel Nicoletti <dantti12>
Status: RESOLVED UPSTREAM    
Severity: normal CC: nate, rdieter
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Eddie 2019-11-21 15:38:08 UTC
SUMMARY

Apology if this not "apper" related, but I could not find pkcon KDE NEON app in the drop-down. Please let the 
correct people know. (Richard Hughes?) http://www.packagekit.org.

pkcon does not look at active network interfaces and ASSUMES incorrectly that network is unavailable.

root@mymachine-bash ~ # pkcon refresh
\Refreshing cache              [=========================]         
Waiting for authentication    [=========================]         
Loading cache                 [=========================]         
Finished                      [=========================]  
       
Fatal error: Cannot refresh cache whilst offline


root@mymachine-bash ~ # ifconfig 
enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.56.1  netmask 255.255.255.0  broadcast 192.168.56.255


STEPS TO REPRODUCE
1. have a static network IP unmanaged by Network-Manager
2. run pkcon refresh .. or pkcon update
3. sit back in dismay, and then rather run apt dist-upgrade which works.

OBSERVED RESULT
it breaks

EXPECTED RESULT
Expected it to work like APT.. (it just works).
It should not rely on high-level monstrous apps like Network-Manager, go lower.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: KDE neon User Edition 5.17
(available in About System)
KDE Plasma Version: n/a, its a command line issue.
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Perhaps related to Bug 412914
Comment 1 Rex Dieter 2019-11-21 16:17:04 UTC
pkcon is part of PackageKit (not a kde project)
Comment 2 Eddie 2019-11-21 21:04:16 UTC
Hello. My Apology. I just saw it part of KDE NEON distribution, 
since the distribution mention "use pkcon instead of apt for updates".
I will contact the packageKit person(s).

I found that DISCOVER suffer from the exact same problem: it only works on Ethernet adaptors managed by Network-Manager.  

Thank you for your help.
Comment 3 Nate Graham 2019-11-22 13:23:53 UTC
Upstream issue in PackageKit: https://github.com/hughsie/PackageKit/issues/336