diff --git a/PkgInfo/plugin.py b/PkgInfo/plugin.py index 26a2e00..03f4f4f 100644 --- a/PkgInfo/plugin.py +++ b/PkgInfo/plugin.py @@ -108,15 +108,11 @@ class PkgInfo(callbacks.Plugin): "jessie", "testing", "sid", "unstable", "stretch", "buster", "experimental", "bullseye", "bookworm") ubuntu = ("bionic", "focal", "groovy", "hirsute", "impish") - mint = ("betsy", "cindy", "qiana", "rebecca", "rafaela", "rosa", - "sarah", "serena", "sonya", "sylvia", "tara") if release.startswith(debian): return "debian" elif release.startswith(ubuntu): return "ubuntu" - elif release.startswith(mint): - return "mint" def _get_distro_fetcher(self, dist, multi=False): dist = dist.lower() @@ -126,8 +122,6 @@ class PkgInfo(callbacks.Plugin): raise AmbiguousDistributionError("You must specify a distribution version (e.g. 'stretch' or 'unstable')") elif dist == 'ubuntu' and not multi: raise AmbiguousDistributionError("You must specify a distribution version (e.g. 'trusty' or 'xenial')") - elif dist in ('mint', 'linuxmint'): - raise AmbiguousDistributionError("You must specify a distribution version (e.g. 'sonya' or 'betsy')") elif dist == 'master': raise AmbiguousDistributionError("'master' is ambiguous: for Fedora rawhide, use the release 'rawhide'") @@ -141,8 +135,6 @@ class PkgInfo(callbacks.Plugin): return self._freebsd_fetcher elif guess_dist == 'ubuntu' or dist == 'ubuntu': return self._ubuntu_fetcher - elif guess_dist == 'mint': - return self._mint_fetcher elif dist == 'fedora': return self._fedora_fetcher elif dist == 'gentoo': @@ -374,56 +366,6 @@ class PkgInfo(callbacks.Plugin): result = results[0] return (result['name'], result['version'], 'Fedora', 'no description available', friendly_url) - def _mint_fetcher(self, release, query, fetch_source=False, fetch_depends=False, multi=False): - if fetch_depends: - raise UnsupportedOperationError("--depends lookup is not supported for Linux Mint") - - if fetch_source: - addr = 'http://packages.linuxmint.com/list-src.php?' - else: - addr = 'http://packages.linuxmint.com/list.php?' - addr += urlencode({'release': release}) - - fd = utils.web.getUrl(addr).decode("utf-8") - - soup = BeautifulSoup(fd) - - # Linux Mint puts their package lists in tables, so use HTML parsing - results = soup.find_all("td") - - versions = {} - query = query.lower() - - multi_results = [] - for result in results: - name = result.contents[0].string # Package name - - if query in name and multi: - multi_results.append(name) - - elif query == name: - # This feels like really messy code, but we have to find tags - # relative to our results. - # Ascend to find the section name (in