Bug 237775

Summary: sysutils/py-ranger: Respect hier(7) and make concurrent safe
Product: Ports & Packages Reporter: Ting-Wei Lan <lantw44>
Component: Individual Port(s)Assignee: Kai Knoblich <kai>
Status: Closed FIXED    
Severity: Affects Only Me CC: kai, linpct
Priority: --- Flags: bugzilla: maintainer-feedback? (linpct)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
py-ranger-respect-hierarchy-and-make-concurrent-safe.patch
none
py-ranger-respect-hierarchy-and-make-concurrent-safe-v2.patch kai: maintainer-approval+

Description Ting-Wei Lan 2019-05-07 15:28:04 UTC
It seems to me that most ports put documentation in /usr/local/share/doc, but ranger puts them in /usr/local/doc instead. Is it an expected behavior or a bug?
Comment 1 linpct 2019-05-08 02:06:46 UTC
Hi, it needs be fixed, could you send a patch, or do you want to maintain this port?

Thanks.
Comment 2 Kai Knoblich freebsd_committer freebsd_triage 2019-07-20 13:45:14 UTC
Created attachment 205934 [details]
py-ranger-respect-hierarchy-and-make-concurrent-safe.patch

Attached is a patch that does following:

- Install documentation into ${DOCSDIR}
- Move ranger.desktop file to ${PYTHON_PKGNAMEPREFIX}ranger and replace the "Exec" entry to ranger-${PYTHON_VER} to make to port concurrent safe
- Add location to license file
- Remove now superfluous python_OLD_CMD as it's not required anymore
- Add a test-target to test the port against different Python versions
- Pet portlint by sorting variables a bit

QA:
~~~
- poudriere (11.2-, 11.3-, 12.0-RELEASE, 13.0-CURRENT@349352 amd64 + i386) for each py27 + py36 flavor -> OK
- portlint -> OK, no fatal warnings

If the patch works for you both (reporter + maintainer) I'll commit it then. In that case, the maintainer needs to set the maintainer-approval flag to "+" for the attachment.
Comment 3 Ting-Wei Lan 2019-07-20 15:58:58 UTC
(In reply to Kai Knoblich from comment #2)
Yes, it works for me, but the path /usr/local/share/doc/py36-ranger/ranger includes the name 'ranger' twice.
Comment 4 Kai Knoblich freebsd_committer freebsd_triage 2019-07-20 16:21:12 UTC
Created attachment 205941 [details]
py-ranger-respect-hierarchy-and-make-concurrent-safe-v2.patch

(In reply to Ting-Wei Lan from comment #3)

Thank you for testing the patch and good catch, indeed! Attached is a slightly revised patch.
Comment 5 Ting-Wei Lan 2019-07-20 16:35:58 UTC
(In reply to Kai Knoblich from comment #4)
Yes, it looks better now.
Comment 6 Kai Knoblich freebsd_committer freebsd_triage 2019-08-03 20:51:09 UTC
Comment on attachment 205941 [details]
py-ranger-respect-hierarchy-and-make-concurrent-safe-v2.patch

Approved by: maintainer timeout (14 days)
Comment 7 commit-hook freebsd_committer freebsd_triage 2019-08-03 20:55:59 UTC
A commit references this bug:

Author: kai
Date: Sat Aug  3 20:55:09 UTC 2019
New revision: 507998
URL: https://svnweb.freebsd.org/changeset/ports/507998

Log:
  sysutils/py-ranger: Respect hier(7) and make concurrent safe

  Documentation related files were installed into ${PREFIX}/doc instead of
  ${PREFIX}/share/doc. [1] Take this opportunity too to make the port
  concurrent safe as it installs beside documentation also scripts and a
  desktop entry.

  Introduce an appropriate workaround for the desktop entry by prefixing the
  filename after the corresponding Python flavor and also take care for the
  script executable. Add "desktop-file-utils" to USES to update the desktop
  database and reduce warnings in the stage QA.

  Remove "python_OLD_CMD" that is no longer required and place a "do-test"
  target with the required dependencies to easen QA related tasks in future.

  PR:		237775
  Reported by:	Ting-Wei Lan <lantw44@gmail.com> [1]
  Approved by:	maintainer timeout (14 days)

Changes:
  head/sysutils/py-ranger/Makefile
Comment 8 Kai Knoblich freebsd_committer freebsd_triage 2019-08-03 20:58:40 UTC
Committed, thank you for reporting the issue and for testing the patch!