aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fix(selectors): use netselect tags to avoid raw IPs in the mirror outputrobbat2/netselect-tagsRobin H. Johnson2024-01-141-8/+69
| | | | | | | | | | | | | | | | | Netselect will return IPs in the output in some cases, which are NOT desirable in HTTP/HTTPS URLs due to vhosts & SNI. Use undocumented netselect functionality to tag hostnames & IPs during testing, and convert the tags back to the original URLs. If there is significant performance difference between IPv4 & IPv6 to a given mirror, this may cause future problems, but users need to get their network fixed in that case - the regular Portage download process should failover regardless. Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=136849 Reference: https://bugs.gentoo.org/922058 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Rerun `pyupgrade` with `--py39-plus`2.4.0Sam James2023-08-075-33/+24
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* Rerun `autopep8` with `--aggressiveSam James2023-08-073-13/+8
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* setup.py: update homepageSam James2023-08-071-2/+2
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* Run `autopep8`Sam James2023-08-072-10/+11
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* Reformat with `black`Sam James2023-08-0711-1334/+1532
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* Modernise shebangSam James2023-08-076-18/+11
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* Drop old URLsSam James2023-08-071-5/+0
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* Drop Python 2 supportSam James2023-08-072-30/+12
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* Run `pyupgrade`Sam James2023-08-079-33/+24
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* CI: add basic pytest workflowSam James2023-08-071-0/+40
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* extractor.py: cleanup py2 compatSam James2023-08-071-7/+2
| | | | | Bug: https://bugs.gentoo.org/911183 Signed-off-by: Sam James <sam@gentoo.org>
* extractor.py: parse proto from the uriPeter Levine2023-08-071-1/+17
| | | | | | | | | | | The protocol can be parsed from the URI so we can get rid of the protocol tag altogether. Bug: https://bugs.gentoo.org/911183 Suggested-by: Florian Schmaus <flow@gentoo.org> Suggested-by: Sam James <sam@gentoo.org> Signed-off-by: Peter Levine <plevine457@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
* main: Fix --all option parsingSam James2023-07-061-3/+8
| | | | | | | | | Avoid --all erroring out with "ERROR: Choose at most one of -s or -a". Bug: https://bugs.gentoo.org/872218 Fixes: 7caac017833b01e13028658effc502430c56d770 Thanks-to: <xpenev@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
* Revert "setup.py: Migrate from deprecated distutils to setuptools"2.3.0-rc1Brian Dolbec2022-07-101-3/+19
| | | | | | | | This reverts commit 4cd4fb6280433f301ad9159f7473dc32ceb063d6. setuptools is installing data_file to the pkg dir inside python. Reverting back to distutils for correct install for now. Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* Some py2 compat. cleanupBrian Dolbec2022-06-233-7/+1
| | | | Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* setup.py: Fix logging in set_versionBrian Dolbec2022-05-311-1/+2
| | | | | | Fixes regresiion in 4cd4fb6280433f301ad9159f7473dc32ceb063d6 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* main.py: Add indented backslash capability to multilne GENTOO_MIRRORSBrian Dolbec2022-05-312-24/+37
| | | | | | | | | For multiple mirrors, use backslashes list additional mirrors with indents for clarity. Gentoo-bug-url: https://bugs.gentoo.org/543814 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* configs.py: Add missing https:// to the re.compileBrian Dolbec2022-05-311-1/+1
| | | | Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* configs.py: Remove py2 codeBrian Dolbec2022-05-311-4/+1
| | | | Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* Remove remaining SYNC codeBrian Dolbec2022-05-312-9/+4
| | | | Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* selectors.py: Change general exception output to print_warnBrian Dolbec2022-05-311-2/+2
| | | | Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* version.py: Bump base version to 2.3.0 before releaseBrian Dolbec2022-05-301-1/+1
| | | | Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* setup.py: Migrate from deprecated distutils to setuptoolsBrian Dolbec2022-05-301-19/+3
| | | | | Gentoo-bug-url: https://bugs.gentoo.org/841131 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* selectors.py: Fix bug 698528 clear screen on dialog exitBrian Dolbec2022-05-301-0/+1
| | | | Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* main.py: Fix bug 600572 Remove SYNC variable usageBrian Dolbec2022-05-301-5/+5
| | | | Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* selectors.py: Bug 800149. Add general exception for any other server errorBrian Dolbec2022-05-301-0/+5
| | | | | | | | Catch any other server errors so that mirrorselect will ignore that server without crashing. It will also output the error and request it to be reported. Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* Apply bug 730994 https filtering patchBrian Dolbec2022-05-303-3/+9
| | | | | Author: Peter Levine Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* Remove obsolete __future__ import of print_functionBrian Dolbec2022-05-303-8/+0
| | | | Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* selectors.py: Fix bug 771963 incorrect comparisonBrian Dolbec2022-05-301-2/+2
| | | | Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* main.py: Add a -a, -s combo sanity checkBrian Dolbec2020-06-031-0/+3
| | | | | | | | | | This is to prevent all mirrors from being added to make.conf when the -s option is also enabled. The -a option takes priority in the code, so there is never any selection done. This options check will error out when both options are enabled. Reported by: toralf on #gentoo-dev Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* write_make_conf: fix infinite loop (bug 698470)Zac Medico2019-10-242-0/+3
| | | | | | Fixes: 42238f4ff13a ("write_make_conf: support multi-line GENTOO_MIRRORS (bug 543814)") Bug: https://bugs.gentoo.org/698470 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Update version for 2.2.5 release2.2.6Zac Medico2019-07-162-2/+2
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* netselect: make netselect ipv6 support optionalZac Medico2019-07-121-4/+11
| | | | | | | | | | | | Since netselect with ipv6 support does not work on a system where ipv6 is disabled, use a NETSELECT_SUPPORTS_IPV4_IPV6 variable to optionally enable the use of netselect -4/-6 options. The ebuild will use sed to set NETSELECT_SUPPORTS_IPV4_IPV6 = True when USE=ipv6 is enabled, and will have a dependency like RDEPEND=">=net-analyzer/netselect-0.4[ipv6(+)?]". Bug: https://bugs.gentoo.org/688214 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Update version for 2.2.5 release2.2.5Zac Medico2019-05-273-2/+3
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* get_filesystem_mirrors: fix DeprecationWarning: invalid escape sequence \Zac Medico2019-05-271-1/+1
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* netselect: use -4/-6 options (bug 582508)Zac Medico2019-05-271-3/+12
| | | | | | | Requires >=net-analyzer/netselect-0.4[ipv6(+)]. Bug: https://bugs.gentoo.org/582508 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* write_make_conf: support multi-line GENTOO_MIRRORS (bug 543814)Zac Medico2019-05-275-26/+86
| | | | | | | Use shlex to support multi-line GENTOO_MIRRORS assignments. Bug: https://bugs.gentoo.org/543814 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Update version for 2.2.4 release2.2.4Zac Medico2019-02-132-2/+2
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* setup.py: extend sdist to archive files owned by rootZac Medico2019-02-131-0/+14
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* selectors.py: Give urllib hostname info (bug 604968)Michel Ganguin2019-02-131-2/+8
| | | | | | | | | | | | Give urllib hostname info such that: * it will not fail when using HTTPS because of hostname mismatch (CertificateError) * it will not fail when the server is a virtualhost * it will not fail when the server validates ssl SNI Bug: https://bugs.gentoo.org/566778 Bug: https://bugs.gentoo.org/604968 Bug: https://bugs.gentoo.org/639156 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* selectors.py: handle ssl.CertificateError (bug 639156)Xiami2019-02-131-1/+1
| | | | | Bug: https://bugs.gentoo.org/639156 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* selectors.py: handle ssl.CertificateError (bug 604968)Daniel Harding2019-02-121-1/+2
| | | | | Bug: https://bugs.gentoo.org/604968 Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Update version for 2.2.3 releaseZac Medico2019-01-232-3/+3
| | | | Signed-off-by: Zac Medico <zmedico@gentoo.org>
* Mirrorselect: add 'exclude' option to allow excluding hosts from mirrors list.i.Dark_Templar2018-05-262-0/+10
|
* main.py: Remove obsolete 'SYNC' option2.2.3Brian Dolbec2017-07-181-4/+1
| | | | Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* main.py: fix isinstance(hosts[i], bytes)Zac Medico2017-02-201-1/+1
| | | | Fixes: c91509d823c2 ("main.py: Fix Bytes error in hosts list bug 610016")
* extractor.py: Add climit param for >=ssl-fetch-0.4Brian Dolbec2017-02-201-1/+1
|
* main.py: Fix Bytes error in hosts list bug 610016zakalwe2017-02-201-2/+3
| | | | | | | The code was only checking the first host which was not a bytes instance in that case. This resulted in the remaining host entries to not be decoded. Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
* deeptime: cancel alarm signal before handling socket.error (bug 523312)Zac Medico2016-11-131-10/+12
| | | | | | | | In order to avoid a race condition, the alarm signal must be cancelled before socket.error is handled. X-Gentoo-Bug: 523312 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=523312