Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
喜羊羊3508
Dak
提交
a29878d1
D
Dak
项目概览
喜羊羊3508
/
Dak
10 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Dak
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a29878d1
编写于
3月 02, 2008
作者:
J
Joerg Jaspert
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix a number of syntax errors. Also do not remove elements from a dict where we iterate through
上级
7a7563b8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
19 deletion
+25
-19
dak/check_transitions.py
dak/check_transitions.py
+19
-15
dak/process_unchecked.py
dak/process_unchecked.py
+4
-3
daklib/database.py
daklib/database.py
+2
-1
未找到文件。
dak/check_transitions.py
浏览文件 @
a29878d1
...
...
@@ -23,7 +23,7 @@
################################################################################
import
os
,
sys
import
os
,
pg
,
sys
import
apt_pkg
import
daklib.database
import
daklib.utils
...
...
@@ -70,6 +70,9 @@ def usage (exit_code=0):
def
main
():
global
Cnf
init
()
# Only check if there is a file defined (and existant) with checks. It's a little bit
# specific to Debian, not much use for others, so return early there.
if
not
Cnf
.
has_key
(
"Dinstall::Reject::ReleaseTransitions"
)
or
not
os
.
path
.
exists
(
"%s"
%
(
Cnf
[
"Dinstall::Reject::ReleaseTransitions"
])):
...
...
@@ -79,8 +82,9 @@ def main():
# Parse the yaml file
sourcefile
=
file
(
Cnf
[
"Dinstall::Reject::ReleaseTransitions"
],
'r'
)
sourcecontent
=
sourcefile
.
read
()
try
:
transitions
=
load
(
source
file
)
transitions
=
load
(
source
content
)
except
error
,
msg
:
# This shouldn't happen, the release team has a wrapper to check the file, but better
# safe then sorry
...
...
@@ -88,9 +92,9 @@ def main():
sys
.
exit
(
2
)
to_dump
=
0
to_remove
=
[]
# Now look through all defined transitions
for
trans
in
transition
:
for
trans
in
transition
s
:
t
=
transition
[
trans
]
source
=
t
[
"source"
]
new_vers
=
t
[
"new"
]
...
...
@@ -99,15 +103,13 @@ def main():
curvers
=
daklib
.
database
.
get_testing_version
(
source
)
print
"""
Looking at transition: %s
Source: %s
New Version: %s
Responsible: %s
Reason: %s
Blocked Packages (total: %d):
"""
%
(
trans
,
source
,
new_vers
,
t
[
"rm"
],
t
[
"reason"
])
for
i
in
t
[
"packages"
]:
print
" %s"
%
(
i
)
Looking at transition: %s
Source: %s
New Version: %s
Responsible: %s
Reason: %s
Blocked Packages (total: %d): %s
"""
%
(
trans
,
source
,
new_vers
,
t
[
"rm"
],
t
[
"reason"
],
len
(
t
[
"packages"
]),
", "
.
join
(
t
[
"packages"
]))
if
curvers
and
apt_pkg
.
VersionCompare
(
new_vers
,
curvers
)
==
1
:
# This is still valid, the current version in database is older than
...
...
@@ -116,13 +118,15 @@ def main():
else
:
print
"This transition is over, the target package reached testing, removing"
print
"%s wanted version: %s, has %s"
%
(
source
,
new_vers
,
curvers
)
del
transition
[
trans
]
to_remove
.
append
(
trans
)
to_dump
=
1
print
"-------------------------------------------------------------------------"
if
to_dump
:
for
remove
in
to_remove
:
del
transitions
[
remove
]
destfile
=
file
(
Cnf
[
"Dinstall::Reject::ReleaseTransitions"
],
'w'
)
dump
(
transition
,
destfile
)
dump
(
transition
s
,
destfile
)
################################################################################
...
...
dak/process_unchecked.py
浏览文件 @
a29878d1
...
...
@@ -1013,8 +1013,9 @@ def check_transition(sourcepkg):
# Parse the yaml file
sourcefile
=
file
(
Cnf
[
"Dinstall::Reject::ReleaseTransitions"
],
'r'
)
sourcecontent
=
sourcefile
.
read
()
try
:
transitions
=
load
(
source
file
)
transitions
=
load
(
source
content
)
except
error
,
msg
:
# This shouldn't happen, the release team has a wrapper to check the file, but better
# safe then sorry
...
...
@@ -1022,8 +1023,8 @@ def check_transition(sourcepkg):
return
# Now look through all defined transitions
for
trans
in
transition
:
t
=
transition
[
trans
]
for
trans
in
transition
s
:
t
=
transition
s
[
trans
]
source
=
t
[
"source"
]
new_vers
=
t
[
"new"
]
...
...
daklib/database.py
浏览文件 @
a29878d1
...
...
@@ -41,6 +41,7 @@ maintainer_cache = {}
fingerprint_id_cache
=
{}
queue_id_cache
=
{}
uid_id_cache
=
{}
testing_version_cache
=
{}
################################################################################
...
...
@@ -229,7 +230,7 @@ def get_testing_version(source):
if
testing_version_cache
.
has_key
(
source
):
return
testing_version_cache
[
source
]
q
=
Upload
.
projectB
.
query
(
"""
q
=
projectB
.
query
(
"""
SELECT s.version FROM source s, suite su, src_associations sa
WHERE sa.source=s.id
AND sa.suite=su.id
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录