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
alpine-conf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
18
Issues
18
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
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
alpine-conf
Commits
c67ff255
Commit
c67ff255
authored
Jul 16, 2011
by
Jeff Bilyk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-bootable: rewrite apk cache section to...work
parent
0bb9e139
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
setup-bootable.in
setup-bootable.in
+14
-12
No files found.
setup-bootable.in
View file @
c67ff255
...
...
@@ -115,6 +115,10 @@ elif [ -b "$dest" ]; then
mount
"
$dest
"
"
$destdir
"
||
die
"Failed to mount
$dest
on
$destdir
"
umounts
=
"
$umounts
$destdir
"
fi
# Check for RO mounting
if
[
"
`
grep
\"
$destdir
\"
/proc/mount |
grep
'(ro,'
`
"
[
-n
"
$verbose
"
]
&&
echo
"Using
$dest
as target (mounted on
$destdir
)"
...
...
@@ -213,21 +217,19 @@ done
# Update the cache folder on destdir if present
if
[
-e
"
$destdir
"
/
*
.apkovl.tar.gz
]
&&
[
-e
"
$destdir
"
/cache
]
;
then
apkovlfile
=
"
`
ls
${
destdir
}
/
*
.apkovl.tar.gz |
head
-n
1
`
"
#Get first file apk/world
worldfile
=
"
`
tar
tzf
$apkovlfile
|
grep
apk/world |
head
-n
1
`
"
apkstofetch
=
"
`
cat
$worldfile
`
"
mkdir
"
$destdir
"
/tmp.cache
# If repository update suceeds, fetch copy of all apks in world
apk update
&&
apk fetch
-R
$apkstofetch
-o
"
$destdir
"
/tmp.cache
mv
/etc/apk/cache /etc/apk/cache.temp
ln
-s
"destdir"
/tmp.cache/ /etc/apk/cache
mkdir
"destdir"
/cache.old
mv
"
$destdir
"
/cache/
*
"
$destdir
"
/cache.old/
apk update
apk cache
sync
# Copy apks to cache dir if verify passes, then re-index
apk verify
"
$destdir
"
/tmp.cache/
*
.apk
&&
mv
"
$destdir
"
/tmp.cache/
*
.apk
"
$destdir
"
/cache/
&&
apk index
-o
"
$destdir
"
/cache/APKINDEX.tar.gz
"
$destdir
"
/cache/
*
.apk
if
[
"
`
ls
${
destdir
}
/tmp.cache
`
"
==
""
]
;
then
rm
-rf
"
$destdir
"
/tmp.cache
fi
mv
"
$destdir
"
/tmp.cache/
*
"
$destdir
"
/cache/
&&
rm
-rf
"
$destdir
"
/cache.old
rm
-rf
"
$destdir
"
/tmp.cache
fi
# cleanup
...
...
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