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
1b5bcbd5
Kaydet (Commit)
1b5bcbd5
authored
Agu 07, 2019
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Main branch was returned this side.
tüm geliştirmelerin parça parça koda yedirilmesi için kod yeri çekildi.
üst
d0d311be
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
36 additions
and
72 deletions
+36
-72
archive.py
inary/archive.py
+1
-1
command.py
inary/cli/command.py
+1
-1
history.py
inary/cli/history.py
+1
-1
history.py
inary/operations/history.py
+1
-1
install.py
inary/operations/install.py
+1
-1
upgrade.py
inary/operations/upgrade.py
+1
-1
package.py
inary/package.py
+1
-1
__init__.py
inary/scenarioapi/__init__.py
+0
-3
actions.py
inary/scenarioapi/actions.py
+1
-0
constants.py
inary/scenarioapi/constants.py
+1
-3
inaryops.py
inary/scenarioapi/inaryops.py
+1
-9
package.py
inary/scenarioapi/package.py
+5
-7
pspec.py
inary/scenarioapi/pspec.py
+4
-6
repoops.py
inary/scenarioapi/repoops.py
+3
-8
scenario.py
inary/scenarioapi/scenario.py
+3
-5
withops.py
inary/scenarioapi/withops.py
+11
-24
No files found.
inary/archive.py
Dosyayı görüntüle @
1b5bcbd5
...
...
@@ -928,7 +928,7 @@ class SourceArchive:
# check hash
if
util
.
check_file_hash
(
self
.
archiveFile
,
self
.
archive
.
sha1sum
):
if
interactive
:
ctx
.
ui
.
info
(
_
(
'{} [cached]'
)
.
format
(
self
.
archive
.
name
)
,
noln
=
True
)
ctx
.
ui
.
info
(
_
(
'{} [cached]'
)
.
format
(
self
.
archive
.
name
))
return
True
return
False
...
...
inary/cli/command.py
Dosyayı görüntüle @
1b5bcbd5
...
...
@@ -205,7 +205,7 @@ class PackageOp(Command):
def
__init__
(
self
,
args
):
super
(
PackageOp
,
self
)
.
__init__
(
args
)
self
.
scom
=
Fals
e
self
.
scom
=
Tru
e
def
options
(
self
,
group
):
group
.
add_option
(
"--ignore-dependency"
,
action
=
"store_true"
,
...
...
inary/cli/history.py
Dosyayı görüntüle @
1b5bcbd5
...
...
@@ -12,11 +12,11 @@
# Please read the COPYING file.
#
import
gettext
import
optparse
import
os
import
sys
import
gettext
__trans
=
gettext
.
translation
(
'inary'
,
fallback
=
True
)
_
=
__trans
.
gettext
...
...
inary/operations/history.py
Dosyayı görüntüle @
1b5bcbd5
...
...
@@ -209,7 +209,7 @@ def takeback(operation):
errors
=
[]
paths
=
[]
for
pkg
in
beinstalled
:
ctx
.
ui
.
info
(
_
(
"
\n
Downloading
%
d /
%
d"
)
%
(
beinstalled
.
index
(
pkg
)
+
1
,
len
(
beinstalled
)),
color
=
"yellow"
)
ctx
.
ui
.
info
(
_
(
"Downloading
%
d /
%
d"
)
%
(
beinstalled
.
index
(
pkg
)
+
1
,
len
(
beinstalled
)),
color
=
"yellow"
)
pkg
+=
ctx
.
const
.
package_suffix
if
fetch_remote_file
(
pkg
,
errors
):
paths
.
append
(
os
.
path
.
join
(
ctx
.
config
.
cached_packages_dir
(),
pkg
))
...
...
inary/operations/install.py
Dosyayı görüntüle @
1b5bcbd5
...
...
@@ -97,7 +97,7 @@ def install_pkg_names(A, reinstall=False, extra=False):
paths
=
[]
extra_paths
=
{}
for
x
in
order
:
ctx
.
ui
.
info
(
_
(
"
\n
Downloading
%
d /
%
d"
)
%
(
order
.
index
(
x
)
+
1
,
len
(
order
)),
color
=
"yellow"
)
ctx
.
ui
.
info
(
_
(
"Downloading
%
d /
%
d"
)
%
(
order
.
index
(
x
)
+
1
,
len
(
order
)),
color
=
"yellow"
)
install_op
=
atomicoperations
.
Install
.
from_name
(
x
)
paths
.
append
(
install_op
.
package_fname
)
if
x
in
extra_packages
or
(
extra
and
x
in
A
):
...
...
inary/operations/upgrade.py
Dosyayı görüntüle @
1b5bcbd5
...
...
@@ -216,7 +216,7 @@ def upgrade(A=None, repo=None):
paths
=
[]
for
x
in
order
:
ctx
.
ui
.
info
(
_
(
"
\n
Downloading
%
d /
%
d"
)
%
(
order
.
index
(
x
)
+
1
,
len
(
order
)),
color
=
"yellow"
)
ctx
.
ui
.
info
(
_
(
"Downloading
%
d /
%
d"
)
%
(
order
.
index
(
x
)
+
1
,
len
(
order
)),
color
=
"yellow"
)
install_op
=
atomicoperations
.
Install
.
from_name
(
x
)
paths
.
append
(
install_op
.
package_fname
)
...
...
inary/package.py
Dosyayı görüntüle @
1b5bcbd5
...
...
@@ -109,7 +109,7 @@ class Package:
url
))
raise
else
:
ctx
.
ui
.
info
(
_
(
'{} [cached]'
)
.
format
(
url
.
filename
())
,
noln
=
True
)
ctx
.
ui
.
info
(
_
(
'{} [cached]'
)
.
format
(
url
.
filename
()))
def
add_to_package
(
self
,
fn
,
an
=
None
):
"""Add a file or directory to package"""
...
...
inary/scenarioapi/__init__.py
Dosyayı görüntüle @
1b5bcbd5
...
...
@@ -15,15 +15,12 @@
import
inary.context
as
ctx
import
inary.errors
class
Error
(
inary
.
errors
.
Error
):
pass
class
Exception
(
inary
.
errors
.
Exception
):
pass
def
error
(
msg
):
if
ctx
.
config
.
get_option
(
'ignore_action_errors'
):
ctx
.
ui
.
error
(
msg
)
...
...
inary/scenarioapi/actions.py
Dosyayı görüntüle @
1b5bcbd5
...
...
@@ -13,6 +13,7 @@
#
class
Actions
:
template
=
"""
from inary.actionsapi import inarytools
...
...
inary/scenarioapi/constants.py
Dosyayı görüntüle @
1b5bcbd5
...
...
@@ -13,7 +13,6 @@
class
_constant
:
"""Constant members implementation"""
class
ConstError
(
TypeError
):
pass
...
...
@@ -29,8 +28,8 @@ class _constant:
# we don't have an attribute by this name
raise
NameError
(
name
)
class
Constants
:
__c
=
_constant
()
def
__getattr__
(
self
,
attr
):
...
...
@@ -42,7 +41,6 @@ class Constants:
def
__delattr__
(
self
,
attr
):
delattr
(
self
.
__c
,
attr
)
consts
=
Constants
()
consts
.
scenarios_path
=
"scenarios/"
...
...
inary/scenarioapi/inaryops.py
Dosyayı görüntüle @
1b5bcbd5
#!/usr/bin/python
#
-*- coding: utf-8 -*-
#-*- coding: utf-8 -*-
#
# Main fork Pisi: Copyright (C) 2005 - 2011, Tubitak/UEKAE
#
...
...
@@ -14,37 +14,29 @@
#
import
os
import
inary.util
as
util
from
inary.scenarioapi.constants
import
*
def
inary_upgraded
(
*
args
):
packages
=
util
.
strlist
(
args
)
.
rstrip
()
os
.
system
(
"inary -D{0} upgrade {1}"
.
format
(
consts
.
inary_db
,
packages
))
def
inary_info
(
package
):
os
.
system
(
"inary -D{0} info {1}"
.
format
(
consts
.
inary_db
,
package
))
def
inary_removed
(
*
args
):
packages
=
util
.
strlist
(
args
)
.
rstrip
()
os
.
system
(
"inary -D{0} remove {1}"
.
format
(
consts
.
inary_db
,
packages
))
def
inary_added_repo
(
name
,
url
):
os
.
system
(
"inary -D{0} add-repo -y {1} {2}"
.
format
(
consts
.
inary_db
,
name
,
url
))
def
inary_updated_repo
():
os
.
system
(
"inary -D{0} update-repo"
.
fotmat
(
consts
.
inary_db
))
def
inary_installed
(
*
args
):
packages
=
util
.
strlist
(
args
)
.
rstrip
()
os
.
system
(
"inary -D{0} install {1}"
.
format
(
consts
.
inary_db
,
packages
))
def
inary_reinstalled
(
package
):
os
.
system
(
"inary -D{0} install --reinstall {1}"
.
format
(
consts
.
inary_db
,
package
))
inary/scenarioapi/package.py
Dosyayı görüntüle @
1b5bcbd5
#!/usr/bin/env python3
#
-*- coding: utf-8 -*-
#-*- coding: utf-8 -*-
#
# Main fork Pisi: Copyright (C) 2005 - 2011, Tubitak/UEKAE
#
...
...
@@ -13,21 +13,20 @@
# Please read the COPYING file.
#
import
gettext
import
glob
import
os
import
glob
from
inary.scenarioapi.pspec
import
Pspec
from
inary.scenarioapi.actions
import
Actions
from
inary.scenarioapi.constants
import
*
from
inary.scenarioapi.pspec
import
Pspec
from
inary.scenarioapi.withops
import
*
import
gettext
__trans
=
gettext
.
translation
(
'inary'
,
fallback
=
True
)
_
=
__trans
.
gettext
class
Package
:
def
__init__
(
self
,
name
,
deps
=
None
,
cons
=
None
,
date
=
"2006-18-18"
,
ver
=
"1.0"
,
partOf
=
"None"
):
def
__init__
(
self
,
name
,
deps
=
None
,
cons
=
None
,
date
=
"2006-18-18"
,
ver
=
"1.0"
,
partOf
=
"None"
):
if
deps
is
None
:
deps
=
[]
if
cons
is
None
:
...
...
@@ -103,7 +102,6 @@ class Package:
self
.
actions
.
write
()
self
.
create_inary
()
if
__name__
==
"__main__"
:
p
=
Package
(
"w0rmux"
,
[],
[],
"0.7"
)
p
.
version_bump
()
inary/scenarioapi/pspec.py
Dosyayı görüntüle @
1b5bcbd5
#!/usr/bin/env python3
#
-*- coding: utf-8 -*-
#-*- coding: utf-8 -*-
#
# Main fork Pisi: Copyright (C) 2005 - 2011, Tubitak/UEKAE
#
...
...
@@ -13,13 +13,11 @@
# Please read the COPYING file.
#
from
inary.
conflict
import
Conflict
from
inary.
specfile
import
SpecFile
,
Package
,
Update
,
Path
,
Action
,
Archive
,
AnyDependency
from
inary.dependency
import
Dependency
from
inary.specfile
import
SpecFile
,
Package
,
Update
,
Path
,
Action
,
Archive
from
inary.conflict
import
Conflict
from
inary.sxml.autoxml
import
LocalText
class
Pspec
:
def
__init__
(
self
,
pkgname
,
filepath
):
self
.
pspec
=
SpecFile
()
...
...
@@ -160,7 +158,7 @@ class Pspec:
self
.
pspec
.
packages
.
append
(
self
.
package
)
def
set_history
(
self
,
date
,
version
,
comment
=
"No Comment"
,
release
=
"1"
):
def
set_history
(
self
,
date
,
version
,
comment
=
"No Comment"
,
release
=
"1"
):
self
.
update
.
date
=
date
self
.
update
.
version
=
version
self
.
update
.
comment
=
comment
...
...
inary/scenarioapi/repoops.py
Dosyayı görüntüle @
1b5bcbd5
#!/usr/bin/env python3
#
-*- coding: utf-8 -*-
#-*- coding: utf-8 -*-
#
# Main fork Pisi: Copyright (C) 2005 - 2011, Tubitak/UEKAE
#
...
...
@@ -13,19 +13,18 @@
# Please read the COPYING file.
#
import
gettext
import
os
from
inary.scenarioapi.constants
import
*
from
inary.scenarioapi.package
import
Package
from
inary.scenarioapi.withops
import
*
from
inary.scenarioapi.constants
import
*
import
gettext
__trans
=
gettext
.
translation
(
'inary'
,
fallback
=
True
)
_
=
__trans
.
gettext
repodb
=
{}
def
repo_added_package
(
package
,
*
args
):
if
package
in
repodb
:
raise
Exception
(
_
(
"Repo already has package named {}."
)
.
format
(
package
))
...
...
@@ -50,7 +49,6 @@ def repo_added_package(package, *args):
repodb
[
package
]
=
Package
(
package
,
dependencies
,
conflicts
,
ver
=
version
,
partOf
=
partOf
)
def
repo_removed_package
(
package
):
if
package
not
in
repodb
:
raise
Exception
(
_
(
"Repo does not have package named {}."
)
.
format
(
package
))
...
...
@@ -58,7 +56,6 @@ def repo_removed_package(package):
os
.
unlink
(
os
.
path
.
join
(
consts
.
repo_path
,
repodb
[
package
]
.
get_file_name
()))
del
repodb
[
package
]
def
repo_version_bumped
(
package
,
*
args
):
if
package
not
in
repodb
:
raise
Exception
(
_
(
"Repo does not have package named {}."
)
.
format
(
package
))
...
...
@@ -67,7 +64,6 @@ def repo_version_bumped(package, *args):
repodb
[
package
]
.
version_bump
(
*
args
)
os
.
unlink
(
os
.
path
.
join
(
consts
.
repo_path
,
old_file
))
def
repo_updated_index
():
cur
=
os
.
getcwd
()
path
=
os
.
path
.
join
(
cur
,
consts
.
repo_path
)
...
...
@@ -75,6 +71,5 @@ def repo_updated_index():
os
.
system
(
"inary index --skip-signing {} >/dev/null 2>&1"
.
format
(
path
))
os
.
chdir
(
cur
)
def
repo_get_url
():
return
"."
inary/scenarioapi/scenario.py
Dosyayı görüntüle @
1b5bcbd5
#!/usr/bin/env python3
#
-*- coding: utf-8 -*-
#-*- coding: utf-8 -*-
#
# Main fork Pisi: Copyright (C) 2005 - 2011, Tubitak/UEKAE
#
...
...
@@ -15,16 +15,14 @@
import
os
from
inary.scenarioapi.constants
import
*
from
inary.scenarioapi.inaryops
import
*
from
inary.scenarioapi.repoops
import
*
from
inary.scenarioapi.inaryops
import
*
from
inary.scenarioapi.constants
import
*
def
let_repo_had
(
package
,
*
args
):
repo_added_package
(
package
,
*
args
)
repo_updated_index
()
def
let_inary_had
(
*
args
):
url
=
os
.
path
.
join
(
os
.
getcwd
(),
consts
.
repo_url
)
inary_added_repo
(
consts
.
repo_name
,
url
)
...
...
inary/scenarioapi/withops.py
Dosyayı görüntüle @
1b5bcbd5
#!/usr/bin/env python3
#
-*- coding: utf-8 -*-
#-*- coding: utf-8 -*-
#
# Main fork Pisi: Copyright (C) 2005 - 2011, Tubitak/UEKAE
#
...
...
@@ -16,12 +16,10 @@
ADDED
,
REMOVED
,
INIT
=
list
(
range
(
3
))
PARTOF
,
VERSION
,
CONFLICT
,
DEPENDENCY
,
REQUIRES
=
list
(
range
(
5
))
class
With
:
def
__init__
(
self
):
pass
def
with_action
(
types
,
action
,
data
):
w
=
With
()
w
.
types
=
types
...
...
@@ -29,43 +27,33 @@ def with_action(types, action, data):
w
.
data
=
data
return
w
def
with_partof
(
partof
):
return
with_action
(
PARTOF
,
INIT
,
partof
)
def
with_version
(
version
):
return
with_action
(
VERSION
,
INIT
,
version
)
def
with_conflicts
(
*
cons
):
return
with_action
(
CONFLICT
,
INIT
,
cons
)
def
with_requiring_actions
(
*
action
):
return
with_action
(
REQUIRES
,
ADDED
,
action
)
def
with_dependencies
(
*
deps
):
return
with_action
(
DEPENDENCY
,
INIT
,
deps
)
def
with_added_conflicts
(
*
cons
):
return
with_action
(
CONFLICT
,
ADDED
,
cons
)
def
with_removed_conflicts
(
*
cons
):
return
with_action
(
CONFLICT
,
REMOVED
,
cons
)
def
with_added_dependencies
(
*
deps
):
return
with_action
(
DEPENDENCY
,
ADDED
,
deps
)
def
with_removed_dependencies
(
*
deps
):
return
with_action
(
DEPENDENCY
,
REMOVED
,
deps
)
def
with_added_conflict
(
package
,
**
kw
):
assert
len
(
kw
)
<=
1
...
...
@@ -73,17 +61,16 @@ def with_added_conflict(package, **kw):
return
with_action
(
CONFLICT
,
ADDED
,
[
package
])
if
(
"versionFrom"
in
kw
or
"versionTo"
in
kw
or
"version"
in
kw
or
"releaseFrom"
in
kw
or
"releaseTo"
in
kw
or
"release"
in
kw
):
"versionTo"
in
kw
or
"version"
in
kw
or
"releaseFrom"
in
kw
or
"releaseTo"
in
kw
or
"release"
in
kw
):
return
with_action
(
CONFLICT
,
ADDED
,
[
kw
,
package
])
# pass other keywords.
return
with_action
(
CONFLICT
,
ADDED
,
[
package
])
def
with_added_dependency
(
package
,
**
kw
):
assert
len
(
kw
)
<=
1
...
...
@@ -91,11 +78,11 @@ def with_added_dependency(package, **kw):
return
with_action
(
DEPENDENCY
,
ADDED
,
[
package
])
if
(
"versionFrom"
in
kw
or
"versionTo"
in
kw
or
"version"
in
kw
or
"releaseFrom"
in
kw
or
"releaseTo"
in
kw
or
"release"
in
kw
):
"versionTo"
in
kw
or
"version"
in
kw
or
"releaseFrom"
in
kw
or
"releaseTo"
in
kw
or
"release"
in
kw
):
return
with_action
(
DEPENDENCY
,
ADDED
,
[
kw
,
package
])
# pass other keywords.
...
...
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