diff --git a/devel/osc/Makefile b/devel/osc/Makefile index 21619472658d..5724b3b1c9ac 100644 --- a/devel/osc/Makefile +++ b/devel/osc/Makefile @@ -1,41 +1,44 @@ PORTNAME= osc -PORTVERSION= 1.26.0 +PORTVERSION= 1.27.0 CATEGORIES= devel MAINTAINER= amdmi3@FreeBSD.org COMMENT= Command Line Interface to work with an openSUSE Build Service WWW= https://en.opensuse.org/openSUSE:OSC \ https://github.com/openSUSE/osc LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}urllib3>=0:net/py-urllib3@${PY_FLAVOR} TEST_DEPENDS= git:devel/git \ - ${PYTHON_PKGNAMEPREFIX}ruamel.yaml>=0:devel/py-ruamel.yaml@${PY_FLAVOR} + vim:editors/vim \ + nano:editors/nano \ + ${PYTHON_PKGNAMEPREFIX}ruamel.yaml>=0:devel/py-ruamel.yaml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyyaml>=0:devel/py-pyyaml@${PY_FLAVOR} USES= cpe python USE_GITHUB= yes GH_ACCOUNT= openSUSE USE_PYTHON= autoplist cryptography distutils noflavors pytest NO_ARCH= yes CPE_VENDOR= suse CPE_PRODUCT= opensuse_osc PORTDOCS= * PYTEST_BROKEN_TESTS= testPrdiffDiffstat TestVC OPTIONS_DEFINE= DOCS post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions ${INSTALL_DATA} ${WRKSRC}/contrib/osc.zsh ${STAGEDIR}${PREFIX}/share/zsh/site-functions/_osc @${MKDIR} ${STAGEDIR}${PREFIX}/share/fish/vendor_completions.d ${INSTALL_DATA} ${WRKSRC}/contrib/osc.fish ${STAGEDIR}${PREFIX}/share/fish/vendor_completions.d/osc.fish post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC} && ${INSTALL_DATA} AUTHORS README.md NEWS ${STAGEDIR}${DOCSDIR} .include diff --git a/devel/osc/distinfo b/devel/osc/distinfo index 7d0246feff94..dd39b17fa1ec 100644 --- a/devel/osc/distinfo +++ b/devel/osc/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1779373737 -SHA256 (openSUSE-osc-1.26.0_GH0.tar.gz) = 2c024260452e75cae36d542ce5207dab8cbc9747e271b5642391d4eb8c9e84ad -SIZE (openSUSE-osc-1.26.0_GH0.tar.gz) = 507327 +TIMESTAMP = 1780330355 +SHA256 (openSUSE-osc-1.27.0_GH0.tar.gz) = c4a1d8ae187d7aed305ce9ed88a7116e7104d1d2e95ee1cebde9c8a19056a83a +SIZE (openSUSE-osc-1.27.0_GH0.tar.gz) = 515669 diff --git a/devel/osc/files/patch-tests_test__git_editor.py b/devel/osc/files/patch-tests_test__git_editor.py new file mode 100644 index 000000000000..56b39062fc4f --- /dev/null +++ b/devel/osc/files/patch-tests_test__git_editor.py @@ -0,0 +1,41 @@ +--- tests/test_git_editor.py.orig 2026-05-27 14:39:15 UTC ++++ tests/test_git_editor.py +@@ -6,17 +6,21 @@ from osc.gitea_api.common import get_editor_command + from osc.gitea_api.common import get_editor_command + + ++vim_executable = shutil.which("vim") ++nano_executable = shutil.which("nano") ++ ++ + class TestGitEditor(unittest.TestCase): + + def test_default(self): + with unittest.mock.patch.dict(os.environ, {"EDITOR": ""}): + c = get_editor_command("test") +- self.assertEqual(c, ["/usr/bin/vim", "test"]) ++ self.assertEqual(c, [vim_executable, "test"]) + + def test_custom(self): + with unittest.mock.patch.dict(os.environ, {"EDITOR": "nano"}): + c = get_editor_command("test") +- self.assertEqual(c, ["/usr/bin/nano", "test"]) ++ self.assertEqual(c, [nano_executable, "test"]) + + def test_custom_with_param(self): + with unittest.mock.patch.dict(os.environ, {"EDITOR": "/usr/bin/emacs -nv"}): +@@ -34,10 +38,10 @@ class TestGitEditor(unittest.TestCase): + self.assertEqual(c, ["/usr/bin/mycmd", "-A", "my fancy parameter ", "test"]) + + +-if shutil.which("nano") != "/usr/bin/nano": +- TestGitEditor = unittest.skip("nano is not /usr/bin/nano")(TestGitEditor) +-elif shutil.which("vim") != "/usr/bin/vim": +- TestGitEditor = unittest.skip("vim is not /usr/bin/vim")(TestGitEditor) ++if nano_executable is None: ++ TestGitEditor = unittest.skip("nano executable missing")(TestGitEditor) ++elif vim_executable is None: ++ TestGitEditor = unittest.skip("vim executable missing")(TestGitEditor) + + if __name__ == "__main__": + unittest.main()