Difference between revisions of "Talk:VCS package guidelines"

From ArchWiki
Jump to: navigation, search
(Edit or remove "Removing VCS leftovers" section: new section)
(Clarifying the first Git function)
Line 79: Line 79:
{{Note|See the man pages of [http://unixhelp.ed.ac.uk/CGI/man-cgi?cut cut(1)] and [http://unixhelp.ed.ac.uk/CGI/man-cgi?tr+1 tr(1)] for more info.}}
{{Note|See the man pages of [http://unixhelp.ed.ac.uk/CGI/man-cgi?cut cut(1)] and [http://unixhelp.ed.ac.uk/CGI/man-cgi?tr+1 tr(1)] for more info.}}
--[[User:Det|Det]] ([[User talk:Det|talk]]) 00:22, 3 May 2013 (UTC)
--[[User:Det|Det]] ([[User talk:Det|talk]]) 00:22, 3 May 2013 (UTC)
:Did you test this before posting? It doesn't do anything like you think it does. [[User:Scimmia|Scimmia]] ([[User talk:Scimmia|talk]]) 22:29, 4 May 2013 (UTC)
== Edit or remove "Removing VCS leftovers" section ==
== Edit or remove "Removing VCS leftovers" section ==

Revision as of 22:29, 4 May 2013

https:// vs git://

Could we consider a guideline to use firewall-friendly protocols when possible (e.g. https://github.com/matplotlib/matplotlib.git instead of git://github.com/matplotlib/matplotlib.git)? --Mitch feaster 14:34, 15 November 2011 (EST)

It shouldn't be too hard to just mention that. As I haven't heard of anybody else ever bringing it up, it'd probably be enough.
--Det (talk) 22:51, 2 May 2013 (UTC)

Updating a CVS repo

I don't use cvs. How can you describe the pkgver for cvs (for pacman 4.1)?
-- Dracorp (talk) 09:31, 6 April 2013 (UTC)

CVS is not supported in pacman 4.1 like the other VCS tools. You will need to update pkgver manually until CVS support is added.
-- Jstjohn (talk) 22:44, 15 April 2013 (UTC)
Yeah, but how about mentioning that in the article (as well as giving a download example)? Even if it's not that common anymore.
--Det (talk) 22:39, 2 May 2013 (UTC)

checking out branches/tags needs clarification

The #fragment part of the VCS source URL has a different meaning for each type of VCS. This can be confusing for people, especially when they are trying to checkout a specific branch or tag. Examples would reduce the chance for confusion a lot.

fictional examples for git and svn (don't have experience with bzr or HG)

check out branch git_test of git://myproject.com into folder my_git_code :


Check out branch svn_test of svn://myproject.com into folder my_svn_code :


Lone_Wolf (talk) 20:49, 16 April 2013 (UTC)

Makes sense. At least for those two.
--Det (talk) 22:53, 2 May 2013 (UTC)

More on git pkgver()'s

I would also like to see packages use pkgver fucntions like this:

git describe --always --long | sed -E 's/([^-]*-g)/r\1/;s/-/./g'

so they are more friendly to vercmp. Current behaviour using git-git as an example:

current ver: next ver:

1 # the first is greater than the second

Right now, the current version is actually greater than the new version, causing a downgrade. If r is appended to the patch level (the numbers just before the g<hex> bit), then vercmp would order the versions correctly.

current ver: 1.8.2.r210.g123abc-1 next ver:

vercmp 1.8.2.r210.g123abc
-1 # the first is less than the second

KaiSforza (talk) 20:42, 18 April 2013 (UTC)

So Git makes some projects jump down from x.x.x.210 to x.x.x.50? Is that really intended behavior?
--Det (talk) 22:48, 2 May 2013 (UTC)
Yes, that's intended behavior. That number is the number of commits since the last tag, so it will reset every time the author tags a new commit.
Scimmia (talk) 08:02, 4 May 2013 (UTC)

Clarifying the first Git function

Instead of just sed 's|-|.|g' it'd probably be better to give some example with cut (which you're probably gonna end up using anyway) and tr (which is simpler than sed). Then you could either explain it like this or just mention the man pages: "cut -d "-" -f2- cuts from the first hyphen (-) to the end, tr - . converts hyphens to dots (.) and tr -d - removes the hyphens".

Also the output should be something like 2.0.6.a17a017 to include the $(git rev-parse --short HEAD) part for clarification.


pkgver() {
  cd local_repo
  git describe --always | cut -d "-" -f2- | tr - .
Note: See the man pages of cut(1) and tr(1) for more info.

--Det (talk) 00:22, 3 May 2013 (UTC)

Did you test this before posting? It doesn't do anything like you think it does. Scimmia (talk) 22:29, 4 May 2013 (UTC)

Edit or remove "Removing VCS leftovers" section

This section is meant for people who look in $pkgdir and see that the .git or .svn dir is there for some reason. What's actually happening is that people are adding it to their PKGBUILDs for no reason at all, not realizing what it's for. Honestly, has anyone seen an installer that installs the VCS dir? IMO, this section should just be removed, but if it needs to be kept, it should be clarified somehow so that people realize that it only needs to be used in very rare circumstances. Scimmia (talk) 08:07, 4 May 2013 (UTC)