Skip to content

Commit

Permalink
Merge branch 'rebuild-todo-pkgctl'
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-heusel committed Jun 17, 2024
2 parents 4f03123 + 7c3deb4 commit d50ec7b
Showing 1 changed file with 16 additions and 31 deletions.
47 changes: 16 additions & 31 deletions package/rebuild-todo
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ usage() {
--no-bump Don't bump pkgrel before building (default bumps pkgrel)
--testing Publish towards testing
--staging Publish towards staging
--skip-broken Skip broken packages
Repository Filters (default: $REPO)
--core Rebuild [core] packages
--extra Rebuild [extra] packages
--community Rebuild [community] packages
--multilib Rebuild [multilib] packages
Examples:
Rebuilds all packages in [community] towards [community] ignoring "archlinux-contrib"
Rebuilds all packages in [extra] towards [extra] ignoring "archlinux-contrib"
$ ${PROGNAME} -i "archlinux-contrib" "https://archlinux.org/todo/some-todo-list/"
Rebuilds all packages from [extra] towards [extra-testing]
Expand All @@ -63,13 +63,13 @@ NO_BUILD=0
PACKAGES=0
NO_PUBLISH=0
EDIT_PKGBUILD=0
COMMUNITY=1
CONTINUE=0
SKIP_BROKEN=0
URL=""
REPO="community"
REPO="extra"
BUILD="extra"
message=""
filter=("community")
filter=("extra")
maintainers=()
packages=()
ignore=()
Expand Down Expand Up @@ -117,30 +117,23 @@ while ((${#})); do
--no-publish)
NO_PUBLISH=1
;;
--skip-broken)
SKIP_BROKEN=1
;;
--core)
PACKAGES=1
COMMUNITY=0
BUILD="extra"
REPO="core"
filter=("extra")
;;
--extra)
PACKAGES=1
COMMUNITY=0
BUILD="extra"
REPO="extra"
filter=("extra")
;;
--community)
PACKAGES=0
COMMUNITY=1
BUILD="extra"
REPO="community"
filter=("community")
;;
--multilib)
PACKAGES=0
COMMUNITY=1
REPO="multilib"
BUILD="multilib"
filter=("multilib")
Expand Down Expand Up @@ -235,22 +228,10 @@ printf ' %s\n' "${packages[@]}"
printf "Confirm..."
read <&1

if ((COMMUNITY)); then
svn checkout -N svn+ssh://svn-community@repos.archlinux.org/srv/repos/svn-community/svn "$TMPDIR/community"
pushd "$TMPDIR/community" &>/dev/null
fi
if ((PACKAGES)); then
svn checkout -N svn+ssh://svn-packages@repos.archlinux.org/srv/repos/svn-packages/svn "$TMPDIR/packages"
pushd "$TMPDIR/packages" &>/dev/null
fi
svn update -- "${packages[@]}"
pkgctl repo clone "${packages[@]}"

for pkg in "${packages[@]}"; do
pushd "$pkg/trunk" &>/dev/null

if ! ((NO_BUMP)); then
bump_pkgrel
fi
pushd "$pkg" &>/dev/null

# This should help us figure out if the package is already built
readarray -t pkgs < <(makepkg --packagelist)
Expand All @@ -263,7 +244,11 @@ for pkg in "${packages[@]}"; do
if ! ((NO_BUILD)); then
SKIP_BUILD=0
while true; do
if offload-build -r "$BUILD"; then
if pkgctl build --rebuild --staging; then
break
fi
if ((SKIP_BROKEN)); then
SKIP_BUILD=1
break
fi
echo "We failed to build! You are in a subshell to fix the build. Exit the shell to build again."
Expand All @@ -280,7 +265,7 @@ for pkg in "${packages[@]}"; do
fi
fi
if ! ((NO_PUBLISH)); then
commitpkg "$REPO" "$message"
pkgctl release --db-update --staging -m "$message"
fi
fi
popd &>/dev/null
Expand Down

0 comments on commit d50ec7b

Please sign in to comment.