mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-21 17:24:10 +00:00
Revert "Add Debian package registry" (#24412)
Reverts go-gitea/gitea#22854
This commit is contained in:
parent
bf77e2163b
commit
c0ddec8a2a
57 changed files with 96 additions and 1995 deletions
|
@ -117,15 +117,13 @@ func DeleteFileByID(ctx context.Context, fileID int64) error {
|
|||
|
||||
// PackageFileSearchOptions are options for SearchXXX methods
|
||||
type PackageFileSearchOptions struct {
|
||||
OwnerID int64
|
||||
PackageType string
|
||||
VersionID int64
|
||||
Query string
|
||||
CompositeKey string
|
||||
Properties map[string]string
|
||||
OlderThan time.Duration
|
||||
HashAlgorithmn string
|
||||
Hash string
|
||||
OwnerID int64
|
||||
PackageType string
|
||||
VersionID int64
|
||||
Query string
|
||||
CompositeKey string
|
||||
Properties map[string]string
|
||||
OlderThan time.Duration
|
||||
db.Paginator
|
||||
}
|
||||
|
||||
|
@ -184,15 +182,6 @@ func (opts *PackageFileSearchOptions) toConds() builder.Cond {
|
|||
cond = cond.And(builder.Lt{"package_file.created_unix": time.Now().Add(-opts.OlderThan).Unix()})
|
||||
}
|
||||
|
||||
if opts.Hash != "" && (opts.HashAlgorithmn == "md5" || opts.HashAlgorithmn == "sha1" || opts.HashAlgorithmn == "sha256" || opts.HashAlgorithmn == "sha512") {
|
||||
innerCond := builder.
|
||||
Expr("package_blob.id = package_file.blob_id").
|
||||
And(builder.Eq{
|
||||
"package_blob.hash_" + opts.HashAlgorithmn: opts.Hash,
|
||||
})
|
||||
cond = cond.And(builder.Exists(builder.Select("package_blob.id").From("package_blob").Where(innerCond)))
|
||||
}
|
||||
|
||||
return cond
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue