Bug 203457 - devel/tig doesn't work with devel/git-subversion
Summary: devel/tig doesn't work with devel/git-subversion
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-30 17:41 UTC by liuw
Modified: 2017-12-05 10:32 UTC (History)
6 users (show)

See Also:


Attachments
The devel/tig-multi port in shar archive (719 bytes, text/plain)
2016-08-17 20:27 UTC, lightside
no flags Details
The devel/tig-plain port in shar archive (929 bytes, text/plain)
2016-08-17 20:28 UTC, lightside
no flags Details
The devel/tig-gui port in shar archive (702 bytes, text/plain)
2016-08-17 20:28 UTC, lightside
no flags Details
The devel/tig-lite port in shar archive (708 bytes, text/plain)
2016-08-17 20:28 UTC, lightside
no flags Details
The devel/tig-subversion port in shar archive (744 bytes, text/plain)
2016-08-17 20:29 UTC, lightside
no flags Details
Patch File (1.80 KB, patch)
2017-11-04 07:37 UTC, David Harrigan
dharrigan: maintainer-approval+
Details | Diff
Poudriere Test Run (37.94 KB, text/x-log)
2017-11-04 07:38 UTC, David Harrigan
no flags Details
Patch File (513 bytes, patch)
2017-11-04 08:52 UTC, David Harrigan
no flags Details | Diff
Proposed patch (since 452422 revision) (1.08 KB, patch)
2017-11-04 11:25 UTC, lightside
dharrigan: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description liuw 2015-09-30 17:41:43 UTC
Well, there is no direct conflict here. But because devel/tig depends on devel/git and devel/git-subversion conflicts with devel/git, it's impossible to install devel/git and devel/git-subversion at the same time.

