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
apk-tools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
62
Issues
62
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
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
apk-tools
Commits
cfdef51b
Commit
cfdef51b
authored
Jan 15, 2009
by
Timo Teräs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db: index file location is a URL
parent
4c7f1e0d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
3 deletions
+8
-3
TODO
TODO
+0
-2
src/apk_io.h
src/apk_io.h
+1
-0
src/database.c
src/database.c
+1
-1
src/url.c
src/url.c
+6
-0
No files found.
TODO
View file @
cfdef51b
...
...
@@ -6,8 +6,6 @@
- Compress 'installed' and 'scripts'
- Repository support:
- always keep local copy of index
- index/package fetching from URLs
- read from config file
- cache .apks on USB stick when using network repo for reboot
- Error handling and rollback
...
...
src/apk_io.h
View file @
cfdef51b
...
...
@@ -50,6 +50,7 @@ struct apk_istream *apk_istream_from_fd(int fd);
struct
apk_istream
*
apk_istream_from_file
(
const
char
*
file
);
struct
apk_istream
*
apk_istream_from_file_gz
(
const
char
*
file
);
struct
apk_istream
*
apk_istream_from_url
(
const
char
*
url
);
struct
apk_istream
*
apk_istream_from_url_gz
(
const
char
*
url
);
size_t
apk_istream_skip
(
struct
apk_istream
*
istream
,
size_t
size
);
size_t
apk_istream_splice
(
void
*
stream
,
int
fd
,
size_t
size
,
apk_progress_cb
cb
,
void
*
cb_ctx
);
...
...
src/database.c
View file @
cfdef51b
...
...
@@ -813,7 +813,7 @@ int apk_db_add_repository(apk_database_t _db, apk_blob_t repository)
};
snprintf
(
tmp
,
sizeof
(
tmp
),
"%s/APK_INDEX.gz"
,
db
->
repos
[
r
].
url
);
is
=
apk_istream_from_
file
_gz
(
tmp
);
is
=
apk_istream_from_
url
_gz
(
tmp
);
if
(
is
==
NULL
)
{
apk_error
(
"Failed to open index file %s"
,
tmp
);
return
-
1
;
...
...
src/url.c
View file @
cfdef51b
...
...
@@ -66,6 +66,11 @@ struct apk_istream *apk_istream_from_url(const char *url)
return
apk_istream_from_fd
(
fork_wget
(
url
));
}
struct
apk_istream
*
apk_istream_from_url_gz
(
const
char
*
file
)
{
return
apk_bstream_gunzip
(
apk_bstream_from_url
(
file
),
TRUE
);
}
struct
apk_bstream
*
apk_bstream_from_url
(
const
char
*
url
)
{
if
(
url_is_file
(
url
))
...
...
@@ -73,3 +78,4 @@ struct apk_bstream *apk_bstream_from_url(const char *url)
return
apk_bstream_from_fd
(
fork_wget
(
url
));
}
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