aptutil
aptutil copied to clipboard
Provide a workaround to ignore bad indices
Some repositories are badly configured to return wrong contents for uncompressed indices.
For instance, pkg.jenkins.io returned wrong Packages as pointed by @takumin:
https://github.com/cybozu-go/aptutil/issues/25#issuecomment-334789886
Zabbix also returned wrong Sources for which go-apt-mirror implements a workaround already:
https://github.com/cybozu-go/aptutil/blob/66c646f1456082148de06a2ae9f41fa88f37eed7/mirror/mirror.go#L243-L257
Although these indices are bad, apt or apt-get will work nicely as they look compressed indices
such as Packages.bz2 or Sources.gz first.
To help users of go-apt-mirror, we should provide a general workaround for this problem.