IMHO devel/tig should work with devel/git-subversion just fine.
Comment 1 Bartek Rutkowski freebsd_committer freebsd_triage 2016-05-08 15:23:44 UTC
Could you elaborate a bit more on what's the issue here, because It's not entirely clear from your original message.
Comment 2 liuw 2016-05-08 20:09:37 UTC
(In reply to Bartek Rutkowski from comment #1)

tig:

RUN_DEPENDS=    git:devel/git

git:

CONFLICTS_INSTALL?=     git-gui-[0-9]* git-subversion-[0-9]* git-lite-[0-9]*

git-subversion:

CONFLICTS_INSTALL=      git-[0-9]* git-gui-[0-9]* git-lite-[0-9]*

git conflicts with git-subversion, tig requires git.

However, tig only needs the `git` command, so tig should be able to work with git-subversion just fine.

The RUN_DEPENDS field of tig should be updated.
Comment 3 lightside 2016-08-17 20:27:52 UTC
Created attachment 173800 [details]
The devel/tig-multi port in shar archive
Comment 4 lightside 2016-08-17 20:28:13 UTC
Created attachment 173801 [details]
The devel/tig-plain port in shar archive
Comment 5 lightside 2016-08-17 20:28:35 UTC
Created attachment 173802 [details]
The devel/tig-gui port in shar archive
Comment 6 lightside 2016-08-17 20:28:51 UTC
Created attachment 173803 [details]
The devel/tig-lite port in shar archive
Comment 7 lightside 2016-08-17 20:29:15 UTC
Created attachment 173804 [details]
The devel/tig-subversion port in shar archive
Comment 8 lightside 2016-08-17 20:31:49 UTC
This issue is not unique for devel/tig port. There are many other ports with devel/git runtime dependency (currently):
http://www.freshports.org/search.php?stype=depends_run&method=match&query=devel%2Fgit&orderby=category&orderbyupdown=asc&search=Search&format=html
-8<--
devel/git-cinnabar devel/git-extras devel/git-modes devel/git-review devel/gitg0
devel/github-backup-utils devel/gitlist devel/gitolite devel/gitolite2
devel/gittrac devel/hs-git-annex devel/magit devel/monodevelop devel/ocaml-opam
devel/p5-Git-Repository devel/p5-Git-Wrapper devel/p5-Minilla devel/phabricator
devel/py-gitosis devel/py-itools devel/rubygem-git devel/rubygem-svn2git
devel/svn2git www/gitlab www/py-frappe-bench www/py-rhodecode
-->8-

Moreover, there are devel/git-gui and devel/git-lite (slave) ports, in addition to devel/git-subversion.

If you "build" your ports, then possible to customize devel/git port directly, instead of using devel/git-subversion, or rebuild devel/tig port after devel/git-subversion installation. Therefore, this issue is more related to users, which use (available) packages. But even in this case, there is a possibility to install devel/tig port with using `pkg install -M devel/tig` or `pkg add -M tig-2.1.1.txz` commands, which "force the installation of the package with missing dependencies" and then (possibly) use `pkg set -o devel/git:devel/git-subversion tig` command to change dependency from devel/git to devel/git-subversion for installed tig package (or omit the package's name to apply changes for all installed packages).

(In reply to comment #2)
> The RUN_DEPENDS field of tig should be updated.
Practically, it's possible to add other port's directories with the same dependency:
RUN_DEPENDS+=	git:devel/git-gui git:devel/git-lite git:devel/git-subversion
and build system will choose available one or install first of them (i.e. devel/git). But created package will contain dependency information for selected port(s), which may lead to (the same) conflicts, if trying to install other devel/git* port afterwards. The attachment #173800 [details] with devel/tig-multi port demonstrates this. Similar method is to create single options to install concrete devel/git* port.

The other possible method is to remove devel/git runtime dependency. The user will need to (post-)install concrete devel/git* port in this case. The attachment #173801 [details] with devel/tig-plain port demonstrates this.

Also possible to create additional (conflicting) ports: devel/tig-gui (attachment #173802 [details]), devel/tig-lite (attachment #173803 [details]) and devel/tig-subversion (attachment #173804 [details]), which are similar to devel/git-*.

Which method to choose, depends from preferences. The devel/tig-plain and devel/tig-multi are more simple ones, while the collection of devel/tig-gui, devel/tig-lite and devel/tig-subversion ports may be more suitable for packages. While they have the same contents, except changed dependency information.

On the other hand, this is not an issue, if using ports or package system correctly, in my opinion.
Comment 9 lightside 2016-08-17 20:57:35 UTC
(In reply to comment #8)
> The attachment #173800 [details] with devel/tig-multi port demonstrates this.
Need to note, that devel/tig-multi port added for demonstration purposes only. There is no need to add other runtime dependencies, because build system checks available git executable and not install other devel/git* port, if available.
Comment 10 lightside 2016-08-26 09:32:47 UTC
My attachments were obsoleted to not create a possible ambiguity. I used them as examples for comment #8.
Comment 11 Kevin Zheng 2017-11-04 06:28:26 UTC
This issue affects me, and I think it might be best to remove the RUN_DEPENDS.
Comment 12 David Harrigan 2017-11-04 07:37:59 UTC
Created attachment 187711 [details]
Patch File
Comment 13 David Harrigan 2017-11-04 07:38:26 UTC
Created attachment 187712 [details]
Poudriere Test Run
Comment 14 David Harrigan 2017-11-04 07:39:09 UTC
Hi,

Patch file and test run file attached. Please can this be merged into the ports tree. Thank you.

-=david=-
Comment 15 lightside 2017-11-04 08:05:41 UTC
(In reply to comment #11)
> This issue affects me, and I think it might be best to remove the RUN_DEPENDS.
The devel/tig-plain (in attachment #173801 [details]) does almost the same, while main devel/tig port is available as is.

(In reply to comment #14)
Please check your text editor settings. Looks like, it converts tabs to spaces, if looking attachment #187711 [details]. The `portlint -C` may report about this.
Comment 16 David Harrigan 2017-11-04 08:51:32 UTC
Hi,

Thank you for your comment. I've fixed the Makefile. As the maintainer, I'm choosing to use the Makefile that I'm submitting, with the portrevision and removal of the RUN_DEPENDS. Since it's been open for +1 year without progress, I'm hopeful that this can be resolved easily with this submission. 

Thank you again for your helpful advice :-)

-=david=-
Comment 17 David Harrigan 2017-11-04 08:52:04 UTC
Created attachment 187714 [details]
Patch File
Comment 18 lightside 2017-11-04 09:08:44 UTC
Comment on attachment 173801 [details]
The devel/tig-plain port in shar archive

Made attachment #173801 [details] visible again.

The devel/tig-plain port (or with some other name, if needed) allows to install devel/tig port without runtime dependencies. This may fix runtime dependency issue(s) for people who prefer to install devel/git-subversion (or other variant) instead of main devel/git port (with customized options, if needed). The manual post-install of devel/git (or other variant) maybe needed, in case of devel/tig-plain usage.

The proposal to remove devel/git from RUN_DEPENDS of main devel/tig port is wrong, in my opinion, if build ports (e.g. devel/tig and devel/git) with default/customized options, where there are no mentioned issues (as well as no need to manually post-install devel/git in case of devel/tig build/install first, which may be another created issue otherwise).
Comment 19 David Harrigan 2017-11-04 09:20:41 UTC
Hi,

Thank you again. I understand and appreciate your point of view, but I believe that creating a new port, whatever its name would be, will only confuse users as to which to install. The vast majority of users will simply do wither "pkg install tig" or go into the ports tree 'devel/tig' and make. They won't spend time understanding the differences between a "plain" version and a "not-plain-version".

It is my view that users who are installing tig would probably already have git  installed (and are looking around for a nice terminal based git repository viewer) and not the other way around - i.e., installing tig just to get git, therefore the current port which pulls in git is assuming too much.

The patch, as it is, solves the issue that people are experiencing. 

I appreciate your contribution and discussion on this matter, but I'm going to leave the patch as it stands.

-=david=-
Comment 20 lightside 2017-11-04 09:37:02 UTC
(In reply to comment #16)
> Thank you again for your helpful advice :-)
You are welcome.

I still advice to rethink this issue from perspective of ports user (who may build them directly with default/customized options), because removal of RUN_DEPENDS is in favor of users who prefer to use available packages only, while may create new post-install (of devel/git variant) issue for both.

I guess, this maybe an issue of current packages system (if not override dependencies manually).

(In reply to comment #19)
> They won't spend time understanding the differences between a "plain" version and a "not-plain-version".
The devel/tig-plain port contains following pkg-message (which shows after install):
"Required to (post-)install devel/git* port as runtime dependency."
Also possible to change COMMENT and description in pkg-descr file, if needed.
Comment 21 lightside 2017-11-04 10:42:10 UTC
(In reply to comment #19)
> I appreciate your contribution and discussion on this matter, but I'm going
> to leave the patch as it stands.
Actually, there is no problem to create additional port with complete RUN_DEPENDS, otherwise (from different point of view).

Still, if you approach your decision about removal of RUN_DEPENDS from devel/tig port, there is maybe a need for pkg-message file and/or changes in pkg-descr file about additional runtime requirements. Also, if user decides to (not force) remove git, the package system will not report about removal of tig in this case and tig may not work after this (with "tig: Not a git repository" message, currently).
Comment 22 lightside 2017-11-04 11:25:44 UTC
Created attachment 187721 [details]
Proposed patch (since 452422 revision)

Another way is to add devel/git for RUN_DEPENDS as an option for devel/tig port.
Added this variant for reference.
Comment 23 lightside 2017-11-04 12:20:13 UTC
Comment on attachment 187721 [details]
Proposed patch (since 452422 revision)

Added maintainer-approval request, just in case. But possible to clarify descriptions, if needed (this is why it was for reference).

Overall, this patch may allow to use devel/tig port with correct runtime dependency information, in case of enabled GIT option, while solve issue of this PR, in case of disabled GIT option (by default), e.g. for packages. Still, there may be a case where some user(s) may prefer package with enabled GIT option, this is why devel/tig-plain port was proposed (attachment #173801 [details]) instead (from different point of view).
Comment 24 David Harrigan 2017-11-06 09:43:19 UTC
Hi,

I like this proposed patch a lot better :-) I've accepted it for inclusion instead of my one, so I'll see if I can get it pushed into ports from a committer. Thank you lighside! :-) Nice to work with you on this.

-=david=-
Comment 25 commit-hook freebsd_committer freebsd_triage 2017-12-05 10:32:20 UTC
A commit references this bug:

Author: mat
Date: Tue Dec  5 10:32:12 UTC 2017
New revision: 455573
URL: https://svnweb.freebsd.org/changeset/ports/455573

Log:
  Make the git dependency optional.

  PR:		203457
  Submitted by:	lightside gmx com
  Approved by:	dharrigan gmail com
  Sponsored by:	Absolight

Changes:
  head/devel/tig/Makefile
  head/devel/tig/pkg-message-git