Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
openEuler-Advisor
提交
a9aaf546
O
openEuler-Advisor
项目概览
openeuler
/
openEuler-Advisor
通知
47
Star
4
Fork
4
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openEuler-Advisor
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a9aaf546
编写于
9月 01, 2020
作者:
G
gongzt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
针对初始化的功能验证修改
上级
fb603897
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
17 deletion
+17
-17
packageship/packageship/application/initsystem/data_import.py
...ageship/packageship/application/initsystem/data_import.py
+16
-16
packageship/pkgship.spec
packageship/pkgship.spec
+1
-1
未找到文件。
packageship/packageship/application/initsystem/data_import.py
浏览文件 @
a9aaf546
...
@@ -14,12 +14,12 @@ from packageship.libs.exception import DatabaseRepeatException
...
@@ -14,12 +14,12 @@ from packageship.libs.exception import DatabaseRepeatException
from
packageship.libs.exception
import
Error
from
packageship.libs.exception
import
Error
from
packageship.libs.configutils.readconfig
import
ReadConfig
from
packageship.libs.configutils.readconfig
import
ReadConfig
from
packageship.libs.log
import
Log
from
packageship.libs.log
import
Log
from
packageship.application.models.package
import
src_p
ack
from
packageship.application.models.package
import
SrcP
ack
from
packageship.application.models.package
import
bin_p
ack
from
packageship.application.models.package
import
BinP
ack
from
packageship.application.models.package
import
bin_r
equires
from
packageship.application.models.package
import
BinR
equires
from
packageship.application.models.package
import
src_r
equires
from
packageship.application.models.package
import
SrcR
equires
from
packageship.application.models.package
import
bin_p
rovides
from
packageship.application.models.package
import
BinP
rovides
from
packageship.application.models.package
import
p
ackages
from
packageship.application.models.package
import
P
ackages
from
packageship
import
system_config
from
packageship
import
system_config
LOGGER
=
Log
(
__name__
)
LOGGER
=
Log
(
__name__
)
...
@@ -266,7 +266,7 @@ class InitDataBase():
...
@@ -266,7 +266,7 @@ class InitDataBase():
LOGGER
.
logger
.
error
(
sql_error
)
LOGGER
.
logger
.
error
(
sql_error
)
return
None
return
None
def
__save_data
(
self
,
src_db_file
,
bin_db_file
,
db_name
,
table_name
,
lifecycle_status_val
):
def
__save_data
(
self
,
src_db_file
,
bin_db_file
,
db_name
,
table_name
,
lifecycle_status_val
):
"""
"""
integration of multiple data files
integration of multiple data files
...
@@ -301,7 +301,7 @@ class InitDataBase():
...
@@ -301,7 +301,7 @@ class InitDataBase():
else
:
else
:
return
True
return
True
def
_save_src_packages
(
self
,
db_name
,
table_name
,
lifecycle_status_val
):
def
_save_src_packages
(
self
,
db_name
,
table_name
,
lifecycle_status_val
):
"""
"""
Save the source package data
Save the source package data
...
@@ -320,7 +320,7 @@ class InitDataBase():
...
@@ -320,7 +320,7 @@ class InitDataBase():
'{db_name}:There is no relevant data in the source
\
'{db_name}:There is no relevant data in the source
\
package provided '
.
format
(
db_name
=
db_name
))
package provided '
.
format
(
db_name
=
db_name
))
with
DBHelper
(
db_name
=
db_name
)
as
database
:
with
DBHelper
(
db_name
=
db_name
)
as
database
:
database
.
batch_add
(
packages_datas
,
src_p
ack
)
database
.
batch_add
(
packages_datas
,
SrcP
ack
)
if
lifecycle_status_val
==
'enable'
:
if
lifecycle_status_val
==
'enable'
:
InitDataBase
.
_storage_packages
(
table_name
,
packages_datas
)
InitDataBase
.
_storage_packages
(
table_name
,
packages_datas
)
...
@@ -329,7 +329,7 @@ class InitDataBase():
...
@@ -329,7 +329,7 @@ class InitDataBase():
"""
"""
The mapping relationship of the orm model
The mapping relationship of the orm model
"""
"""
model
=
type
(
"packages"
,
(
p
ackages
,
DBHelper
.
BASE
),
{
model
=
type
(
"packages"
,
(
P
ackages
,
DBHelper
.
BASE
),
{
'__tablename__'
:
table_name
})
'__tablename__'
:
table_name
})
return
model
return
model
...
@@ -339,7 +339,7 @@ class InitDataBase():
...
@@ -339,7 +339,7 @@ class InitDataBase():
Bulk storage of source code package data
Bulk storage of source code package data
"""
"""
add_packages
=
[]
add_packages
=
[]
cls_model
=
p
ackages
.
package_meta
(
table_name
)
cls_model
=
P
ackages
.
package_meta
(
table_name
)
pkg_keys
=
(
'name'
,
'url'
,
'rpm_license'
,
'version'
,
pkg_keys
=
(
'name'
,
'url'
,
'rpm_license'
,
'version'
,
'release'
,
'summary'
,
'description'
)
'release'
,
'summary'
,
'description'
)
with
DBHelper
(
db_name
=
"lifecycle"
)
as
database
:
with
DBHelper
(
db_name
=
"lifecycle"
)
as
database
:
...
@@ -365,7 +365,7 @@ class InitDataBase():
...
@@ -365,7 +365,7 @@ class InitDataBase():
if
add_packages
:
if
add_packages
:
database
.
batch_add
(
add_packages
,
cls_model
)
database
.
batch_add
(
add_packages
,
cls_model
)
database
.
session
.
commit
()
database
.
session
.
commit
()
def
_save_src_requires
(
self
,
db_name
):
def
_save_src_requires
(
self
,
db_name
):
"""
"""
...
@@ -385,7 +385,7 @@ class InitDataBase():
...
@@ -385,7 +385,7 @@ class InitDataBase():
raise
ContentNoneException
(
'{db_name}: The package data that the source package
\
raise
ContentNoneException
(
'{db_name}: The package data that the source package
\
depends on is empty'
.
format
(
db_name
=
db_name
))
depends on is empty'
.
format
(
db_name
=
db_name
))
with
DBHelper
(
db_name
=
db_name
)
as
database
:
with
DBHelper
(
db_name
=
db_name
)
as
database
:
database
.
batch_add
(
requires_datas
,
src_r
equires
)
database
.
batch_add
(
requires_datas
,
SrcR
equires
)
def
_save_bin_packages
(
self
,
db_name
):
def
_save_bin_packages
(
self
,
db_name
):
"""
"""
...
@@ -415,7 +415,7 @@ class InitDataBase():
...
@@ -415,7 +415,7 @@ class InitDataBase():
bin_packaegs
[
index
][
'src_name'
]
=
src_package_name
bin_packaegs
[
index
][
'src_name'
]
=
src_package_name
with
DBHelper
(
db_name
=
db_name
)
as
database
:
with
DBHelper
(
db_name
=
db_name
)
as
database
:
database
.
batch_add
(
bin_packaegs
,
bin_p
ack
)
database
.
batch_add
(
bin_packaegs
,
BinP
ack
)
def
_save_bin_requires
(
self
,
db_name
):
def
_save_bin_requires
(
self
,
db_name
):
"""
"""
...
@@ -436,7 +436,7 @@ class InitDataBase():
...
@@ -436,7 +436,7 @@ class InitDataBase():
dependency package'
.
format
(
db_name
=
db_name
))
dependency package'
.
format
(
db_name
=
db_name
))
with
DBHelper
(
db_name
=
db_name
)
as
database
:
with
DBHelper
(
db_name
=
db_name
)
as
database
:
database
.
batch_add
(
requires_datas
,
bin_r
equires
)
database
.
batch_add
(
requires_datas
,
BinR
equires
)
def
_save_bin_provides
(
self
,
db_name
):
def
_save_bin_provides
(
self
,
db_name
):
"""
"""
...
@@ -457,7 +457,7 @@ class InitDataBase():
...
@@ -457,7 +457,7 @@ class InitDataBase():
binary component '
.
format
(
db_name
=
db_name
))
binary component '
.
format
(
db_name
=
db_name
))
with
DBHelper
(
db_name
=
db_name
)
as
database
:
with
DBHelper
(
db_name
=
db_name
)
as
database
:
database
.
batch_add
(
provides_datas
,
bin_p
rovides
)
database
.
batch_add
(
provides_datas
,
BinP
rovides
)
def
__exists_repeat_database
(
self
):
def
__exists_repeat_database
(
self
):
"""
"""
...
...
packageship/pkgship.spec
浏览文件 @
a9aaf546
...
@@ -13,7 +13,7 @@ BuildRequires: python3-prettytable python3-requests python3-flask-session python
...
@@ -13,7 +13,7 @@ BuildRequires: python3-prettytable python3-requests python3-flask-session python
BuildRequires: python3-Flask-APScheduler python3-pandas python3-retrying python3-xlrd python3-XlsxWriter
BuildRequires: python3-Flask-APScheduler python3-pandas python3-retrying python3-xlrd python3-XlsxWriter
Requires: python3-pip python3-flask-restful python3-flask python3 python3-pyyaml
Requires: python3-pip python3-flask-restful python3-flask python3 python3-pyyaml
Requires: python3-sqlalchemy python3-prettytable python3-requests
Requires: python3-sqlalchemy python3-prettytable python3-requests
Requires: python3-
pyinstaller python3-
flask-session python3-flask-script python3-marshmallow python3-uWSGI
Requires: python3-flask-session python3-flask-script python3-marshmallow python3-uWSGI
Requires: python3-pandas python3-dateutil python3-XlsxWriter python3-xlrd python3-Flask-APScheduler python3-retrying
Requires: python3-pandas python3-dateutil python3-XlsxWriter python3-xlrd python3-Flask-APScheduler python3-retrying
%description
%description
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录