pylint complains about E1136: Value 'parser.section' is unsubscriptable
(unsubscriptable-object). `apt_pkg.TagFile` claims to be an iterator
over `apt_pkg.TagSection`.
So iterate over `apt_pkg.TagFile` for the sections instead of calling
`step()` and accessing the `section` property.
This change was tested to also work on Ubuntu 16.04 "xenial" with
Python 3.5.2 and python3-apt 1.1.0~beta1ubuntu0.16.04.12.
Signed-off-by: Benjamin Drung <email address hidden>
feat: Generate .Release.gpg.new and use atomic replace
There is an unnecessary window when `Release.gpg` is absent. Generate
`.Release.gpg.new` and use atomic replace to update `Release.gpg`. There
is still a window where `Release` and `Release.gpg` are out of sync.
This should be addressed in the future by atomically replacing the
complete directory.
Signed-off-by: Benjamin Drung <email address hidden>