mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Repo management: drop unused component
This commit is contained in:
@@ -93,9 +93,6 @@ publishing(){
|
|||||||
for release in "${distributions[@]}"; do
|
for release in "${distributions[@]}"; do
|
||||||
|
|
||||||
# create for each one
|
# create for each one
|
||||||
if [[ -z $(aptly repo list -config="${CONFIG}" -raw | awk '{print $(NF)}' | grep "${release}") ]]; then
|
|
||||||
aptly repo create -config="${CONFIG}" -component="${release}" -distribution="${release}" -comment="Armbian ${release} repository" "${release}" | sudo tee -a "${DEBUGFILE}" >/dev/null
|
|
||||||
fi
|
|
||||||
if [[ -z $(aptly repo list -config="${CONFIG}" -raw | awk '{print $(NF)}' | grep "${release}-utils") ]]; then
|
if [[ -z $(aptly repo list -config="${CONFIG}" -raw | awk '{print $(NF)}' | grep "${release}-utils") ]]; then
|
||||||
aptly repo create -config="${CONFIG}" -component="${release}-utils" -distribution="${release}" -comment="Armbian ${release}-utils repository" "${release}-utils" | sudo tee -a "${DEBUGFILE}" >/dev/null
|
aptly repo create -config="${CONFIG}" -component="${release}-utils" -distribution="${release}" -comment="Armbian ${release}-utils repository" "${release}-utils" | sudo tee -a "${DEBUGFILE}" >/dev/null
|
||||||
fi
|
fi
|
||||||
@@ -103,14 +100,9 @@ publishing(){
|
|||||||
aptly repo create -config="${CONFIG}" -component="${release}-desktop" -distribution="${release}" -comment="Armbian ma${release}-desktop repository" "${release}-desktop" | sudo tee -a "${DEBUGFILE}" >/dev/null
|
aptly repo create -config="${CONFIG}" -component="${release}-desktop" -distribution="${release}" -comment="Armbian ma${release}-desktop repository" "${release}-desktop" | sudo tee -a "${DEBUGFILE}" >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
adding_packages "${release}" "/${release}" "release packages" "$1"
|
|
||||||
adding_packages "${release}-utils" "/extra/${release}-utils" "release utils" "$1"
|
adding_packages "${release}-utils" "/extra/${release}-utils" "release utils" "$1"
|
||||||
adding_packages "${release}-desktop" "/extra/${release}-desktop" "release desktop" "$1"
|
adding_packages "${release}-desktop" "/extra/${release}-desktop" "release desktop" "$1"
|
||||||
|
|
||||||
# drop release snapshot
|
|
||||||
if [[ -n $(aptly snapshot list -config="${CONFIG}" -raw | awk '{print $(NF)}' | grep "${release}") ]]; then
|
|
||||||
aptly -config="${CONFIG}" snapshot drop ${release} | sudo tee -a "${DEBUGFILE}" 2>/dev/null
|
|
||||||
fi
|
|
||||||
# drop release utils snapshot
|
# drop release utils snapshot
|
||||||
if [[ -n $(aptly snapshot list -config="${CONFIG}" -raw | awk '{print $(NF)}' | grep "${release}-utils") ]]; then
|
if [[ -n $(aptly snapshot list -config="${CONFIG}" -raw | awk '{print $(NF)}' | grep "${release}-utils") ]]; then
|
||||||
aptly -config="${CONFIG}" snapshot drop ${release}-utils | sudo tee -a "${DEBUGFILE}" 2>/dev/null
|
aptly -config="${CONFIG}" snapshot drop ${release}-utils | sudo tee -a "${DEBUGFILE}" 2>/dev/null
|
||||||
@@ -120,7 +112,6 @@ publishing(){
|
|||||||
aptly -config="${CONFIG}" snapshot drop ${release}-desktop | sudo tee -a "${DEBUGFILE}" 2>/dev/null
|
aptly -config="${CONFIG}" snapshot drop ${release}-desktop | sudo tee -a "${DEBUGFILE}" 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
aptly -config="${CONFIG}" snapshot create ${release} from repo ${release} | sudo tee -a "${DEBUGFILE}" >/dev/null
|
|
||||||
aptly -config="${CONFIG}" snapshot create ${release}-utils from repo ${release}-utils | sudo tee -a "${DEBUGFILE}" >/dev/null
|
aptly -config="${CONFIG}" snapshot create ${release}-utils from repo ${release}-utils | sudo tee -a "${DEBUGFILE}" >/dev/null
|
||||||
aptly -config="${CONFIG}" snapshot create ${release}-desktop from repo ${release}-desktop | sudo tee -a "${DEBUGFILE}" >/dev/null
|
aptly -config="${CONFIG}" snapshot create ${release}-desktop from repo ${release}-desktop | sudo tee -a "${DEBUGFILE}" >/dev/null
|
||||||
|
|
||||||
@@ -133,8 +124,8 @@ publishing(){
|
|||||||
-origin="Armbian" \
|
-origin="Armbian" \
|
||||||
-label="Armbian" \
|
-label="Armbian" \
|
||||||
-config="${CONFIG}" \
|
-config="${CONFIG}" \
|
||||||
-component=main,${release},${release}-utils,${release}-desktop \
|
-component=main,${release}-utils,${release}-desktop \
|
||||||
-distribution="${release}" snapshot common ${release} ${release}-utils ${release}-desktop > /dev/null
|
-distribution="${release}" snapshot common ${release}-utils ${release}-desktop > /dev/null
|
||||||
done
|
done
|
||||||
# cleanup
|
# cleanup
|
||||||
aptly db cleanup -config="${CONFIG}"
|
aptly db cleanup -config="${CONFIG}"
|
||||||
@@ -173,8 +164,6 @@ case $3 in
|
|||||||
for release in "${DISTROS[@]}"; do
|
for release in "${DISTROS[@]}"; do
|
||||||
echo "<thead><tr><td colspan=3><h2>$release</h2></tr><tr><th>Main</th><th>Utils</th><th>Desktop</th></tr></thead>"
|
echo "<thead><tr><td colspan=3><h2>$release</h2></tr><tr><th>Main</th><th>Utils</th><th>Desktop</th></tr></thead>"
|
||||||
echo "<tbody><tr><td width=33% valing=top>"
|
echo "<tbody><tr><td width=33% valing=top>"
|
||||||
aptly repo show -with-packages -config="${CONFIG}" "${release}" | tail -n +7 | sed 's/.*/&<br>/'
|
|
||||||
echo "</td><td width=33% valign=top>" | sudo tee -a ${filename}
|
|
||||||
aptly repo show -with-packages -config="${CONFIG}" "${release}-utils" | tail -n +7 | sed 's/.*/&<br>/'
|
aptly repo show -with-packages -config="${CONFIG}" "${release}-utils" | tail -n +7 | sed 's/.*/&<br>/'
|
||||||
echo "</td><td width=33% valign=top>" | sudo tee -a ${filename}
|
echo "</td><td width=33% valign=top>" | sudo tee -a ${filename}
|
||||||
aptly repo show -with-packages -config="${CONFIG}" "${release}-desktop" | tail -n +7 | sed 's/.*/&<br>/'
|
aptly repo show -with-packages -config="${CONFIG}" "${release}-desktop" | tail -n +7 | sed 's/.*/&<br>/'
|
||||||
@@ -188,8 +177,6 @@ case $3 in
|
|||||||
echo "Deleting $6 from common"
|
echo "Deleting $6 from common"
|
||||||
aptly -config="${CONFIG}" repo remove common "$6"
|
aptly -config="${CONFIG}" repo remove common "$6"
|
||||||
for release in "${DISTROS[@]}"; do
|
for release in "${DISTROS[@]}"; do
|
||||||
echo "Deleting $6 from $release"
|
|
||||||
aptly -config="${CONFIG}" repo remove "${release}" "$6"
|
|
||||||
echo "Deleting $6 from $release-utils"
|
echo "Deleting $6 from $release-utils"
|
||||||
aptly -config="${CONFIG}" repo remove "${release}-utils" "$6"
|
aptly -config="${CONFIG}" repo remove "${release}-utils" "$6"
|
||||||
echo "Deleting $6 from $release-desktop"
|
echo "Deleting $6 from $release-desktop"
|
||||||
@@ -212,7 +199,6 @@ case $3 in
|
|||||||
LIST=()
|
LIST=()
|
||||||
LIST+=($(aptly repo show -with-packages -config="${CONFIG}" common | tail -n +7))
|
LIST+=($(aptly repo show -with-packages -config="${CONFIG}" common | tail -n +7))
|
||||||
for release in "${DISTROS[@]}"; do
|
for release in "${DISTROS[@]}"; do
|
||||||
LIST+=($(aptly repo show -with-packages -config="${CONFIG}" "${release}" | tail -n +7))
|
|
||||||
LIST+=($(aptly repo show -with-packages -config="${CONFIG}" "${release}-utils" | tail -n +7))
|
LIST+=($(aptly repo show -with-packages -config="${CONFIG}" "${release}-utils" | tail -n +7))
|
||||||
LIST+=($(aptly repo show -with-packages -config="${CONFIG}" "${release}-desktop" | tail -n +7))
|
LIST+=($(aptly repo show -with-packages -config="${CONFIG}" "${release}-desktop" | tail -n +7))
|
||||||
done
|
done
|
||||||
@@ -233,7 +219,6 @@ case $3 in
|
|||||||
if [[ $exitstatus -eq 0 ]]; then
|
if [[ $exitstatus -eq 0 ]]; then
|
||||||
aptly repo remove -config="${CONFIG}" "common" "$TARGET_VERSION"
|
aptly repo remove -config="${CONFIG}" "common" "$TARGET_VERSION"
|
||||||
for release in "${DISTROS[@]}"; do
|
for release in "${DISTROS[@]}"; do
|
||||||
aptly repo remove -config="${CONFIG}" "${release}" "$TARGET_VERSION"
|
|
||||||
aptly repo remove -config="${CONFIG}" "${release}-utils" "$TARGET_VERSION"
|
aptly repo remove -config="${CONFIG}" "${release}-utils" "$TARGET_VERSION"
|
||||||
aptly repo remove -config="${CONFIG}" "${release}-desktop" "$TARGET_VERSION"
|
aptly repo remove -config="${CONFIG}" "${release}-desktop" "$TARGET_VERSION"
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user