Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
喜羊羊3508
Dak
提交
c9ed674e
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,发现更多精彩内容 >>
提交
c9ed674e
编写于
5月 03, 2001
作者:
A
Anthony Towns
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
make jenna cleanup after arch:all/arch:any transitions
上级
e6b39a72
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
37 addition
and
2 deletion
+37
-2
jenna
jenna
+37
-2
未找到文件。
jenna
浏览文件 @
c9ed674e
...
...
@@ -2,7 +2,7 @@
# Generate file list which is then fed to apt-ftparchive to generate Packages and Sources files
# Copyright (C) 2000, 2001 James Troup <james@nocrew.org>
# $Id: jenna,v 1.1
0 2001-04-16 17:45:06 troup
Exp $
# $Id: jenna,v 1.1
1 2001-05-03 06:52:03 ajt
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
...
...
@@ -107,6 +107,40 @@ def generate_bin_list(suite, component, architecture, output, type, dislocated_f
# <aj> yo momma was SQLin' like a pig last night!
##########
# If something has gone from arch:all to arch:any or vice-versa,
# clean out the old versions here. The rest of jenna won't do this
# because it's lame. I have no idea. </aj>
def
clean_duplicate_packages
(
suite
):
print
"Cleaning duplicate packages for %s..."
%
(
suite
)
suite_id
=
db_access
.
get_suite_id
(
suite
)
q
=
projectB
.
query
(
"""
SELECT b1.package,
b1.id, b1.version, a1.arch_string,
b2.id, b2.version, a2.arch_string
FROM bin_associations ba1, binaries b1, architecture a1,
bin_associations ba2, binaries b2, architecture a2
WHERE ba1.suite = ba2.suite AND ba1.suite = %s
AND ba1.bin = b1.id AND b1.architecture = a1.id
AND ba2.bin = b2.id AND b2.architecture = a2.id
AND b1.package = b2.package
AND (a1.id = a2.id OR a1.arch_string = 'all' OR a2.arch_string = 'all')
AND b1.id != b2.id
AND versioncmp(b1.version, b2.version) <= 0
ORDER BY b1.package, b1.version, a1.arch_string;"""
%
(
suite_id
))
ql
=
q
.
getresult
()
seen
=
{}
for
i
in
ql
:
(
package
,
oldid
,
oldver
,
oldarch
,
newid
,
newver
,
newarch
)
=
i
if
not
seen
.
has_key
(
oldid
):
seen
[
oldid
]
=
newid
print
"Removing %s %s on %s (ifo %s/%s)"
%
(
package
,
oldver
,
oldarch
,
newver
,
newarch
)
projectB
.
query
(
"DELETE FROM bin_associations WHERE suite = %s AND bin = %s"
%
(
suite_id
,
oldid
))
else
:
print
"%s %s on %s also superceded by %s/%s"
%
(
package
,
oldver
,
oldarch
,
newver
,
newarch
)
# If something has moved from one component to another we need to
# clean out the old versions here. The rest of jenna won't do this
# because it works on a per-component level for flexibility.
...
...
@@ -114,7 +148,7 @@ def generate_bin_list(suite, component, architecture, output, type, dislocated_f
def
clean_suite
(
suite
):
print
"Cleaning out packages for %s..."
%
(
suite
)
suite_id
=
db_access
.
get_suite_id
(
suite
)
;
suite_id
=
db_access
.
get_suite_id
(
suite
)
q
=
projectB
.
query
(
"""
SELECT b.id, b.package, a.arch_string, b.version, l.path, f.filename, c.name
FROM binaries b, bin_associations ba, files f, location l, architecture a, component c
...
...
@@ -197,6 +231,7 @@ def main():
else
:
dislocated_files
=
{};
clean_suite
(
suite
);
clean_duplicate_packages
(
suite
)
components
=
Cnf
[
"Jenna::Options::Component"
];
if
not
Cnf
.
has_key
(
"Suite::%s::Components"
%
(
suite
)):
components
=
"-"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录