Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
喜羊羊3508
Dak
提交
16083d7c
D
Dak
项目概览
喜羊羊3508
/
Dak
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
16083d7c
编写于
10月 30, 2009
作者:
F
Frank Lichtenheld
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
process-upload: import process_it() from process-unchecked
Signed-off-by:
N
Frank Lichtenheld
<
djpig@debian.org
>
上级
ce63c9c5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
85 addition
and
1 deletion
+85
-1
dak/process_upload.py
dak/process_upload.py
+85
-1
未找到文件。
dak/process_upload.py
浏览文件 @
16083d7c
...
...
@@ -133,13 +133,14 @@ import sys
import
apt_pkg
from
daklib
import
daklog
#
from daklib.queue import *
from
daklib.queue
import
*
from
daklib
import
utils
from
daklib.dbconn
import
*
#from daklib.dak_exceptions import *
#from daklib.regexes import re_default_answer, re_issource, re_fdnic
from
daklib.urgencylog
import
UrgencyLog
from
daklib.summarystats
import
SummaryStats
from
daklib.holding
import
Holding
from
daklib.config
import
Config
###############################################################################
...
...
@@ -161,6 +162,88 @@ def usage (exit_code=0):
###############################################################################
def
process_it
(
changes_file
):
global
Logger
cnf
=
Config
()
holding
=
Holding
()
u
=
Upload
()
u
.
pkg
.
changes_file
=
changes_file
u
.
pkg
.
directory
=
os
.
getcwd
()
u
.
logger
=
Logger
origchanges
=
os
.
path
.
join
(
u
.
pkg
.
directory
,
u
.
pkg
.
changes_file
)
# Some defaults in case we can't fully process the .changes file
u
.
pkg
.
changes
[
"maintainer2047"
]
=
cnf
[
"Dinstall::MyEmailAddress"
]
u
.
pkg
.
changes
[
"changedby2047"
]
=
cnf
[
"Dinstall::MyEmailAddress"
]
# debian-{devel-,}-changes@lists.debian.org toggles writes access based on this header
bcc
=
"X-DAK: dak process-unchecked"
if
cnf
.
has_key
(
"Dinstall::Bcc"
):
u
.
Subst
[
"__BCC__"
]
=
bcc
+
"
\n
Bcc: %s"
%
(
cnf
[
"Dinstall::Bcc"
])
else
:
u
.
Subst
[
"__BCC__"
]
=
bcc
# Remember where we are so we can come back after cd-ing into the
# holding directory. TODO: Fix this stupid hack
u
.
prevdir
=
os
.
getcwd
()
# TODO: Figure out something better for this (or whether it's even
# necessary - it seems to have been for use when we were
# still doing the is_unchecked check; reprocess = 2)
u
.
reprocess
=
1
try
:
# If this is the Real Thing(tm), copy things into a private
# holding directory first to avoid replacable file races.
if
not
Options
[
"No-Action"
]:
os
.
chdir
(
cnf
[
"Dir::Queue::Holding"
])
# Absolutize the filename to avoid the requirement of being in the
# same directory as the .changes file.
holding
.
copy_to_holding
(
origchanges
)
# Relativize the filename so we use the copy in holding
# rather than the original...
changespath
=
os
.
path
.
basename
(
u
.
pkg
.
changes_file
)
(
u
.
pkg
.
changes
[
"fingerprint"
],
rejects
)
=
utils
.
check_signature
(
changespath
)
if
u
.
pkg
.
changes
[
"fingerprint"
]:
valid_changes_p
=
u
.
load_changes
(
changespath
)
else
:
valid_changes_p
=
False
u
.
rejects
.
extend
(
rejects
)
if
valid_changes_p
:
while
u
.
reprocess
:
u
.
check_distributions
()
u
.
check_files
(
not
Options
[
"No-Action"
])
valid_dsc_p
=
u
.
check_dsc
(
not
Options
[
"No-Action"
])
if
valid_dsc_p
and
not
Options
[
"No-Action"
]:
u
.
check_source
()
u
.
check_lintian
()
u
.
check_hashes
()
u
.
check_urgency
()
u
.
check_timestamps
()
u
.
check_signed_by_key
()
action
(
u
)
except
(
SystemExit
,
KeyboardInterrupt
):
raise
except
:
print
"ERROR"
traceback
.
print_exc
(
file
=
sys
.
stderr
)
# Restore previous WD
os
.
chdir
(
u
.
prevdir
)
###############################################################################
def
main
():
global
Options
,
Logger
...
...
@@ -234,6 +317,7 @@ def main():
for
changes_file
in
changes_files
:
print
"
\n
"
+
changes_file
session
=
DBConn
().
session
()
process_it
(
changes_file
)
session
.
close
()
if
summarystats
.
accept_count
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录