Page MenuHomeSoftware Heritage

add missing "archive_type" property to revision.metadata JSON for all imported dsc
Closed, MigratedEdits Locked

Description

the original_artifact JSON properties in revision.metadata for all imported tar/zip files look this:

"original_artifact" : [
  {
    "name" : "birdfont_0.37-3.dsc",
    "sha1" : "89d3ba1591147f215f9ad0603184c2c43b6bb693",
    "length" : 99,
    "sha256" : "ff67d9d596c1db8ccf5ffa702e9226f549177e48bd74c6a0c0123d951584f26c",
    "sha1_git" : "4adf3851d7fc5a6d3273943209e68a12bad34de6"
  },
  {
    "name" : "birdfont_0.37.orig.tar.gz",
    "sha1" : "f8662ae8c52e4604264aff605b8c5395b757724c",
    "length" : 99,
    "sha256" : "6c2d40ffdc7b78d6391d911aa222ff70b72c1776d297940a1bb949c6fc02cdd0",
    "sha1_git" : "b7f56d2480b652727da3021df08dd31cc377f679"
  },
  {
    "name" : "birdfont_0.37-3.debian.tar.xz",
    "sha1" : "431a696a39e7ce44b8aa5c55daeb2e833dd2a7d5",
    "length" : 99,
    "sha256" : "448e1c943b8e9f6d12b39fc6a7dcf9b6668b74b3754520e4098365e7efc5ae94",
    "sha1_git" : "bf948334fe2126c8fbd43c6102881332e6a6335f"
  }
]

Differently from what happens for the tarball loader, we don't have an archive_type field here. We should add it, both to the git loader and to the already imported data.

Note that it is not 100% clear where to add it. In the case of the tarball loader we have it in each element of the array, but that's easy because it's an array with a single element. What do we want to do here? Add it to all elements, or rather structure a bit more "original_artifact" to have an "archive_type" property and then a "members" array? That would impact T339 too.

Event Timeline

olasd changed the visibility from "All Users" to "Public (No Login Required)".May 13 2016, 5:09 PM
olasd added a subscriber: vlorentz.

I suspect that this is superseded by work done by @vlorentz for the extrinsic metadata store.

I don't think so; the loader is storing the data elsewhere, but still doesn't write the archive type in each of these entries