Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
1ba16c45f9
|
|||
95afc31152
|
|||
af81317aad | |||
79e12f3d10 |
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
|||||||
SHELL=/bin/bash
|
SHELL=/bin/bash
|
||||||
|
|
||||||
V=0.33
|
V=0.36
|
||||||
BUILDTOOLVER ?= $(V)
|
BUILDTOOLVER ?= $(V)
|
||||||
|
|
||||||
CHROOTVER=0.12
|
CHROOTVER=0.12
|
||||||
|
@@ -41,3 +41,6 @@
|
|||||||
|
|
||||||
# override the default git url for patches repo
|
# override the default git url for patches repo
|
||||||
# PATCH_URL=${GIT_SSH}:artix/artix-patches.git
|
# PATCH_URL=${GIT_SSH}:artix/artix-patches.git
|
||||||
|
|
||||||
|
# override the default debug pool
|
||||||
|
# PKGDEST_DBG=${WORKSPACE_DIR}/packages-debug
|
||||||
|
@@ -7,6 +7,9 @@ ARTOOLS_INCLUDE_GIT_PULL_SH=1
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# shellcheck source=src/lib/pkg/db/db.sh
|
||||||
|
source "${LIBDIR}"/pkg/db/db.sh
|
||||||
|
|
||||||
|
|
||||||
artixpkg_git_pull_usage() {
|
artixpkg_git_pull_usage() {
|
||||||
local -r COMMAND=${_ARTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}}
|
local -r COMMAND=${_ARTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}}
|
||||||
@@ -123,6 +126,11 @@ artixpkg_git_pull() {
|
|||||||
die 'failed to pull %s' "${pkgbase}"
|
die 'failed to pull %s' "${pkgbase}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
msg "Querying ${pkgbase} ..."
|
||||||
|
if ! show_db; then
|
||||||
|
warning "Could not query ${REPO_DB}"
|
||||||
|
fi
|
||||||
|
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
warning "Skip pulling ${pkgbase}: Directory does not exist"
|
warning "Skip pulling ${pkgbase}: Directory does not exist"
|
||||||
|
@@ -112,7 +112,9 @@ artixpkg_repo_remove() {
|
|||||||
local commit_msg
|
local commit_msg
|
||||||
commit_msg=$(get_commit_msg 'remove' "${DEST}")
|
commit_msg=$(get_commit_msg 'remove' "${DEST}")
|
||||||
|
|
||||||
# pkg2yaml -o "${SRCINFO}"
|
if ! [[ -f "${SRCINFO}" ]]; then
|
||||||
|
pkg2yaml -o "${SRCINFO}"
|
||||||
|
fi
|
||||||
|
|
||||||
upgrade_db
|
upgrade_db
|
||||||
|
|
||||||
@@ -130,6 +132,14 @@ artixpkg_repo_remove() {
|
|||||||
if [[ "$f" == "${REPO_DB}" ]]; then
|
if [[ "$f" == "${REPO_DB}" ]]; then
|
||||||
git add "$f"
|
git add "$f"
|
||||||
fi
|
fi
|
||||||
|
if [[ "$f" == "${REPO_CI}" ]]; then
|
||||||
|
git add "$f"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
for f in $(git ls-files --others); do
|
||||||
|
if [[ "$f" == "${SRCINFO}" ]]; then
|
||||||
|
git add "$f"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
stat_done
|
stat_done
|
||||||
|
|
||||||
|
@@ -64,6 +64,8 @@ load_pkg_config(){
|
|||||||
|
|
||||||
PATCH_URL=${PATCH_URL:-"${GIT_SSH}:artix/artix-patches.git"}
|
PATCH_URL=${PATCH_URL:-"${GIT_SSH}:artix/artix-patches.git"}
|
||||||
|
|
||||||
|
PKGDEST_DBG=${PKGDEST_DBG:-"${WORKSPACE_DIR}/packages-debug"}
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -31,6 +31,18 @@ remove(){
|
|||||||
# pkg removal will be done by a patched repo-remove honoring -R
|
# pkg removal will be done by a patched repo-remove honoring -R
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_dbg() {
|
||||||
|
local rmp
|
||||||
|
rmp=${pkgname%"${PKGEXT}"}
|
||||||
|
rmp=${rmp%-*}
|
||||||
|
rmp=${rmp%-*}
|
||||||
|
rm -fv "${PKGDEST_DBG}/${rmp}"*
|
||||||
|
if pkgfile=$(find_cached_pkgfile "${pkgname}"); then
|
||||||
|
msg "Found: %s" "${pkgfile}"
|
||||||
|
ln -sfv "${pkgfile}" "${PKGDEST_DBG}"/
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
repo_action() {
|
repo_action() {
|
||||||
local repo_path
|
local repo_path
|
||||||
# shellcheck disable=SC2153
|
# shellcheck disable=SC2153
|
||||||
@@ -40,11 +52,13 @@ repo_action() {
|
|||||||
for pkgname in "${passfiles[@]}"; do
|
for pkgname in "${passfiles[@]}"; do
|
||||||
"$func"
|
"$func"
|
||||||
done
|
done
|
||||||
( cd "${repo_path}" || return
|
if ! "${dbg_pkg}"; then
|
||||||
if [[ -n "${action}" ]]; then
|
( cd "${repo_path}" || return
|
||||||
repo-"${action}" "${action_args[@]}" "${dest_repo}.${db_ext}" "${packages[@]}"
|
if [[ -n "${action}" ]]; then
|
||||||
fi
|
repo-"${action}" "${action_args[@]}" "${dest_repo}.${db_ext}" "${packages[@]}"
|
||||||
)
|
fi
|
||||||
|
)
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#}}}
|
#}}}
|
||||||
@@ -55,9 +69,10 @@ db_ext="db.tar.${DBEXT}"
|
|||||||
|
|
||||||
add_pkg=false
|
add_pkg=false
|
||||||
rm_pkg=false
|
rm_pkg=false
|
||||||
|
dbg_pkg=false
|
||||||
|
|
||||||
cmd=${0##*/}
|
cmd=${0##*/}
|
||||||
dest_repo=${cmd#*-}
|
dest_repo=world #${cmd#*-}
|
||||||
action_args=(-R)
|
action_args=(-R)
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
@@ -65,19 +80,21 @@ usage() {
|
|||||||
printf ' -d <dest> Destination repository\n'
|
printf ' -d <dest> Destination repository\n'
|
||||||
printf ' -a Add package(s) to repository\n'
|
printf ' -a Add package(s) to repository\n'
|
||||||
printf ' -r Remove package(s) from repository\n'
|
printf ' -r Remove package(s) from repository\n'
|
||||||
|
printf ' -u Update debug repository\n'
|
||||||
printf ' -h This help\n'
|
printf ' -h This help\n'
|
||||||
printf '\n'
|
printf '\n'
|
||||||
printf '\n'
|
printf '\n'
|
||||||
exit "$1"
|
exit "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
opts='arLRhd:'
|
opts='uarhd:'
|
||||||
|
|
||||||
while getopts "${opts}" arg; do
|
while getopts "${opts}" arg; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
d) dest_repo="$OPTARG" ;;
|
d) dest_repo="$OPTARG" ;;
|
||||||
a) add_pkg=true; rm_pkg=false ;;
|
a) add_pkg=true; rm_pkg=false ;;
|
||||||
r) rm_pkg=true; add_pkg=false ;;
|
r) rm_pkg=true; add_pkg=false ;;
|
||||||
|
u) dbg_pkg=true ;;
|
||||||
h|?) usage 0 ;;
|
h|?) usage 0 ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -87,10 +104,14 @@ shift $(( OPTIND - 1 ))
|
|||||||
passfiles=("$@")
|
passfiles=("$@")
|
||||||
|
|
||||||
if [[ -n "${passfiles[*]}" ]]; then
|
if [[ -n "${passfiles[*]}" ]]; then
|
||||||
if ${add_pkg}; then
|
if ! "${dbg_pkg}"; then
|
||||||
repo_action add
|
if ${add_pkg}; then
|
||||||
fi
|
repo_action add
|
||||||
if ${rm_pkg}; then
|
fi
|
||||||
repo_action remove
|
if ${rm_pkg}; then
|
||||||
|
repo_action remove
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
repo_action update_dbg
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user