Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
喜羊羊3508
Dak
提交
4edf024f
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,发现更多精彩内容 >>
提交
4edf024f
编写于
5月 18, 2002
作者:
J
James Troup
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
parse_changes and build_file_list 2nd argument sanity changes
上级
080f3c9b
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
34 addition
and
34 deletion
+34
-34
fernanda.py
fernanda.py
+3
-3
halle
halle
+3
-3
jennifer
jennifer
+6
-6
jeri
jeri
+3
-3
melanie
melanie
+3
-3
shania
shania
+5
-5
utils.py
utils.py
+11
-11
未找到文件。
fernanda.py
浏览文件 @
4edf024f
...
...
@@ -2,7 +2,7 @@
# Script to automate some parts of checking NEW packages
# Copyright (C) 2000, 2001, 2002 James Troup <james@nocrew.org>
# $Id: fernanda.py,v 1.
2 2002-05-03 16:06:45
troup Exp $
# $Id: fernanda.py,v 1.
3 2002-05-18 23:54:51
troup Exp $
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
...
...
@@ -128,8 +128,8 @@ def display_changes (changes_filename):
def
check_changes
(
changes_filename
):
display_changes
(
changes_filename
);
changes
=
utils
.
parse_changes
(
changes_filename
,
0
);
files
=
utils
.
build_file_list
(
changes
,
""
);
changes
=
utils
.
parse_changes
(
changes_filename
);
files
=
utils
.
build_file_list
(
changes
);
for
file
in
files
.
keys
():
if
file
[
-
4
:]
==
".deb"
or
file
[
-
5
:]
==
".udeb"
:
check_deb
(
file
);
...
...
halle
浏览文件 @
4edf024f
...
...
@@ -2,7 +2,7 @@
# Remove obsolete .changes files from proposed-updates
# Copyright (C) 2001, 2002 James Troup <james@nocrew.org>
# $Id: halle,v 1.
6 2002-05-08 11:13:02
troup Exp $
# $Id: halle,v 1.
7 2002-05-18 23:54:51
troup Exp $
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
...
...
@@ -49,8 +49,8 @@ Need either changes files or an admin.txt file with a '.joey' suffix."""
def
check_changes
(
filename
):
try
:
changes
=
utils
.
parse_changes
(
filename
,
0
)
files
=
utils
.
build_file_list
(
changes
,
""
);
changes
=
utils
.
parse_changes
(
filename
);
files
=
utils
.
build_file_list
(
changes
);
except
:
utils
.
warn
(
"Couldn't read changes file '%s'."
%
(
filename
));
return
;
...
...
jennifer
浏览文件 @
4edf024f
...
...
@@ -2,7 +2,7 @@
# Checks Debian packages from Incoming
# Copyright (C) 2000, 2001, 2002 James Troup <james@nocrew.org>
# $Id: jennifer,v 1.
19 2002-05-14 22:28:0
1 troup Exp $
# $Id: jennifer,v 1.
20 2002-05-18 23:54:5
1 troup Exp $
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
...
...
@@ -43,7 +43,7 @@ re_is_changes = re.compile (r"(.+?)_(.+?)_(.+?)\.changes$");
################################################################################
# Globals
jennifer_version
=
"$Revision: 1.
19
$"
;
jennifer_version
=
"$Revision: 1.
20
$"
;
Cnf
=
None
;
Options
=
None
;
...
...
@@ -355,7 +355,7 @@ def check_changes():
# Parse the .changes field into a dictionary
try
:
changes
.
update
(
utils
.
parse_changes
(
filename
,
0
));
changes
.
update
(
utils
.
parse_changes
(
filename
));
except
utils
.
cant_open_exc
:
reject
(
"can't read changes file '%s'."
%
(
filename
));
return
0
;
...
...
@@ -365,7 +365,7 @@ def check_changes():
# Parse the Files field from the .changes into another dictionary
try
:
files
.
update
(
utils
.
build_file_list
(
changes
,
""
));
files
.
update
(
utils
.
build_file_list
(
changes
));
except
utils
.
changes_parse_error_exc
,
line
:
reject
(
"error parsing changes file '%s', can't grok: %s."
%
(
filename
,
line
));
except
utils
.
nk_format_exc
,
format
:
...
...
@@ -713,7 +713,7 @@ def check_dsc ():
if
files
[
file
][
"type"
]
==
"dsc"
:
# Parse the .dsc file
try
:
dsc
.
update
(
utils
.
parse_changes
(
file
,
1
));
dsc
.
update
(
utils
.
parse_changes
(
file
,
dsc_whitespace_rules
=
1
));
except
utils
.
cant_open_exc
:
# if not -n copy_to_holding() will have done this for us...
if
Options
[
"No-Action"
]:
...
...
@@ -724,7 +724,7 @@ def check_dsc ():
reject
(
"syntax error in .dsc file '%s', line %s."
%
(
file
,
line
));
# Build up the file list of files mentioned by the .dsc
try
:
dsc_files
.
update
(
utils
.
build_file_list
(
dsc
,
1
));
dsc_files
.
update
(
utils
.
build_file_list
(
dsc
,
is_a_dsc
=
1
));
except
utils
.
no_files_exc
:
reject
(
"no Files: field in .dsc file."
);
continue
;
...
...
jeri
浏览文件 @
4edf024f
...
...
@@ -2,7 +2,7 @@
#
Dependency
check
proposed
-
updates
#
Copyright
(
C
)
2001
,
2002
James
Troup
<
james
@
nocrew
.
org
>
#
$
Id
:
jeri
,
v
1.
6
2002
-
05
-
14
15
:
34
:
02
troup
Exp
$
#
$
Id
:
jeri
,
v
1.
7
2002
-
05
-
18
23
:
54
:
51
troup
Exp
$
#
This
program
is
free
software
;
you
can
redistribute
it
and
/
or
modify
#
it
under
the
terms
of
the
GNU
General
Public
License
as
published
by
...
...
@@ -187,8 +187,8 @@ def pass_fail (filename, result):
def
check_changes
(
filename
):
try
:
changes
=
utils
.
parse_changes
(
filename
,
0
)
files
=
utils
.
build_file_list
(
changes
,
""
);
changes
=
utils
.
parse_changes
(
filename
);
files
=
utils
.
build_file_list
(
changes
);
except
:
utils
.
warn
(
"Error parsing changes file '%s'"
%
(
filename
));
return
;
...
...
melanie
浏览文件 @
4edf024f
...
...
@@ -2,7 +2,7 @@
#
General
purpose
package
removal
tool
for
ftpmaster
#
Copyright
(
C
)
2000
,
2001
,
2002
James
Troup
<
james
@
nocrew
.
org
>
#
$
Id
:
melanie
,
v
1.2
5
2002
-
05
-
16
18
:
01
:
33
rmurray
Exp
$
#
$
Id
:
melanie
,
v
1.2
6
2002
-
05
-
18
23
:
54
:
51
troup
Exp
$
#
This
program
is
free
software
;
you
can
redistribute
it
and
/
or
modify
#
it
under
the
terms
of
the
GNU
General
Public
License
as
published
by
...
...
@@ -255,7 +255,7 @@ def main ():
for
i
in
source_packages
.
keys
():
filename
=
string
.
join
(
source_packages
[
i
],
'/'
);
try
:
dsc
=
utils
.
parse_changes
(
filename
,
0
);
dsc
=
utils
.
parse_changes
(
filename
);
except
utils
.
cant_open_exc
:
utils
.
warn
(
"couldn't open '%s'."
%
(
filename
));
continue
;
...
...
@@ -394,7 +394,7 @@ def main ():
Subst["__BCC__"] = "Bcc: " + string.join(bcc, ", ");
else:
Subst["__BCC__"] = "X-Filler: 42";
Subst["__CC__"] = "X-Melanie: $Revision: 1.2
5
$";
Subst["__CC__"] = "X-Melanie: $Revision: 1.2
6
$";
if carbon_copy:
Subst["__CC__"] = Subst["__CC__"] + "\nCc: " + string.join(carbon_copy, ", ");
Subst["__SUITE_LIST__"] = suites_list;
...
...
shania
浏览文件 @
4edf024f
...
...
@@ -2,7 +2,7 @@
# Clean incoming of old unused files
# Copyright (C) 2000, 2001, 2002 James Troup <james@nocrew.org>
# $Id: shania,v 1.1
4 2002-05-08 11:13:02
troup Exp $
# $Id: shania,v 1.1
5 2002-05-18 23:54:51
troup Exp $
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
...
...
@@ -129,8 +129,8 @@ def flush_orphans ():
# Proces all .changes and .dsc files.
for
changes_filename
in
changes_files
:
try
:
changes
=
utils
.
parse_changes
(
changes_filename
,
0
)
files
=
utils
.
build_file_list
(
changes
,
""
);
changes
=
utils
.
parse_changes
(
changes_filename
);
files
=
utils
.
build_file_list
(
changes
);
except
:
utils
.
warn
(
"error processing '%s'; skipping it. [Got %s]"
%
(
changes_filename
,
sys
.
exc_type
));
continue
;
...
...
@@ -139,8 +139,8 @@ def flush_orphans ():
for
file
in
files
.
keys
():
if
file
[
-
4
:]
==
".dsc"
:
try
:
dsc
=
utils
.
parse_changes
(
file
,
0
)
dsc_files
=
utils
.
build_file_list
(
dsc
,
1
)
dsc
=
utils
.
parse_changes
(
file
);
dsc_files
=
utils
.
build_file_list
(
dsc
,
is_a_dsc
=
1
);
except
:
utils
.
warn
(
"error processing '%s'; skipping it. [Got %s]"
%
(
file
,
sys
.
exc_type
));
continue
;
...
...
utils.py
浏览文件 @
4edf024f
# Utility functions
# Copyright (C) 2000, 2001, 2002 James Troup <james@nocrew.org>
# $Id: utils.py,v 1.4
3 2002-05-10 00:24:14
troup Exp $
# $Id: utils.py,v 1.4
4 2002-05-18 23:54:51
troup Exp $
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
...
...
@@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import
commands
,
os
,
pwd
,
re
,
socket
,
shutil
,
string
,
sys
,
tempfile
import
os
,
pwd
,
re
,
socket
,
shutil
,
string
,
sys
,
tempfile
import
apt_pkg
re_comments
=
re
.
compile
(
r
"\#.*"
)
...
...
@@ -123,7 +123,7 @@ def extract_component_from_section(section):
# o The data section must end with a blank line and must be followed by
# "-----BEGIN PGP SIGNATURE-----".
def
parse_changes
(
filename
,
dsc_whitespace_rules
):
def
parse_changes
(
filename
,
dsc_whitespace_rules
=
0
):
changes_in
=
open_file
(
filename
);
error
=
""
;
changes
=
{};
...
...
@@ -199,12 +199,12 @@ def parse_changes(filename, dsc_whitespace_rules):
# Dropped support for 1.4 and ``buggy dchanges 3.4'' (?!) compared to di.pl
def
build_file_list
(
changes
,
dsc
):
def
build_file_list
(
changes
,
is_a_dsc
=
0
):
files
=
{}
format
=
changes
.
get
(
"format"
,
""
)
if
format
!=
""
:
format
=
float
(
format
)
if
dsc
==
""
and
(
format
<
1.5
or
format
>
2.0
):
if
not
is_a_dsc
and
(
format
<
1.5
or
format
>
2.0
):
raise
nk_format_exc
,
format
;
# No really, this has happened. Think 0 length .dsc file.
...
...
@@ -217,7 +217,7 @@ def build_file_list(changes, dsc):
s
=
string
.
split
(
i
)
section
=
priority
=
""
;
try
:
if
dsc
!=
""
:
if
is_a_dsc
:
(
md5
,
size
,
name
)
=
s
else
:
(
md5
,
size
,
section
,
priority
,
name
)
=
s
...
...
@@ -428,12 +428,12 @@ def cc_fix_changes (changes):
# Sort by source name, source version, 'have source', and then by filename
def
changes_compare
(
a
,
b
):
try
:
a_changes
=
parse_changes
(
a
,
0
)
a_changes
=
parse_changes
(
a
);
except
:
return
-
1
;
try
:
b_changes
=
parse_changes
(
b
,
0
)
b_changes
=
parse_changes
(
b
);
except
:
return
1
;
...
...
@@ -452,11 +452,11 @@ def changes_compare (a, b):
b_version
=
b_changes
.
get
(
"version"
);
q
=
apt_pkg
.
VersionCompare
(
a_version
,
b_version
);
if
q
:
return
q
return
q
;
# Sort by 'have source'
a_has_source
=
a_changes
[
"architecture"
].
get
(
"source"
)
b_has_source
=
b_changes
[
"architecture"
].
get
(
"source"
)
a_has_source
=
a_changes
[
"architecture"
].
get
(
"source"
)
;
b_has_source
=
b_changes
[
"architecture"
].
get
(
"source"
)
;
if
a_has_source
and
not
b_has_source
:
return
-
1
;
elif
b_has_source
and
not
a_has_source
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录