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)
0
Konular (issue)
0
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
0a0982a0
Kaydet (Commit)
0a0982a0
authored
Haz 13, 2006
tarafından
Eray Özkural
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
* a little less verbosity
* fix: downgrading to old upstream release is OK.
üst
d3392980
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
atomicoperations.py
pisi/atomicoperations.py
+8
-7
file.py
pisi/file.py
+3
-3
No files found.
pisi/atomicoperations.py
Dosyayı görüntüle @
0a0982a0
...
...
@@ -221,12 +221,13 @@ class Install(AtomicOperation):
# is this a downgrade? confirm this action.
if
self
.
ask_reinstall
and
(
not
upgrade
):
if
Version
(
pkg
.
version
)
<
Version
(
iversion
):
x
=
_
(
'Downgrade to old upstream version?'
)
#x = _('Downgrade to old upstream version?')
x
=
None
elif
Version
(
pkg
.
release
)
<
Version
(
irelease
):
x
=
_
(
'Downgrade to old distribution release?'
)
else
:
x
=
_
(
'Downgrade to old distribution build?'
)
if
not
ctx
.
ui
.
confirm
(
x
):
if
x
and
not
ctx
.
ui
.
confirm
(
x
):
raise
Error
(
_
(
'Package downgrade declined'
))
# schedule for reinstall
...
...
@@ -288,17 +289,17 @@ class Install(AtomicOperation):
if
self
.
reinstall
:
util
.
clean_dir
(
self
.
old_path
)
ctx
.
ui
.
info
(
_
(
'Storing
%
s, '
)
%
ctx
.
const
.
files_xml
)
ctx
.
ui
.
info
(
_
(
'Storing
%
s, '
)
%
ctx
.
const
.
files_xml
,
verbose
=
True
)
self
.
package
.
extract_file
(
ctx
.
const
.
files_xml
,
self
.
package
.
pkg_dir
())
ctx
.
ui
.
info
(
_
(
'Storing
%
s.'
)
%
ctx
.
const
.
metadata_xml
)
ctx
.
ui
.
info
(
_
(
'Storing
%
s.'
)
%
ctx
.
const
.
metadata_xml
,
verbose
=
True
)
self
.
package
.
extract_file
(
ctx
.
const
.
metadata_xml
,
self
.
package
.
pkg_dir
())
for
pcomar
in
self
.
metadata
.
package
.
providesComar
:
fpath
=
os
.
path
.
join
(
ctx
.
const
.
comar_dir
,
pcomar
.
script
)
# comar prefix is added to the pkg_dir while extracting comar
# script file. so we'll use pkg_dir as destination.
ctx
.
ui
.
info
(
_
(
'Storing
%
s'
)
%
fpath
)
ctx
.
ui
.
info
(
_
(
'Storing
%
s'
)
%
fpath
,
verbose
=
True
)
self
.
package
.
extract_file
(
fpath
,
self
.
package
.
pkg_dir
())
def
register_comar_scripts
(
self
):
...
...
@@ -345,10 +346,10 @@ class Install(AtomicOperation):
break
if
not
ctx
.
get_option
(
'bypass_ldconfig'
):
if
shared
:
ctx
.
ui
.
info
(
_
(
"Regenerating /etc/ld.so.cache..."
))
ctx
.
ui
.
info
(
_
(
"Regenerating /etc/ld.so.cache..."
)
,
verbose
=
True
)
util
.
env_update
()
else
:
ctx
.
ui
.
warning
(
_
(
"Bypassing ldconfig"
)
)
ctx
.
ui
.
info
(
_
(
"Bypassing ldconfig"
),
verbose
=
True
)
def
install_single
(
pkg
,
upgrade
=
False
):
"""install a single package from URI or ID"""
...
...
pisi/file.py
Dosyayı görüntüle @
0a0982a0
...
...
@@ -15,7 +15,7 @@
generic file abstraction that allows us to use URIs for everything
we support only the simple read case ATM
we are just encapsulating a common pattern in our program, nothing big.
like all pisi classes, it has been programmed in a non-restricti
ng
way
like all pisi classes, it has been programmed in a non-restricti
ve
way
"""
import
os
...
...
@@ -115,12 +115,12 @@ class File:
raise
AlreadyHaveException
(
uri
,
localfile
)
if
uri
.
is_remote_file
():
ctx
.
ui
.
info
(
_
(
"Fetching
%
s"
)
%
uri
.
get_uri
())
ctx
.
ui
.
info
(
_
(
"Fetching
%
s"
)
%
uri
.
get_uri
()
,
verbose
=
True
)
fetch_url
(
uri
,
transfer_dir
)
else
:
# copy to transfer dir,
localfile
=
join
(
transfer_dir
,
uri
.
filename
())
ctx
.
ui
.
info
(
_
(
"Copying
%
s to transfer dir"
)
%
uri
.
get_uri
())
ctx
.
ui
.
info
(
_
(
"Copying
%
s to transfer dir"
)
%
uri
.
get_uri
()
,
verbose
=
True
)
shutil
.
copy
(
uri
.
get_uri
(),
transfer_dir
)
else
:
localfile
=
uri
.
get_uri
()
#TODO: use a special function here?
...
...
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