cybozu-go / aptutil

Go utilities for Debian APT repositories
MIT License
124 stars 29 forks source link

Provide a workaround to ignore bad indices #27

Open ymmt2005 opened 6 years ago

ymmt2005 commented 6 years ago

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.