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
25
Issues
25
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
44247711
Commit
44247711
authored
Jun 03, 2009
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abuild: up2date handle apkcache properly
abuild will not consider package up2date unless apk cache is up2date
parent
2c907ddc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
8 deletions
+26
-8
abuild.in
abuild.in
+26
-8
No files found.
abuild.in
View file @
44247711
...
...
@@ -467,10 +467,11 @@ update_apkcache_index() {
}
apkcache
()
{
if
!
up2date
;
then
if
!
apk_up2date
||
[
-n
"
$force
"
]
;
then
sanitycheck
&&
builddeps
&&
clean
&&
fetch
&&
unpack
&&
rootpkg
||
return
1
fi
local
apk
mkdir
-p
"
$apkcache
"
||
return
1
set
--
for
apk
in
$(
listpkg
)
;
do
ln
-sf
"
$PKGDEST
"
/
$apk
"
$apkcache
"
/
$apk
...
...
@@ -572,7 +573,7 @@ srcpkg() {
}
# check if package is up to date
up2date
()
{
apk_
up2date
()
{
local
pkg
=
"
$PKGDEST
/
$pkgname
-
$pkgver
-r
$pkgrel
.apk"
local
i s
cd
"
$startdir
"
...
...
@@ -595,6 +596,19 @@ up2date() {
return
0
}
cache_up2date
()
{
local
i apk
for
i
in
$pkgname
$subpackages
;
do
apk
=
"
${
i
%
:
*
}
-
$pkgver
-r
$pkgrel
.apk"
[
"
$apkcache
"
/APK_INDEX.gz
-nt
"
$apkcache
"
/
$apk
]
||
return
1
done
return
0
}
up2date
()
{
apk_up2date
&&
cache_up2date
}
# source all APKBUILDs and output:
# 1) origin of package
# 2) all dependencies
...
...
@@ -854,7 +868,15 @@ installdeps() {
uninstalldeps
(){
sudo
apk del .makedepends-
$pkgname
}
all
()
{
if
up2date
&&
[
-z
"
$force
"
]
;
then
msg
"Package is up to date"
else
apkcache
fi
}
usage
()
{
echo
"
$(
basename
$0
)
$abuild_ver
"
echo
"usage:
${
0
##*/
}
[options] [-i PKG] [-P REPODEST] [-p PKGDEST]"
...
...
@@ -947,11 +969,7 @@ if [ -z "$1" ] && [ -n "$newname" ]; then
fi
if
[
-z
"
$1
"
]
;
then
if
up2date
&&
[
-z
"
$force
"
]
;
then
msg
"Package is up to date"
else
set
$default_cmds
fi
set
all
fi
while
[
$#
-gt
0
]
;
do
...
...
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