File man-propose-online.patch of Package man

---
 man-db-2.13.0/src/man.c                      |    9 +++++++--
 man-db-2.13.0/src/tests/man-invalid-db-entry |    2 ++
 2 files changed, 9 insertions(+), 2 deletions(-)

--- man-db-2.13.0/src/man.c
+++ man-db-2.13.0/src/man.c	2024-10-18 12:56:52.431247186 +0000
@@ -769,11 +769,16 @@ static void gripe_no_man (const char *na
 	}
 #endif
 
-	if (sec)
+	if (sec) {
 		fprintf (stderr, _ ("No manual entry for %s in section %s\n"),
 		         name, sec);
-	else
+		fprintf (stderr, _("Possibly, man page is not installed, try online at: "));
+		fprintf (stderr, _("https://manpages.opensuse.org/%s.%s\n"), name, sec);
+        } else {
 		fprintf (stderr, _ ("No manual entry for %s\n"), name);
+		fprintf (stderr, _("Possibly, man page is not installed, try online at: "));
+		fprintf (stderr, _("https://manpages.opensuse.org/%s\n"), name);
+	}
 
 #ifdef UNDOC_COMMAND
 	if (getenv ("MAN_TEST_DISABLE_UNDOCUMENTED") == NULL &&
--- man-db-2.13.0/src/tests/man-invalid-db-entry
+++ man-db-2.13.0/src/tests/man-invalid-db-entry	2024-10-18 12:53:16.443176267 +0000
@@ -25,6 +25,8 @@ run $MANDB -C "$tmpdir/manpath.config" -
 rm -f "$tmpdir/usr/share/man/man1/test.1"
 
 echo "No manual entry for test" > "$tmpdir/1.exp"
+echo "Possibly, man page is not installed, try online at: https://manpages.opensuse.org/test" >> "$tmpdir/1.exp"
+
 LC_ALL=C run $MAN -C "$tmpdir/manpath.config" test 2> "$tmpdir/1.out"
 expect_files_equal 'invalid DB entry' "$tmpdir/1.exp" "$tmpdir/1.out"
 
openSUSE Build Service is sponsored by