diff options
author | Yarden Shoham <git@yardenshoham.com> | 2023-04-29 01:06:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-28 18:06:41 -0400 |
commit | c0ddec8a2a4cd348462257e0ceb253daf5692c32 (patch) | |
tree | 6fd2e68d8d3b874576fdd6a2c7a4a4681bef6c98 /models/packages/descriptor.go | |
parent | bf77e2163b670797d5bf7199da88789968e47c61 (diff) | |
download | gitea-c0ddec8a2a4cd348462257e0ceb253daf5692c32.tar.gz gitea-c0ddec8a2a4cd348462257e0ceb253daf5692c32.zip |
Revert "Add Debian package registry" (#24412)
Reverts go-gitea/gitea#22854
Diffstat (limited to 'models/packages/descriptor.go')
-rw-r--r-- | models/packages/descriptor.go | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/models/packages/descriptor.go b/models/packages/descriptor.go index 9256dd5630..974c5b2c36 100644 --- a/models/packages/descriptor.go +++ b/models/packages/descriptor.go @@ -18,7 +18,6 @@ import ( "code.gitea.io/gitea/modules/packages/conan" "code.gitea.io/gitea/modules/packages/conda" "code.gitea.io/gitea/modules/packages/container" - "code.gitea.io/gitea/modules/packages/debian" "code.gitea.io/gitea/modules/packages/helm" "code.gitea.io/gitea/modules/packages/maven" "code.gitea.io/gitea/modules/packages/npm" @@ -128,9 +127,13 @@ func GetPackageDescriptor(ctx context.Context, pv *PackageVersion) (*PackageDesc return nil, err } - pfds, err := GetPackageFileDescriptors(ctx, pfs) - if err != nil { - return nil, err + pfds := make([]*PackageFileDescriptor, 0, len(pfs)) + for _, pf := range pfs { + pfd, err := GetPackageFileDescriptor(ctx, pf) + if err != nil { + return nil, err + } + pfds = append(pfds, pfd) } var metadata interface{} @@ -147,8 +150,6 @@ func GetPackageDescriptor(ctx context.Context, pv *PackageVersion) (*PackageDesc metadata = &conda.VersionMetadata{} case TypeContainer: metadata = &container.Metadata{} - case TypeDebian: - metadata = &debian.Metadata{} case TypeGeneric: // generic packages have no metadata case TypeHelm: @@ -209,19 +210,6 @@ func GetPackageFileDescriptor(ctx context.Context, pf *PackageFile) (*PackageFil }, nil } -// GetPackageFileDescriptors gets the package file descriptors for the package files -func GetPackageFileDescriptors(ctx context.Context, pfs []*PackageFile) ([]*PackageFileDescriptor, error) { - pfds := make([]*PackageFileDescriptor, 0, len(pfs)) - for _, pf := range pfs { - pfd, err := GetPackageFileDescriptor(ctx, pf) - if err != nil { - return nil, err - } - pfds = append(pfds, pfd) - } - return pfds, nil -} - // GetPackageDescriptors gets the package descriptions for the versions func GetPackageDescriptors(ctx context.Context, pvs []*PackageVersion) ([]*PackageDescriptor, error) { pds := make([]*PackageDescriptor, 0, len(pvs)) |