Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
I
inary
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
1
Konular (issue)
1
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
inary
Commits
e1206b0f
Kaydet (Commit)
e1206b0f
authored
Haz 13, 2010
tarafından
Fatih Aşıcı
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
scripts: Update unpisi to extract using file objects
üst
727ba796
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
unpisi
scripts/unpisi
+6
-13
No files found.
scripts/unpisi
Dosyayı görüntüle @
e1206b0f
#!/usr/bin/python
#!/usr/bin/python
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
#
#
# Copyright (C) 2006, TUBITAK/UEKAE
# Copyright (C) 2006
-2010
, TUBITAK/UEKAE
#
#
# This program is free software; you can redistribute it and/or modify it under
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# the terms of the GNU General Public License as published by the Free
...
@@ -10,14 +10,13 @@
...
@@ -10,14 +10,13 @@
#
#
# Please read the COPYING file.
# Please read the COPYING file.
import
sys
import
os
import
os
import
shutil
import
sys
import
tempfile
from
zipfile
import
BadZipfile
from
zipfile
import
BadZipfile
import
pisi
import
pisi
from
pisi.archive
import
ArchiveZip
,
ArchiveTar
from
pisi.archive
import
ArchiveZip
,
ArchiveTar
import
pisi.context
as
ctx
import
pisi.util
as
util
import
pisi.util
as
util
def
usage
(
errmsg
):
def
usage
(
errmsg
):
...
@@ -44,20 +43,14 @@ def main():
...
@@ -44,20 +43,14 @@ def main():
print
e
print
e
sys
.
exit
(
1
)
sys
.
exit
(
1
)
# Create a temporary directory in /tmp
tempdir
=
tempfile
.
mkdtemp
(
prefix
=
'unpisi'
)
arc
.
unpack_files
([
'files.xml'
,
'metadata.xml'
],
'.'
)
arc
.
unpack_files
([
'files.xml'
,
'metadata.xml'
],
'.'
)
arc
.
unpack_files
(
"install.tar.lzma"
,
tempdir
)
arc
.
unpack_dir
(
'comar'
,
'.'
)
arc
.
unpack_dir
(
'comar'
,
'.'
)
tar_file
=
util
.
join_path
(
tempdir
,
"install.tar.lzma"
)
if
arc
.
has_file
(
ctx
.
const
.
install_tar_lzma
):
if
os
.
path
.
exists
(
tar_file
):
tar_file
=
arc
.
open
(
ctx
.
const
.
install_tar_lzma
)
tar
=
ArchiveTar
(
tar_file
,
'tarlzma'
)
tar
=
ArchiveTar
(
fileobj
=
tar_file
,
arch_type
=
'tarlzma'
)
tar
.
unpack_dir
(
'.'
)
tar
.
unpack_dir
(
'.'
)
os
.
unlink
(
tar_file
)
shutil
.
rmtree
(
tempdir
)
return
0
return
0
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
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