Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johannes Müller
aports
Commits
64890559
Commit
64890559
authored
15 years ago
by
Natanael Copa
Browse files
Options
Downloads
Patches
Plain Diff
core/abuild: fix for buildrepo
parent
24ae3932
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/abuild/APKBUILD
+6
-2
6 additions, 2 deletions
core/abuild/APKBUILD
core/abuild/buildrepo.patch
+50
-0
50 additions, 0 deletions
core/abuild/buildrepo.patch
with
56 additions
and
2 deletions
core/abuild/APKBUILD
+
6
−
2
View file @
64890559
...
...
@@ -2,17 +2,21 @@
pkgdesc
=
"Script to build Alpine Packages"
pkgname
=
abuild
pkgver
=
1.15.1
pkgrel
=
0
pkgrel
=
1
url
=
http://git.alpinelinux.org/cgit/abuild/
source
=
"http://git.alpinelinux.org/cgit/abuild/snapshot/abuild-
$pkgver
.tar.bz2
buildrepo.patch
"
depends
=
"fakeroot file sudo"
license
=
GPL-2
build
()
{
cd
"
$srcdir
/
$pkgname
-
$pkgver
"
patch
-p1
< ../buildrepo.patch
||
return
1
make
install
DESTDIR
=
"
$pkgdir
"
install
-m
644 abuild.conf
"
$pkgdir
"
/etc/abuild.conf
}
md5sums
=
"ad7db0b6112bed7418a8aef97f20aed5 abuild-1.15.1.tar.bz2"
md5sums
=
"ad7db0b6112bed7418a8aef97f20aed5 abuild-1.15.1.tar.bz2
465280f43fd69fa0949bc8f1ce67ab39 buildrepo.patch"
This diff is collapsed.
Click to expand it.
core/abuild/buildrepo.patch
0 → 100644
+
50
−
0
View file @
64890559
commit 896c436e140a4888c59135c7a2238e2ec4861632
Author: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu Jun 4 12:22:48 2009 +0000
buildrepo: check if all files exist before try copy anything
seems like copy removes destination if source does not exist so
we ended up with a buildrepo that removed all packages
diff --git a/buildrepo.in b/buildrepo.in
index 5b4133d..2be50e1 100755
--- a/buildrepo.in
+++ b/buildrepo.in
@@ -28,6 +28,14 @@
listpackages() {
done
}
+all_exist() {
+ while [ $# -gt 0 ]; do
+ [ -e "$1" ] || return 1
+ shift 1
+ done
+ return 0
+}
+
build() {
local repo="$1" i indexupdate needbuild
@@ -47,15 +55,18 @@
build() {
continue
fi
+ indexupdate="$indexupdate $i"
+
# try link or copy the files if they are in the ports dir
pkgs=$(abuild listpkg)
- if cp -p -l $pkgs "$repodir/$repo"/ 2>/dev/null \
- || cp -p $pkgs "$repodir/$repo"/ 2>/dev/null; then
+ if all_exist $pkgs; then
echo ">>> Copying " $pkgs
+ cp -p -l $pkgs "$repodir/$repo"/ 2>/dev/null \
+ || cp -p $pkgs "$repodir/$repo"/ \
+ || needbuild="$needbuild $i"
else
needbuild="$needbuild $i"
fi
- indexupdate="$indexupdate $i"
done
# build the postponed packages if any
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment