[pacman-dev] [PATCH] makepkg: do not update pkgver when building source package
When making a source package for a SCM PKGBUILD, makepkg should not update the pkgver/pkgrel. Noted in FS#14456. Signed-off-by: Allan McRae <allan@archlinux.org> --- scripts/makepkg.sh.in | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 97acfb4..c97eff2 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1098,14 +1098,13 @@ install_package() { devel_check() { newpkgver="" - # Only update pkgver if --holdver is not set - if [ "$HOLDVER" -eq 1 ]; then - return - fi - # Cannot update pkgver/pkgrel if reading PKGBUILD from pipe - if [ ! -f "./$BUILDSCRIPT" ]; then + + # Do not update pkgver if --holdver is set, when building a source package, + # or when reading PKGBUILD from pipe + if [ "$HOLDVER" -eq 1 -o "$SOURCEONLY" -ne 0 -o ! -f "./$BUILDSCRIPT" ]; 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 -- 1.6.2.4
On Sun, Apr 26, 2009 at 6:13 AM, Allan McRae <allan@archlinux.org> wrote:
When making a source package for a SCM PKGBUILD, makepkg should not update the pkgver/pkgrel. Noted in FS#14456.
Signed-off-by: Allan McRae <allan@archlinux.org>
I saw your comment on this, and was a bit unsure about it. Although the version doesn't have the same meaning on an SCM package, doesn't it still have some meaning in telling us when the source package was built?
--- scripts/makepkg.sh.in | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 97acfb4..c97eff2 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1098,14 +1098,13 @@ install_package() {
devel_check() { newpkgver="" - # Only update pkgver if --holdver is not set - if [ "$HOLDVER" -eq 1 ]; then - return - fi - # Cannot update pkgver/pkgrel if reading PKGBUILD from pipe - if [ ! -f "./$BUILDSCRIPT" ]; then + + # Do not update pkgver if --holdver is set, when building a source package, + # or when reading PKGBUILD from pipe + if [ "$HOLDVER" -eq 1 -o "$SOURCEONLY" -ne 0 -o ! -f "./$BUILDSCRIPT" ]; 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 -- 1.6.2.4
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev
Dan McGee wrote:
On Sun, Apr 26, 2009 at 6:13 AM, Allan McRae <allan@archlinux.org> wrote:
When making a source package for a SCM PKGBUILD, makepkg should not update the pkgver/pkgrel. Noted in FS#14456.
Signed-off-by: Allan McRae <allan@archlinux.org>
I saw your comment on this, and was a bit unsure about it. Although the version doesn't have the same meaning on an SCM package, doesn't it still have some meaning in telling us when the source package was built?
My thinking is that the packager would only know that the package works with the current pkgver and not with any updated one. Allan
On Sun, Apr 26, 2009 at 9:35 AM, Allan McRae <allan@archlinux.org> wrote:
Dan McGee wrote:
On Sun, Apr 26, 2009 at 6:13 AM, Allan McRae <allan@archlinux.org> wrote:
When making a source package for a SCM PKGBUILD, makepkg should not update the pkgver/pkgrel. Noted in FS#14456.
Signed-off-by: Allan McRae <allan@archlinux.org>
I saw your comment on this, and was a bit unsure about it. Although the version doesn't have the same meaning on an SCM package, doesn't it still have some meaning in telling us when the source package was built?
My thinking is that the packager would only know that the package works with the current pkgver and not with any updated one.
That is in fact much more sound logic. If there are no other objections I'm fine with this too. Who am I kidding? Barely anyone reads this list. :P -Dan
On Sun, Apr 26, 2009 at 9:38 AM, Dan McGee <dpmcgee@gmail.com> wrote:
On Sun, Apr 26, 2009 at 9:35 AM, Allan McRae <allan@archlinux.org> wrote:
Dan McGee wrote:
On Sun, Apr 26, 2009 at 6:13 AM, Allan McRae <allan@archlinux.org> wrote:
When making a source package for a SCM PKGBUILD, makepkg should not update the pkgver/pkgrel. Noted in FS#14456.
Signed-off-by: Allan McRae <allan@archlinux.org>
I saw your comment on this, and was a bit unsure about it. Although the version doesn't have the same meaning on an SCM package, doesn't it still have some meaning in telling us when the source package was built?
My thinking is that the packager would only know that the package works with the current pkgver and not with any updated one.
That is in fact much more sound logic. If there are no other objections I'm fine with this too. Who am I kidding? Barely anyone reads this list. :P
I do! And I'm fine with it.
participants (3)
-
Aaron Griffin
-
Allan McRae
-
Dan McGee