- Redirect error output of ls to /dev/null to not clutter the posttrans

script output bnc#900186

OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice-share-linker?expand=0&rev=4
This commit is contained in:
Tomáš Chvátal 2015-11-03 12:24:57 +00:00 committed by Git OBS Bridge
parent 4aee40ea29
commit 548fe015de
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Nov 3 12:24:14 UTC 2015 - tchvatal@suse.com
- Redirect error output of ls to /dev/null to not clutter the posttrans
script output bnc#900186
-------------------------------------------------------------------
Wed May 20 08:35:28 UTC 2015 - tchvatal@suse.com

View File

@ -46,7 +46,7 @@ change_linking() {
# doing in 2nd run to ensure avoiding collisions
for file in `cat ${filelist} | grep "/usr/share/libreoffice" | sort`; do
linkdir="${file/${datadir}/${libdir}}"
if [[ -d "${linkdir}" && -z `ls "${linkdir}"/*` ]]; then
if [[ -d "${linkdir}" && -z `ls "${linkdir}"/* 2>/dev/null` ]]; then
# check if nothing else owns the dir
if [[ $(rpm -qf "${file}" 2>/dev/null |wc -l) == 0 ]]; then
rmdir "${linkdir}" || exit 1