Commit 5fb6c91
committed
fix(apt): fix compression when python-apt is available
When python-apt is available, and thus apt_pkg, the iter_paragraphs
method only accepts filehandles in python-debian 0.1.49. Contrary to
what the docs state, passing a filehandle to an encrypted file causes
a segmentation fault. Thus we need to treat it differently.
When dealing with compressed files we now decompress the file and never
us python-apt.
For python debian >= 1.0.0 this behavior is fixed, and the method also
accepts filenames. Debian bookworm still uses 0.1.49, so we have to
have this workaround for now.
Fixes: 2d070dc feat(apt): allow reading of compressed apt-cache files
Signed-off-by: Christoph Steiger <[email protected]>1 parent 80be4d7 commit 5fb6c91
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
0 commit comments