Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 851db77

Browse files
CorySaninGiteaBot
andauthored
Fix Arch repo pacman.conf snippet (#35825)
Current template uses the owner followed by the instance URL as the repo name. Technically this can work if the repo happens to be named the exact same way. But if, for example, you follow [the docs](https://docs.gitea.com/usage/packages/arch/#publish-a-package), you'll end up with a package in `core` while the pacman conf refers to a non-existent repo `testuser.gitea.example.com`. Whatever is in the square brackets get substituted in for `$repo`, so we do not want anything except the exact repo name there. And since it's now referring to the repo and not the owner, I've updated the pacman conf to show all repositories. --------- Co-authored-by: Giteabot <teabot@gitea.io>
1 parent 2be51d0 commit 851db77

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎templates/package/content/arch.tmpl‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
<div class="ui form">
55
<div class="field">
66
<label>{{svg "octicon-gear"}} {{ctx.Locale.Tr "packages.arch.registry"}}</label>
7-
<div class="markup"><pre class="code-block"><code>[{{.PackageDescriptor.Owner.LowerName}}.{{.PackageRegistryHost}}]
7+
<div class="markup"><pre class="code-block"><code>{{range $i, $repo := .Repositories}}{{if $i}}
8+
{{end}}[{{$repo}}]
89
SigLevel = Optional TrustAll
9-
Server = <origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/arch/$repo/$arch"></origin-url></code></pre></div>
10+
Server = <origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/arch/$repo/$arch"></origin-url>
11+
{{end}}</code></pre></div>
1012
</div>
1113
<div class="field">
1214
<label>{{svg "octicon-sync"}} {{ctx.Locale.Tr "packages.arch.install"}}</label>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /