Extract (distro, release) from a source path. All source paths follow the ``distro/release/section/file.gz`` format: "ubuntu/26.04/1/ps.1.gz" -> ("ubuntu", "26.04")
(source)
| 18 | |
| 19 | |
| 20 | def parse_distro_release(source): |
| 21 | """Extract (distro, release) from a source path. |
| 22 | |
| 23 | All source paths follow the ``distro/release/section/file.gz`` format: |
| 24 | "ubuntu/26.04/1/ps.1.gz" -> ("ubuntu", "26.04") |
| 25 | """ |
| 26 | parts = source.split("/") |
| 27 | return parts[0], parts[1] |
| 28 | |
| 29 | |
| 30 | def source_from_path(gz_path): |
no outgoing calls