Bug 220941

Summary: devel/qt5-core: QStorageInfo::mountedVolumes() fails to read mountpoints
Product: Ports & Packages Reporter: Yuri Victorovich <yuri>
Component: Individual Port(s)Assignee: freebsd-kde (group) <kde>
Status: Closed FIXED    
Severity: Affects Only Me CC: tcberner
Priority: --- Flags: tcberner: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
suggested patch to qstorageinfo__unix.cpp
none
patch none

Description Yuri Victorovich freebsd_committer freebsd_triage 2017-07-23 10:23:05 UTC
Created attachment 184624 [details]
suggested patch to qstorageinfo__unix.cpp

QStorageInfo::mountedVolumes() returns an empty list.

See filelight (https://github.com/KDE/filelight) as a testcase. Particularly, src/localLister.cpp there.

It looked like patching /usr/ports/devel/qt5-core/files/patch-src_corelib_io_qstorageinfo__unix.cpp should have helped, but it doesn't.
It calls getfsstat which returns a non-empty list, but QStorageInfo::mountedVolumes() still returns an empty list.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2017-07-23 10:41:02 UTC
Created attachment 184625 [details]
patch

Please disregard my previous message.

The attached patch solves the problem.
Comment 2 Tobias C. Berner freebsd_committer freebsd_triage 2017-07-23 10:46:21 UTC
Hi, 

we have already upstreamed that change recently:
https://github.com/qt/qtbase/commit/fa3940cc4b5580070f465d1f64a23a69bc925367

But it seems we forgot to add it to the propper ports tree :D 

mfg Tobias
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2017-07-23 10:48:42 UTC
Thanks!
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-07-23 10:56:40 UTC
A commit references this bug:

Author: tcberner
Date: Sun Jul 23 10:56:03 UTC 2017
New revision: 446462
URL: https://svnweb.freebsd.org/changeset/ports/446462

Log:
  Fix QStorageInfo in devel/qt5-core.

  QStorageInfo did not return any valid data on FreeBSD.

  Add upstreamed patch:
     getmntinfo() was wrongly called with flag 0. This changes it to use MNT_NOWAIT.

  PR:		220941

Changes:
  head/devel/qt5-core/Makefile
  head/devel/qt5-core/files/patch-git_fa3940cc