Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
喜羊羊3508
Dak
提交
a4a019fa
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,体验更适合开发者的 AI 搜索 >>
提交
a4a019fa
编写于
2月 22, 2009
作者:
M
Mike O'Connor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use get_suite_architectures from dbconn.py instead of database.py
Signed-off-by:
N
Mike O'Connor
<
stew@vireo.org
>
上级
f3db7ee8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
28 addition
and
2 deletion
+28
-2
dak/process_unchecked.py
dak/process_unchecked.py
+2
-2
daklib/dbconn.py
daklib/dbconn.py
+26
-0
未找到文件。
dak/process_unchecked.py
浏览文件 @
a4a019fa
...
...
@@ -326,7 +326,7 @@ def check_distributions():
(
source
,
dest
)
=
args
[
1
:
3
]
if
changes
[
"distribution"
].
has_key
(
source
):
for
arch
in
changes
[
"architecture"
].
keys
():
if
arch
not
in
database
.
get_suite_architectures
(
source
):
if
arch
not
in
DBConn
()
.
get_suite_architectures
(
source
):
reject
(
"Mapping %s to %s for unreleased architecture %s."
%
(
source
,
dest
,
arch
),
""
)
del
changes
[
"distribution"
][
source
]
changes
[
"distribution"
][
dest
]
=
1
...
...
@@ -474,7 +474,7 @@ def check_files():
default_suite
=
Cnf
.
get
(
"Dinstall::DefaultSuite"
,
"Unstable"
)
architecture
=
control
.
Find
(
"Architecture"
)
upload_suite
=
changes
[
"distribution"
].
keys
()[
0
]
if
architecture
not
in
database
.
get_suite_architectures
(
default_suite
)
and
architecture
not
in
database
.
get_suite_architectures
(
upload_suite
):
if
architecture
not
in
DBConn
().
get_suite_architectures
(
default_suite
)
and
architecture
not
in
DBConn
()
.
get_suite_architectures
(
upload_suite
):
reject
(
"Unknown architecture '%s'."
%
(
architecture
))
# Ensure the architecture of the .deb is one of the ones
...
...
daklib/dbconn.py
浏览文件 @
a4a019fa
...
...
@@ -452,6 +452,32 @@ class DBConn(Singleton):
return
id
def
get_suite_architectures
(
self
,
suite
):
"""
Returns list of architectures for C{suite}.
@type suite: string, int
@param suite: the suite name or the suite_id
@rtype: list
@return: the list of architectures for I{suite}
"""
suite_id
=
None
if
type
(
suite
)
==
str
:
suite_id
=
self
.
get_suite_id
(
suite
)
elif
type
(
suite
)
==
int
:
suite_id
=
suite
else
:
return
None
c
=
self
.
db_con
.
cursor
()
c
.
execute
(
"""SELECT a.arch_string FROM suite_architectures sa
JOIN architecture a ON (a.id = sa.architecture)
WHERE suite='%s'"""
%
suite_id
)
return
map
(
lambda
x
:
x
[
0
],
c
.
fetchall
())
def
insert_content_paths
(
self
,
package
,
fullpaths
):
"""
Make sure given path is associated with given binary id
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录