Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

funtoo-http: Add support to next release #689

Merged
merged 1 commit into from
Jan 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions sources/funtoo-http.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ func (s *funtoo) Run() error {
topLevelArch = "arm-64bit"
}

baseURL := fmt.Sprintf("%s/%s-release-std/%s/%s",
// Keep release backward compatible to old implementation
// and to permit to have yet the funtoo/1.4 alias.
if s.definition.Image.Release == "1.4" {
s.definition.Image.Release = "1.4-release-std"
}
Comment on lines +35 to +39
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we expect 1.5 to also be 1.5-release-std? If so, should we make the logic append -release-std to anything that's not next instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment there aren't plans for 1.5-release-std or other releases, just 1.4-release-std and next. Instead could be could to use it also for harvester releases that are high development trees often broken but that could be integrated eventually with this patch for cd/ci tasks.
So, I don't think that hardcoded a postfix is a great solution, IMHO.
Personally, I think that was wrong before to have statically the release-std string fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to complete the previous comment... the harvester releases are there:
https://harvester.funtoo.org/
and in this case, it's needed to replace the URL too but I haven't tested yet if it could work.


baseURL := fmt.Sprintf("%s/%s/%s/%s",
s.definition.Source.URL, s.definition.Image.Release,
topLevelArch, s.definition.Image.ArchitectureMapped)

Expand All @@ -46,7 +52,8 @@ func (s *funtoo) Run() error {

// Find a valid release tarball
for i := len(releaseDates) - 1; i >= 0; i-- {
fname = fmt.Sprintf("stage3-%s-%s-release-std-%s.tar.xz", s.definition.Image.ArchitectureMapped, s.definition.Image.Release, releaseDates[i])
fname = fmt.Sprintf("stage3-%s-%s-%s.tar.xz",
s.definition.Image.ArchitectureMapped, s.definition.Image.Release, releaseDates[i])
tarball = fmt.Sprintf("%s/%s/%s", baseURL, releaseDates[i], fname)

var (
Expand Down