server/crawler_perhost
by Matt Domsch
server/crawler_perhost | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 7c4e194f5ada28f430b2267717f0846a1382965b
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Mon Jul 19 11:27:01 2010 -0500
crawler: don't close sys.stdout as logfile, leave that for sys.exit()
diff --git a/server/crawler_perhost b/server/crawler_perhost
index eda28aa..52f2456 100755
--- a/server/crawler_perhost
+++ b/server/crawler_perhost
@@ -519,7 +519,7 @@ def sigusr1_handler(signum, frame):
reopenLogs = False
def reopen_logs():
global logfile
- if logfile is not None:
+ if logfile is not None and logfile != sys.stdout:
fname = logfile.name
logfile.flush()
# it's a logfile, don't care if it's fsynced to disk or not...
@@ -684,7 +684,7 @@ def main():
print >>logfile, "Ending crawl %s" % (datetime.utcnow().isoformat())
logfile.flush()
- logfile.close()
+ if logfile != sys.stdout: logfile.close()
if __name__ == "__main__":
13 years, 9 months
server/update-static-content
by Matt Domsch
server/update-static-content | 2 --
1 file changed, 2 deletions(-)
New commits:
commit 3a638af15a59277156c6806869679304f810fd40
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Thu Jul 8 15:23:58 2010 -0500
remove robots.txt and favicon.ico. These should come from the hosting organization, not MM.
diff --git a/server/update-static-content b/server/update-static-content
index 439b4f3..fdcd379 100755
--- a/server/update-static-content
+++ b/server/update-static-content
@@ -17,8 +17,6 @@ if [ $(find . -type f -name \*.html | wc -l) -lt 5 ]; then
fi
rsync -a /usr/share/mirrormanager/server/mirrormanager/static .
-ln static/images/favicon.ico
-touch robots.txt
# remove /mirrormanager in the URLs
find . -name index.html -type f | xargs -n 20 sed -i -e 's:href=\"/mirrormanager/:href=\"/:g'
find . -name \*.css -type f | xargs -n 20 sed -i -e 's:/mirrormanager/:/:g'
13 years, 9 months
2 commits - server/mirrormanager server/update-master-directory-list
by Matt Domsch
server/mirrormanager/repomap.py | 2 +-
server/update-master-directory-list | 33 +++++++++++++++++++++++++++------
2 files changed, 28 insertions(+), 7 deletions(-)
New commits:
commit 93749dc38d59152e6b1ba804af6a24d00aba0122
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Wed Jul 7 10:04:31 2010 -0500
umdl: set Repository.name = directory.name to be guaranteed unique
diff --git a/server/update-master-directory-list b/server/update-master-directory-list
index 4bdc226..95ba977 100755
--- a/server/update-master-directory-list
+++ b/server/update-master-directory-list
@@ -195,26 +195,47 @@ def make_repomd_file_details(dir):
fd = FileDetail(directory=dir, filename='repomd.xml', sha1=sha1, md5=md5, sha256=sha256, sha512=sha512,
timestamp=timestamp, size=size)
+
+def move_repository_from_development(prefix, arch, newdir):
+ try:
+ repo = Repository.selectBy(prefix=prefix, arch=arch)[0]
+ except:
+ return None
+
+ if repo.directory is not None and newdir.name is not None:
+ if '/development' in repo.directory.name and '/releases' in newdir.name:
+ repo.directory = newdir
+ return repo
+
def make_repository(dir, category):
repo = None
path = dir.name[len(category.topdir.name)+1:]
(ver, arch) = guess_ver_arch_from_path(category, path)
if ver is None or arch is None:
return None
- path = trim_os_from_dirname(path)
- name=path.split('/')
- name = rename_SRPMS_source(name)
- name='-'.join(name)
- name='%s-%s-%s' % (category.product.name, category.name, name)
prefix = repo_prefix(path, category, ver)
try:
- repo = Repository(name=name, category=category, version=ver, arch=arch, directory=dir, prefix=prefix)
+ # historically, Repository.name was a longer string with
+ # product and category deliniations. But we were getting
+ # unique constraint conflicts once we started introducing
+ # repositories under repositories. And .name isn't used for
+ # anything meaningful. So simply have it match dir.name,
+ # which can't conflict.
+ repo = Repository(name=dir.name, category=category, version=ver, arch=arch, directory=dir, prefix=prefix)
except:
+ # repo exists, but it may be one we want to move
+ #try:
+ #repo = move_repository_from_development(prefix, arch, dir)
+ #except:
+ #pass
pass
return repo
+
+
+
def nuke_gone_directories(category, category_directories):
""" deleting a Directory has a ripple effect through the whole
database. Be really sure you're ready do to this. It comes
commit 20dd461704b7363f14e6a2a8b11d7542bf114a75
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Mon Jul 5 07:29:41 2010 -0500
repomap: remove extra -beta" on prefixes
diff --git a/server/mirrormanager/repomap.py b/server/mirrormanager/repomap.py
index 66ccbc0..27665b6 100644
--- a/server/mirrormanager/repomap.py
+++ b/server/mirrormanager/repomap.py
@@ -362,7 +362,7 @@ def repo_prefix(path, category, ver):
elif isSource:
prefix = u'rhel-source-%s' % version
else:
- prefix = u'rhel-%s-beta' % version
+ prefix = u'rhel-%s' % version
if prefix and isBeta:
prefix = u'%s-beta' % prefix
13 years, 9 months
server/mirrormanager
by Matt Domsch
server/mirrormanager/repomap.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit b3b64ccb95ecae186653deedbb146042ccf645fd
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Sun Jul 4 13:05:10 2010 -0500
category named "RHEL", not "Red Hat Enterprise Linux". Fix references.
diff --git a/server/mirrormanager/repomap.py b/server/mirrormanager/repomap.py
index 0f06a53..66ccbc0 100644
--- a/server/mirrormanager/repomap.py
+++ b/server/mirrormanager/repomap.py
@@ -43,10 +43,10 @@ repomap = {
u'epel-debug-' : (u'EPEL', u'Fedora EPEL'),
u'epel-source-' : (u'EPEL', u'Fedora EPEL'),
- u'rhel-' : (u'RHEL', u'Red Hat Enterprise Linux'),
- u'rhel-debug-' : (u'RHEL', u'Red Hat Enterprise Linux'),
- u'rhel-source-' : (u'RHEL', u'Red Hat Enterprise Linux'),
- u'rhel-optional-' : (u'RHEL', u'Red Hat Enterprise Linux'),
+ u'rhel-' : (u'RHEL', u'RHEL'),
+ u'rhel-debug-' : (u'RHEL', u'RHEL'),
+ u'rhel-source-' : (u'RHEL', u'RHEL'),
+ u'rhel-optional-' : (u'RHEL', u'RHEL'),
}
import re
@@ -92,7 +92,7 @@ def repo_prefix(path, category, ver):
isRrpmfusionNonfreeEl = (category.name == u'RPMFUSION nonfree EL')
isRrpmfusionNonfreeFedora = (category.name == u'RPMFUSION nonfree Fedora')
- isRhel = (category.name == u'Red Hat Enterprise Linux')
+ isRhel = (category.name == u'RHEL')
version = u'unknown'
if not isRawhide and ver is not None:
13 years, 9 months
server/mirrormanager
by Matt Domsch
server/mirrormanager/repomap.py | 41 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
New commits:
commit dfcfc1409c342a56eee1d1da8f4f4e9bbd26d96a
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Sun Jul 4 13:01:38 2010 -0500
add repomaps for RHEL
diff --git a/server/mirrormanager/repomap.py b/server/mirrormanager/repomap.py
index cc48f97..0f06a53 100644
--- a/server/mirrormanager/repomap.py
+++ b/server/mirrormanager/repomap.py
@@ -42,6 +42,11 @@ repomap = {
u'epel-' : (u'EPEL', u'Fedora EPEL'),
u'epel-debug-' : (u'EPEL', u'Fedora EPEL'),
u'epel-source-' : (u'EPEL', u'Fedora EPEL'),
+
+ u'rhel-' : (u'RHEL', u'Red Hat Enterprise Linux'),
+ u'rhel-debug-' : (u'RHEL', u'Red Hat Enterprise Linux'),
+ u'rhel-source-' : (u'RHEL', u'Red Hat Enterprise Linux'),
+ u'rhel-optional-' : (u'RHEL', u'Red Hat Enterprise Linux'),
}
import re
@@ -87,6 +92,8 @@ def repo_prefix(path, category, ver):
isRrpmfusionNonfreeEl = (category.name == u'RPMFUSION nonfree EL')
isRrpmfusionNonfreeFedora = (category.name == u'RPMFUSION nonfree Fedora')
+ isRhel = (category.name == u'Red Hat Enterprise Linux')
+
version = u'unknown'
if not isRawhide and ver is not None:
version = ver.name
@@ -325,5 +332,39 @@ def repo_prefix(path, category, ver):
prefix = u'nonfree-fedora-rawhide-source'
else:
prefix = u'nonfree-fedora-rawhide'
+
+ elif isRhel:
+ isBeta = u'beta' in path
+ isOptional= u'optional' in path
+ isCS = u'ClusteredStorage' in path
+ isHA = u'HighAvailability' in path
+ isLFS = u'LargeFileSystem' in path
+ isLB = u'LoadBalance' in path
+ if isCS:
+ prefix = u'rhel-%s-clusteredstorage' % version
+ elif isHA:
+ prefix = u'rhel-%s-highavailability' % version
+ elif isLFS:
+ prefix = u'rhel-%s-largefilesystem' % version
+ elif isLB:
+ prefix = u'rhel-%s-loadbalance' % version
+ elif isOptional:
+ if isSource:
+ prefix = u'rhel-optional-source-%s' % version
+ elif isDebug:
+ prefix = u'rhel-optional-debug-%s' % version
+ else:
+ prefix = u'rhel-optional-%s' % version
+ else:
+ if isDebug:
+ prefix = u'rhel-debug-%s' % version
+ elif isSource:
+ prefix = u'rhel-source-%s' % version
+ else:
+ prefix = u'rhel-%s-beta' % version
+
+ if prefix and isBeta:
+ prefix = u'%s-beta' % prefix
+
return prefix
13 years, 9 months