FS#48315 - [pacman] add -t to git fetch

Attached to Project: Pacman
Opened by Johannes Ernst (jernst) - Tuesday, 23 February 2016, 22:09 GMT
Last edited by Eli Schwartz (eschwartz) - Wednesday, 12 December 2018, 06:42 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 5.1.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I have a PKGBUILD that refers to a specific git tag:

source=("git+https:github.com/something.or.other#tag=v${pkgver}"

I built the package with makepkg. Then, I moved the tag on github per http://stackoverflow.com/questions/8044583/how-can-i-move-a-tag-on-a-git-branch-to-a-different-commit, and built again.

makepkg produced the same build as before, not one using the sources identified by the new location of the tag.

I suspect changing download_git() in /usr/share/makepkg/source/git.sh to use

git fetch --all -p -t

(adding the -t flag) would fix this (rare, but puzzling) problem.
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Wednesday, 12 December 2018, 06:42 GMT
Reason for closing:  Won't implement
Additional comments about closing:  This is the default, expected behavior of git and we do not need to document that we don't do surprising things.
Comment by Allan McRae (Allan) - Tuesday, 23 February 2016, 22:58 GMT
I'm not interested in supporting moving tags.
Comment by Johannes Ernst (jernst) - Tuesday, 23 February 2016, 23:10 GMT
Due to pacman requiring a new package version if the sources changed? So the best case would be to support moving tags only if $pkgver-$pkgver was changed as well. But that's probably not worth implementing.

In which case, can we add something like this to 'man PKGBUILD', section 'USING VCS SOURCES':

"makepkg will not track moving tags."
Comment by Allan McRae (Allan) - Tuesday, 23 February 2016, 23:26 GMT
Moving publicly pushed tags is a very, very, very bad idea and highly discouraged.
Comment by Johannes Ernst (jernst) - Tuesday, 23 February 2016, 23:28 GMT
What about my sentence for the documentation.
Comment by Eli Schwartz (eschwartz) - Tuesday, 26 September 2017, 17:14 GMT
Certainly makepkg shouldn't do anything git itself wouldn't do.

I think as far as documentation goes this is the expected behavior and we would have to document the confusing case of tracking moving tags. We shouldn't need to document "makepkg will not use weird and confusing non-default options when downloading VCS sources".

This should be closed as wontfix.

Loading...