Bug 436171 - Double commented line in Discover hides all valid entries from sources.list
Summary: Double commented line in Discover hides all valid entries from sources.list
Status: RESOLVED UPSTREAM
Alias: None
Product: Discover
Classification: Applications
Component: discover (other bugs)
Version First Reported In: 5.21.4
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-25 16:21 UTC by Daniel
Modified: 2021-05-03 15:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel 2021-04-25 16:21:11 UTC
SUMMARY
plasma-discover does not handle commented lines in /etc/apt/sources.list properly.

STEPS TO REPRODUCE
1. add the following line to your sources.list:
# deb file://archive.local/user/pervert_penguin ./ # test
2. Start `plasma-discover` from command line, switch to settings

OBSERVED RESULT
No sources are shown (besides snap, flatpak, ...)
Get the terminal-message «Transaction error:  PackageKit::Transaction::ErrorFailedConfigParsing "E: Syntax error in line # deb file://archive.local/user/pervert_panda ./ # test\nW: Ignoring invalid record(s) in sources.list file!\nE: Cannot read vendors.list file\n" PackageKit::Transaction(0x5634082d97b0)»


EXPECTED RESULT
The tool should ignore any line beginning with #

SOFTWARE/OS VERSIONS
Discover: 5.21.4
Linux/KDE Plasma: KDE neon
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
The same behaviour occurs in Kubuntu 20.04 (Discover 5.18, KDE/Qt: ancientstable ;) )
Comment 1 Nate Graham 2021-04-27 18:02:42 UTC
Discover doesn't read this file directly; it relies on the PackageKit library to read the file and abstract its contents for us. The fact that the error message you saw in the console output came from PackageKit ("PackageKit::Transaction::ErrorFailedConfigParsing 'blablabla'") is a clue.

So you would need to report this to the PackageKit developers at https://github.com/hughsie/PackageKit/issues

Thanks!
Comment 2 Daniel 2021-05-02 11:30:27 UTC
Hello Nate,

i've reported upstream at
https://github.com/hughsie/PackageKit/issues/469

Thanks too!
Comment 3 Nate Graham 2021-05-03 15:48:25 UTC
You're welcome!