def _calculateFileNameAndVersioning(self): #self.version = self.metadata._getDefaultDefinedVersion('+') self.format = 'gzip' Packager._calculateFileNameAndVersioning(self) self.version = self.metadata._getVersionWithFormat( ["%(epoch)s:", "%(primary)s"], True, ['epoch', 'primary'], '+') version = self.version self.filenameVersion = self.metadata._getVersionWithFormat( ["%(primary)s"], True, ['epoch', 'primary'], '+') self.packageVersion = self.options['package-version'] self.filenameFullVersion = '%s-%s' % (self.filenameVersion, self.packageVersion) self.fullVersion = '%s-%s' % (version, self.packageVersion) self.fullPackageName = '%s_%s_%s.deb' % ( self.packageName, self.filenameFullVersion, self.arch)
def _calculateFileNameAndVersioning(self): hasPackageVersion = 'package-version' in self.options hasExtension = 'extension' in self.options if 'format' in self.options: self.format = self.options['format'] else: self.format = 'gzip' if self.format == 'gzip': self.filetype = 'gz' if hasExtension: ext = self.options['extension'] else: ext = 'tar.gz' elif self.format == 'bzip2': self.filetype = 'bz' if hasExtension: ext = self.options['extension'] else: ext = 'tar.bz2' else: self.log.warning( "'format' '%s' is not understood defaulting to gzip") self.format = 'gzip' self.filetype = 'gz' if hasExtension: ext = self.options['extension'] else: ext = 'tar.gz' if not hasPackageVersion: self.options['package-version'] = '' Packager._calculateFileNameAndVersioning(self) if 'version' in self.options: self.version = self.metadata._parseVersionFormatString( self.options['version']) if not hasPackageVersion: self.fullVersion = self.version else: self.fullVersion = '%s-%s' % (self.version, self.packageVersion) self.fullPackageName = "%s-%s" % (self.packageName, self.fullVersion) self.archiveFileName = '%s.%s' % (self.fullPackageName, ext) self.fullPathToArchive = os.path.join(self.resultdir, self.archiveFileName)
def _calculateFileNameAndVersioning(self): Packager._calculateFileNameAndVersioning(self) self.archiveFileName = "%s.zip" % self.fullPackageName self.fullPathToArchive = os.path.join(self.resultdir, self.archiveFileName)