From f0f40079b87f8574c129d4c88850202294aeec63 Mon Sep 17 00:00:00 2001 From: "Jason St. John" Date: Tue, 11 Feb 2014 22:38:35 -0500 Subject: [PATCH 1/4] Update pkgver in the PKGBUILD for v25 Add a post_upgrade message for the changes since v24. --- PKGBUILD | 4 ++-- pkgtools.install | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 9524487..5e00ddc 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Daenyth # Contributor: Daenyth pkgname=pkgtools -pkgver=24 +pkgver=25 pkgrel=1 pkgdesc="A collection of scripts for Arch Linux packages" arch=('any') @@ -13,7 +13,7 @@ provides=('newpkg') backup=('etc/pkgtools/newpkg.conf' 'etc/pkgtools/pkgfile.conf' 'etc/pkgtools/spec2arch.conf') install=pkgtools.install source=("${pkgname}-v${pkgver}.tar.gz::https://github.com/Daenyth/pkgtools/tarball/v$pkgver") -md5sums=('f139c3940e1038cac4e29e985089e8a8') +md5sums=('9e9d7aad5ba8ecee1b798c3ed4e0a0a7') package() { cd "Daenyth-$pkgname"-* diff --git a/pkgtools.install b/pkgtools.install index dcce756..289572f 100644 --- a/pkgtools.install +++ b/pkgtools.install @@ -23,6 +23,10 @@ post_upgrade() { if is_update_from $2 22-1; then echo " - This is the largest release in a long time. This updates all Python scripts to Python 3." fi + if is_update_from $2 24-1; then + echo " - This update removes the gem2arch and pkgfile scripts. This update also updates pkgconflict to work with pkgfile from [extra] and other minor fixes." + echo " - You may want to remove /var/cache/pkgtools/lists, which is no longer used." + fi } ## arg 1: the old package version From bb58b3b4b9f0a2007500d7a6107a277fbdf19bfb Mon Sep 17 00:00:00 2001 From: "Jason St. John" Date: Tue, 11 Feb 2014 22:40:02 -0500 Subject: [PATCH 2/4] Replace backticks with more preferred command substitution syntax in the .install file --- pkgtools.install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgtools.install b/pkgtools.install index 289572f..776a09c 100644 --- a/pkgtools.install +++ b/pkgtools.install @@ -1,6 +1,6 @@ is_update_from() { - res="`vercmp $1 $2`" - case $res in + res="$(vercmp $1 $2)" + case "$res" in '-1'|'0') return 0;; '1') return 1;; esac From 3c61d1b0594d47610437f413365e1caac57b3fb8 Mon Sep 17 00:00:00 2001 From: "Jason St. John" Date: Tue, 11 Feb 2014 22:44:39 -0500 Subject: [PATCH 3/4] PKGBUILD-git: Fix possible vercmp issue with pkgver() function This inserts the number of commits between the date and the commit hash. This should resolve an issue that could occur when building the package twice in one day when multiple commits were made on the same day where the latter commit(s)' hash would trick vercmp into thinking a package downgrade was happening. --- PKGBUILD-git | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PKGBUILD-git b/PKGBUILD-git index cd17d62..12b4117 100644 --- a/PKGBUILD-git +++ b/PKGBUILD-git @@ -20,7 +20,7 @@ sha1sums=('SKIP') pkgver() { cd "${_pkgname%-git}" - echo "$(date +%Y%m%d).$(git rev-parse --short master)" + echo "$(date +%Y%m%d).$(git rev-list --count master).$(git rev-parse --short master)" } package() { From 4e55012dd7d485c5b99fcf75fe3b6dd58e5cdf37 Mon Sep 17 00:00:00 2001 From: "Jason St. John" Date: Tue, 11 Feb 2014 22:48:49 -0500 Subject: [PATCH 4/4] PKGBUILDs: Add 'gem2arch' as a dependency --- PKGBUILD | 2 +- PKGBUILD-git | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 5e00ddc..4fbaddc 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -7,7 +7,7 @@ pkgdesc="A collection of scripts for Arch Linux packages" arch=('any') url="https://bbs.archlinux.org/viewtopic.php?pid=384196" license=('GPL') -depends=('bash>=4' 'pcre' 'libarchive' 'python' 'namcap' 'pkgfile') +depends=('bash>=4' 'pcre' 'libarchive' 'python' 'namcap' 'pkgfile' 'gem2arch') optdepends=('abs: Provides PKGBUILD prototypes for newpkg') provides=('newpkg') backup=('etc/pkgtools/newpkg.conf' 'etc/pkgtools/pkgfile.conf' 'etc/pkgtools/spec2arch.conf') diff --git a/PKGBUILD-git b/PKGBUILD-git index 12b4117..e217ac2 100644 --- a/PKGBUILD-git +++ b/PKGBUILD-git @@ -7,7 +7,7 @@ pkgdesc="A collection of scripts for Arch Linux packages" arch=('any') url="https://github.com/Daenyth/pkgtools" license=('GPL') -depends=('bash>=4' 'libarchive' 'pcre' 'python' 'namcap' 'pkgfile') +depends=('bash>=4' 'libarchive' 'pcre' 'python' 'namcap' 'pkgfile' 'gem2arch') makedepends=('git') optdepends=('abs: Provides PKGBUILD prototypes for newpkg') provides=('pkgtools' 'newpkg')