Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
arch-historical-archive
Commits
a1e5cccf
Unverified
Commit
a1e5cccf
authored
Jan 15, 2020
by
Jelle van der Waa
🚧
Committed by
GitHub
Jan 15, 2020
Browse files
Merge pull request #3 from archlinux/zst
Support .zst files by using xtarfile
parents
4c605a56
fc1da784
Changes
1
Hide whitespace changes
Inline
Side-by-side
upload_pkg_internetarchive.py
View file @
a1e5cccf
...
...
@@ -3,7 +3,7 @@
import
sys
import
os
import
re
import
tarfile
import
xtarfile
as
tarfile
import
traceback
import
internetarchive
as
ia
...
...
@@ -39,7 +39,7 @@ class ArchiveUploader:
def
extract_pkginfo
(
self
,
package
):
"""Given a package (.tar.xz filename), extract and parse its .PKGINFO file as a dict"""
with
tarfile
.
open
(
package
,
mode
=
'r
|*'
,
encoding
=
'utf-8
'
)
as
tar
:
with
tarfile
.
open
(
package
,
mode
=
'r'
)
as
tar
:
# Manual seeking to find .PKGINFO without having to uncompress the whole package
while
True
:
f
=
tar
.
next
()
...
...
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