Levente Polyak
9221a476c5
feat(core): resolve symlinks on file write ( #233 )
...
* feat(core): resolve symlinks on file write
Instead of using the passed filename as the rename target, use
Path.resolve for resolving any symlinks.
This allows to use symlinks for the nvchecker database files that point
somewhere else. Before this commit nvchecker simply replaced the symlink
with an actual file, now we resolve the targets first and only replace
the actual file that is pointed to.
---------
Signed-off-by: Levente Polyak <levente@leventepolyak.net>
Co-authored-by: Andreas 'Segaja' Schleifer <webmaster@segaja.de>
Co-authored-by: lilydjwg <lilydjwg@gmail.com>
2023-10-27 17:18:05 +08:00
依云
c401d239b2
Merge pull request #239 from dpeukert/feature/source-url-support
...
Implement URL result support for other sources
2023-10-23 16:18:30 +08:00
Daniel Peukert
55b3f671c8
implement second batch of URL results for sources
2023-10-18 21:58:29 +02:00
Daniel Peukert
592b4a4f6b
update docs for sparkle
2023-10-18 02:03:10 +02:00
Daniel Peukert
6bf34873d3
implement first batch of URL results for sources
2023-10-18 02:00:46 +02:00
Daniel Peukert
5a6fee2817
fix pacman test
2023-10-18 01:59:43 +02:00
Daniel Peukert
a04d6b0fc6
implement rich result support for list-based sources
2023-10-18 01:59:30 +02:00
lilydjwg
5dcb3bc36a
tests: update
2023-10-14 15:19:13 +08:00
lilydjwg
d00203d103
fix: Python < 3.10 doesn't have kw_only for dataclass
2023-10-14 14:54:56 +08:00
lilydjwg
bdd025d995
implement url results for AUR and PyPI
...
see https://github.com/lilydjwg/nvchecker/issues/238 .
2023-10-14 14:52:10 +08:00
lilydjwg
cc4a0cd301
support url in results
2023-10-14 14:52:10 +08:00
lilydjwg
0fd35f4458
minor fix of a docstring
2023-10-14 14:52:10 +08:00
依云
3563d71fb2
Merge pull request #237 from stepnem/notifyopt
...
nvchecker-notify: accept and pass --tries and --failures to nvchecker
2023-10-07 19:06:34 +08:00
Štěpán Němec
4f79058cbd
nvchecker-notify: accept and pass --tries and --failures to nvchecker
2023-10-03 17:28:34 +02:00
lilydjwg
b8c0e8a6b3
still fix readthedocs
...
[skip ci]
2023-08-26 11:54:02 +08:00
lilydjwg
f3da72403e
fix readthedocs
...
[skip ci]
2023-08-26 11:47:34 +08:00
lilydjwg
efc99cb791
add .readthedocs.yaml
...
https://blog.readthedocs.com/migrate-configuration-v2/
[skip ci]
2023-08-26 11:46:24 +08:00
lilydjwg
2683f47e04
update tests: give up deepin as it times out frequently
2023-08-26 10:23:40 +08:00
lilydjwg
0a90d195d1
update tests
2023-08-26 10:17:40 +08:00
依云
83272dc04a
Merge pull request #236 from dpeukert/github-prereleases
...
github: implement option to include prereleases
2023-08-26 10:09:00 +08:00
Daniel Peukert
5052d82550
github: implement option to include prereleases
2023-08-25 23:23:30 +02:00
依云
587eeafd65
Merge pull request #235 from yan12125/fix-tests
...
Fix tests
2023-08-22 20:48:46 +08:00
Chih-Hsuan Yen
386d05f8e3
tests: skip testing with broken Deepin mirror
2023-08-22 19:51:16 +08:00
Chih-Hsuan Yen
07cddd9bd6
tests: fix tests with httpbin 0.10.0
...
The latest httpbin changes the format of JSON response. For example:
```
{
"authenticated": true,
"user": "username"
}
```
2023-08-22 18:44:51 +08:00
Chih-Hsuan Yen
598bb94135
tests: update Android SDK version
2023-08-22 18:40:01 +08:00
依云
ea542d1fa1
Merge pull request #231 from hack3ric/master
...
tests: bump android-sdk-cmake and xml2 version
2023-07-13 18:00:44 +08:00
Eric Long
fe1342e9fb
tests: bump android-sdk-cmake and xml2 version
2023-07-13 16:54:24 +08:00
lilydjwg
5a972cd0d0
alpm: community repo is gone
2023-06-29 14:03:03 +08:00
依云
4e7dce4e93
Merge pull request #229 from yan12125/fix-test-alpmfiles
...
Fix test_alpmfiles in Arch chroots
2023-06-19 22:18:38 +08:00
Chih-Hsuan Yen
d9888cc49d
Fix test_alpmfiles in Arch chroots
...
In general, there are no /var/lib/pacman/sync/*.files in Arch chroots,
and thus tests in test_alpmfiles.py fail.
The tempfile approach roughly follows tests/test_alpm.py.
Follow-up https://github.com/lilydjwg/nvchecker/pull/226
2023-06-19 22:06:47 +08:00
lilydjwg
b54c5a0cf7
PyPI signature support is gone
...
[skip ci]
2023-06-17 22:27:21 +08:00
lilydjwg
82dc93ceff
bump version to 2.12
2023-06-17 18:52:00 +08:00
lilydjwg
e708d19d35
tests: update test_htmlparser to avoid httpbin.org
...
it produces a lot of 504 errors.
2023-06-02 00:58:24 +08:00
lilydjwg
d3603fcee8
better documentation on optional dependencies
...
fixes #225 .
[skip ci]
2023-06-02 00:43:49 +08:00
lilydjwg
ac57d8fd15
alpmfiles: fix typing
2023-06-02 00:35:05 +08:00
依云
62ab3b05ef
Merge pull request #226 from pekkarr/alpmfiles
...
Add alpmfiles source
2023-06-02 00:33:02 +08:00
Pekka Ristola
8157e08b59
Add alpmfiles source
...
Rewritten from the `archfiles` source in archlinuxcn/lilac
2023-05-31 21:29:17 +03:00
lilydjwg
af77af34f3
fight mypy[1]
...
The following error will be reported without if:
error: Name "tomllib" already defined (by an import)
While this can be silenced by a "# type: ignore", in some case[2] mypy
will report the following error:
error: Unused "type: ignore" comment
[1]: https://github.com/python/mypy/issues/1153
[2]: https://github.com/lilydjwg/nvchecker/actions/runs/4916840821/jobs/8793454970
2023-05-09 13:31:11 +08:00
lilydjwg
62a3f336b8
bump to dev version
2023-05-08 23:28:52 +08:00
lilydjwg
e9ecbd514b
silence mypy for new module
2023-05-08 23:28:20 +08:00
Felix Yan
34e87db8f9
Use tomllib on Python 3.11+
...
Fallback to tomli for compatibility with older Python.
2023-05-08 10:52:27 +03:00
依云
8cd75fd101
Merge pull request #223 from alexfikl/remove-sre-constants
...
Remove usage of deprecared sre_constants
2023-05-01 17:33:56 +08:00
Alexandru Fikl
fed4fc52ff
test_cran: bump xml2 version to pass test
2023-05-01 09:59:16 +03:00
Alexandru Fikl
1be02fc29c
remove usage of deprecared sre_constants
2023-04-30 14:12:34 +03:00
依云
4a0caf3213
Merge pull request #222 from yan12125/fix-test_alpm
...
Fix test_alpm in Arch chroots
2023-04-07 21:11:50 +08:00
Chih-Hsuan Yen
166dfb11a4
Fix test_alpm in Arch chroots
...
Arch chroots with recent devtools has options=(debug) by default, and
thus test_alpm fails:
_________________________ ERROR at setup of test_alpm __________________________
module = <module 'tests.test_alpm' from '/build/nvchecker/src/nvchecker/tests/test_alpm.py'>
def setup_module(module):
global temp_dir, db_path
temp_dir = tempfile.TemporaryDirectory()
temp_path = pathlib.Path(temp_dir.name)
pkg_path = temp_path / 'test-pkg'
pkg_path.mkdir()
with (pkg_path / 'PKGBUILD').open('w') as f:
f.write(
'pkgname=test-pkg\n'
'pkgver=1.2.3\n'
'pkgrel=4\n'
'arch=(any)\n'
'provides=("test-provides=5.6-7" "test-provides-unversioned")\n'
)
subprocess.check_call(['makepkg', '--nosign'], cwd=pkg_path)
pkg_file = subprocess.check_output(['makepkg', '--packagelist'], cwd=pkg_path, text=True).strip()
db_path = pkg_path / 'test-db'
db_path.mkdir()
repo_path = db_path / 'sync'
repo_path.mkdir()
> subprocess.check_call([
'repo-add',
repo_path / 'test-repo.db.tar.gz',
pkg_path / pkg_file
])
tests/test_alpm.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = (['repo-add', PosixPath('/tmp/tmp2kl26h_y/test-pkg/test-db/sync/test-repo.db.tar.gz'), PosixPath('/pkgdest/test-pkg-1.2.3-4-any.pkg.tar.zst\n/pkgdest/test-pkg-debug-1.2.3-4-any.pkg.tar.zst')],)
kwargs = {}, retcode = 1
cmd = ['repo-add', PosixPath('/tmp/tmp2kl26h_y/test-pkg/test-db/sync/test-repo.db.tar.gz'), PosixPath('/pkgdest/test-pkg-1.2.3-4-any.pkg.tar.zst\n/pkgdest/test-pkg-debug-1.2.3-4-any.pkg.tar.zst')]
def check_call(*popenargs, **kwargs):
"""Run command with arguments. Wait for command to complete. If
the exit code was zero then return, otherwise raise
CalledProcessError. The CalledProcessError object will have the
return code in the returncode attribute.
The arguments are the same as for the call function. Example:
check_call(["ls", "-l"])
"""
retcode = call(*popenargs, **kwargs)
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E subprocess.CalledProcessError: Command '['repo-add', PosixPath('/tmp/tmp2kl26h_y/test-pkg/test-db/sync/test-repo.db.tar.gz'), PosixPath('/pkgdest/test-pkg-1.2.3-4-any.pkg.tar.zst\n/pkgdest/test-pkg-debug-1.2.3-4-any.pkg.tar.zst')]' returned non-zero exit status 1.
/usr/lib/python3.10/subprocess.py:369: CalledProcessError
---------------------------- Captured stdout setup -----------------------------
==> Making package: test-pkg 1.2.3-4 (Fri Apr 7 11:53:43 2023)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> Extracting sources...
==> Entering fakeroot environment...
==> Tidying install...
-> Removing libtool files...
-> Purging unwanted files...
-> Removing static library files...
-> Stripping unneeded symbols from binaries and libraries...
-> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "test-pkg"...
-> Generating .PKGINFO file...
-> Generating .BUILDINFO file...
-> Generating .MTREE file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: test-pkg 1.2.3-4 (Fri Apr 7 11:53:44 2023)
==> No packages modified, nothing to do.
---------------------------- Captured stderr setup -----------------------------
==> ERROR: File '/pkgdest/test-pkg-1.2.3-4-any.pkg.tar.zst
/pkgdest/test-pkg-debug-1.2.3-4-any.pkg.tar.zst' not found.
2023-04-07 20:38:17 +08:00
lilydjwg
80343945a1
bump version to 2.11
2023-04-06 21:00:56 +08:00
lilydjwg
1bbbdca638
github actions: exclude matrix containing an upstream bug
2023-03-26 20:51:19 +08:00
lilydjwg
414c20a60f
update github actions versions
2023-03-26 20:02:39 +08:00
lilydjwg
931b3fdf3c
github actions: test again Python 3.11
2023-03-26 18:47:38 +08:00