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
3afd8486
Kaydet (Commit)
3afd8486
authored
May 11, 2020
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Update inary/atomicoperations.py
üst
0fdce424
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
34 deletions
+0
-34
atomicoperations.py
inary/atomicoperations.py
+0
-34
No files found.
inary/atomicoperations.py
Dosyayı görüntüle @
3afd8486
...
...
@@ -341,42 +341,11 @@ class Install(AtomicOperation):
ctx
.
ui
.
notify
(
inary
.
ui
.
extracting
,
package
=
self
.
pkginfo
,
files
=
self
.
files
)
config_changed
=
[]
def
check_config_changed
(
config
):
fpath
=
util
.
join_path
(
ctx
.
config
.
dest_dir
(),
config
.
path
)
if
util
.
config_changed
(
config
):
config_changed
.
append
(
fpath
)
self
.
historydb
.
save_config
(
self
.
pkginfo
.
name
,
fpath
)
if
os
.
path
.
exists
(
fpath
+
'.old-byinary'
):
os
.
unlink
(
fpath
+
'.old-byinary'
)
os
.
rename
(
fpath
,
fpath
+
'.old-byinary'
)
# old config files are kept as they are. New config files from the installed
# packages are saved with ".newconfig" string appended to their names.
def
rename_configs
():
for
path
in
config_changed
:
newconfig
=
path
+
'.newconfig-byinary'
oldconfig
=
path
+
'.old-byinary'
if
os
.
path
.
exists
(
newconfig
):
os
.
unlink
(
newconfig
)
# In the case of delta packages: the old package and the new package
# may contain same config typed files with same hashes, so the delta
# package will not have that config file. In order to protect user
# changed config files, they are renamed with ".old-byinary" prefix in case
# of the hashes of these files on the filesystem and the new config
# file that is coming from the new package. But in delta package case
# with the given scenario there wont be any, so we can pass this one.
# If the config files were not be the same between these packages the
# delta package would have it and extract it and the path would point
# to that new config file. If they are same and the user had changed
# that file and using the changed config file, there is no problem
# here.
if
os
.
path
.
exists
(
path
):
os
.
rename
(
path
,
newconfig
)
os
.
rename
(
oldconfig
,
path
)
# Package file's path may not be relocated or content may not be changed but
# permission may be changed
...
...
@@ -502,9 +471,6 @@ class Install(AtomicOperation):
self
.
package
.
extract_install
(
ctx
.
config
.
dest_dir
())
if
config_changed
:
rename_configs
()
if
self
.
reinstall
():
clean_leftovers
()
...
...
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