Bug 212572 - devel/glib20: gio-enabled programs fail to write symbolic links (g-io-error-quark: Error opening file '{filename}' Too many links (0))
Summary: devel/glib20: gio-enabled programs fail to write symbolic links (g-io-error-q...
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: freebsd-gnome (Nobody)
URL:
Keywords: patch
Depends on: 214633
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-10 22:54 UTC by Yuri Victorovich
Modified: 2017-07-02 03:17 UTC (History)
2 users (show)

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


Attachments
glocalfileoutputstream: Fix symlink writing on FreeBSD and NetBSD (2.03 KB, patch)
2017-06-10 13:13 UTC, Ting-Wei Lan
lantw44: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2016-09-10 22:54:21 UTC
When file 1.lnk is a symbolic link:
> lrwxr-xr-x  1 yuri  users      1 Sep 10 15:49 1.lnk -> 1
gedit fails to save it after editing:
> Unexpected error: Error opening file '/home/yuri/test/1.lnk': Too many links

Same happens in meld.

> $ pkg which /usr/local/lib/libgio-2.0.so.0
> /usr/local/lib/libgio-2.0.so.0 was installed by package glib-2.46.2

10.3 amd64
Comment 1 Ting-Wei Lan 2016-12-04 14:32:14 UTC
I reported this bug to upstream and attached a patch in that bug report:
https://bugzilla.gnome.org/show_bug.cgi?id=775593
Comment 2 Yuri Victorovich freebsd_committer 2017-01-16 19:34:48 UTC
Upstream bug report: https://bugzilla.gnome.org/show_bug.cgi?id=777352
Comment 3 Yuri Victorovich freebsd_committer 2017-01-16 19:35:15 UTC
same on 11
Comment 4 Ting-Wei Lan 2017-06-10 13:12:25 UTC
After pinging the maintainer, I got my patch committed to upstream repository:
https://git.gnome.org/browse/glib/commit/?id=45d4b59
Comment 5 Ting-Wei Lan 2017-06-10 13:13:19 UTC
Created attachment 183381 [details]
glocalfileoutputstream: Fix symlink writing on FreeBSD and NetBSD
Comment 6 commit-hook freebsd_committer 2017-07-01 05:20:02 UTC
A commit references this bug:

Author: jbeich
Date: Sat Jul  1 05:19:22 UTC 2017
New revision: 444811
URL: https://svnweb.freebsd.org/changeset/ports/444811

Log:
  devel/glib20: fix symlink writing

  $ gio save testfile < /etc/shells
  $ ln -s testfile testlink
  $ gio save testlink < /etc/shells
  gio: file:///path/to/testlink: Error opening file '/path/to/testlink': Too many links

  PR:		212572
  Reported by:	Yuri Victorovich
  Submitted by:	Ting-Wei Lan
  Approved by:	maintainer timeout (3 weeks)
  MFH:		2017Q2

Changes:
  head/devel/glib20/Makefile
  head/devel/glib20/files/patch-gio_glocalfileoutputstream.c
Comment 7 commit-hook freebsd_committer 2017-07-02 03:17:24 UTC
A commit references this bug:

Author: jbeich
Date: Sun Jul  2 03:17:15 UTC 2017
New revision: 444863
URL: https://svnweb.freebsd.org/changeset/ports/444863

Log:
  MFH: r444811

  devel/glib20: fix symlink writing

  $ gio save testfile < /etc/shells
  $ ln -s testfile testlink
  $ gio save testlink < /etc/shells
  gio: file:///path/to/testlink: Error opening file '/path/to/testlink': Too many links

  PR:		212572
  Reported by:	Yuri Victorovich
  Submitted by:	Ting-Wei Lan
  Approved by:	maintainer timeout (3 weeks)
  Approved by:	ports-secteam (feld)

Changes:
_U  branches/2017Q2/
  branches/2017Q2/devel/glib20/Makefile
  branches/2017Q2/devel/glib20/files/patch-gio_glocalfileoutputstream.c