diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2016-08-18 14:25:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-18 14:25:46 +0200 |
commit | 337580f3e53967ee635926efd308af5da95da5b6 (patch) | |
tree | 243ada9a9ffd18c6c8d015bd47abc24ebe2a2335 /src/lib/Bcfg2/Server | |
parent | b041064295a7805df65a5fb19b699f1319a22d66 (diff) | |
parent | fbeaf6ca2f2e0d6a1d9cfa724469db7994c77d15 (diff) | |
download | bcfg2-337580f3e53967ee635926efd308af5da95da5b6.tar.gz bcfg2-337580f3e53967ee635926efd308af5da95da5b6.tar.bz2 bcfg2-337580f3e53967ee635926efd308af5da95da5b6.zip |
Merge pull request #340 from rbuch/master
Add support for rawurl in Apt
Diffstat (limited to 'src/lib/Bcfg2/Server')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Packages/Apt.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Apt.py b/src/lib/Bcfg2/Server/Plugins/Packages/Apt.py index 7de79e2f3..2637fadfe 100644 --- a/src/lib/Bcfg2/Server/Plugins/Packages/Apt.py +++ b/src/lib/Bcfg2/Server/Plugins/Packages/Apt.py @@ -34,8 +34,12 @@ class AptCollection(Collection): for source in self: if source.rawurl: - self.logger.info("Packages: Skipping rawurl %s" % - source.rawurl) + if source.rawurl[-1] != '/': + source.rawurl = source.rawurl + "/" + index = source.rawurl.rfind("/", 0, -1) + lines.append("deb %s %s" % + (source.rawurl[:index], + source.rawurl[index + 1:])) else: lines.append("deb %s %s %s" % (source.url, source.version, " ".join(source.components))) @@ -44,7 +48,7 @@ class AptCollection(Collection): (source.url, source.version, " ".join(source.components))) - lines.append("") + lines.append("") return "\n".join(lines) |