CachyOS / CachyOS/CachyOS-Live-ISO
mv error if ISO built close to midnight
- Dominant language
- Shell
- Stars
- 98
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
When building the live ISO via buildiso.sh, if the compilation phase begins before midnight and finishes after midnight, the final script execution fails during the file movement/cleanup stage. The script generates the ISO matching the initial execution date, but evaluates date a second time post-rollover when attempting to move the file, resulting in a `mv: cannot stat ...: No such file or directory` crash.
To reproduce:
1. Start a build late in the evening, close to midnight (e.g., 11:59 PM).
2. Allow the build to complete after midnight.
3. Observe the `mv` error block right at the end of mkarchiso completion.
The issue has been narrowed down to line 191 of `util-iso.sh` in the most recent commit as of now (542a218):
``` mv "$outFolder/$_profile/cachyos-$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)-x86_64.iso" "$outFolder/$_profile/${iso_file}"```
Log:
```[mkarchiso] INFO: Creating checksum file for self-test...
[mkarchiso] INFO: Done!
[mkarchiso] INFO: Creating ISO image...
xorriso 1.5.8.pl02 : RockRidge filesystem manipulator, libburnia project.
xorriso : NOTE : Environment variable SOURCE_DATE_EPOCH encountered with value 1782535293
Drive current: -outdev 'stdio:/home/timothy/cachyos-archiso/out/desktop/cachyos-2026.06.26-x86_64.iso'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 1319g free
Added to ISO image: directory '/'='/home/timothy/cachyos-archiso/build/iso'
xorriso : UPDATE : 105 files added in 1 seconds
xorriso : UPDATE : 105 files added in 1 seconds
xorriso : NOTE : Copying to System Area: 432 bytes from file '/home/timothy/cachyos-archiso/build/iso/boot/syslinux/isohdpfx.bin'
libisofs: NOTE : Automatically adjusted MBR geometry to 1021/187/32
libisofs: NOTE : Aligned image size to cylinder size by 41 blocks
xorriso : UPDATE : 6.91% done
xorriso : UPDATE : 99.49% done
ISO image produced: 1539208 sectors
Written to medium : 1539208 sectors at LBA 0
Writing to 'stdio:/home/timothy/cachyos-archiso/out/desktop/cachyos-2026.06.26-x86_64.iso' completed successfully.
[mkarchiso] INFO: Done!
3.0G /home/timothy/cachyos-archiso/out/desktop/cachyos-2026.06.26-x86_64.iso
mv: cannot stat '/home/timothy/cachyos-archiso/out/desktop/cachyos-2026.06.27-x86_64.iso': No such file or directory
==> ERROR: An unknown error has occurred. Exiting...
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in util-iso.sh at line 191 and review how the ISO filename date is evaluated during the buildiso.sh workflow. Reproduce the build across midnight if possible, then verify the completed build does not fail in the final file movement and cleanup stage with an incorrect date-based path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100