Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
f5daac0d67 | |||
2484ea39a4 | |||
9b222bdb83 | |||
a3e6b17c5f | |||
21a37f6b00 | |||
80416b76d5 |
@@ -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##*/}"
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user