[pacman-dev] [RFC] [PATCH 0/4] makepkg: VCS package overhaul
This is my first attempt at overhauling the really crap VCS PKGBUILD support in makepkg. So far only git is implemented. This is for initial comments. There is still much to tidy up (apart from reinstating all the other VCS...), but using git works. E.g. to make a package for pacman-git from the maint branch: source=('git+https://projects.archlinux.org/git/pacman.git#branch=maint') Currently you need to use --skipinteg, as integrity checking is broken. So is generating the integrity checks. Also, I would like ideas on how to stop the git repo being updated. This is a common request for having VCS PKGBUILDs work offline (assumably after an initial checkout...). Should I add a new flag, or just not error out when updating the repo fails? Allan McRae (4): makepkg: remove VCS package support makepkg: reorder source handling functions makepkg: generalize download_sources makepkg: allow using GIT source URLs scripts/makepkg.sh.in | 467 ++++++++++++++++++++++++------------------------- 1 file changed, 230 insertions(+), 237 deletions(-) -- 1.7.10.3
The current VCS packaging support is really, really, really bad. It is best to strip it out completely before rewriting it. Signed-off-by: Allan McRae <allan@archlinux.org> --- scripts/makepkg.sh.in | 117 ------------------------------------------------- 1 file changed, 117 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index c055691..0c54497 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1786,114 +1786,6 @@ check_software() { return $ret } -devel_check() { - newpkgver="" - - # Do not update pkgver if --holdver is set, when building a source package, repackaging, - # reading PKGBUILD from pipe (-f), or if we cannot write to the file (-w) - if (( HOLDVER || SOURCEONLY || REPKG )) || - [[ ! -f $BUILDFILE || ! -w $BUILDFILE || $BUILDFILE = "/dev/stdin" ]]; then - return - fi - - if [[ -z $FORCE_VER ]]; then - # Check if this is a svn/cvs/etc PKGBUILD; set $newpkgver if so. - # This will only be used on the first call to makepkg; subsequent - # calls to makepkg via fakeroot will explicitly pass the version - # number to avoid having to determine the version number twice. - # Also do a check to make sure we have the VCS tool available. - local vcs=() - - [[ -n ${_darcstrunk} && -n ${_darcsmod} ]] && vcs+=("darcs") - [[ -n ${_cvsroot} && -n ${_cvsmod} ]] && vcs+=("cvs") - [[ -n ${_gitroot} && -n ${_gitname} ]] && vcs+=("git") - [[ -n ${_svntrunk} && -n ${_svnmod} ]] && vcs+=("svn") - [[ -n ${_bzrtrunk} && -n ${_bzrmod} ]] && vcs+=("bzr") - [[ -n ${_hgroot} && -n ${_hgrepo} ]] && vcs+=("hg") - - if (( ${#vcs[@]} == 0 )); then - return - elif (( ${#vcs[@]} > 1 )); then - warning "$(gettext "Ambiguous VCS package. Cannot pick from: %s.")" "${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 - fi - - msg "$(gettext "Determining latest %s revision...")" "$vcs" - - case "$vcs" in - darcs) - newpkgver=$(date +%Y%m%d) - ;; - cvs) - newpkgver=$(date +%Y%m%d) - ;; - git) - newpkgver=$(date +%Y%m%d) - ;; - svn) - newpkgver=$(LC_ALL=C svn info $_svntrunk | sed -n 's/^Last Changed Rev: \([0-9]*\)$/\1/p') - ;; - bzr) - newpkgver=$(bzr revno ${_bzrtrunk}) - ;; - hg) - if pushd "./src/$_hgrepo" > /dev/null; then - local ret=0 - hg pull || ret=$? - if (( ! ret )); then - hg update - elif (( ret != 1 )); then - return 1 - fi - else - [[ ! -d ./src/ ]] && mkdir ./src/ - hg clone "$_hgroot/$_hgrepo" "./src/$_hgrepo" - if ! pushd "./src/$_hgrepo" > /dev/null; then - warning "$(gettext "An error occured while determining the hg version number.")" - return 0 - fi - fi - newpkgver=$(hg tip --template "{rev}") - popd > /dev/null - ;; - esac - - if [[ -n $newpkgver ]]; then - msg2 "$(gettext "Version found: %s")" "$newpkgver" - fi - - else - # Version number retrieved from fakeroot->makepkg argument - newpkgver=$FORCE_VER - fi -} - -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.: - # - # pkgver=23 - # ... - # _foo=pkgver - # - if [[ -n $newpkgver && $newpkgver != "$pkgver" ]]; then - if [[ -f $BUILDFILE && -w $BUILDFILE ]]; then - @SEDINPLACE@ "s/^pkgver=[^ ]*/pkgver=$newpkgver/" "$BUILDFILE" - @SEDINPLACE@ "s/^pkgrel=[^ ]*/pkgrel=1/" "$BUILDFILE" - source "$BUILDFILE" - else - warning "$(gettext "%s is not writeable -- pkgver will not be updated")" "$BUILDFILE" - fi - fi -} - backup_package_variables() { local var for var in ${splitpkg_overrides[@]}; do @@ -2267,13 +2159,6 @@ check_sanity || exit 1 # check we have the software required to process the PKGBUILD check_software || exit 1 -# We need to run devel_update regardless of whether we are in the fakeroot -# build process so that if the user runs makepkg --forcever manually, we -# 1) output the correct pkgver, and 2) use the correct filename when -# checking if the package file already exists - fixes FS #9194 -devel_check -devel_update - if (( ${#pkgname[@]} > 1 )); then SPLITPKG=1 fi @@ -2508,7 +2393,6 @@ else # if we are root or if fakeroot is not enabled, then we don't use it if ! check_buildenv "fakeroot" "y" || (( EUID == 0 )); then if (( ! REPKG )); then - devel_update (( BUILDFUNC )) && run_build (( CHECKFUNC )) && run_check fi @@ -2530,7 +2414,6 @@ else fi else if (( ! REPKG && ( PKGFUNC || SPLITPKG ) )); then - devel_update (( BUILDFUNC )) && run_build (( CHECKFUNC )) && run_check cd_safe "$startdir" -- 1.7.10.3
There is no actual code change here, but these related functions were all over the place which makes this code difficult to adjust. Signed-off-by: Allan McRae <allan@archlinux.org> --- scripts/makepkg.sh.in | 240 ++++++++++++++++++++++++------------------------- 1 file changed, 120 insertions(+), 120 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 0c54497..fee3a40 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -214,13 +214,6 @@ get_filepath() { printf "%s\n" "$file" } -# Print 'source not found' error message and exit makepkg -missing_source_file() { - error "$(gettext "Unable to find source file %s.")" "$(get_filename "$1")" - plain "$(gettext "Aborting...")" - exit 1 # $E_MISSING_FILE -} - # extract the filename from a source entry get_filename() { # if a filename is specified, use it @@ -235,6 +228,126 @@ get_url() { printf "%s\n" "${1#*::}" } +get_downloadclient() { + # $1 = URL with valid protocol prefix + local url=$1 + local proto="${url%%://*}" + + # loop through DOWNLOAD_AGENTS variable looking for protocol + local i + for i in "${DLAGENTS[@]}"; do + local handler="${i%%::*}" + if [[ $proto = "$handler" ]]; then + local agent="${i##*::}" + break + fi + done + + # if we didn't find an agent, return an error + if [[ -z $agent ]]; then + error "$(gettext "There is no agent set up to handle %s URLs. Check %s.")" "$proto" "$MAKEPKG_CONF" + plain "$(gettext "Aborting...")" + exit 1 # $E_CONFIG_ERROR + fi + + # ensure specified program is installed + local program="${agent%% *}" + if [[ ! -x $program ]]; then + local baseprog="${program##*/}" + error "$(gettext "The download program %s is not installed.")" "$baseprog" + plain "$(gettext "Aborting...")" + exit 1 # $E_MISSING_PROGRAM + fi + + printf "%s\n" "$agent" +} + +download_file() { + # download command + local dlcmd=$1 + # URL of the file + local url=$2 + # destination file + local file=$3 + # temporary download file, default to last component of the URL + local dlfile="${url##*/}" + + # replace %o by the temporary dlfile if it exists + if [[ $dlcmd = *%o* ]]; then + dlcmd=${dlcmd//\%o/\"$file.part\"} + dlfile="$file.part" + fi + # add the URL, either in place of %u or at the end + if [[ $dlcmd = *%u* ]]; then + dlcmd=${dlcmd//\%u/\"$url\"} + else + dlcmd="$dlcmd \"$url\"" + fi + + local ret=0 + eval "$dlcmd || ret=\$?" + if (( ret )); then + [[ ! -s $dlfile ]] && rm -f -- "$dlfile" + return $ret + fi + + # rename the temporary download file to the final destination + if [[ $dlfile != "$file" ]]; then + mv -f "$SRCDEST/$dlfile" "$SRCDEST/$file" + fi +} + +download_sources() { + msg "$(gettext "Retrieving Sources...")" + + pushd "$SRCDEST" &>/dev/null + + local netfile + for netfile in "${source[@]}"; do + local file=$(get_filepath "$netfile" || true) + if [[ -n "$file" ]]; then + msg2 "$(gettext "Found %s")" "${file##*/}" + rm -f "$srcdir/${file##*/}" + ln -s "$file" "$srcdir/" + continue + fi + + file=$(get_filename "$netfile") + local url=$(get_url "$netfile") + + # if we get here, check to make sure it was a URL, else fail + if [[ $file = "$url" ]]; then + error "$(gettext "%s was not found in the build directory and is not a URL.")" "$file" + exit 1 # $E_MISSING_FILE + fi + + # find the client we should use for this URL + local dlclient + dlclient=$(get_downloadclient "$url") || exit $? + + msg2 "$(gettext "Downloading %s...")" "$file" + # fix flyspray bug #3289 + local ret=0 + download_file "$dlclient" "$url" "$file" || ret=$? + if (( ret )); then + error "$(gettext "Failure while downloading %s")" "$file" + plain "$(gettext "Aborting...")" + exit 1 + fi + rm -f "$srcdir/$file" + ln -s "$SRCDEST/$file" "$srcdir/" + done + + popd &>/dev/null +} + +# Print 'source not found' error message and exit makepkg +missing_source_file() { + error "$(gettext "Unable to find source file %s.")" "$(get_filename "$1")" + plain "$(gettext "Aborting...")" + exit 1 # $E_MISSING_FILE +} + ## # usage : get_full_version( [$pkgname] ) # return : full version spec, including epoch (if necessary), pkgver, pkgrel @@ -392,75 +505,6 @@ source_has_signatures() { return 1 } -get_downloadclient() { - # $1 = URL with valid protocol prefix - local url=$1 - local proto="${url%%://*}" - - # loop through DOWNLOAD_AGENTS variable looking for protocol - local i - for i in "${DLAGENTS[@]}"; do - local handler="${i%%::*}" - if [[ $proto = "$handler" ]]; then - local agent="${i##*::}" - break - fi - done - - # if we didn't find an agent, return an error - if [[ -z $agent ]]; then - error "$(gettext "There is no agent set up to handle %s URLs. Check %s.")" "$proto" "$MAKEPKG_CONF" - plain "$(gettext "Aborting...")" - exit 1 # $E_CONFIG_ERROR - fi - - # ensure specified program is installed - local program="${agent%% *}" - if [[ ! -x $program ]]; then - local baseprog="${program##*/}" - error "$(gettext "The download program %s is not installed.")" "$baseprog" - plain "$(gettext "Aborting...")" - exit 1 # $E_MISSING_PROGRAM - fi - - printf "%s\n" "$agent" -} - -download_file() { - # download command - local dlcmd=$1 - # URL of the file - local url=$2 - # destination file - local file=$3 - # temporary download file, default to last component of the URL - local dlfile="${url##*/}" - - # replace %o by the temporary dlfile if it exists - if [[ $dlcmd = *%o* ]]; then - dlcmd=${dlcmd//\%o/\"$file.part\"} - dlfile="$file.part" - fi - # add the URL, either in place of %u or at the end - if [[ $dlcmd = *%u* ]]; then - dlcmd=${dlcmd//\%u/\"$url\"} - else - dlcmd="$dlcmd \"$url\"" - fi - - local ret=0 - eval "$dlcmd || ret=\$?" - if (( ret )); then - [[ ! -s $dlfile ]] && rm -f -- "$dlfile" - return $ret - fi - - # rename the temporary download file to the final destination - if [[ $dlfile != "$file" ]]; then - mv -f "$SRCDEST/$dlfile" "$SRCDEST/$file" - fi -} - run_pacman() { local cmd if [[ ! $1 = -@(T|Qq) ]]; then @@ -577,50 +621,6 @@ remove_deps() { fi } -download_sources() { - msg "$(gettext "Retrieving Sources...")" - - pushd "$SRCDEST" &>/dev/null - - local netfile - for netfile in "${source[@]}"; do - local file=$(get_filepath "$netfile" || true) - if [[ -n "$file" ]]; then - msg2 "$(gettext "Found %s")" "${file##*/}" - rm -f "$srcdir/${file##*/}" - ln -s "$file" "$srcdir/" - continue - fi - - file=$(get_filename "$netfile") - local url=$(get_url "$netfile") - - # if we get here, check to make sure it was a URL, else fail - if [[ $file = "$url" ]]; then - error "$(gettext "%s was not found in the build directory and is not a URL.")" "$file" - exit 1 # $E_MISSING_FILE - fi - - # find the client we should use for this URL - local dlclient - dlclient=$(get_downloadclient "$url") || exit $? - - msg2 "$(gettext "Downloading %s...")" "$file" - # fix flyspray bug #3289 - local ret=0 - download_file "$dlclient" "$url" "$file" || ret=$? - if (( ret )); then - error "$(gettext "Failure while downloading %s")" "$file" - plain "$(gettext "Aborting...")" - exit 1 - fi - rm -f "$srcdir/$file" - ln -s "$SRCDEST/$file" "$srcdir/" - done - - popd &>/dev/null -} - get_integlist() { local integ local integlist=() -- 1.7.10.3
In order to treat all VCS sources as URLs, we need to be able to deal with more protocols. Rewrite download_sources to use a case statement so additional protocols are easily added. Also fix the use of scp to not pass the protocol in the URL (noticed by William J. Bowman <wjb@williamjbowman.com>) Signed-off-by: Allan McRae <allan@archlinux.org> --- scripts/makepkg.sh.in | 79 +++++++++++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 32 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index fee3a40..227af5e 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -229,9 +229,7 @@ get_url() { } get_downloadclient() { - # $1 = URL with valid protocol prefix - local url=$1 - local proto="${url%%://*}" + local proto=$1 # loop through DOWNLOAD_AGENTS variable looking for protocol local i @@ -304,38 +302,55 @@ download_sources() { local netfile for netfile in "${source[@]}"; do - local file=$(get_filepath "$netfile" || true) - if [[ -n "$file" ]]; then - msg2 "$(gettext "Found %s")" "${file##*/}" - rm -f "$srcdir/${file##*/}" - ln -s "$file" "$srcdir/" - continue - fi - - file=$(get_filename "$netfile") local url=$(get_url "$netfile") - - # if we get here, check to make sure it was a URL, else fail - if [[ $file = "$url" ]]; then - error "$(gettext "%s was not found in the build directory and is not a URL.")" "$file" - exit 1 # $E_MISSING_FILE + local filename=$(get_filename "$netfile") + + # deal with local files + if [[ $filename = "$url" ]]; then + local filepath=$(get_filepath "$netfile") + if [[ -n "$filepath" ]]; then + msg2 "$(gettext "Found %s")" "${filepath##*/}" + rm -f "$srcdir/${filepath##*/}" + ln -s "$filepath" "$srcdir/" + continue + else + error "$(gettext "%s was not found in the build directory and is not a URL.")" "$filename" + exit 1 # $E_MISSING_FILE + fi fi - # find the client we should use for this URL - local dlclient - dlclient=$(get_downloadclient "$url") || exit $? - - msg2 "$(gettext "Downloading %s...")" "$file" - # fix flyspray bug #3289 - local ret=0 - download_file "$dlclient" "$url" "$file" || ret=$? - if (( ret )); then - error "$(gettext "Failure while downloading %s")" "$file" - plain "$(gettext "Aborting...")" - exit 1 - fi - rm -f "$srcdir/$file" - ln -s "$SRCDEST/$file" "$srcdir/" + local proto="${url%%://*}" + + case "$proto" in + scp) + # scp downloads should not pass the protocol in the url + url="${url##*://}" + ;;& + ftp|http|https|rsync|scp) + local filepath=$(get_filepath "$netfile") + if [[ -n "$filepath" ]]; then + msg2 "$(gettext "Found %s")" "${filepath##*/}" + rm -f "$srcdir/${filepath##*/}" + ln -s "$filepath" "$srcdir/" + continue + else + # find the client we should use for this URL + local dlclient + dlclient=$(get_downloadclient "$proto") || exit $? + + msg2 "$(gettext "Downloading %s...")" "$filename" + local ret=0 + download_file "$dlclient" "$url" "$filename" || ret=$? + if (( ret )); then + error "$(gettext "Failure while downloading %s")" "$filename" + plain "$(gettext "Aborting...")" + exit 1 + fi + rm -f "$srcdir/$filename" + ln -s "$SRCDEST/$filename" "$srcdir/" + fi + ;; + esac done popd &>/dev/null -- 1.7.10.3
Allow specifing GIT sources using the following syntax source=('<folder>::<repo>#<fragment>') This will download the git repo <repo> into <folder> (into $SRCDIR if set, otherwise $startdir). <repo> must start with "git", but non-git protocols are handled using (e.g.) "git+http://...". The <fragment> can be used to specify a branch, tag, or commit to build from. e.g. branch=maint. When --holdver is not used and the fragment does not specify a commit or tag to build from, makepkg will update the pkgver to $(git rev-list HEAD | wc -l)_$(git rev-parse --short HEAD) Note: this currently must be used with --skipinteg... Signed-off-by: Allan McRae <allan@archlinux.org> --- scripts/makepkg.sh.in | 95 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 227af5e..59fa9e4 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -295,6 +295,98 @@ download_file() { fi } +download_git() { + local netfile=$1 + + local fragment=${netfile##*#} + if [[ $fragment = "$netfile" ]]; then + unset fragment + fi + + local folder=${netfile%%::*} + local repo=${netfile##*/} + repo=${repo%%.git*} + + if [[ $folder = "$netfile" ]]; then + folder="${repo}" + fi + + if [[ ! -d "$startdir"/$folder && -d "$SRCDEST"/$folder ]]; then + folder="$SRCDEST"/$folder + else + folder="$startdir"/$folder + fi + + local url=${netfile##*git+} + url=${url%%#*} + + local ret=0 + if [[ ! -d $folder ]]; then + msg2 "$(gettext "Cloning %s %s repo...")" "${repo}" "git" + git clone --mirror "$url" "$folder" || ret=$? + else + msg2 "$(gettext "Updating %s %s repo...")" "${repo}" "git" + cd_safe "$folder" + git fetch --all -p || ret=$? + fi + + if (( ret )); then + error "$(gettext "Failure while downloading %s %s repo")" "${repo}" "git" + plain "$(gettext "Aborting...")" + exit 1 + fi + + msg2 "$(gettext "Creating working copy of %s %s repo...")" "${repo}" "git" + pushd "$srcdir" &>/dev/null + rm -rf ${folder##*/} + git clone $folder + + cd_safe ${folder##*/} + + if (( HOLDVER )); then + ref=${pkgver##*_} + elif [[ -n $fragment ]]; then + case $fragment in + commit=*|tag*) + ref=${fragment##*=} + # assume pkgver is set when building from given commit or tag + HOLDVER=1 + ;; + branch=*) + ref=origin/${fragment##*=} + ;; + *) + error "$(gettext "Unrecognized reference: %s")" "${fragment}" + plain "$(gettext "Aborting...")" + exit 1 + esac + fi + + if [[ -n $ref ]]; then + git checkout -b makepkg $ref || ret=$? + if (( ret )); then + error "$(gettext "Failure while checking out reference %s")" "${fragment}" + plain "$(gettext "Aborting...")" + exit 1 + fi + fi + + if (( !HOLDVER )); then + newpkgver=$(git rev-list HEAD | wc -l)_$(git rev-parse --short HEAD) + if [[ $newpkgver != "$pkgver" ]]; then + if [[ -f $BUILDFILE && -w $BUILDFILE ]]; then + sed -i "s/^pkgver=[^ ]*/pkgver=$newpkgver/" "$BUILDFILE" + sed -i "s/^pkgrel=[^ ]*/pkgrel=1/" "$BUILDFILE" + source "$BUILDFILE" + else + warning "$(gettext "%s is not writeable -- pkgver will not be updated")" "$BUILDFILE" + fi + fi + fi + + popd &>/dev/null +} + download_sources() { msg "$(gettext "Retrieving Sources...")" @@ -350,6 +442,9 @@ download_sources() { ln -s "$SRCDEST/$filename" "$srcdir/" fi ;; + git*) + download_git "$netfile" + ;; esac done -- 1.7.10.3
On 04/06/12 01:40, Allan McRae wrote:
This is my first attempt at overhauling the really crap VCS PKGBUILD support in makepkg. So far only git is implemented.
This is for initial comments. There is still much to tidy up (apart from reinstating all the other VCS...), but using git works. E.g. to make a package for pacman-git from the maint branch:
source=('git+https://projects.archlinux.org/git/pacman.git#branch=maint')
Currently you need to use --skipinteg, as integrity checking is broken. So is generating the integrity checks.
Also, I would like ideas on how to stop the git repo being updated. This is a common request for having VCS PKGBUILDs work offline (assumably after an initial checkout...). Should I add a new flag, or just not error out when updating the repo fails?
I am not going to resend the patchset at this stage, but I now consider git PKGBUILDs to be finished (apart from a documentation update). See the full patchset at: https://projects.archlinux.org/users/allan/pacman.git/log/?h=vcs Changes made since the last patchset: - Failing when updating a repo only produces a warning. This allows packages to be build while offline (provided the initial checkout is available) - Checking checksums bails early if "SKIP" is specified. No need to use --skipinteg anymore - "makepkg -g" prints "SKIP" for git sources - "makepkg --allsource" will backup the VCS checkout Allan McRae (9): makepkg: remove VCS package support makepkg: reorder source handling functions makepkg: add function to return download protocol makepkg: generalize download_sources makepkg: skip integrity checking early makepkg: allow using GIT source URLs makepkg: fix checksum generation with VCS sources makepkg: modify get_filename to handle git sources makepkg: modify get_filepath to handle VCS sources doc/PKGBUILD.5.txt | 64 ------ scripts/makepkg.sh.in | 577 ++++++++++++++++++++++++++----------------------- 2 files changed, 311 insertions(+), 330 deletions(-) This fixes the following bugs: FS#7816 - get source from svn/Subversion URLs FS#8890 - separate download and build stages for offline mode (cvs/svn PKGBUILDs) FS#13727 - VCS packages, makedepends and output FS#15895 - PKGBUILD git feature is systematically setting pkgver to today date, not date of the last commit FS#16384 - Inconsistency of makepkg's activities in devel_check() for Mercurial FS#16872 - the way VCS packages are handled is a mess FS#19459 - Integrated VCS checkout, update and revision selection FS#19476 - Remove duplication of VCS downloads from PKGBUILDs FS#21098 - [makepkg] Backup VCS source code with --allsource Work is needed to readd CVS, SVN, Mercurial, Darcs and Bazaar. These should be fairly simple to add given I have done the groundwork already. Apart from code comments, the only area I would like input on is the pkgver for git packages. When not using --holdver, "#tag=..." or "#commit=...", makepkg will update the pkgver to: $(git rev-list HEAD | wc -l)_$(git rev-parse --short HEAD) This increases with increasing commits (so version comparisons are fine) and includes a commit ID for uniqueness. I can not think of a better way... Allan
participants (1)
-
Allan McRae