@@ -20,23 +20,19 @@ class DockerfileHandler(models.DatafileHandler):
2020 datasource_id = 'dockerfile_oci_labels'
2121 default_package_type = 'docker-image'
2222 path_patterns = ('Dockerfile' , 'containerfile' , '*.dockerfile' )
23- description = 'Dockerfile (OCI) metadata handler'
24- documentation_url = 'https://docs.docker.com/engine/reference/builder/'
2523
2624 @classmethod
2725 def parse (cls , location , package_only = False ):
2826 """
2927 Parse a Dockerfile and yield one or more PackageData objects with OCI labels and metadata.
3028 """
3129 labels = cls .extract_oci_labels_from_dockerfile (location )
32-
33-
3430 package_data = {
3531 'datasource_id' : cls .datasource_id ,
3632 'type' : cls .default_package_type ,
37- 'name' : labels .get ('name' , 'unknown ' ),
38- 'version' : labels .get ('version' , 'unknown ' ),
39- 'license_expression' : labels .get ('license' , 'unknown ' ),
33+ 'name' : labels .get ('name' , 'None ' ),
34+ 'version' : labels .get ('version' , 'None ' ),
35+ 'license_expression' : labels .get ('license' , 'None ' ),
4036 'labels' : labels ,
4137 }
4238
@@ -52,21 +48,3 @@ def extract_oci_labels_from_dockerfile(cls, dockerfile_path):
5248 parser .parse (dockerfile_path )
5349 labels = parser .labels
5450 return labels
55-
56- @classmethod
57- def assemble (cls , package_data , resource , codebase , package_adder ):
58- """
59- Assemble a Package from the parsed Dockerfile data.
60- """
61- if package_data .purl :
62- package = models .Package .from_package_data (package_data = package_data , datafile_path = resource .path )
63-
64-
65- package .populate_license_fields ()
66-
67- yield package
68-
69-
70- package_adder (package .package_uid , resource , codebase )
71-
72- yield resource
0 commit comments