Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Jan 2026 14:10:16 +0000
From:      Nicola Vitale <nivit@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Cc:        Jason W. Bacon <jwb@freebsd.org>
Subject:   git: f49ababc2946 - main - textproc/py-mdformat: Add a patch to fix program crashing
Message-ID:  <695e6948.8f0e.79024b70@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by nivit:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f49ababc29460ebc5f980e996c75e2d366b76047

commit f49ababc29460ebc5f980e996c75e2d366b76047
Author:     Jason W. Bacon <jwb@freebsd.org>
AuthorDate: 2026-01-07 14:02:50 +0000
Commit:     Nicola Vitale <nivit@FreeBSD.org>
CommitDate: 2026-01-07 14:08:55 +0000

    textproc/py-mdformat: Add a patch to fix program crashing
    
    - mdformat throws an exception when trying to access /net,
      a directory used only by autoconf with special attributes.
      See https://github.com/hukkin/mdformat/issues/565#issuecomment-3697204512
    - Bump PORTREVISION
    
    PR:             292021
---
 textproc/py-mdformat/Makefile                      |  2 +-
 .../py-mdformat/files/patch-src_mdformat___conf.py | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/textproc/py-mdformat/Makefile b/textproc/py-mdformat/Makefile
index 989ab1be270d..b7c930b72f33 100644
--- a/textproc/py-mdformat/Makefile
+++ b/textproc/py-mdformat/Makefile
@@ -1,7 +1,7 @@
 # XXX: see below (post-patch target) before updating
 PORTNAME=	mdformat
 DISTVERSION=	0.7.22
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	textproc python
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
diff --git a/textproc/py-mdformat/files/patch-src_mdformat___conf.py b/textproc/py-mdformat/files/patch-src_mdformat___conf.py
new file mode 100644
index 000000000000..772ec1c6678b
--- /dev/null
+++ b/textproc/py-mdformat/files/patch-src_mdformat___conf.py
@@ -0,0 +1,22 @@
+--- src/mdformat/_conf.py.orig	2025-01-30 17:57:20 UTC
++++ src/mdformat/_conf.py
+@@ -1,6 +1,6 @@ from __future__ import annotations
+ from __future__ import annotations
+ 
+-import functools
++import functools, os
+ from pathlib import Path
+ from types import MappingProxyType
+ from typing import Mapping
+@@ -35,7 +35,10 @@ def read_toml_opts(conf_dir: Path) -> tuple[Mapping, P
+ @functools.lru_cache()
+ def read_toml_opts(conf_dir: Path) -> tuple[Mapping, Path | None]:
+     conf_path = conf_dir / ".mdformat.toml"
+-    if not conf_path.is_file():
++    # conf_path.is_file() throws an exception when trying to access /net,
++    # a directory used only by autoconf with special attributes.
++    # https://github.com/hukkin/mdformat/issues/565#issuecomment-3697204512
++    if not os.path.isfile(str(conf_path)):
+         parent_dir = conf_dir.parent
+         if conf_dir == parent_dir:
+             return {}, None


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?695e6948.8f0e.79024b70>