Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
abuild
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
24
Issues
24
List
Boards
Labels
Service Desk
Milestones
Merge Requests
17
Merge Requests
17
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
abuild
Commits
61125579
Commit
61125579
authored
Feb 11, 2009
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
buildrepo: copy files from aports if already built.
and dont build index if its not needed
parent
bcb440d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
5 deletions
+38
-5
buildrepo
buildrepo
+38
-5
No files found.
buildrepo
View file @
61125579
...
...
@@ -40,18 +40,48 @@ purge() {
}
build
()
{
local
repo
=
"
$1
"
i
local
repo
=
"
$1
"
i
indexupdate needbuild
cd
"
$aportsdir
/
$repo
"
||
return
1
mkdir
-p
"
$repodir
/
$repo
"
# first we try copy everything possible and find out which we need
# to rebuild. By doing this we might save us for rebuilding
# needed when running 'abuild -R'
for
i
in
*
/APKBUILD
;
do
(
cd
${
i
%/*
}
||
return
1
REPODEST
=
"
$repodir
"
abuild
-k
-r
||
return
1
)
||
return
1
export
REPODEST
=
"
$repodir
"
cd
"
$aportsdir
/
$repo
"
/
${
i
%/*
}
||
return
1
if
abuild
-k
-q
up2date 2>/dev/null
;
then
continue
fi
# 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
echo
">>> Copying "
$pkgs
else
needbuild
=
"
$needbuild
$i
"
fi
indexupdate
=
"
$indexupdate
$i
"
done
if
[
-z
"
$indexupdate
"
]
&&
[
-z
"
$needbuild
"
]
;
then
echo
">>> Repository
$repo
is up-to-date."
return
0
fi
# build the postponed packages if any
if
[
-n
"
$needbuild
"
]
;
then
for
i
in
$needbuild
;
do
cd
"
$aportsdir
/
$repo
"
/
${
i
%/*
}
||
return
1
abuild
-k
-R
||
return
1
done
fi
# generate the repository index
cd
"
$repodir
/
$repo
"
echo
">>> Generating Index..."
echo
">>> Generating Index
for
$repo
..."
md5sum
*
.apk |
gzip
-9
>
INDEX.md5.gz
if
which apk
>
/dev/null
;
then
local
deps
...
...
@@ -60,6 +90,8 @@ build() {
done
apk
$deps
index
*
.apk |
gzip
-9
>
APK_INDEX.gz
fi
# kill old packages in repo
purge
"
$repo
"
}
...
...
@@ -83,6 +115,7 @@ while [ $# -gt 0 ]; do
else
build
$1
||
exit
1
fi
deprepo
=
"
$deprepo
$1
"
shift
done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment