forked from artix/artools
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
ae41ba16c6 | |||
cf87f88580 | |||
76e97b3702 | |||
d1b2da317f | |||
e59680bf11 |
@@ -94,15 +94,13 @@ show_deps(){
|
||||
|
||||
. $src/PKGBUILD 2>/dev/null
|
||||
|
||||
[[ $arch == 'any' ]] && CARCH=any
|
||||
|
||||
local archver=$(get_full_version)
|
||||
|
||||
[[ -n ${pkgbase} ]] && msg2 "pkgbase: %s" "${pkgbase}"
|
||||
msg2 "pkgname: %s" "${pkgname[*]}"
|
||||
[[ -n $pkgdesc ]] && msg2 "pkgdesc: %s" "${pkgdesc}"
|
||||
msg2 "Arch Version: %s" "$archver"
|
||||
msg2 "arch: %s" "$CARCH"
|
||||
msg2 "arch: %s" "$arch"
|
||||
|
||||
[[ -n ${makedepends[@]} ]] && msg2 "makedepends: %s" "${makedepends[*]}"
|
||||
[[ -n ${checkdepends[@]} ]] && msg2 "checkdepends: %s" "${checkdepends[*]}"
|
||||
@@ -133,7 +131,7 @@ from_arch(){
|
||||
[[ -z $srcpath ]] && die "Package '%s' does not exist!" "${PACKAGE}"
|
||||
|
||||
local repo=$(find_repo "$srcpath")
|
||||
msg "repo: %s" "$repo"
|
||||
msg "repo: %s" "${repo#*/}"
|
||||
|
||||
local archpath=$srcpath/$repo
|
||||
local artixpath=$(find_pkg "${TREE_DIR_ARTIX}" "${PACKAGE}")
|
||||
@@ -157,7 +155,7 @@ view_build(){
|
||||
[[ -z $archpath ]] && die "Package '%s' does not exist!" "${PACKAGE}"
|
||||
local repo=$(find_repo "${archpath}")
|
||||
archpath=$archpath/$repo
|
||||
msg2 "repo: %s" "$repo"
|
||||
msg "repo: %s" "${repo#*/}"
|
||||
show_deps "$archpath"
|
||||
}
|
||||
|
||||
|
@@ -22,20 +22,11 @@ prepare_commit(){
|
||||
msg "Switching to new layout ..."
|
||||
[[ ! -d "$CARCH" ]] && mkdir "$CARCH"
|
||||
|
||||
if [[ -d repos/"${REPO_SRC}-$CARCH" ]] || [[ -d repos/"${REPO_SRC}"-any ]]; then
|
||||
mkdir "$CARCH/${REPO_SRC}"
|
||||
local old_src="${REPO_SRC}-$CARCH"
|
||||
[[ "$arch" == any ]] && old_src="${REPO_SRC}"-any
|
||||
cp repos/"$old_src"/* "$CARCH/${REPO_SRC}"/
|
||||
git add $CARCH/${REPO_SRC}
|
||||
fi
|
||||
if [[ -d repos/"${REPO_DEST}-$CARCH" ]] || [[ -d repos/"${REPO_DEST}"-any ]]; then
|
||||
mkdir "$CARCH/${REPO_DEST}"
|
||||
local old_dest="${REPO_DEST}-$CARCH"
|
||||
[[ "$arch" == any ]] && old_dest="${REPO_DEST}"-any
|
||||
cp repos/"$old_dest"/* "$CARCH/${REPO_DEST}"/
|
||||
git add $CARCH/${REPO_DEST}
|
||||
fi
|
||||
for r in $(ls repos); do
|
||||
mkdir "$CARCH/${r%-*}"
|
||||
cp repos/${r}/* $CARCH/${r%-*}/
|
||||
git add $CARCH/${r%-*}
|
||||
done
|
||||
|
||||
git rm -r repos
|
||||
git commit -m "switch to new repo layout"
|
||||
|
@@ -28,7 +28,7 @@ get_import_path(){
|
||||
compare_m(){
|
||||
local result=$(vercmp "$artixver" "$archver")
|
||||
if [[ $artixrepo == *testing* ]] || [[ $artixrepo == *staging* ]]; then
|
||||
if [[ "$archrepo" == "$artixrepo" ]]; then
|
||||
if [[ "${a}" == "${b}" ]]; then
|
||||
msg_row "${table}" "${a}" "${b}" "$pkg" "$archver" "$artixver" "${group#*-}"
|
||||
else
|
||||
msg_row_notify "${table}" "${a}" "${b}" "$pkg" "$archver" "$artixver" "${group#*-}"
|
||||
@@ -151,7 +151,7 @@ update_db_cache(){
|
||||
query_db() {
|
||||
for repo in "${searchrepos[@]}"; do
|
||||
local prefix=
|
||||
local db=${db_cache_dir}/${LINKSDBEXT}/${ARCH}/${repo}/
|
||||
local db=${db_cache_dir}/${LINKSDBEXT}/${CARCH}/${repo}/
|
||||
if [[ -d ${db} ]]; then
|
||||
while read -rd '' pkg; do
|
||||
read -r match
|
||||
@@ -178,46 +178,25 @@ is_db_entry() {
|
||||
return 1
|
||||
}
|
||||
|
||||
check_pkg_in_db() {
|
||||
. $pkgbuild 2>/dev/null
|
||||
local artixver=$(get_full_version)
|
||||
local is_entry=false
|
||||
for name in ${pkgname[@]};do
|
||||
|
||||
if is_db_entry "$name-$artixver" "$repo";then
|
||||
is_entry=true
|
||||
fi
|
||||
if ! $is_entry;then
|
||||
msg_row "${tableU}" "$repo" "$name" "$artixver" "$is_entry"
|
||||
fi
|
||||
|
||||
done
|
||||
unset artixver is_entry pkgbuild pkgver epoch pkgname pkgbase
|
||||
}
|
||||
|
||||
check_new() {
|
||||
local func="$1"
|
||||
local pkgbuild=$pkgpath/$CARCH/$repo/PKGBUILD
|
||||
"$func"
|
||||
}
|
||||
|
||||
check_old() {
|
||||
local func="$1"
|
||||
for a in any ${CARCH};do
|
||||
local pkgbuild=$pkgpath/repos/$repo-$a/PKGBUILD
|
||||
"$func"
|
||||
done
|
||||
}
|
||||
|
||||
check_db(){
|
||||
local pkgpath="${1%/*}"
|
||||
|
||||
for repo in ${!REPOS[@]};do
|
||||
if [[ -f $pkgpath/$CARCH/$repo/PKGBUILD ]]; then
|
||||
check_new "check_pkg_in_db"
|
||||
else
|
||||
check_old "check_pkg_in_db"
|
||||
fi
|
||||
local pkgbuild=
|
||||
[[ -f $pkgpath/$CARCH/$repo/PKGBUILD ]] && pkgbuild=$pkgpath/$CARCH/$repo/PKGBUILD
|
||||
[[ -f $pkgpath/repos/$repo-$CARCH/PKGBUILD ]] && pkgbuild=$pkgpath/repos/$repo-$CARCH/PKGBUILD
|
||||
[[ -f $pkgpath/repos/$repo-any/PKGBUILD ]] && pkgbuild=$pkgpath/repos/$repo-any/PKGBUILD
|
||||
|
||||
. $pkgbuild 2>/dev/null
|
||||
local artixver=$(get_full_version)
|
||||
for name in ${pkgname[@]};do
|
||||
|
||||
if ! is_db_entry "$name-$artixver" "$repo";then
|
||||
msg_row "${tableU}" "$repo" "$name" "$artixver" "false"
|
||||
fi
|
||||
|
||||
done
|
||||
unset artixver pkgbuild pkgver epoch pkgname pkgbase
|
||||
done
|
||||
}
|
||||
|
||||
|
@@ -86,7 +86,7 @@ passfiles="$@"
|
||||
|
||||
prepare_dir "${REPOS_ROOT}"
|
||||
|
||||
repo_path=${REPOS_ROOT}/${dest_repo}/os/${ARCH}
|
||||
repo_path=${REPOS_ROOT}/${dest_repo}/os/${CARCH}
|
||||
|
||||
if [[ -n ${passfiles[@]} ]]; then
|
||||
if ${add_pkg}; then
|
||||
|
@@ -101,6 +101,7 @@ yaml_write_package() {
|
||||
|
||||
yaml_write_fileinfo(){
|
||||
local version=$(get_full_version)
|
||||
pkgbase=${pkgbase:-$pkgname}
|
||||
Yaml+=$(write_yaml_map 0 "version" "${version:-0}")
|
||||
Yaml+=$(write_empty_line)
|
||||
local pkgfile=$(print_all_package_names)
|
||||
|
@@ -15,10 +15,7 @@
|
||||
prepare_boot_extras(){
|
||||
local src="$1" dest=${iso_root}/boot
|
||||
|
||||
for u in intel amd;do
|
||||
cp $src/boot/$u-ucode.img $dest/$u-ucode.img
|
||||
cp $src/usr/share/licenses/$u-ucode/LICENSE $dest/$u-ucode.LICENSE
|
||||
done
|
||||
cp $src/boot/intel-ucode.img $dest/intel-ucode.img
|
||||
|
||||
cp $src/boot/memtest86+/memtest.bin $dest/memtest
|
||||
cp $src/usr/share/licenses/common/GPL2/license.txt $dest/memtest.COPYING
|
||||
|
Reference in New Issue
Block a user