TODO
by Matt Domsch
TODO | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 370ac317ed98b446c21ad3f7e9f0c22997dbff8d
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Mon Jun 14 10:35:30 2010 -0500
TODO: add 'create Category' item
diff --git a/TODO b/TODO
index 19041ed..fe29195 100644
--- a/TODO
+++ b/TODO
@@ -29,3 +29,5 @@ will be in the tree. Include them in the proper metalinks.
* replace kid templates with genshi
http://genshi.edgewall.org/wiki/GenshiVsKid
http://genshi.edgewall.org/wiki/GenshiTutorial
+
+* add a 'create Category' button/page in the admin view
13 years, 10 months
mirrorlist-server/mirrorlist_server.py
by Matt Domsch
mirrorlist-server/mirrorlist_server.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit a315e7e6772f263b6af6bee200856532f78c1568
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Mon Jun 14 10:23:57 2010 -0500
mirrorlist_server: add mm0:private attribute to <url> in metalinks
By request of James Antill. This will be used by yum in Fedora 14 and
newer to let users set a policy of only using their private mirror.
diff --git a/mirrorlist-server/mirrorlist_server.py b/mirrorlist-server/mirrorlist_server.py
index 0d73469..9c85343 100755
--- a/mirrorlist-server/mirrorlist_server.py
+++ b/mirrorlist-server/mirrorlist_server.py
@@ -106,7 +106,7 @@ def metalink_file_not_found(directory, file):
message = '%s/%s not found or has no metalink' % (directory, file)
return metalink_failuredoc(message)
-def metalink(directory, file, hosts_and_urls):
+def metalink(cache, directory, file, hosts_and_urls):
preference = 100
# fixme add alternate format pubdate when specified
pubdate = datetime.datetime.utcnow().strftime("%a, %d %b %Y %H:%M:%S GMT")
@@ -157,6 +157,9 @@ def metalink(directory, file, hosts_and_urls):
doc += indent(3) + '<resources maxconnections="1">\n'
for (hostid, hcurls) in hosts_and_urls:
+ private = ''
+ if hostid not in cache['global']:
+ private = 'mm0:private="True"'
for url in hcurls:
protocol = url.split(':')[0]
# FIXME January 2010
@@ -164,7 +167,7 @@ def metalink(directory, file, hosts_and_urls):
# but MirrorManager 1.2.6 used it accidentally, as did yum 3.2.20-3 as released
# in Fedora 8, 9, and 10. After those three are EOL (~January 2010), the
# extra protocol= can be removed.
- doc += indent(4) + '<url protocol="%s" type="%s" location="%s" preference="%s">' % (protocol, protocol, host_country_cache[hostid].upper(), preference)
+ doc += indent(4) + '<url protocol="%s" type="%s" location="%s" preference="%s" %s>' % (protocol, protocol, host_country_cache[hostid].upper(), preference, private)
doc += url
doc += '</url>\n'
preference = max(preference-1, 1)
@@ -567,7 +570,7 @@ def do_mirrorlist(kwargs):
hosts_and_urls = append_path(allhosts, cache, file, pathIsDirectory=pathIsDirectory)
if 'metalink' in kwargs and kwargs['metalink']:
- (resulttype, returncode, results)=metalink(dir, file, hosts_and_urls)
+ (resulttype, returncode, results)=metalink(cache, dir, file, hosts_and_urls)
d = dict(message=None, resulttype=resulttype, returncode=returncode, results=results)
return d
13 years, 10 months