Running photon-upgrade from 2.0 minimal install throws error
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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