diff --git a/helpers/create-abi-dump.py b/helpers/create-abi-dump.py --- a/helpers/create-abi-dump.py +++ b/helpers/create-abi-dump.py @@ -273,7 +273,7 @@ foundLibraries.append(foundLibrary) # Initialize the archive manager -ourArchive = Packages.Archive(arguments.environment, 'ABIReference', usingCache = False) +ourArchive = Packages.Archive(arguments.environment, 'ABIReference', usingCache = False, suffix = ".abidump") # Determine which SCM revision we are storing # This will be embedded into the package metadata which might help someone doing some debugging diff --git a/helpers/helperslib/Packages.py b/helpers/helperslib/Packages.py --- a/helpers/helperslib/Packages.py +++ b/helpers/helperslib/Packages.py @@ -15,11 +15,13 @@ class Archive(object): # Sets up an archive for use, to allow for retrieving and uploading new resources to the archive # A local cache of the archive will be managed to improve performance - def __init__( self, name, platform, usingCache = True ): + # contentsSuffix is the filename suffix used for the contents files + def __init__( self, name, platform, usingCache = True, contentsSuffix = ".tar" ): # Save the name of this archive, the platform we're on and whether a local cache should be used for later use - self.name = name - self.platform = platform - self.usingCache = usingCache + self.name = name + self.platform = platform + self.usingCache = usingCache + self.contentsSuffix = contentsSuffix # Set an empty manifest up for safety later on self.serverManifest = {} @@ -78,7 +80,7 @@ def retrievePackage( self, package ): # Determine the names the metadata and archive files would have respectively metadataFilename = package + ".yaml" - contentsFilename = package + ".tar" + contentsFilename = package + self.contentsSuffix # Begin determining if we need to download or not # We start from the assumption we will need to download an archive @@ -171,7 +173,7 @@ def storePackage( self, package, archiveFileToInclude, scmRevision = '', extraMetadata=None ): # Determine the names the metadata and archive files would have respectively metadataFilename = package + ".yaml" - contentsFilename = package + ".tar" + contentsFilename = package + self.contentsSuffix # Generate metadata for the package we are about to store archiveMetadata = self.generateMetadataForFile( archiveFileToInclude, scmRevision, extraMetadata ) @@ -219,7 +221,7 @@ def publishPackage( self, package ): # Determine the names the metadata and archive files would have respectively metadataFilename = package + ".yaml" - contentsFilename = package + ".tar" + contentsFilename = package + self.contentsSuffix # Move the contents file first # Assuming we're on the same file system this should be an atomic operation and thus instant