Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
喜羊羊3508
Dak
提交
f3752fdd
D
Dak
项目概览
喜羊羊3508
/
Dak
大约 1 年 前同步成功
通知
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,发现更多精彩内容 >>
提交
f3752fdd
编写于
4月 22, 2008
作者:
T
Thomas Viehmann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
send mails to sponsors
上级
881bcc72
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
26 addition
and
0 deletion
+26
-0
dak/process_unchecked.py
dak/process_unchecked.py
+2
-0
daklib/queue.py
daklib/queue.py
+2
-0
daklib/utils.py
daklib/utils.py
+22
-0
未找到文件。
dak/process_unchecked.py
浏览文件 @
f3752fdd
...
@@ -1072,6 +1072,8 @@ def check_signed_by_key():
...
@@ -1072,6 +1072,8 @@ def check_signed_by_key():
if
uid_name
==
""
:
sponsored
=
1
if
uid_name
==
""
:
sponsored
=
1
else
:
else
:
sponsored
=
1
sponsored
=
1
if
daklib
.
utils
.
is_email_alias
(
uid_email
):
changes
[
"sponsoremail"
]
=
uid_email
if
sponsored
and
not
may_sponsor
:
if
sponsored
and
not
may_sponsor
:
reject
(
"%s is not authorised to sponsor uploads"
%
(
uid
))
reject
(
"%s is not authorised to sponsor uploads"
%
(
uid
))
...
...
daklib/queue.py
浏览文件 @
f3752fdd
...
@@ -279,6 +279,8 @@ class Upload:
...
@@ -279,6 +279,8 @@ class Upload:
Subst
[
"__MAINTAINER_FROM__"
]
=
changes
[
"changedby2047"
]
Subst
[
"__MAINTAINER_FROM__"
]
=
changes
[
"changedby2047"
]
Subst
[
"__MAINTAINER_TO__"
]
=
"%s, %s"
%
(
changes
[
"changedby2047"
],
Subst
[
"__MAINTAINER_TO__"
]
=
"%s, %s"
%
(
changes
[
"changedby2047"
],
changes
[
"maintainer2047"
])
changes
[
"maintainer2047"
])
if
"sponsoremail"
in
changes
:
Subst
[
"__MAINTAINER_TO__"
]
+=
", %s"
%
changes
[
"sponsoremail"
]
Subst
[
"__MAINTAINER__"
]
=
changes
.
get
(
"changed-by"
,
"Unknown"
)
Subst
[
"__MAINTAINER__"
]
=
changes
.
get
(
"changed-by"
,
"Unknown"
)
else
:
else
:
Subst
[
"__MAINTAINER_FROM__"
]
=
changes
[
"maintainer2047"
]
Subst
[
"__MAINTAINER_FROM__"
]
=
changes
[
"maintainer2047"
]
...
...
daklib/utils.py
浏览文件 @
f3752fdd
...
@@ -468,6 +468,14 @@ def which_apt_conf_file ():
...
@@ -468,6 +468,14 @@ def which_apt_conf_file ():
else
:
else
:
return
default_apt_config
return
default_apt_config
def
which_alias_file
():
hostname
=
socket
.
gethostbyaddr
(
socket
.
gethostname
())[
0
]
aliasfn
=
'/var/lib/misc/'
+
hostname
+
'/forward-alias'
if
os
.
path
.
exists
(
aliasfn
):
return
aliasfn
else
:
return
None
################################################################################
################################################################################
# Escape characters which have meaning to SQL's regex comparison operator ('~')
# Escape characters which have meaning to SQL's regex comparison operator ('~')
...
@@ -1148,6 +1156,20 @@ If 'dotprefix' is non-null, the filename will be prefixed with a '.'."""
...
@@ -1148,6 +1156,20 @@ If 'dotprefix' is non-null, the filename will be prefixed with a '.'."""
################################################################################
################################################################################
# checks if the user part of the email is listed in the alias file
def
is_email_alias
(
email
):
aliasfn
=
which_alias_file
()
uid
=
email
.
split
(
'@'
)[
0
]
if
not
aliasfn
:
return
False
for
l
in
open
(
aliasfn
):
if
l
.
startswith
(
uid
+
': '
):
return
True
return
False
################################################################################
apt_pkg
.
init
()
apt_pkg
.
init
()
Cnf
=
apt_pkg
.
newConfiguration
()
Cnf
=
apt_pkg
.
newConfiguration
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录