Skip to content

Commit

Permalink
[RPM] fix broken -u flag in buildrmps.sh
Browse files Browse the repository at this point in the history
When using `buildrpms.sh -u`, the script fails with:

```
Wrote: /builddir/build/SRPMS/qgis-*.src.rpm
Finish: rpmbuild -bs
Finish: buildsrpm
INFO: Done(qgis.spec) Config(default) 0 minutes 22 seconds
INFO: Results and/or logs in: result
INFO: Cleaning up build root ('cleanup_on_success=True')
Start: clean chroot
Finish: clean chroot
Finish: run
Source package created
Source package unavailable. Abort
```

The reason was because a wrong src.rpm file name was extracted by sed.
Instead of `qgis-*.src.rpm`, what was being extracted is
`qgis-*.src.rpm\r` which includes a carriage return. This change removes
any character at the end of the `.rpm` when extracting the file name.
  • Loading branch information
basilrabi authored and nyalldawson committed Jan 2, 2020
1 parent 30569bc commit a25f8b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpm/buildrpms.sh
Expand Up @@ -165,7 +165,7 @@ then
fi fi


srpm=$(grep -e 'Wrote: .*\.src\.rpm' $OUTDIR/build.log 2>/dev/null | srpm=$(grep -e 'Wrote: .*\.src\.rpm' $OUTDIR/build.log 2>/dev/null |
sed 's_Wrote: /builddir/build/SRPMS/\(.*\)_\1_') sed 's_Wrote: /builddir/build/SRPMS/\(.*\.rpm\).*_\1_')


if [ "$srpm_only" -eq "1" ] if [ "$srpm_only" -eq "1" ]
then then
Expand Down

0 comments on commit a25f8b9

Please sign in to comment.