Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
喜羊羊3508
Dak
提交
63cfa70f
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,体验更适合开发者的 AI 搜索 >>
提交
63cfa70f
编写于
10月 31, 2009
作者:
M
Mark Hymers
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename known_changes
Signed-off-by:
N
Mark Hymers
<
mhy@debian.org
>
上级
945c33a3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
19 addition
and
16 deletion
+19
-16
dak/dakdb/update22.py
dak/dakdb/update22.py
+3
-0
dak/import_known_changes.py
dak/import_known_changes.py
+2
-2
daklib/changes.py
daklib/changes.py
+1
-1
daklib/dbconn.py
daklib/dbconn.py
+11
-11
daklib/queue.py
daklib/queue.py
+2
-2
未找到文件。
dak/dakdb/update22.py
浏览文件 @
63cfa70f
...
...
@@ -198,6 +198,9 @@ def do_update(self):
print
"Getting rid of old queue table"
c
.
execute
(
"""DROP TABLE queue"""
)
print
"Moving known_changes table"
c
.
execute
(
"""ALTER TABLE known_changes RENAME TO changes"""
)
print
"Sorting out permissions"
for
t
in
[
'build_queue'
,
'policy_queue'
,
'build_queue_files'
,
...
...
dak/import_known_changes.py
浏览文件 @
63cfa70f
...
...
@@ -32,7 +32,7 @@ import sys
import
os
import
logging
import
threading
from
daklib.dbconn
import
DBConn
,
get_known
change
from
daklib.dbconn
import
DBConn
,
get_db
change
from
daklib.config
import
Config
import
apt_pkg
from
daklib.dak_exceptions
import
DBUpdateError
,
InvalidDscError
,
ChangesUnicodeError
...
...
@@ -218,7 +218,7 @@ class ChangesGenerator(threading.Thread):
continue
count
+=
1
if
not
get_
known
change
(
changesfile
,
self
.
session
):
if
not
get_
db
change
(
changesfile
,
self
.
session
):
to_import
=
ChangesToImport
(
dirpath
,
changesfile
,
count
)
if
self
.
die
:
return
...
...
daklib/changes.py
浏览文件 @
63cfa70f
...
...
@@ -179,7 +179,7 @@ class Changes(object):
@
session_wrapper
def
remove_known_changes
(
self
,
session
=
None
):
session
.
delete
(
get_
known
change
(
self
.
changes_file
,
session
))
session
.
delete
(
get_
db
change
(
self
.
changes_file
,
session
))
def
mark_missing_fields
(
self
):
"""add "missing" in fields which we will require for the known_changes table"""
...
...
daklib/dbconn.py
浏览文件 @
63cfa70f
...
...
@@ -1248,19 +1248,19 @@ __all__.append('KeyringACLMap')
################################################################################
class
Known
Change
(
object
):
class
DB
Change
(
object
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
pass
def
__repr__
(
self
):
return
'<
Known
Change %s>'
%
self
.
changesname
return
'<
DB
Change %s>'
%
self
.
changesname
__all__
.
append
(
'
Known
Change'
)
__all__
.
append
(
'
DB
Change'
)
@
session_wrapper
def
get_
known
change
(
filename
,
session
=
None
):
def
get_
db
change
(
filename
,
session
=
None
):
"""
returns
knownc
hange object for given C{filename}.
returns
DBC
hange object for given C{filename}.
@type archive: string
@param archive: the name of the arhive
...
...
@@ -1273,14 +1273,14 @@ def get_knownchange(filename, session=None):
@return: Archive object for the given name (None if not present)
"""
q
=
session
.
query
(
Known
Change
).
filter_by
(
changesname
=
filename
)
q
=
session
.
query
(
DB
Change
).
filter_by
(
changesname
=
filename
)
try
:
return
q
.
one
()
except
NoResultFound
:
return
None
__all__
.
append
(
'get_
known
change'
)
__all__
.
append
(
'get_
db
change'
)
################################################################################
...
...
@@ -2506,7 +2506,7 @@ class DBConn(Singleton):
self
.
tbl_files
=
Table
(
'files'
,
self
.
db_meta
,
autoload
=
True
)
self
.
tbl_fingerprint
=
Table
(
'fingerprint'
,
self
.
db_meta
,
autoload
=
True
)
self
.
tbl_keyrings
=
Table
(
'keyrings'
,
self
.
db_meta
,
autoload
=
True
)
self
.
tbl_
known_changes
=
Table
(
'known_
changes'
,
self
.
db_meta
,
autoload
=
True
)
self
.
tbl_
changes
=
Table
(
'
changes'
,
self
.
db_meta
,
autoload
=
True
)
self
.
tbl_keyring_acl_map
=
Table
(
'keyring_acl_map'
,
self
.
db_meta
,
autoload
=
True
)
self
.
tbl_location
=
Table
(
'location'
,
self
.
db_meta
,
autoload
=
True
)
self
.
tbl_maintainer
=
Table
(
'maintainer'
,
self
.
db_meta
,
autoload
=
True
)
...
...
@@ -2611,8 +2611,8 @@ class DBConn(Singleton):
properties
=
dict
(
keyring_name
=
self
.
tbl_keyrings
.
c
.
name
,
keyring_id
=
self
.
tbl_keyrings
.
c
.
id
))
mapper
(
KnownChange
,
self
.
tbl_known
_changes
,
properties
=
dict
(
known_change_id
=
self
.
tbl_known
_changes
.
c
.
id
,
mapper
(
DBChange
,
self
.
tbl
_changes
,
properties
=
dict
(
change_id
=
self
.
tbl
_changes
.
c
.
id
,
poolfiles
=
relation
(
PoolFile
,
secondary
=
self
.
tbl_changes_pool_files
,
backref
=
"changeslinks"
),
...
...
@@ -2626,7 +2626,7 @@ class DBConn(Singleton):
mapper
(
ChangePendingSource
,
self
.
tbl_changes_pending_source
,
properties
=
dict
(
change_pending_source_id
=
self
.
tbl_changes_pending_source
.
c
.
id
,
change
=
relation
(
Known
Change
),
change
=
relation
(
DB
Change
),
maintainer
=
relation
(
Maintainer
,
primaryjoin
=
(
self
.
tbl_changes_pending_source
.
c
.
maintainer_id
==
self
.
tbl_maintainer
.
c
.
id
)),
changedby
=
relation
(
Maintainer
,
...
...
daklib/queue.py
浏览文件 @
63cfa70f
...
...
@@ -441,7 +441,7 @@ class Upload(object):
# Check there isn't already a changes file of the same name in one
# of the queue directories.
base_filename
=
os
.
path
.
basename
(
filename
)
if
get_
known
change
(
base_filename
):
if
get_
db
change
(
base_filename
):
self
.
rejects
.
append
(
"%s: a file with this name already exists."
%
(
base_filename
))
# Check the .changes is non-empty
...
...
@@ -822,7 +822,7 @@ class Upload(object):
session
=
DBConn
().
session
()
try
:
changes
=
session
.
query
(
Known
Change
).
filter_by
(
changesname
=
base_filename
).
one
()
changes
=
session
.
query
(
DB
Change
).
filter_by
(
changesname
=
base_filename
).
one
()
if
not
changes
.
approved_for
:
self
.
rejects
.
append
(
"%s file already known to dak"
%
base_filename
)
except
NoResultFound
,
e
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录