Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm just about to move to Arch Linux. Checking out packages in the AUR, there's a lot of packages following the naming scheme "project-name-git date", e.g:

adonthell-git 20100408-1
akonadi-facebook-git 20111117-1
wesnoth-svn 40587-1
vimprobable-git 20110829-1
vimprobable2-git 20111214-1

What are these packages? Are they just snapshots from the adonthell/wesnoth/etc repository the specified point in time? If so, it the package couldn't be updated without changing its name, which has got to complicate package management a lot.

If I'd like the latest version of, say, vimprobable from the git repo, should I use AUR or compile it myself?

share|improve this question
1  
The date is not part of the packages name, it's the version number (why the date is used is described in the answers). –  Wieland Jul 9 '12 at 16:22

2 Answers 2

up vote 8 down vote accepted

In short: Just build the package and it will be the latest version from the git repo; this is automatically handled by makepkg.

From reading the PKGBUILD files of -git packages (e.g. for adonthell-git), you can see:

cd $_gitname && git pull origin
msg "The local files are updated."

Thus, every time makepkg is ran, it downloads the latest version from the git repository.

The pkgver parameter is because makepkg requires a version number in the PKGBUILD and in the final package; a date is what makes the most sense here.

If it's detected that it's a package from git, makepkg handles the special case accordingly:

(lines 1687-1771 of makepkg, function devel_check)

elif [[ -n ${_gitroot} && -n ${_gitname} ]] ; then
    if ! type -p git >/dev/null; then
            warning "$(gettext "Cannot find the %s binary required to determine latest %s revision.")" "git" "git"
            return 0
        fi
        msg "$(gettext "Determining latest %s revision...")" 'git'
        newpkgver=$(date +%Y%m%d)

[snipped lots of other cases for darcs, hg, svn etc...]

(lines 1773-1792 of makepkg, function devel_update)

# This is lame, but if we're wanting to use an updated pkgver for
# retrieving svn/cvs/etc sources, we'll update the PKGBUILD with
# the new pkgver and then re-source it. This is the most robust
# method for dealing with PKGBUILDs that use, e.g.:

hence you end up with a package with its version number being the date when you built it.

share|improve this answer
    
Thanks. Does this mean that pacman -Syu won't automatically detect that there's a new version and compile it again? –  Anna Jul 9 '12 at 18:45
    
Exactly, you will need to check for the new version on your own. But you can upgrade it just by rebuilding the package. –  Renan Jul 9 '12 at 18:47

Using a Git date is just as valid as using any other form of version numbering.

As to how to get the newest version of a package/program, downloading from git and compiling yourself if probably the best way to get the "most recent" version of a package.

On the other hand, if you want an already-compiled version that has been at least marginally tested and found moderately stable, then I would recommend the package from the repository.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.