Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
喜羊羊3508
Dak
提交
6244fb61
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,发现更多精彩内容 >>
提交
6244fb61
编写于
8月 08, 2008
作者:
M
Mark Hymers
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
let's store the known_hashes information centrally
Signed-off-by:
N
Mark Hymers
<
mhy@debian.org
>
上级
1e0cd14a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
16 deletion
+12
-16
dak/process_unchecked.py
dak/process_unchecked.py
+8
-16
daklib/utils.py
daklib/utils.py
+4
-0
未找到文件。
dak/process_unchecked.py
浏览文件 @
6244fb61
...
...
@@ -929,33 +929,25 @@ def check_hashes ():
check_hash
(
".changes"
,
files
,
"md5sum"
,
apt_pkg
.
md5sum
)
check_hash
(
".dsc"
,
dsc_files
,
"md5sum"
,
apt_pkg
.
md5sum
)
# (hashname, function, originate)
# If originate is true, we have to calculate it because
# the changes file version is too early for it to be
# included
hashes
=
[(
"sha1"
,
apt_pkg
.
sha1sum
,
False
),
(
"sha256"
,
apt_pkg
.
sha256sum
,
False
)]
if
format
<=
(
1
,
8
):
hashes
[
"sha1"
]
=
True
hashes
[
"sha256"
]
=
True
for
x
in
changes
:
if
x
.
startswith
(
"checksum-"
):
h
=
x
.
split
(
"-"
,
1
)[
1
]
if
h
not
in
dict
(
hashes
):
if
h
not
in
dict
(
utils
.
known_
hashes
):
reject
(
"Unsupported checksum field in .changes"
%
(
h
))
for
x
in
dsc
:
if
x
.
startswith
(
"checksum-"
):
h
=
x
.
split
(
"-"
,
1
)[
1
]
if
h
not
in
dict
(
hashes
):
if
h
not
in
dict
(
utils
.
known_
hashes
):
reject
(
"Unsupported checksum field in .dsc"
%
(
h
))
for
h
,
f
,
o
in
hashes
:
# We have to calculate the hash if we have an earlier changes version than
# the hash appears in rather than require it exist in the changes file
# I hate backwards compatibility
for
h
,
f
,
v
in
utils
.
known_hashes
:
try
:
fs
=
utils
.
build_file_list
(
changes
,
0
,
"checksums-%s"
%
h
,
h
)
if
o
:
if
format
<
v
:
create_hash
(
fs
,
h
,
f
,
files
)
else
:
check_hash
(
".changes %s"
%
(
h
),
fs
,
h
,
f
,
files
)
...
...
@@ -970,7 +962,7 @@ def check_hashes ():
try
:
fs
=
utils
.
build_file_list
(
dsc
,
1
,
"checksums-%s"
%
h
,
h
)
if
o
:
if
format
<
v
:
create_hash
(
fs
,
h
,
f
,
dsc_files
)
else
:
check_hash
(
".dsc %s"
%
(
h
),
fs
,
h
,
f
,
dsc_files
)
...
...
daklib/utils.py
浏览文件 @
6244fb61
...
...
@@ -55,6 +55,10 @@ default_apt_config = "/etc/dak/apt.conf"
alias_cache
=
None
key_uid_email_cache
=
{}
# (hashname, function, earliest_changes_version)
known_hashes
=
[(
"sha1"
,
apt_pkg
.
sha1sum
,
(
1
,
8
)),
(
"sha256"
,
apt_pkg
.
sha256sum
,
(
1
,
8
))]
################################################################################
def
open_file
(
filename
,
mode
=
'r'
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录