Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 576156 - git-2.eclass: drop -u
Summary: git-2.eclass: drop -u
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
: 577874 578672 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-03-01 19:41 UTC by Michal Privoznik
Modified: 2016-08-07 10:59 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
eclass-debug.log (eclass-debug.log,3.86 KB, text/x-log)
2016-03-01 19:41 UTC, Michal Privoznik
Details
emerge --info (emerge.info,5.31 KB, application/x-info)
2016-03-01 19:42 UTC, Michal Privoznik
Details
patch (patch,912 bytes, patch)
2016-03-01 19:45 UTC, Michal Privoznik
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Privoznik 2016-03-01 19:41:12 UTC
Created attachment 427136 [details]
eclass-debug.log

So I've tried to rebuild net-im/psi-9999. But as it turns out, my local clone of repo was unable to update:

+ printf '%s\n' 'git pull -f -u '
+ chgrp portage /var/tmp/portage/net-im/psi-9999/temp/eclass-debug.log
+ chmod g+w /var/tmp/portage/net-im/psi-9999/temp/eclass-debug.log
+ git pull -f -u
error: unknown switch `u'

As I've investigated, emerge is trying to run 'git pull -f -u' from within the repo, but the git pull manpage states quite clearly:

       -u, --update-head-ok
           By default git fetch refuses to update the head which corresponds to the current branch. This flag disables the check. This is purely for the internal use for git pull to communicate with git fetch, and unless you are implementing your own Porcelain you are not supposed to use it.

In fact, trying to run 'git pull -u'  in any other git repo I have results in the very same error.
Comment 1 Michal Privoznik 2016-03-01 19:42:17 UTC
Created attachment 427138 [details]
emerge --info
Comment 2 Michal Privoznik 2016-03-01 19:45:21 UTC
Created attachment 427140 [details, diff]
patch
Comment 3 Pacho Ramos gentoo-dev 2016-03-02 11:44:16 UTC
This looks to not affect to -r3 eclass... this one is tagged as deprecated, but maybe maintainers want to solve it anyway :/
Comment 4 Michal Privoznik 2016-03-02 12:20:02 UTC
(In reply to Pacho Ramos from comment #3)
> This looks to not affect to -r3 eclass... this one is tagged as deprecated,
> but maybe maintainers want to solve it anyway :/

Well, there are still ~700 packages inheriting git-2, so maybe it's worth fixing, esp. if the fix is that simple.
Comment 5 Fat-Zer 2016-03-18 15:09:23 UTC
Note that the '-u' flag was removed only from the git-pull, git-fetch still has it. So I'm not sure if your patch is correct because -u may be essential here somewhy or just a type and something other should be on it's place. After-all this one may be even a git bug, but IMHO no mere than a bit obscure documentation mentioning it on the git-pull man page.

Also note that it affects only git 2.6+, but due to recent security alarms and stabilization of 2.7.3. it will affect more people.

I agree that fixing this one is essential due to lots of ebuilds still inherit the eclass, even in the main tree, not speaking about overlays.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-04-13 14:38:12 UTC
*** Bug 578672 has been marked as a duplicate of this bug. ***
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-04-13 14:38:16 UTC
*** Bug 577874 has been marked as a duplicate of this bug. ***
Comment 8 Hadrien Lacour 2016-05-23 14:17:42 UTC
Any ETA conerning this fix? I'm forced to use git-2 to avoid downloading useless submodules, but even this isn't possible.
Comment 9 Pacho Ramos gentoo-dev 2016-08-06 08:28:48 UTC
Use git-r3.eclass instead
Comment 10 Michal Privoznik 2016-08-06 08:48:42 UTC
(In reply to Pacho Ramos from comment #9)
> Use git-r3.eclass instead

Does this mean that gentoo developers will happily merge patch that reworks all the git-2 to git-r3 eclass? Because if not, I'm afraid we are leaving plenty of broken ebuilds behind:

lisa ~ # grep -r "inherit.*git-2" /usr/portage/ | wc -l
642
lisa ~ # cat /usr/portage/metadata/timestamp
Sat Aug  6 07:39:47 UTC 2016
Comment 11 Pacho Ramos gentoo-dev 2016-08-07 10:59:49 UTC
The will and they will welcome that work to be done for migrating from the deprecated eclasses (like python.eclass too and many others ;)