Return the ``distro/release/section/name.section.gz`` source identifier. Extracts the last four path components, which by convention are ``distro/release/section/file.gz``.
(gz_path)
| 28 | |
| 29 | |
| 30 | def source_from_path(gz_path): |
| 31 | """Return the ``distro/release/section/name.section.gz`` source identifier. |
| 32 | |
| 33 | Extracts the last four path components, which by convention are |
| 34 | ``distro/release/section/file.gz``. |
| 35 | """ |
| 36 | parts = os.path.normpath(gz_path).split(os.sep) |
| 37 | return "/".join(parts[-4:]) |
nothing calls this directly
no outgoing calls
no test coverage detected