diff options
author | Ronak Buch <rabuch2@illinois.edu> | 2016-08-11 18:17:07 -0500 |
---|---|---|
committer | Ronak Buch <rabuch2@illinois.edu> | 2016-08-17 17:15:29 -0500 |
commit | fbeaf6ca2f2e0d6a1d9cfa724469db7994c77d15 (patch) | |
tree | 84b3448610b98c0443f2ff89201e82e3ddbebc7e /src/lib/Bcfg2/Server/Plugins | |
parent | 2c08b85d056eb2c339f18bb9f327d41b95b23d6a (diff) | |
download | bcfg2-fbeaf6ca2f2e0d6a1d9cfa724469db7994c77d15.tar.gz bcfg2-fbeaf6ca2f2e0d6a1d9cfa724469db7994c77d15.tar.bz2 bcfg2-fbeaf6ca2f2e0d6a1d9cfa724469db7994c77d15.zip |
Add support for rawurl in Apt
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins')
-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) |