Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adélie Linux
apkkit
Commits
6b907444
Commit
6b907444
authored
Apr 24, 2016
by
A. Wilcox
🦊
Browse files
APKFile: More reliably determine if any files are present
parent
ce8b474a
Changes
1
Hide whitespace changes
Inline
Side-by-side
apkkit/io/apkfile.py
View file @
6b907444
...
...
@@ -204,10 +204,14 @@ def _make_data_tgz(datadir, mode, package, my_filter=None):
format
=
tarfile
.
PAX_FORMAT
)
as
data
:
for
item
in
glob
.
glob
(
datadir
+
'/*'
):
data
.
add
(
item
,
arcname
=
os
.
path
.
basename
(
item
),
filter
=
my_filter
)
members
=
[
member
for
member
in
data
.
getmembers
()
if
member
.
isfile
()]
package
.
size
=
fdfile
.
tell
()
if
package
.
size
<=
10240
:
if
len
(
members
)
==
0
:
return
None
fdfile
.
seek
(
0
,
2
)
package
.
size
=
fdfile
.
tell
()
LOGGER
.
info
(
'Hashing data.tar [pass 1]...'
)
fdfile
.
seek
(
0
)
abuild_pipe
=
Popen
([
'abuild-tar'
,
'--hash'
],
stdin
=
fdfile
,
...
...
Write
Preview
Supports
Markdown
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