[pacman-dev] [PATCH 5/6] makepkg: devel_check(): only work for -vcs pkgnames

Matthew Monaco dgbaley27 at 0x01b.net
Mon Mar 12 15:33:47 EDT 2012

On 03/12/2012 01:22 PM, Dave Reisner wrote:
> On Mon, Mar 12, 2012 at 12:53:14PM -0600, dgbaley27 at 0x01b.net wrote:
>> From: Matthew Monaco <matthew.monaco at 0x01b.net>
>> If  the package's name does not end in -git/svn/etc, then don't touch
>> the pkgver or pkgrel. This changes the current semantics of makepkg, but
>> it shouldn't be too mind blowing.
> And I strongly disagree... What's the point in holding the package
> version if you can't tell the VCS behind the source files to obey this
> arbitrary date (e.g. in the case of git)?

I'm not sure I follow. If the package uses _gitroot and _gitname, but is not
-git, then from what I saw in packages.git and community.git, most of the time
the package is built using git, but the intention is to still build some
specific version. (There are a lot of packages that have to use __gitroot,

The situation I intend(ed) to help with is when there is some package in the
repos that I temporarily want to replace with the git version until the next
release. For this, I grab the -git version but set the pkgver to some number
just before the next release so future upgrades will happen automatically.

That, coupled with my look through existing packages, made it seem like packages
that don't have a -vcs shouldn't have the version's automatically set.

>> Currently in core/extra there are two vcs packages (svn) which use
>> _svntrunk and _svnmod. They also use -svn in the pkgname so they won't
>> be affected (mplayer-svn, seom-svn). In addition, vim uses the _hg
>> directives but with a double underscore (presumably to avoid automatic
>> versioning despite not being vim-git).
>> In community there are a few packages which use the vcs directives but
>> do not have a -vcs name. Most of these appear to never want an automatic
>> version number (blender, boinc, bti, cfml, go, lorcon, sfml).
>> The exceptions in community are: fusion-icon, ldc, notion, opencollada.
> And in my opinion, these packages are wrong.

So then I'm not sure where the disagreement is =)

>> ---
>>  doc/PKGBUILD.5.txt    |    3 ++-
>>  scripts/makepkg.sh.in |    5 +++++
>>  2 files changed, 7 insertions(+), 1 deletion(-)
>> diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt
>> index a21c1df..7459521 100644
>> --- a/doc/PKGBUILD.5.txt
>> +++ b/doc/PKGBUILD.5.txt
>> @@ -389,7 +389,8 @@ makepkg supports building development versions of packages without having to
>>  manually update the pkgver in the PKGBUILD. This was formerly done using the
>>  separate utility 'versionpkg'. In order to utilize this functionality, your
>>  PKGBUILD must use correct variable names depending on the SCM being fetched
>> -from (e.g., 'makepkg-git', 'mplayer-svn').
>> +from *and* the name of the package must end in -SCM (e.g., 'makepkg-git',
>> +'mplayer-svn').
>>  *CVS*::
>>  	The generated pkgver will be the date the package is built.
>> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
>> index d4798ca..dd545c6 100644
>> --- a/scripts/makepkg.sh.in
>> +++ b/scripts/makepkg.sh.in
>> @@ -1735,6 +1735,11 @@ devel_check() {
>>  			vcs=${pkgname##*-}
>>  		fi
>> +		if [[ "$vcs" != "${pkgname##*-}" ]]; then
>> +			warning "$(gettext "The pkgname does not end in -%s, skipping automatic versioning.")" "$vcs"
>> +			return 0
>> +		fi
>> +
>>  		if ! type -p "$vcs" >/dev/null; then
>>  			warning "$(gettext "Cannot find the %s binary required to determine latest %s revision.")" "$vcs" "$vcs"
>>  			return 0
>> -- 

More information about the pacman-dev mailing list