Skip to content

Commit

Permalink
Merge pull request #300 from adrianreber/2021-09-06-empty-topdir
Browse files Browse the repository at this point in the history
empty topdir
  • Loading branch information
adrianreber authored Sep 6, 2021
2 parents c1e572c + ad75709 commit 83f58eb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
4 changes: 2 additions & 2 deletions doc/contributors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ Contributors to MirrorManager

MirrorManager2 would be nothing without its contributors.

On May 29, 2021 (release 0.15), the list looks as follow:
On September 06, 2021 (release 0.16), the list looks as follow:

================= ===========
Number of commits Contributor
================= ===========
908 Pierre-Yves Chibon <[email protected]>
356 Adrian Reber <[email protected]>
363 Adrian Reber <[email protected]>
58 Ralph Bean <[email protected]>
19 Zbigniew Jędrzejewski-Szmek <[email protected]>
14 Luke Macken <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion mirrormanager2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@

__import__('pkg_resources').declare_namespace(__name__)

__version__ = '0.15'
__version__ = '0.16'
7 changes: 6 additions & 1 deletion utility/mirrormanager2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
%endif

Name: mirrormanager2
Version: 0.15
Version: 0.16
Release: 1%{?dist}
Summary: Mirror management application

Expand Down Expand Up @@ -455,6 +455,11 @@ MM2_SKIP_NETWORK_TESTS=1 ./runtests.sh -v
%{_bindir}/mirrorlist_statistics

%changelog
* Mon Sep 06 2021 Adrian Reber <[email protected]> - 0.16-1
- Update to 0.16
- Added support for admin only categories
- Added support for empty top dirs ('')

* Sat May 29 2021 Adrian Reber <[email protected]> - 0.15-1
- Update to 0.15

Expand Down
9 changes: 7 additions & 2 deletions utility/mm2_crawler
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,10 @@ def sync_hcds(session, host, host_category_dirs, options):
continue

topname = hc.category.topdir.name
path = d.name[len(topname)+1:]
toplen = len(topname)
if d.name.startswith('/'):
toplen += 1
path = d.name[toplen:]

hcd = mirrormanager2.lib.get_hostcategorydir_by_hostcategoryid_and_path(
session, host_category_id=hc.id, path=path)
Expand Down Expand Up @@ -1307,7 +1310,9 @@ def per_host(session, host, options, config):
categoryUrl = method_pref(host_category_urls)
if categoryUrl is None:
continue
categoryPrefixLen = len(category.topdir.name)+1
categoryPrefixLen = len(category.topdir.name)
if categoryPrefixLen > 0:
categoryPrefixLen += 1

if options.continents:
# Only check for continent if something specified
Expand Down

0 comments on commit 83f58eb

Please sign in to comment.