Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
喜羊羊3508
Dak
提交
979890d1
D
Dak
项目概览
喜羊羊3508
/
Dak
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
未验证
提交
979890d1
编写于
6月 10, 2013
作者:
A
Ansgar Burchardt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve rejection message for version checks.
上级
c225d87a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
7 deletion
+15
-7
daklib/checks.py
daklib/checks.py
+15
-7
未找到文件。
daklib/checks.py
浏览文件 @
979890d1
...
...
@@ -709,23 +709,31 @@ class VersionCheck(Check):
else
:
return
db_binary
.
version
def
_version_checks
(
self
,
upload
,
suite
,
o
p
):
def
_version_checks
(
self
,
upload
,
suite
,
o
ther_suite
,
op
,
op_name
):
session
=
upload
.
session
if
upload
.
changes
.
source
is
not
None
:
source_name
=
upload
.
changes
.
source
.
dsc
[
'Source'
]
source_version
=
upload
.
changes
.
source
.
dsc
[
'Version'
]
v
=
self
.
_highest_source_version
(
session
,
source_name
,
suite
)
v
=
self
.
_highest_source_version
(
session
,
source_name
,
other_
suite
)
if
v
is
not
None
and
not
op
(
version_compare
(
source_version
,
v
)):
raise
Reject
(
'Version check failed (source={0}, version={1}, other-version={2}, suite={3})'
.
format
(
source_name
,
source_version
,
v
,
suite
.
suite_name
))
raise
Reject
(
"Version check failed:
\n
"
"Your upload included the source package {0}, version {1},
\n
"
"however {3} already has the {4} version {2}.
\n
"
"Uploads to {5} must have a {4} version than present in {3}."
.
format
(
source_name
,
source_version
,
v
,
other_suite
.
suite_name
,
op_name
,
suite
.
suite_name
))
for
binary
in
upload
.
changes
.
binaries
:
binary_name
=
binary
.
control
[
'Package'
]
binary_version
=
binary
.
control
[
'Version'
]
architecture
=
binary
.
control
[
'Architecture'
]
v
=
self
.
_highest_binary_version
(
session
,
binary_name
,
suite
,
architecture
)
v
=
self
.
_highest_binary_version
(
session
,
binary_name
,
other_
suite
,
architecture
)
if
v
is
not
None
and
not
op
(
version_compare
(
binary_version
,
v
)):
raise
Reject
(
'Version check failed (binary={0}, version={1}, other-version={2}, suite={3})'
.
format
(
binary_name
,
binary_version
,
v
,
suite
.
suite_name
))
raise
Reject
(
"Version check failed:
\n
"
"Your upload included the binary package {0}, version {1}, for {2},
\n
"
"however {4} already has the {5} version {3}.
\n
"
"Uploads to {6} must have a {5} version than present in {4}."
.
format
(
binary_name
,
binary_version
,
architecture
,
v
,
other_suite
.
suite_name
,
op_name
,
suite
.
suite_name
))
def
per_suite_check
(
self
,
upload
,
suite
):
session
=
upload
.
session
...
...
@@ -737,13 +745,13 @@ class VersionCheck(Check):
must_be_newer_than
.
append
(
suite
)
for
s
in
must_be_newer_than
:
self
.
_version_checks
(
upload
,
s
,
lambda
result
:
result
>
0
)
self
.
_version_checks
(
upload
,
s
uite
,
s
,
lambda
result
:
result
>
0
,
'higher'
)
vc_older
=
session
.
query
(
dbconn
.
VersionCheck
).
filter_by
(
suite
=
suite
,
check
=
'MustBeOlderThan'
)
must_be_older_than
=
[
vc
.
reference
for
vc
in
vc_older
]
for
s
in
must_be_older_than
:
self
.
_version_checks
(
upload
,
s
,
lambda
result
:
result
<
0
)
self
.
_version_checks
(
upload
,
s
uite
,
s
,
lambda
result
:
result
<
0
,
'lower'
)
return
True
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录