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
6c4b2772
Kaydet (Commit)
6c4b2772
authored
Şub 10, 2018
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Written basic type distupdate module and bug fixes
üst
e71388e8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
35 deletions
+39
-35
.travis.yml
.travis.yml
+1
-10
distupdate.py
inary/cli/distupdate.py
+9
-8
distupdate.py
inary/operations/distupdate.py
+8
-3
reactor.py
inary/reactor.py
+9
-2
createrepo.py
tests/repos/createrepo.py
+12
-12
No files found.
.travis.yml
Dosyayı görüntüle @
6c4b2772
...
...
@@ -9,13 +9,4 @@ install: "pip install -r requirements.txt"
script
:
-
./setup.py install --root=/tmp/install-root
# prevent repoman tests from trying to fetch metadata.xsd
# mkdir -p /tmp/install-root/usr/lib/portage/cnf
# cp repoman/cnf/metadata.xsd /tmp/install-root/usr/lib/portage/cnf/
# sudo rsync -a /tmp/install-root/. /
# python -b -Wd -m portage.tests.runTests
# repoman test block
# repoman/setup.py test
# repoman/setup.py install --root=/tmp/install-root
# sudo rsync -a /tmp/install-root/. /
# python -b -Wd -m repoman.tests.runTests
-
./tests/run.py
inary/cli/distupdate.py
Dosyayı görüntüle @
6c4b2772
...
...
@@ -24,7 +24,7 @@ import inary.db
class
DistUpdate
(
command
.
PackageOp
,
metaclass
=
command
.
autocommand
):
__doc__
=
_
(
"""Update the system a new release
Usage:
DistUpdate [ next_dist_release_repo_url ] [ dist-update-list ]
Usage:
dist-update [ next_dist_release_repo_url ]
WARNING: DIST-UPDATE risk içerir.
Dist-Update yapmadan önce iki kez düşününüz. Çünkü
...
...
@@ -50,8 +50,6 @@ Usage: DistUpdate [ next_dist_release_repo_url ] [ dist-update-list ]
group
=
optparse
.
OptionGroup
(
self
.
parser
,
_
(
"dist-update options"
))
super
(
Upgrade
,
self
)
.
options
(
group
)
group
.
add_option
(
"--security-only"
,
action
=
"store_true"
,
default
=
False
,
help
=
_
(
"Security related package upgrades only"
))
group
.
add_option
(
"-x"
,
"--exclude"
,
action
=
"append"
,
default
=
None
,
help
=
_
(
"When upgrading system, ignore packages and components whose basenames match pattern."
))
group
.
add_option
(
"--exclude-from"
,
action
=
"store"
,
...
...
@@ -65,8 +63,11 @@ Usage: DistUpdate [ next_dist_release_repo_url ] [ dist-update-list ]
self
.
parser
.
add_option_group
(
group
)
def
run
(
self
):
self
.
init
()
argv
=
[]
argv
.
extend
(
self
.
args
)
targetrepo
=
argv
[
1
]
Reactor
.
distupdate
(
targetrepo
)
if
len
(
self
.
args
)
>
1
:
self
.
init
()
for
arg
in
self
.
args
:
if
arg
.
endswith
(
".xml"
)
or
arg
.
endswith
(
"xml.xz"
):
targetrepo
=
arg
break
Reactor
.
distupdate
(
targetrepo
)
inary/operations/distupdate.py
Dosyayı görüntüle @
6c4b2772
...
...
@@ -20,7 +20,7 @@ import inary.context as ctx
defaultForceInstallPackageURI
=
"http://packages.sulin.org/main/force-install.list"
class
Dist
u
pdatePlanner
:
class
Dist
U
pdatePlanner
:
def
__init__
(
self
,
nextRepoUri
,
forceInstallUri
=
defaultForceInstallPackageURI
,
Debug
=
False
):
self
.
debug
=
Debug
self
.
forceInstallUri
=
forceInstallUri
...
...
@@ -292,5 +292,10 @@ class DistupdatePlanner:
self
.
calculateNextRepoSize
()
self
.
calculeNeededSpace
()
class
MakeDistUpdate
():
pass
def
MakeDistUpdate
():
try
:
inary
.
operations
.
upgrade
.
upgrade
(
packages
,
'distuprepo'
)
#FIXME: Should write a detailed
# upgrade system
except
:
raise
Error
(
_
(
'A problem occured'
))
# FIXME: When not complete distupdate
# inary make takeback
inary/reactor.py
Dosyayı görüntüle @
6c4b2772
...
...
@@ -342,7 +342,7 @@ def upgrade(packages=[], repo=None):
return
inary
.
operations
.
upgrade
.
upgrade
(
packages
,
repo
)
def
distupdate
(
targetrepo
):
weddingplanner
=
inary
.
operations
.
distupdate
.
Dist
u
pdatePlanner
(
nextRepoUri
=
targetrepo
,
Debug
=
True
)
weddingplanner
=
inary
.
operations
.
distupdate
.
Dist
U
pdatePlanner
(
nextRepoUri
=
targetrepo
,
Debug
=
True
)
weddingplanner
.
plan
()
ctx
.
ui
.
info
(
inary
.
util
.
colorize
(
_
(
"*** Conclusion ***"
),
"red"
))
...
...
@@ -359,7 +359,14 @@ def distupdate(targetrepo):
ctx
.
ui
.
info
(
_
(
" biggest package size {}"
)
.
format
(
weddingplanner
.
sizeOfBiggestPackage
))
ctx
.
ui
.
info
(
_
(
" total space needed for distupdate {}"
)
.
format
(
weddingplanner
.
sizeOfNeededTotalSpace
))
if
ctx
.
ui
.
confirm
(
str
(
_
(
'Do you want make dist-update?'
))):
if
ctx
.
ui
.
confirm
(
str
(
_
(
'Do you want make dist update?'
))):
for
repo
in
inary
.
db
.
repodb
.
RepoDB
()
.
list_repos
():
repodb
.
remove_repo
(
repo
)
inary
.
db
.
flush_caches
()
ctx
.
ui
.
debug
(
_
(
'Repo {} removed from system.'
)
.
format
(
name
))
add_repo
(
'distuprepo'
,
targetrepo
)
update_repo
([
'distuprepo'
])
inary
.
operations
.
distupdate
.
MakeDistUpdate
()
...
...
tests/repos/createrepo.py
Dosyayı görüntüle @
6c4b2772
...
...
@@ -133,13 +133,13 @@ class Package:
def
get_spec_template
(
self
):
package
=
self
.
name
homepage
=
"www.
pardus.org.tr
"
packager_name
=
"
Joe Packager
"
packager_email
=
"
joe@pardus.org.tr
"
summary
=
"
%
s is a
very useful
package"
%
self
.
name
description
=
"
%
s is a
very useful package that is known for its usefulnes
s."
%
self
.
name
homepage
=
"www.
sulin.org
"
packager_name
=
"
Inary Testers
"
packager_email
=
"
developers@sulin.org
"
summary
=
"
%
s is a
test
package"
%
self
.
name
description
=
"
%
s is a
test package for testing repositorie
s."
%
self
.
name
sha1sum
=
"cc64dfa6e068fe1f6fb68a635878b1ea21acfac7"
archive
=
"http://
cekirdek.uludag.org.tr/~faik/spam
/skeleton.tar.gz"
archive
=
"http://
dev.sulin.org/inary
/skeleton.tar.gz"
date
=
time
.
strftime
(
"
%
Y-
%
m-
%
d"
)
partof
=
self
.
partof
...
...
@@ -216,7 +216,7 @@ class Repository:
open
(
"components.xml"
,
"w"
)
.
write
(
xml_content
)
class
Pardus2007
Repo
(
Repository
):
class
Main
Repo
(
Repository
):
def
__init__
(
self
):
Repository
.
__init__
(
self
,
"main-2018"
,
"2018"
,
[],
[
"wengophone"
,
"rar"
])
...
...
@@ -245,9 +245,9 @@ class Pardus2007Repo(Repository):
Repository
.
create
(
self
)
class
Contrib
2007
Repo
(
Repository
):
class
ContribRepo
(
Repository
):
def
__init__
(
self
):
Repository
.
__init__
(
self
,
"contrib-20
07"
,
"2007
"
,
[],
[
"xara"
])
Repository
.
__init__
(
self
,
"contrib-20
18"
,
"2018
"
,
[],
[
"xara"
])
def
create
(
self
):
...
...
@@ -283,6 +283,6 @@ class BuildFarm:
self
.
create_index
(
repo
)
if
__name__
==
"__main__"
:
Pardus2007
Repo
()
.
create
()
Contrib
2007
Repo
()
.
create
()
BuildFarm
()
.
build
([
"
pardus-2007"
,
"contrib-2007
"
,
"repo1"
,
"repo2"
])
Main
Repo
()
.
create
()
ContribRepo
()
.
create
()
BuildFarm
()
.
build
([
"
main-2018"
,
"contrib-2018
"
,
"repo1"
,
"repo2"
])
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