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
61
Issues
61
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
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
46430ceb
Commit
46430ceb
authored
Jan 20, 2009
by
Timo Teräs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pkg: use absolute filenames for packages
parent
aee61d0a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
src/package.c
src/package.c
+7
-2
No files found.
src/package.c
View file @
46430ceb
...
...
@@ -13,6 +13,7 @@
#include <fcntl.h>
#include <ctype.h>
#include <stdio.h>
#include <limits.h>
#include <malloc.h>
#include <string.h>
#include <stdlib.h>
...
...
@@ -325,12 +326,16 @@ struct apk_package *apk_pkg_read(struct apk_database *db, const char *file)
{
struct
read_info_ctx
ctx
;
struct
apk_bstream
*
bs
;
char
realfile
[
PATH_MAX
];
if
(
realpath
(
file
,
realfile
)
<
0
)
return
NULL
;
ctx
.
pkg
=
apk_pkg_new
();
if
(
ctx
.
pkg
==
NULL
)
return
NULL
;
bs
=
apk_bstream_from_file
(
file
);
bs
=
apk_bstream_from_file
(
real
file
);
if
(
bs
==
NULL
)
goto
err
;
...
...
@@ -355,7 +360,7 @@ struct apk_package *apk_pkg_read(struct apk_database *db, const char *file)
};
apk_deps_add
(
&
ctx
.
pkg
->
depends
,
&
dep
);
}
ctx
.
pkg
->
filename
=
strdup
(
file
);
ctx
.
pkg
->
filename
=
strdup
(
real
file
);
return
ctx
.
pkg
;
err:
...
...
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