Bug 237775 - sysutils/py-ranger: Respect hier(7) and make concurrent safe
Summary: sysutils/py-ranger: Respect hier(7) and make concurrent safe
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kai Knoblich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-07 15:28 UTC by Ting-Wei Lan
Modified: 2019-08-03 20:59 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (linpct)


Attachments
py-ranger-respect-hierarchy-and-make-concurrent-safe.patch (1.52 KB, patch)
2019-07-20 13:45 UTC, Kai Knoblich
no flags Details | Diff
py-ranger-respect-hierarchy-and-make-concurrent-safe-v2.patch (1.53 KB, patch)
2019-07-20 16:21 UTC, Kai Knoblich
kai: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!