Entropy/ServerInterface/ServerMirrorsInterface:

- block database upload if there are uncommitted configuration files


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2759 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
lxnay
2008-12-10 11:51:06 +00:00
parent 128e7a34a1
commit f054c3fbe4
+48 -1
View File
@@ -469,7 +469,7 @@ class EquoInterface(TextInterface):
# add to etpRepositories
repodata = {
'repoid': sets_repo_id,
'repoid': repoid,
'in_memory': True,
'description': description,
'packages': package_mirrors,
@@ -29138,6 +29138,53 @@ class ServerMirrorsInterface:
)
return 3,set(),set()
self.Entropy.updateProgress(
"[repo:%s|%s] %s" % (
brown(repo),
red(_("config files")), # something short please
blue(_("checking system")),
),
importance = 1,
type = "info",
header = blue(" @@ "),
back = True
)
# scanning for config files not updated
scandata = self.Entropy.ClientService.FileUpdates.scanfs(dcache = False)
if scandata:
self.Entropy.updateProgress(
"[repo:%s|%s] %s" % (
brown(repo),
red(_("config files")), # something short please
blue(_("there are configuration files not updated yet")),
),
importance = 1,
type = "error",
header = darkred(" @@ ")
)
for x in scandata:
self.Entropy.updateProgress(
"%s" % ( brown(etpConst['systemroot']+scandata[x]['destination']) ),
importance = 1,
type = "info",
header = "\t"
)
return 4,set(),set()
self.Entropy.updateProgress(
"[repo:%s|%s] %s" % (
brown(repo),
red(_("config files")), # something short please
blue(_("no configuration files to commit. All fine.")),
),
importance = 1,
type = "info",
header = blue(" @@ "),
back = True
)
# for x in scandata:
#
uris = [x[0] for x in upload_queue]
errors, fine_uris, broken_uris = self.upload_database(uris, repo = repo)
if errors: