]> git.tdb.fi Git - builder.git/commitdiff
Don't generate filenames with double dash for versionless packages
authorMikko Rasa <tdb@tdb.fi>
Thu, 9 Oct 2014 22:18:58 +0000 (01:18 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 9 Oct 2014 22:18:58 +0000 (01:18 +0300)
source/sourcearchivecomponent.cpp

index 6dc5fe6caa2a6dd96d88736d45a1f1a430aa9839..3304e6badff7df162d6a76d77f878d5cdc68b06c 100644 (file)
@@ -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);
 }