Compare commits

..

6 Commits

Author SHA1 Message Date
f5daac0d67 commitpkg: commit removal of obsolete arch 2020-05-28 20:12:33 +02:00
2484ea39a4 commitpkg: support are change when moving 2020-05-28 15:54:43 +02:00
9b222bdb83 commitpkg: rm old arch on change of arch
signpkg: tweak msg
2020-05-28 10:39:19 +02:00
a3e6b17c5f deploypkg: add xz compat 2020-05-25 22:49:27 +02:00
21a37f6b00 buildtree: quote vars 2020-05-25 22:10:26 +02:00
80416b76d5 buildtree: fix import for new pkgs 2020-05-25 21:01:05 +02:00
4 changed files with 37 additions and 34 deletions

View File

@@ -113,9 +113,6 @@ show_deps(){
subrepo_new(){
cd ${TREE_DIR_ARTIX}/${GROUP}
msg2 "team: %s" "${TEAM}"
msg2 "group: %s" "${GROUP}"
local org=$(get_pkg_org "${PACKAGE}")
create_repo "${PACKAGE}" "$org"
@@ -139,20 +136,14 @@ from_arch(){
msg "repo: %s" "$repo"
local archpath=$srcpath/repos/$repo
local artixpath=$(find_pkg ${TREE_DIR_ARTIX} ${PACKAGE})
local artixpath=$(find_pkg "${TREE_DIR_ARTIX}" "${PACKAGE}")
show_deps "$archpath"
if [[ -f "$artixpath"/.gitrepo ]]; then
artixpath=$artixpath/trunk
if [[ -f $artixpath/PKGBUILD ]];then
. $artixpath/PKGBUILD 2>/dev/null
local artixver=$(get_full_version)
msg2 "Artix Version: %s" "$artixver"
artixpath="$artixpath"/trunk
if [[ -d "$artixpath" ]];then
sync_pkg "$archpath" "$artixpath"
patch_pkg "$artixpath"
fi
@@ -173,7 +164,7 @@ view_build(){
check_tree(){
local archpath=$(find_pkg "${TREE_DIR_ARCH}" "${PACKAGE}")
[[ -z $archpath ]] && die "Package '%s' does not exist!" "${PACKAGE}"
local artixpath=$(find_pkg "${TREE_DIR_ARTIX}" ${PACKAGE})
local artixpath=$(find_pkg "${TREE_DIR_ARTIX}" "${PACKAGE}")
local group=${artixpath%/*}
msg "group: %s" "${group##*/}"

View File

@@ -26,7 +26,11 @@ get_path(){
}
prepare_commit(){
local dest="$1"
local dest="$1" to_rm="${2:-none}"
if [[ -d repos/$to_rm ]]; then
git rm -r repos/$to_rm
git commit -m "change of package arch"
fi
[[ -d repos/$dest ]] && git rm -r repos/$dest
[[ ! -d repos ]] && mkdir repos
[[ ! -d repos/$dest ]] && mkdir repos/$dest
@@ -101,6 +105,15 @@ commit_pkg(){
fi
}
get_rm_arch(){
local rm_arch='none'
case "$CARCH" in
'any') rm_arch="${REPO_DEST}-x86_64" ;;
'x86_64') rm_arch="${REPO_DEST}-any" ;;
esac
echo $rm_arch
}
repo_commit_pkg(){
local artixpath=$(find_pkg "${TREE_DIR_ARTIX}" "${PACKAGE}")
if [[ -n ${artixpath} ]];then
@@ -124,7 +137,7 @@ repo_commit_pkg(){
local action='add'
local dest="${REPO_DEST}-$CARCH"
prepare_commit "$dest"
prepare_commit "$dest" "$(get_rm_arch)"
cp trunk/* repos/$dest/
else
@@ -132,7 +145,7 @@ repo_commit_pkg(){
local src="${REPO_SRC}-$CARCH" dest="${REPO_DEST}-$CARCH"
[[ ! -f repos/$src/PKGBUILD ]] && die "%s does not exist!" "repos/$src/PKGBUILD"
prepare_commit "$dest"
prepare_commit "$dest" "$(get_rm_arch)"
cp repos/$src/* repos/$dest/
git rm -r repos/$src

View File

@@ -34,29 +34,28 @@ get_pkgbasename(){
}
add(){
packages+=("$pkg")
if [[ -e "${pkgfile}" ]]; then
action='add'
ln -sf "${pkgfile}"{,.sig} "$repo_path"/
fi
packages+=("$pkg.$ext")
action='add'
ln -sf "${pkgfile}"{,.sig} "$repo_path"/
}
remove(){
packages+=("$(get_pkgbasename "$pkg")")
if [[ -e "$repo_path"/"$pkg" ]]; then
action='remove'
rm "$repo_path"/"$pkg"
fi
[[ -e "$repo_path"/"$pkg".sig ]] && rm "$repo_path"/"$pkg".sig
local to_remove=$(get_pkgbasename "$pkg.$ext")
packages+=("$to_remove")
action='remove'
rm "$repo_path"/"$to_remove"*pkg.tar*
}
repo_action(){
local packages=() action= func="$1"
for pkg in ${passfiles[@]}; do
if pkgfile=$(find_cached_pkgfile "$pkg");then
msg "Found: %s" "${pkgfile}"
"$func"
fi
for pkgname in ${passfiles[@]}; do
pkg=${pkgname%.*}
for ext in zst xz;do
if pkgfile=$(find_cached_pkgfile "$pkg.$ext");then
msg "Found: %s" "${pkgfile}"
"$func"
fi
done
done
cd $repo_path
if [[ -n "$action" ]]; then

View File

@@ -29,7 +29,7 @@ sign_pkg(){
fi
if [[ -n "${BUILDBOT_GPGP}" ]]; then
msg2 "Signing [%s]" "${file_to_sign##*/}"
msg "Signing [%s]" "${file_to_sign##*/}"
gpg --batch --passphrase "${BUILDBOT_GPGP}" --detach-sign "$file_to_sign"
else
msg2 "Signing [%s] with key %s" "${file_to_sign##*/}" "${GPGKEY}..."
@@ -39,7 +39,7 @@ sign_pkg(){
for pkg in ${passfiles[@]}; do
if pkgfile=$(find_cached_pkgfile "$pkg");then
msg "Found: %s" "${pkgfile}"
msg2 "Found: %s" "${pkgfile}"
[[ -e "${pkgfile}".sig ]] && rm "${pkgfile}".sig
sign_pkg "${pkgfile}"
fi