So looking at this a bit more, the assumption that "there is only one hash for a particular file in an archive" is correct - that should always be the case, so what Archive.getFilesAndSha1s() and the package copier is doing is also correct. Sort order has no bearing on this at all.
The problem is that there is a conflicting file *already in the archive*. How that got there is what I am most interested in now.
Kees, do you have any idea how we'd end up with two different linux_2.6.24.orig.tar.gz files?
lpmain_staging=> select distinct LibraryFileContent.sha1 from LibraryFileAlias, LibraryFileContent, SourcePackagePublishingHistory, SourcePackageReleaseFile, SourcePackageRelease
where SourcePackagePublishingHistory.archive = 1and SourcePackageRelease.id = SourcePackagePublishingHistory.sourcepackagerelease
and SourcePackageReleaseFile.sourcepackagerelease = SourcePackageRelease.id
and LibraryFileAlias.id = SourcePackageReleaseFile.libraryfile
and LibraryFileAlias.filename = 'linux_2.6.24.orig.tar.gz'
and LibraryFileContent.id = LibraryFileAlias.content; sha1
------------------------------------------
b7b63f52551f9e4bf2e5ba902f8385fbefc5d80c
ccccdc4759fd780a028000a1b7b15dbd9c60363b
(2 rows)
So looking at this a bit more, the assumption that "there is only one hash for a particular file in an archive" is correct - that should always be the case, so what Archive. getFilesAndSha1 s() and the package copier is doing is also correct. Sort order has no bearing on this at all.
The problem is that there is a conflicting file *already in the archive*. How that got there is what I am most interested in now.
Kees, do you have any idea how we'd end up with two different linux_2. 6.24.orig. tar.gz files?
lpmain_staging=> select distinct LibraryFileCont ent.sha1 from LibraryFileAlias, LibraryFileContent, SourcePackagePu blishingHistory , SourcePackageRe leaseFile, SourcePackageRe lease blishingHistory .archive = 1and SourcePackageRe lease.id = SourcePackagePu blishingHistory .sourcepackager elease leaseFile. sourcepackagere lease = SourcePackageRe lease.id leaseFile. libraryfile s.filename = 'linux_ 2.6.24. orig.tar. gz' ent.id = LibraryFileAlia s.content;
sha1 ------- ------- ------- ------- ------- 4bf2e5ba902f838 5fbefc5d80c 0a028000a1b7b15 dbd9c60363b
where SourcePackagePu
and SourcePackageRe
and LibraryFileAlias.id = SourcePackageRe
and LibraryFileAlia
and LibraryFileCont
-------
b7b63f52551f9e
ccccdc4759fd78
(2 rows)