From: Mikko Rasa Date: Thu, 9 Oct 2014 22:18:58 +0000 (+0300) Subject: Don't generate filenames with double dash for versionless packages X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=ca82985462351ea787d62236e05b962b06dfe267;p=builder.git Don't generate filenames with double dash for versionless packages --- diff --git a/source/sourcearchivecomponent.cpp b/source/sourcearchivecomponent.cpp index 6dc5fe6..3304e6b 100644 --- a/source/sourcearchivecomponent.cpp +++ b/source/sourcearchivecomponent.cpp @@ -35,7 +35,10 @@ void SourceArchiveComponent::create_targets() const files.push_back(i->second); const Toolchain &toolchain = builder.get_toolchain(); - string archive_name = package.get_name()+"-"+package.get_version()+"-source"; + string archive_name = package.get_name(); + if(!package.get_version().empty()) + archive_name += "-"+package.get_version(); + archive_name += "-source"; Target *result = toolchain.get_tool("TAR").create_target(files, archive_name); build_graph.get_target("archives")->add_dependency(*result); }