Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
喜羊羊3508
Dak
提交
eead92f7
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,发现更多精彩内容 >>
未验证
提交
eead92f7
编写于
6月 09, 2015
作者:
A
Ansgar Burchardt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove obsolete daklib/holding.py.
上级
e6c38ef3
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
0 addition
and
107 deletion
+0
-107
config/debian-security/dak.conf
config/debian-security/dak.conf
+0
-1
config/debian/dak.conf
config/debian/dak.conf
+0
-1
daklib/holding.py
daklib/holding.py
+0
-99
daklib/queue.py
daklib/queue.py
+0
-1
docs/README.config
docs/README.config
+0
-4
setup/dak-minimal.conf.template
setup/dak-minimal.conf.template
+0
-1
未找到文件。
config/debian-security/dak.conf
浏览文件 @
eead92f7
...
...
@@ -154,7 +154,6 @@ Dir
Override
"/srv/security-master.debian.org/scripts/override/"
;
Upload
"/srv/queued/ftpmaster/"
;
TempPath
"/srv/security-master.debian.org/tmp"
;
Holding
"/srv/security-master.debian.org/queue/holding/"
;
Done
"/srv/security-master.debian.org/queue/done/"
;
Reject
"/srv/security-master.debian.org/queue/reject/"
;
...
...
config/debian/dak.conf
浏览文件 @
eead92f7
...
...
@@ -221,7 +221,6 @@ Dir
UrgencyLog
"/srv/release.debian.org/britney/input/urgencies/"
;
TempPath
"/srv/ftp-master.debian.org/tmp/"
;
BTSVersionTrack
"/srv/ftp-master.debian.org/queue/bts_version_track/"
;
Holding
"/srv/ftp-master.debian.org/queue/holding/"
;
Done
"/srv/ftp-master.debian.org/queue/done/"
;
Reject
"/srv/ftp-master.debian.org/queue/reject/"
;
};
...
...
daklib/holding.py
已删除
100644 → 0
浏览文件 @
e6c38ef3
#!/usr/bin/env python
# vim:set et sw=4:
"""
Simple singleton class for storing info about Holding directory
@contact: Debian FTP Master <ftpmaster@debian.org>
@copyright: 2001 - 2006 James Troup <james@nocrew.org>
@copyright: 2009 Joerg Jaspert <joerg@debian.org>
@license: GNU General Public License version 2 or later
"""
# 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
###############################################################################
import
os
from
errno
import
ENOENT
,
EEXIST
,
EACCES
import
shutil
from
config
import
Config
from
utils
import
fubar
###############################################################################
class
Holding
(
object
):
__shared_state
=
{}
def
__init__
(
self
,
*
args
,
**
kwargs
):
self
.
__dict__
=
self
.
__shared_state
if
not
getattr
(
self
,
'initialised'
,
False
):
self
.
initialised
=
True
self
.
in_holding
=
{}
self
.
holding_dir
=
Config
()[
"Dir::Holding"
]
# ftptrainees haven't access to holding, use a temp directory instead
if
not
os
.
access
(
self
.
holding_dir
,
os
.
W_OK
):
self
.
holding_dir
=
Config
()[
"Dir::TempPath"
]
def
chdir_to_holding
(
self
):
os
.
chdir
(
self
.
holding_dir
)
def
copy_to_holding
(
self
,
filename
):
base_filename
=
os
.
path
.
basename
(
filename
)
dest
=
os
.
path
.
join
(
self
.
holding_dir
,
base_filename
)
try
:
fd
=
os
.
open
(
dest
,
os
.
O_RDWR
|
os
.
O_CREAT
|
os
.
O_EXCL
,
0o640
)
os
.
close
(
fd
)
except
OSError
as
e
:
# Shouldn't happen, but will if, for example, someone lists a
# file twice in the .changes.
if
e
.
errno
==
EEXIST
:
return
"%s: already exists in holding area; can not overwrite."
%
(
base_filename
)
try
:
shutil
.
copy
(
filename
,
dest
)
except
IOError
as
e
:
# In either case (ENOENT or EACCES) we want to remove the
# O_CREAT | O_EXCLed ghost file, so add the file to the list
# of 'in holding' even if it's not the real file.
if
e
.
errno
==
ENOENT
:
os
.
unlink
(
dest
)
return
"%s: can not copy to holding area: file not found."
%
(
base_filename
)
elif
e
.
errno
==
EACCES
:
os
.
unlink
(
dest
)
return
"%s: can not copy to holding area: read permission denied."
%
(
base_filename
)
self
.
in_holding
[
base_filename
]
=
""
return
None
def
clean
(
self
):
cwd
=
os
.
getcwd
()
os
.
chdir
(
self
.
holding_dir
)
for
f
in
self
.
in_holding
.
keys
():
# TODO: Sanitize path in a much better manner...
if
os
.
path
.
exists
(
f
):
if
f
.
find
(
'/'
)
!=
-
1
:
fubar
(
"WTF? clean_holding() got a file ('%s') with / in it!"
%
(
f
))
else
:
os
.
unlink
(
f
)
self
.
in_holding
=
{}
os
.
chdir
(
cwd
)
daklib/queue.py
浏览文件 @
eead92f7
...
...
@@ -45,7 +45,6 @@ from dak_exceptions import *
from
changes
import
*
from
regexes
import
*
from
config
import
Config
from
holding
import
Holding
from
urgencylog
import
UrgencyLog
from
dbconn
import
*
from
summarystats
import
SummaryStats
...
...
docs/README.config
浏览文件 @
eead92f7
...
...
@@ -200,10 +200,6 @@ Dir
////
is
mainly
used
for
britney
(
the
testing
script
).
//
UrgencyLog
"/srv/dak/testing/urgencies/"
;
////
Holding
(
required
):
Directory
to
use
for
temporary
storage
during
////
process
-
upload
Holding
"/srv/dak/queue/holding/"
;
////
Done
(
required
):
Directory
in
which
to
store
processed
.
changes
files
Done
"/srv/dak/queue/done/"
;
...
...
setup/dak-minimal.conf.template
浏览文件 @
eead92f7
...
...
@@ -42,7 +42,6 @@ Dir
Log "__DAKBASE__/log/";
Lock "__DAKBASE__/lock/";
Morgue "__DAKBASE__/morgue/";
Holding "__DAKBASE__/holding/";
Done "__DAKBASE__/done/";
Reject "__DAKBASE__/reject/";
TempPath "__DAKBASE__/tmp/";
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录