Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
xmvn-connector.34078
UUID.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File UUID.patch of Package xmvn-connector.34078
--- a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/DefaultArtifactInstaller.java +++ b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/DefaultArtifactInstaller.java @@ -185,7 +185,12 @@ class DefaultArtifactInstaller am.setNamespace( repo.getNamespace() ); // UUID - am.setUuid( UUID.randomUUID().toString() ); + UUID guid = UUID.randomUUID(); + if ( System.getenv( "SOURCE_DATE_EPOCH" ) != null ) + { + guid = UUID.nameUUIDFromBytes( ( System.getenv( "SOURCE_DATE_EPOCH" ) + repo.getNamespace() + artifact.toString() ).getBytes() ); + } + am.setUuid( guid.toString() ); // Compat version for ( String version : rule.getVersions() ) --- a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/JavaPackage.java +++ b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/JavaPackage.java @@ -58,7 +58,12 @@ public class JavaPackage super( id ); this.basePackageName = basePackageName; this.metadataDir = metadataDir; - metadata.setUuid( UUID.randomUUID().toString() ); + UUID guid = UUID.randomUUID(); + if ( System.getenv( "SOURCE_DATE_EPOCH" ) != null ) + { + guid = UUID.nameUUIDFromBytes( ( System.getenv( "SOURCE_DATE_EPOCH" ) + id + basePackageName + metadataDir.toString() ).getBytes() ); + } + metadata.setUuid( guid.toString() ); } /** @@ -71,11 +76,16 @@ public class JavaPackage private PackageMetadata getSplitMetadata( String namespace ) { PackageMetadata splitMetadata = new PackageMetadata(); - splitMetadata.setUuid( UUID.randomUUID().toString() ); splitMetadata.setProperties( metadata.getProperties() ); List<ArtifactMetadata> allArtifacts = metadata.getArtifacts(); List<ArtifactMetadata> splitArtifacts = allArtifacts.stream().filter( a -> namespace.equals( a.getNamespace() ) ).collect( Collectors.toList() ); + UUID guid = UUID.randomUUID(); + if ( System.getenv( "SOURCE_DATE_EPOCH" ) != null ) + { + guid = UUID.nameUUIDFromBytes( ( System.getenv( "SOURCE_DATE_EPOCH" ) + splitArtifacts.toString() ).getBytes() ); + } + splitMetadata.setUuid( guid.toString() ); splitMetadata.setArtifacts( splitArtifacts ); splitMetadata.setSkippedArtifacts( metadata.getSkippedArtifacts() ); return splitMetadata;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor