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
60
Issues
60
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
c51d82f8
Commit
c51d82f8
authored
Jun 18, 2013
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
url: fix fetching from local repositories
parent
01ec60f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
src/apk_io.h
src/apk_io.h
+3
-2
src/url.c
src/url.c
+3
-3
No files found.
src/apk_io.h
View file @
c51d82f8
...
...
@@ -13,6 +13,7 @@
#include <sys/types.h>
#include <openssl/evp.h>
#include <fcntl.h>
#include "apk_defines.h"
#include "apk_blob.h"
...
...
@@ -91,7 +92,7 @@ static inline struct apk_istream *apk_istream_from_fd(int fd)
}
static
inline
struct
apk_istream
*
apk_istream_from_url
(
const
char
*
url
)
{
return
apk_istream_from_fd_url
(
-
1
,
url
);
return
apk_istream_from_fd_url
(
AT_FDCWD
,
url
);
}
struct
apk_bstream
*
apk_bstream_from_istream
(
struct
apk_istream
*
istream
);
...
...
@@ -108,7 +109,7 @@ static inline struct apk_bstream *apk_bstream_from_fd(int fd)
static
inline
struct
apk_bstream
*
apk_bstream_from_url
(
const
char
*
url
)
{
return
apk_bstream_from_fd_url
(
-
1
,
url
);
return
apk_bstream_from_fd_url
(
AT_FDCWD
,
url
);
}
struct
apk_ostream
*
apk_ostream_to_fd
(
int
fd
);
...
...
src/url.c
View file @
c51d82f8
...
...
@@ -91,7 +91,7 @@ struct apk_istream *apk_istream_from_fd_url(int atfd, const char *url)
pid_t
pid
;
int
fd
;
if
(
a
tfd
>=
0
&&
a
pk_url_local_file
(
url
)
!=
NULL
)
if
(
apk_url_local_file
(
url
)
!=
NULL
)
return
apk_istream_from_file
(
atfd
,
apk_url_local_file
(
url
));
fd
=
fork_wget
(
url
,
&
pid
);
...
...
@@ -108,8 +108,8 @@ struct apk_bstream *apk_bstream_from_fd_url(int atfd, const char *url)
pid_t
pid
;
int
fd
;
if
(
a
tfd
>=
0
&&
apk_url_local_file
(
url
)
)
return
apk_bstream_from_file
(
atfd
,
url
);
if
(
a
pk_url_local_file
(
url
)
!=
NULL
)
return
apk_bstream_from_file
(
atfd
,
apk_url_local_file
(
url
)
);
fd
=
fork_wget
(
url
,
&
pid
);
return
apk_bstream_from_fd_pid
(
fd
,
pid
,
translate_wget
);
...
...
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