Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xupdate-archlinux32-package26
1 files changed, 19 insertions, 7 deletions
diff --git a/update-archlinux32-package b/update-archlinux32-package
index e8a1d98..c41075e 100755
--- a/update-archlinux32-package
+++ b/update-archlinux32-package
@@ -9,6 +9,7 @@
git_repo_path='/usr/src/archlinux32/packages'
upstream_git_path='/usr/src/archlinux/packages'
+upstream_community_git_path='/usr/src/archlinux/community'
archlinuxewe_git_path=~erich/'eigeneSkripte/archPackages'
vagrant_path=$(
readlink -f ~/"virtual-boxes/archlinux32-test"
@@ -24,6 +25,7 @@ if [ "x$1" = "x-" ]; then
else
if ! git -C "${git_repo_path}" pull --ff-only || \
! git -C "${upstream_git_path}" pull --ff-only || \
+ ! git -C "${upstream_community_git_path}" pull --ff-only || \
! git -C "${archlinuxewe_git_path}" pull --ff-only; then
>&2 echo 'Your git repos cannot cleanly be updated'
exit 1
@@ -86,7 +88,7 @@ case "${pkgname}" in
# upstream, though)
update_path='archlinuxewe'
;;
- 'flashplugin')
+ 'eclipse'|'flashplugin')
# an upstream package which is updated by solely updating its checksum
update_path='checksum'
;;
@@ -179,13 +181,23 @@ case ${update_path} in
git -C "${git_repo_path}" commit "${repo}/${pkgname}/PKGBUILD" -m "${repo}/${pkgname}: ${old_pkgver} -> ${new_pkgver}"
;;
'checksum')
+ used_upstream_git_path="${upstream_git_path}"
repo_arch=$(
- git -C "${upstream_git_path}/${pkgname}/repos" archive HEAD -- | \
- tar -t | \
+ git -C "${used_upstream_git_path}/${pkgname}/repos" archive HEAD -- 2>/dev/null | \
+ tar -t 2>/dev/null | \
sed 's/^'"${repo}-"'//;t;d' | \
head -n1
)
- scp -r "${upstream_git_path}/${pkgname}/repos/${repo}-${repo_arch}" \
+ if [ -z "${repo_arch}" ]; then
+ used_upstream_git_path="${upstream_community_git_path}"
+ repo_arch=$(
+ git -C "${used_upstream_git_path}/${pkgname}/repos" archive HEAD -- | \
+ tar -t | \
+ sed 's/^'"${repo}-"'//;t;d' | \
+ head -n1
+ )
+ fi
+ scp -r "${used_upstream_git_path}/${pkgname}/repos/${repo}-${repo_arch}" \
"arch32-test:${pkgname}"
sums=$(
ssh arch32-test '
@@ -201,14 +213,14 @@ case ${update_path} in
)
echo "'$sums'"
sed -i '
- /^\S\+sums=(/{
+ /^\S\+sums\(_[^=]\+\)\?=(/{
:a
$b
N
- s/^\S\+sums=(.*)/'"${sums}"'/
+ s/^\S\+sums[^=]*=(.*)/'"${sums}"'/
}
' "${git_repo_path}/${repo}/${pkgname}/PKGBUILD"
- if ! cat "${upstream_git_path}/${pkgname}/repos/${repo}-${repo_arch}/PKGBUILD" "${git_repo_path}/${repo}/${pkgname}/PKGBUILD" \
+ if ! cat "${used_upstream_git_path}/${pkgname}/repos/${repo}-${repo_arch}/PKGBUILD" "${git_repo_path}/${repo}/${pkgname}/PKGBUILD" \
| ssh arch32-test '
cd "'"${pkgname}"'"
cat > PKGBUILD