Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
stboot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
erikhagopian
stboot
Commits
35cb909a
Commit
35cb909a
authored
1 year ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
Allow relative OS package URL in CreateOSPackage
parent
286cb01d
Branches
Branches containing commit
Tags
v0.4.0
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ospkg/ospkg.go
+4
-4
4 additions, 4 deletions
ospkg/ospkg.go
with
4 additions
and
4 deletions
ospkg/ospkg.go
+
4
−
4
View file @
35cb909a
...
...
@@ -76,10 +76,10 @@ func CreateOSPackageCtx(ctx context.Context, label, pkgURL, kernel, initramfs, c
return
nil
,
fmt
.
Errorf
(
"invalid package URL %q, %w"
,
pkgURL
,
err
)
}
if
uri
.
Scheme
==
""
||
uri
.
Scheme
!=
"http"
&&
uri
.
Scheme
!=
"https"
{
stlog
.
Debug
(
"os package: OS package URL:
missing or
unsupported scheme in %s"
,
uri
.
String
()
)
if
uri
.
IsAbs
()
&&
(
uri
.
Scheme
!=
"http"
&&
uri
.
Scheme
!=
"https"
)
{
stlog
.
Debug
(
"os package: OS package URL: unsupported scheme in %s"
,
pkgURL
)
return
nil
,
fmt
.
Errorf
(
"invalid package URL %q,
missing or
unsupported scheme"
,
pkgURL
)
return
nil
,
fmt
.
Errorf
(
"invalid package URL %q, unsupported scheme"
,
pkgURL
)
}
osp
.
descriptor
.
PkgURL
=
pkgURL
...
...
@@ -104,7 +104,7 @@ func CreateOSPackageCtx(ctx context.Context, label, pkgURL, kernel, initramfs, c
}
if
err
:=
osp
.
validate
();
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"OS package fai
e
ld to validate: %w"
,
err
)
return
nil
,
fmt
.
Errorf
(
"OS package fail
e
d to validate: %w"
,
err
)
}
return
osp
,
nil
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment