代码拉取完成,页面将自动刷新
import sys
from database.goleveldb.db import packageList
sys.path.append('.')
import deb.local
import deb.formatp
import deb.listp
import deb.package_collection
import deb.package_deps
import deb.package_files
import deb.package
import deb.reflist
import deb.remote
import deb.uploaders
import deb.version
import deb.importp
import files.mocks
import files.package_pool
import files.public
import utils.checksum
import utils.compress
import utils.config
import utils.human
import utils.utils
from typing import List,Dict,Tuple
import api.repos
import database
import api.publish
import deb.snapshot
from context.context import *
def fold(path):
if not os.path.isfile(path) :
t=os.listdir(path)
tt=[]
while t!=[]:
for i in t:
n=os.path.join(path,i)
t.remove(i)
if not os.path.isdir(n):
tt.append(n)
else:
# tt.append(n)
for k in os.listdir(n):
t.append(os.path.join(i,k))
tt.sort()
return tt
# api.repos.apiReposCreate(dict(Name='deepin',Comment='deepin册数',DefaultDistribution='aaa',DefaultComponent='main'))
# reposList=api.repos.apiReposList()
# for i in reposList:
# print(i)
# print(i.__dict__)
# repo=api.repos.apiReposShow('deepin')
# print(repo.__dict__)
# api.repos.apiReposPackagesAdd(dict(name='deepin',PackageRefs=['asdf']))
# from shutil import copyfile
# debDir='/var/spool/apt-mirror/mirror/archive.ubuntukylin.com/ubuntukylin/pool'
# for i in fold(debDir):
# print(i)
# copyfile(i,os.path.join('/root/.aptly/upload/aaa',os.path.basename(i)))
for i in os.listdir('/root/.aptly/upload/aaa'):
api.repos.apiReposPackageFromDir(dict(name='deepin',dir='aaa',file=i,noRemove="1"))
# api.repos.apiReposPackageFromDir(dict(name='deepin',dir='aaa',file='todesk-v4.3.1.0-amd64.deb',noRemove="1",forceReplace=1))
# api.repos.apiReposPackagesShow(dict(name='deepin'))
# api.publish.apiPublishList({})
# api.publish.apiPublishRepoOrSnapshot({'prefix':'filesystem:sparkstore:',"SourceKind": "local","Signing":{"Passphrase":""}, "Sources": [{"Name": "deepin","Component":"main"}], "Architectures": ["i386", "amd64"], "Distribution": "wheezy",'ForceOverwrite':1})
# print(dir(database))
# aptlyContext=AptlyContext()
# gpgSigner=aptlyContext.GetSigner()
# print(gpgSigner.__dict__)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。