I had some spare time now (not much to do at work...) so I used it to browse a little bit in the entropy code (http://svn.sabayonlinux.org/projects/entropy/trunk/)
If found the routine that logs the 'Repository is being updated' messages in the 'libraries/entropy.py' file
- Code: Select all
def handle_repository_lock(self, repo):
# get database lock
unlocked = self.is_repository_unlocked(repo)
if not unlocked:
mytxt = "%s: %s. %s." % (
bold(_("Attention")),
red(_("Repository is being updated")),
red(_("Try again in a few minutes")),
)
self.Entropy.updateProgress(
mytxt,
importance = 1,
type = "warning",
header = "\t"
)
return True
return False
Going further down the line, following the routines I found the following (also in 'libraries/entropy.py)
- Code: Select all
def is_repository_unlocked(self, repo):
self.__validate_repository_id(repo)
rc = self.download_item("lock", repo)
if rc: # cannot download database
self.syncErrors = True
return False
return True
and
- Code: Select all
def download_item(self, item, repo, cmethod = None, lock_status_func = None):
self.__validate_repository_id(repo)
url, filepath = self.__construct_paths(item, repo, cmethod)
#some code here, left out by me (poster of this messages...)
rc = fetchConn.download()
del fetchConn
if rc in ("-1","-2","-3"):
return False
self.Entropy.setup_default_file_perms(filepath)
return True
From what I could understand further down the line (to much code to paste
If it failes then it concludes that it is unlocked, if it succeeds it concludes that it is locked.
This is all logical to me, but for some reason it succeeds to download a file that isn't event there?
P.S. I must say I was pleasantly suprised when I saw how much code there was for entropy. It was a little hard to browse through because of the large files, but then I don't have a python ide to ease the browsing between classes (I used notepad


, but had to alter the code in 'libraries/entropy.py' a bit