rickysarraf / apt-offline

Offline APT Package Manager
http://rickysarraf.github.io/apt-offline/
GNU General Public License v3.0
219 stars 37 forks source link

Fixes issue 199 by ignoring items/lines that are completely invalid when parsing a signature file #203

Closed kyp44 closed 1 year ago

kyp44 commented 2 years ago

Fixes issue 199.

Since the generation of the signature file is done by directly writing the output of the apt backend command, it was easier to fix this when parsing the signature file by putting the line splitting in a try block and simple ignoring that line/item if that fails.

In my opinion this isn't even an issue that we should have to fix in apt-offline. It should be the case that apt and apt-get do not output this advertisement when you enable the highest quiet level like apt-offline does. If this is fixed in those tools later, this apt-offline fix will just have no effect but will not cause any problems. This fix should also protect against any future odd lines that they decide to have apt or apt-get print out even in quiet mode.