Bug 239248

Summary: mail/fetchmailconf: Unable to locate 'Tkinter'
Product: Ports & Packages Reporter: Gerard Seibert <gerard_seibert>
Component: Individual Port(s)Assignee: Kurt Jaeger <pi>
Status: Closed FIXED    
Severity: Affects Only Me CC: chalpin, pi
Priority: --- Flags: chalpin: maintainer-feedback+
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
Proposed fix chalpin: maintainer-approval+

Description Gerard Seibert 2019-07-16 12:03:37 UTC
FreeBSD 12.0-RELEASE-p7 amd64 system

When I attempt to run 'fetchmailconf', I am greeted with this error message.

The fetchmailconf program requires Python with Tkinter, which does
not appear to be installed on this system.  Python can be found in
the FreeBSD Ports Collection in lang/python, and Tkinter for Python
can be found in x11-toolkits/py-tkinter.

I double-checked for 'py-tkinter'

~ $ pkg info py36-tkinter
py36-tkinter-3.6.9_6
Name           : py36-tkinter
Version        : 3.6.9_6
Installed on   : Mon Jul 15 08:50:01 2019 EDT
Origin         : x11-toolkits/py-tkinter
Architecture   : FreeBSD:12:amd64
Prefix         : /usr/local
Categories     : python x11-toolkits
Licenses       : PSFL
Maintainer     : python@FreeBSD.org
WWW            : UNKNOWN
Comment        : Python bindings to the Tk widget set (Python 3.6)
Shared Libs required:
        libX11.so.6
        libtk86.so.1
        libpython3.6m.so.1.0
        libtcl86.so.1
Annotations    :
        FreeBSD_version: 1200086
        flavor         : py36
        repo_type      : binary
        repository     : poudriere
Flat size      : 78.2KiB
Description    :
Python bindings to the Tk widget set.

Evidently, 'fetchmailconf' is not able to locate 'Tkinter'. "Fetchmail" is installed on this system and is working perfectly. I built everything using 'poudriere'
Comment 1 Corey Halpin 2019-07-21 16:07:25 UTC
Created attachment 205971 [details]
Proposed fix

When the fetchmailconf port was split off from fetchmail, it inherited some python version detection logic that had been intended to let fetchmail be installed with or without python and work either way. However, this logic 1) no longer works with current python packaging, and 2) doesn't really make sense in the context of a 'fetchmailconf' port that already depends on python.

This patch simplifies out that logic.

Passes 'portlint' and 'poudriere testport', works correctly when installed on FreeBSD 12.0/amd64.
Comment 2 Kurt Jaeger freebsd_committer freebsd_triage 2019-08-04 12:39:38 UTC
(In reply to Corey Halpin from comment #1)
Do you see a chance to get this running with a python3 version ?

py2 will go out of fashion at the end of 2019... ?
Comment 3 Kurt Jaeger freebsd_committer freebsd_triage 2019-08-04 12:39:56 UTC
testbuilds@work
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-08-04 12:45:04 UTC
A commit references this bug:

Author: pi
Date: Sun Aug  4 12:44:58 UTC 2019
New revision: 508092
URL: https://svnweb.freebsd.org/changeset/ports/508092

Log:
  mail/fetchmailconf: fix use by simplifing the search for Tkinter etc

  When the fetchmailconf port was split off from fetchmail, it inherited
  some python version detection logic that had been intended to let
  fetchmail be installed with or without python and work either way.
  However, this logic 1) no longer works with current python packaging,
  and 2) doesn't really make sense in the context of a 'fetchmailconf'
  port that already depends on python.

  This patch simplifies out that logic.

  PR:		239248
  Submitted by:	Corey Halpin <chalpin@cs.wisc.edu> (maintainer)
  Reported by:	gerard_seibert@outlook.com

Changes:
  head/mail/fetchmailconf/Makefile
  head/mail/fetchmailconf/files/fetchmailconf.in
  head/mail/fetchmailconf/pkg-plist
Comment 5 Kurt Jaeger freebsd_committer freebsd_triage 2019-08-04 12:45:13 UTC
Committed, thanks!
Comment 6 Corey Halpin 2019-08-04 12:55:38 UTC
(In reply to Kurt Jaeger from comment #2)

fetchmail 6.4.0 beta5 contains fixes for python3. At this point, my plan is to wait for the 6.4.0 final release to get those fixes.