vmware / vmware/photon

Running photon-upgrade from 2.0 minimal install throws error

Open
#875 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
3.2k
Forks
692
PR merge metrics
No merged PRs in 30d

Description

Problem: When upgrading from a 2.0 minimal install to 3.0, the photon-upgrade.sh script throws an error because it can't find awk:

root@redacted [ ~ ]# tdnf -y install photon-upgrade

Installing:
photon-upgrade           noarch       1.0-1.ph2        photon-updates   2.77k 2841

Total installed size:   2.77k 2841

Downloading:
photon-upgrade                            7882    100%
Testing transaction
Running transaction
Installing/Updating: photon-upgrade-1.0-1.ph2.noarch

Complete!
root@redacted [ ~ ]# photon-upgrade.sh
/usr/bin/photon-upgrade.sh: line 3: awk: command not found
/usr/bin/photon-upgrade.sh: line 83: [: ==: unary operator expected
You are about to upgrade PhotonOS from  to 3.0.

Workaround: tdnf -y install gawk

A better solution may be to make the photon-upgrade package dependent on gawk.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting /usr/bin/photon-upgrade.sh, especially lines 3 and 83, and the photon-upgrade package metadata. Reproduce the upgrade from a 2.0 minimal install without gawk; done means the package installs its awk dependency and photon-upgrade.sh no longer reports a missing command or unary-operator error.

Written by the indexing model from the issue text.

Assessment

Tech stack
awk, shell
Domain
operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.