X-Original-To: alpine-user@lists.alpinelinux.org Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by lists.alpinelinux.org (Postfix) with ESMTP id E06CC5C4E2B for ; Fri, 2 Feb 2018 15:22:36 +0000 (GMT) Received: by mail-lf0-f66.google.com with SMTP id h92so32006828lfi.7 for ; Fri, 02 Feb 2018 07:22:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:mime-version :content-disposition:user-agent; bh=xgdfy/fhn5Vjl0keZXMw4o2Qgj7Xc4/BZGmWhi3QWP8=; b=qQU4np+TDx89/rgp6CsSdlRaaCS5nx1+jCR3S6risKfYMHu3M715lfXJt6Wuw0i3P/ D5ZoaGblq5McxRL4RC+ULlADQ5InxaCH2ryXsFxxVz79qMSvE8tSZWmiUx7jiViccerk iRfD4db+EP15/dTqFVGYIL+8YZIe2NpqO45IyNp4OKFoBFACEbUeeRpkhwOlP4lkFueo PwZvW8EFaU3zSyLG8rGvQ/C8NYHejADufDigxXib9/4iV/Ca8/oCtEyM/BEkp4C0r8y6 /hhLj6LIqauFJoUYCj9+qpw8tS3v1GsgxaWW4NPqDS3KY27Zz0hVPE67KU6PpyTMBPVx XmJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:mime-version:content-disposition:user-agent; bh=xgdfy/fhn5Vjl0keZXMw4o2Qgj7Xc4/BZGmWhi3QWP8=; b=uOm0Zw/uli+xVj2P0ET7r1FGx1dGFnqeAOKjUe1/HfbScSDY5obJ/+1vYdUXqUnKR3 yuEW7uC/u4wbKKHh7MVXwb4HhNY94CzS3sKfQrRYuQp9qFB3pUAeX8NbOqeENc5pfabM DeaIR31n43oJNJvf1GfDLKEYWsCxhWKnZ55/uPV91JHUxh7y9W+cDB1Y6AE5oA3k32Xr J1KuFZe8XYLWOvAGkdS4DWFFHhD6LQIlza5I2VTfKqpG7tgizMjDM5yW0BhSSc+oMQ7M mHnmX3jCjGJa0kg+KQrDr3ZlEktlQ4TyotiQ7QBZd6dhCvoXLwtfY025riQbfwztHytq QInA== X-Gm-Message-State: AKwxytfDUmSyasoKHagTR1jFhS4bSQJFcryzOhqzm3kbNG8/YgucZ8SW DUoPIsI69xZB35P2MxVSqw+locG0 X-Google-Smtp-Source: AH8x225RJit24YoGgR2GKXsxUeb53VHMpvpbnie3bhS5c5olgreMDDdzyUa5M22onCiQHL9HP7Ystw== X-Received: by 10.46.23.215 with SMTP id 84mr2688094ljx.29.1517584955443; Fri, 02 Feb 2018 07:22:35 -0800 (PST) Received: from localhost ([46.211.66.64]) by smtp.gmail.com with ESMTPSA id n24sm443802lfi.18.2018.02.02.07.22.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Feb 2018 07:22:34 -0800 (PST) Date: Fri, 2 Feb 2018 17:22:33 +0200 From: Svyatoslav Mishyn To: alpine-user@lists.alpinelinux.org Cc: discuss@mandoc.bsd.lv Subject: [alpine-user] can't open a specific manual if there are multiple almost identical fnames Message-ID: <20180202152229.GA36666@e460.lan> Mail-Followup-To: alpine-user@lists.alpinelinux.org, discuss@mandoc.bsd.lv X-Mailinglist: alpine-user Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hQiwHBbRI9kgIhsi" Content-Disposition: inline X-PGP-Key: https://www.juef.space/pubkey.asc User-Agent: Mutt/1.9.2 (2017-12-15) --hQiwHBbRI9kgIhsi Content-Type: multipart/mixed; boundary="rwEMma7ioTxnRzrJ" Content-Disposition: inline --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, just noticed by accident that cannot open in Alpine Linux some manuals e.g. scandir(3). I've installed 'man-pages' package which contains for some manuals two versions: POSIX and Linux (e.g. https://pkgs.alpinelinux.org/contents?file=3Dscandir.*&path=3D&name=3Dman-p= ages&branch=3Dedge&arch=3Dx86_64 ) and installs them into the same subdir. Then checked mandocdb that scandir(3) is there (also why are there double slashes?). /home/juef: sudo /usr/sbin/makewhatis -D -a -T utf8 /usr/share/man 2>&1 | g= rep scandir /usr/share/man//man3/scandir.3.gz: Adding to database /usr/share/man//man3/scandir.3p: Adding to database (I've slightly modified mandoc (against CVS HEAD) to see a bit more.) /home/juef/cvs/mandoc: ./man 3 scandir sec: /usr/share/man/man3/scandir.3p prio: 5; sec: 3/scandir.3p resp->file: /usr/share/man/man3/scandir.3p sec: /usr/share/man/man3/scandir.3.gz prio: 5; sec: 3/scandir.3.gz sec: /usr/share/man/man3/alphasort.3p prio: 5; sec: 3/alphasort.3p and /home/juef/cvs/mandoc: ./man 3p scandir sec: /usr/share/man/man3/scandir.3p prio: 5; sec: 3/scandir.3p resp->file: /usr/share/man/man3/scandir.3p sec: /usr/share/man/man3/alphasort.3p prio: 5; sec: 3/alphasort.3p So, mandoc in that case always opens /usr/share/man/man3/scandir.3p regardless of the section option. Should mandoc handle such case? Or should 'man-pages' package be fixed (i.e. install POSIX manuals in man[0-3]p subdirs, by removing this block: https://git.alpinelinux.org/cgit/aports/tree/main/man-pages/APKBUILD?id=3De= b6c8019412e3e5dbcb4112b33f4f89a8ec73dcb#n19 ) ? ++ (just an experiment) # pwd /usr/share/man # mkdir mann # mv man3/scandir.3.gz mann # /usr/sbin/makewhatis -D -a -T utf8 /usr/share/man now, `man n scandir`, opens /usr/share/man/mann/scandir.3.gz So, doesn't mandoc look at the file extention to determine its section? BTW, POSIX manuals are not gzipped, see for example 3p section: https://pkgs.alpinelinux.org/contents?file=3D*.3p&path=3D&name=3Dman-pages&= branch=3Dedge&arch=3Dx86_64 Also, is it possible to not apply less-specific patch if the less[1], or less-fork[2] was installed beforehand? https://git.alpinelinux.org/cgit/aports/tree/main/mdocml/pager.patch?id=3Da= e43f02b3cdfb0f944bf352fa81911324ec594fb#n16 +++ Is there a possibility in apk to make a local search by the file names for all packages including not installed? Similar what web-interface[3] can do or CRUX's prt-get[4]. [1]: http://www.greenwoodsoftware.com/less/ [2]: https://github.com/gdamore/less-fork [3]: https://pkgs.alpinelinux.org/contents [4]: https://crux.nu/doc/prt-get%20-%20User%20Manual.html#info_fsearch Thanks. --=20 https://www.juef.space/ --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="mandoc_show-more.patch" Content-Transfer-Encoding: quoted-printable ? Makefile.local ? config.h ? config.log ? configure.local ? demandoc ? mandoc ? soelim Index: main.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/mandoc/main.c,v retrieving revision 1.302 diff -u -r1.302 main.c --- main.c 21 Aug 2017 15:42:58 -0000 1.302 +++ main.c 2 Feb 2018 15:18:18 -0000 @@ -412,16 +412,19 @@ else if (outmode =3D=3D OUTMODE_ONE) { /* Search for the best section. */ sec =3D res[i].file; + fprintf(stderr, "sec: %s\n", sec); sec +=3D strcspn(sec, "123456789"); if (sec[0] =3D=3D '\0') continue; prio =3D sec_prios[sec[0] - '1']; + fprintf(stderr, "prio: %d; sec: %s\n", prio, sec); if (sec[1] !=3D '/') prio +=3D 10; if (prio >=3D best_prio) continue; best_prio =3D prio; resp =3D res + i; + fprintf(stderr, "resp->file: %s\n", resp->file); } } =20 --rwEMma7ioTxnRzrJ-- --hQiwHBbRI9kgIhsi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEGiQlKlVSF7bXIM5pA6NXggyXe3gFAlp0gjEACgkQA6NXggyX e3i9Mw/+JRTPSpdqTbEvca9wrqAccw9RfDxjsnXRfh+eIsoItMFhSIMDFISq5bPb PHNhWz9BLrCzjH7HEuknvWkB49daoOeIaoTlPSjB9PUPunHOGVsNEoZO63k0NlAE 4Nx+O2kflClZhHUZlCkb2kFPyFw90CiUPqlq+FLdEnZUCFeKThj46EQw1w4INNj5 zeTaAXjwNg2eDMZZTmziYHaPngkGsVwSlB6Zr0lFfmbGIyNufGa59E7zuAQ3m7aS beovvHOjD9qJD/McWdHI7KMpalPBZdytb6+YrrooKrmrbhFuIckrPqIiwSGiI9r2 VIh3pSVwC4B7f5RueHbOM0DzFkzN9aSKe/XZKpXcD+COtF6LHnSXfaAYYxVbTwJD 8UvLiFqHheR370OGt2sRvhwqF+AWh2u/0GMMv/RPSqy28N9C1+8WF9z2qMCDBhS0 c93SRtbW6XvgPR0kzvcsr8UFC+LI/IiorwNRz9MimEPJVF1LQeA6yDYLkf3EFrBV UZo20du2qB6ewZKrflcH6Izn9ajXJJC8cm+51YTMhtAXU4B8Vqk8M/Nqyihq5Owm uQ/jJSakn8KCnDbdYAzfoCLtnVvoLxYwT3ThxW+n1bAo/2mN5LBkqL9BWBzjHyBB Qi4yHyv4D2e7jNolXiwPcGxRp1/Zg6vuKZ+801hWvTsiqbjyYNM= =Of63 -----END PGP SIGNATURE----- --hQiwHBbRI9kgIhsi-- --- Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org Help: alpine-user+help@lists.alpinelinux.org ---