Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
喜羊羊3508
Dak
提交
1bcac7a3
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,发现更多精彩内容 >>
提交
1bcac7a3
编写于
7月 30, 2006
作者:
A
Anthony Towns
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support for ~ in versions; use _ as an internal separator instead
上级
2dd958f4
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
25 addition
and
25 deletion
+25
-25
dak/control_suite.py
dak/control_suite.py
+6
-6
dak/cruft_report.py
dak/cruft_report.py
+4
-4
dak/import_archive.py
dak/import_archive.py
+7
-7
dak/make_maintainers.py
dak/make_maintainers.py
+1
-1
dak/process_unchecked.py
dak/process_unchecked.py
+1
-1
dak/stats.py
dak/stats.py
+1
-1
daklib/database.py
daklib/database.py
+4
-4
docs/README.assumptions
docs/README.assumptions
+1
-1
未找到文件。
dak/control_suite.py
浏览文件 @
1bcac7a3
...
...
@@ -77,10 +77,10 @@ def get_id (package, version, architecture):
ql
=
q
.
getresult
()
if
not
ql
:
daklib
.
utils
.
warn
(
"Couldn't find '%s
~%s~
%s'."
%
(
package
,
version
,
architecture
))
daklib
.
utils
.
warn
(
"Couldn't find '%s
_%s_
%s'."
%
(
package
,
version
,
architecture
))
return
None
if
len
(
ql
)
>
1
:
daklib
.
utils
.
warn
(
"Found more than one match for '%s
~%s~
%s'."
%
(
package
,
version
,
architecture
))
daklib
.
utils
.
warn
(
"Found more than one match for '%s
_%s_
%s'."
%
(
package
,
version
,
architecture
))
return
None
id
=
ql
[
0
][
0
]
return
id
...
...
@@ -178,13 +178,13 @@ def process_file (file, suite, action):
# Take action
if
action
==
"add"
:
if
assoication_id
:
daklib
.
utils
.
warn
(
"'%s
~%s~
%s' already exists in suite %s."
%
(
package
,
version
,
architecture
,
suite
))
daklib
.
utils
.
warn
(
"'%s
_%s_
%s' already exists in suite %s."
%
(
package
,
version
,
architecture
,
suite
))
continue
else
:
q
=
projectB
.
query
(
"INSERT INTO src_associations (suite, source) VALUES (%s, %s)"
%
(
suite_id
,
id
))
elif
action
==
"remove"
:
if
assoication_id
==
None
:
daklib
.
utils
.
warn
(
"'%s
~%s~
%s' doesn't exist in suite %s."
%
(
package
,
version
,
architecture
,
suite
))
daklib
.
utils
.
warn
(
"'%s
_%s_
%s' doesn't exist in suite %s."
%
(
package
,
version
,
architecture
,
suite
))
continue
else
:
q
=
projectB
.
query
(
"DELETE FROM src_associations WHERE id = %s"
%
(
assoication_id
))
...
...
@@ -199,13 +199,13 @@ def process_file (file, suite, action):
# Take action
if
action
==
"add"
:
if
assoication_id
:
daklib
.
utils
.
warn
(
"'%s
~%s~
%s' already exists in suite %s."
%
(
package
,
version
,
architecture
,
suite
))
daklib
.
utils
.
warn
(
"'%s
_%s_
%s' already exists in suite %s."
%
(
package
,
version
,
architecture
,
suite
))
continue
else
:
q
=
projectB
.
query
(
"INSERT INTO bin_associations (suite, bin) VALUES (%s, %s)"
%
(
suite_id
,
id
))
elif
action
==
"remove"
:
if
assoication_id
==
None
:
daklib
.
utils
.
warn
(
"'%s
~%s~
%s' doesn't exist in suite %s."
%
(
package
,
version
,
architecture
,
suite
))
daklib
.
utils
.
warn
(
"'%s
_%s_
%s' doesn't exist in suite %s."
%
(
package
,
version
,
architecture
,
suite
))
continue
else
:
q
=
projectB
.
query
(
"DELETE FROM bin_associations WHERE id = %s"
%
(
assoication_id
))
...
...
dak/cruft_report.py
浏览文件 @
1bcac7a3
...
...
@@ -202,7 +202,7 @@ def do_dubious_nbs(dubious_nbs):
def
do_obsolete_source
(
duplicate_bins
,
bin2source
):
obsolete
=
{}
for
key
in
duplicate_bins
.
keys
():
(
source_a
,
source_b
)
=
key
.
split
(
'
~
'
)
(
source_a
,
source_b
)
=
key
.
split
(
'
_
'
)
for
source
in
[
source_a
,
source_b
]:
if
not
obsolete
.
has_key
(
source
):
if
not
source_binaries
.
has_key
(
source
):
...
...
@@ -340,7 +340,7 @@ def main ():
if
bin_pkgs
.
has_key
(
binary
):
key_list
=
[
source
,
bin_pkgs
[
binary
]
]
key_list
.
sort
()
key
=
'
~
'
.
join
(
key_list
)
key
=
'
_
'
.
join
(
key_list
)
duplicate_bins
.
setdefault
(
key
,
[])
duplicate_bins
[
key
].
append
(
binary
)
bin_pkgs
[
binary
]
=
source
...
...
@@ -390,7 +390,7 @@ def main ():
if
previous_source
!=
source
:
key_list
=
[
source
,
previous_source
]
key_list
.
sort
()
key
=
'
~
'
.
join
(
key_list
)
key
=
'
_
'
.
join
(
key_list
)
duplicate_bins
.
setdefault
(
key
,
[])
if
package
not
in
duplicate_bins
[
key
]:
duplicate_bins
[
key
].
append
(
package
)
...
...
@@ -445,7 +445,7 @@ def main ():
keys
=
duplicate_bins
.
keys
()
keys
.
sort
()
for
key
in
keys
:
(
source_a
,
source_b
)
=
key
.
split
(
"
~
"
)
(
source_a
,
source_b
)
=
key
.
split
(
"
_
"
)
print
" o %s & %s => %s"
%
(
source_a
,
source_b
,
", "
.
join
(
duplicate_bins
[
key
]))
print
...
...
dak/import_archive.py
浏览文件 @
1bcac7a3
...
...
@@ -307,7 +307,7 @@ def get_location_path(directory):
def
get_or_set_files_id
(
filename
,
size
,
md5sum
,
location_id
):
global
files_id_cache
,
files_id_serial
,
files_query_cache
cache_key
=
"
~
"
.
join
((
filename
,
size
,
md5sum
,
repr
(
location_id
)))
cache_key
=
"
_
"
.
join
((
filename
,
size
,
md5sum
,
repr
(
location_id
)))
if
not
files_id_cache
.
has_key
(
cache_key
):
files_id_serial
+=
1
files_query_cache
.
write
(
"%d
\t
%s
\t
%s
\t
%s
\t
%d
\t\\
N
\n
"
%
(
files_id_serial
,
filename
,
size
,
md5sum
,
location_id
))
...
...
@@ -363,7 +363,7 @@ def process_sources (filename, suite, component, archive):
(
md5sum
,
size
,
filename
)
=
line
.
strip
().
split
()
# Don't duplicate .orig.tar.gz's
if
filename
.
endswith
(
".orig.tar.gz"
):
cache_key
=
"%s
~%s~
%s"
%
(
filename
,
size
,
md5sum
)
cache_key
=
"%s
_%s_
%s"
%
(
filename
,
size
,
md5sum
)
if
orig_tar_gz_cache
.
has_key
(
cache_key
):
id
=
orig_tar_gz_cache
[
cache_key
]
else
:
...
...
@@ -376,9 +376,9 @@ def process_sources (filename, suite, component, archive):
if
filename
.
endswith
(
".dsc"
):
files_id
=
id
filename
=
directory
+
package
+
'_'
+
no_epoch_version
+
'.dsc'
cache_key
=
"%s
~
%s"
%
(
package
,
version
)
cache_key
=
"%s
_
%s"
%
(
package
,
version
)
if
not
source_cache
.
has_key
(
cache_key
):
nasty_key
=
"%s
~
%s"
%
(
package
,
version
)
nasty_key
=
"%s
_
%s"
%
(
package
,
version
)
source_id_serial
+=
1
if
not
source_cache_for_binaries
.
has_key
(
nasty_key
):
source_cache_for_binaries
[
nasty_key
]
=
source_id_serial
...
...
@@ -438,16 +438,16 @@ def process_packages (filename, suite, component, archive):
filename
=
poolify
(
filename
,
location
)
if
architecture
==
"all"
:
filename
=
re_arch_from_filename
.
sub
(
"binary-all"
,
filename
)
cache_key
=
"%s
~
%s"
%
(
source
,
source_version
)
cache_key
=
"%s
_
%s"
%
(
source
,
source_version
)
source_id
=
source_cache_for_binaries
.
get
(
cache_key
,
None
)
size
=
Scanner
.
Section
[
"size"
]
md5sum
=
Scanner
.
Section
[
"md5sum"
]
files_id
=
get_or_set_files_id
(
filename
,
size
,
md5sum
,
location_id
)
type
=
"deb"
;
# FIXME
cache_key
=
"%s
~%s~%s~%d~%d~%d~
%d"
%
(
package
,
version
,
repr
(
source_id
),
architecture_id
,
location_id
,
files_id
,
suite_id
)
cache_key
=
"%s
_%s_%s_%d_%d_%d_
%d"
%
(
package
,
version
,
repr
(
source_id
),
architecture_id
,
location_id
,
files_id
,
suite_id
)
if
not
arch_all_cache
.
has_key
(
cache_key
):
arch_all_cache
[
cache_key
]
=
1
cache_key
=
"%s
~%s~%s~
%d"
%
(
package
,
version
,
repr
(
source_id
),
architecture_id
)
cache_key
=
"%s
_%s_%s_
%d"
%
(
package
,
version
,
repr
(
source_id
),
architecture_id
)
if
not
binary_cache
.
has_key
(
cache_key
):
if
not
source_id
:
source_id
=
"\N"
...
...
dak/make_maintainers.py
浏览文件 @
1bcac7a3
...
...
@@ -139,7 +139,7 @@ def main():
lhs
=
split
[
0
]
maintainer
=
fix_maintainer
(
" "
.
join
(
split
[
1
:]))
if
lhs
.
find
(
'~'
)
!=
-
1
:
(
package
,
version
)
=
lhs
.
split
(
'~'
)
(
package
,
version
)
=
lhs
.
split
(
'~'
,
1
)
else
:
package
=
lhs
version
=
'*'
...
...
dak/process_unchecked.py
浏览文件 @
1bcac7a3
...
...
@@ -39,7 +39,7 @@ from types import *
################################################################################
re_valid_version
=
re
.
compile
(
r
"^([0-9]+:)?[0-9A-Za-z\.\-\+:]+$"
)
re_valid_version
=
re
.
compile
(
r
"^([0-9]+:)?[0-9A-Za-z\.\-\+:
~
]+$"
)
re_valid_pkg_name
=
re
.
compile
(
r
"^[\dA-Za-z][\dA-Za-z\+\-\.]+$"
)
re_changelog_versions
=
re
.
compile
(
r
"^\w[-+0-9a-z.]+ \([^\(\) \t]+\)"
)
re_strip_revision
=
re
.
compile
(
r
"-([^-]+)$"
)
...
...
dak/stats.py
浏览文件 @
1bcac7a3
...
...
@@ -73,7 +73,7 @@ def daily_install_stats():
stats
=
{}
file
=
daklib
.
utils
.
open_file
(
"2001-11"
)
for
line
in
file
.
readlines
():
split
=
line
.
strip
().
split
(
'
~
'
)
split
=
line
.
strip
().
split
(
'
|
'
)
program
=
split
[
1
]
if
program
!=
"katie"
and
program
!=
"process-accepted"
:
continue
...
...
daklib/database.py
浏览文件 @
1bcac7a3
...
...
@@ -185,7 +185,7 @@ def get_component_id (component):
def
get_location_id
(
location
,
component
,
archive
):
global
location_id_cache
cache_key
=
location
+
'
~'
+
component
+
'~
'
+
location
cache_key
=
location
+
'
_'
+
component
+
'_
'
+
location
if
location_id_cache
.
has_key
(
cache_key
):
return
location_id_cache
[
cache_key
]
...
...
@@ -208,7 +208,7 @@ def get_location_id (location, component, archive):
def
get_source_id
(
source
,
version
):
global
source_id_cache
cache_key
=
source
+
'
~'
+
version
+
'~
'
cache_key
=
source
+
'
_'
+
version
+
'_
'
if
source_id_cache
.
has_key
(
cache_key
):
return
source_id_cache
[
cache_key
]
...
...
@@ -278,7 +278,7 @@ def get_or_set_fingerprint_id (fingerprint):
def
get_files_id
(
filename
,
size
,
md5sum
,
location_id
):
global
files_id_cache
cache_key
=
"%s
~
%d"
%
(
filename
,
location_id
)
cache_key
=
"%s
_
%d"
%
(
filename
,
location_id
)
if
files_id_cache
.
has_key
(
cache_key
):
return
files_id_cache
[
cache_key
]
...
...
@@ -331,7 +331,7 @@ def set_files_id (filename, size, md5sum, location_id):
##
##q = projectB.query("SELECT id FROM files WHERE id = currval('files_id_seq')")
##ql = q.getresult()[0]
##cache_key = "%s
~
%d" % (filename, location_id)
##cache_key = "%s
_
%d" % (filename, location_id)
##files_id_cache[cache_key] = ql[0]
##return files_id_cache[cache_key]
...
...
docs/README.assumptions
浏览文件 @
1bcac7a3
...
...
@@ -2,7 +2,7 @@ Assumptions
-----------
o Usernames do not contain ",". [dak import-users-from-passwd]
o Package names
do not contain "~
" [dak cruft-report]
o Package names
and versions do not contain "_
" [dak cruft-report]
o Suites are case-independent in conf files, but forced lower case in use. [dak make-suite-file-list]
o Components are case-sensitive. [dak make-suite-file-list]
o There's always source of some sort
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录