[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

problem with brp-compress



Under certain circumstances, /usr/lib/rpm/brp-compress hangs.  Here is
how:

When I run `rpm -bb' on the spec file

Buildroot: /tmp/%name-root
Copyright: try
Group: Utilities/System
Name: try
Release: 1
Summary: try
Version: 1

%description 
try

%install
#rm -rf %buildroot
mkdir -p %buildroot/usr/man/man1
touch %buildroot/usr/man/man1/try.1

%files
/usr/man/*/*

all is well.  But when I do `rpm -bb' the second time, I get 

# rpm -bb try.spec
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.27844
+ umask 022
+ cd /usr/src/redhat/BUILD
+ mkdir -p /tmp/try-root/usr/man/man1
+ touch /tmp/try-root/usr/man/man1/try.1
+ /usr/lib/rpm/brp-compress

and it hangs there forever---until I press RET.  Putting a `set -x' in
the beginning of /usr/lib/rpm/brp-compress, I see that the processing
stops at 

+ '[' try.1 = dir ']'
+ b=./usr/man/man1/try.1
+ gzip -9 ./usr/man/man1/try.1

While it seems unrelated, I wonder where `dir' is coming from in

[ "`basename $f`" = "dir" ] && continue

Let me remark that doing 

rm -f %buildroot/usr/man/man1/try.1
touch %buildroot/usr/man/man1/try.1

does not change anything (still hangs), but 

rm -rf %buildroot/usr/man/man1/
mkdir -p %buildroot/usr/man/man1/

will result in a correct rpm -bb run.

Mate





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []