@@ -102,6 +102,8 @@ type mirrorCreateParams struct {
102102 DownloadUdebs bool ` json:"DownloadUdebs"`
103103 // Set "true" to mirror installer files
104104 DownloadInstaller bool ` json:"DownloadInstaller"`
105+ // Set "true" to mirror AppStream (DEP-11) metadata
106+ DownloadAppStream bool ` json:"DownloadAppStream"`
105107 // Set "true" to include dependencies of matching packages when filtering
106108 FilterWithDeps bool ` json:"FilterWithDeps"`
107109 // Set "true" to skip if the given components are in the Release file
@@ -153,7 +155,7 @@ func apiMirrorsCreate(c *gin.Context) {
153155 }
154156
155157 repo , err := deb .NewRemoteRepo (b .Name , b .ArchiveURL , b .Distribution , b .Components , b .Architectures ,
156- b .DownloadSources , b .DownloadUdebs , b .DownloadInstaller )
158+ b .DownloadSources , b .DownloadUdebs , b .DownloadInstaller , b . DownloadAppStream )
157159
158160 if err != nil {
159161 AbortWithJSONError (c , 400 , fmt .Errorf ("unable to create mirror: %s" , err ))
@@ -573,6 +575,14 @@ func apiMirrorsUpdate(c *gin.Context) {
573575 return & task.ProcessReturnValue {Code : http .StatusInternalServerError , Value : nil }, fmt .Errorf ("unable to update: %s" , err )
574576 }
575577
578+ if remote .DownloadAppStream && ! remote .IsFlat () {
579+ err = remote .DownloadAppStreamFiles (out , downloader ,
580+ context .PackagePool (), collectionFactory .ChecksumCollection (nil ), b .IgnoreChecksums )
581+ if err != nil {
582+ return & task.ProcessReturnValue {Code : http .StatusInternalServerError , Value : nil }, fmt .Errorf ("unable to update: %s" , err )
583+ }
584+ }
585+
576586 if remote .Filter != "" {
577587 var filterQuery deb.PackageQuery
578588
0 commit comments