Skip to content
Permalink
Browse files

[RPM] fix broken -u flag in buildrmps.sh

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 a25f8b970f0c4153d04d127282e39fc5e0e2e2ca
Showing with 1 addition and 1 deletion.
  1. +1 −1 rpm/buildrpms.sh
@@ -165,7 +165,7 @@ then
fi

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" ]
then

0 comments on commit a25f8b9

Please sign in to comment.
You can’t perform that action at this time.