From /usr/bin/rpm2targz (on Slackware 13.37...may be different in 14.0):
Code:
if file $i | grep RPM | grep -w src 1> /dev/null 2> /dev/null ; then
isSource=1
else
isSource=0
fi
`file $i` will output $i in full, so if it contains the path as well (and the path contains src), then it will treat it as a source rpm. To get around this the SlackBuild should make sure to include relative paths (and cd into the appropriate directory before running rpm2tgz to make sure it knows where it is) instead of passing the full filename. Alternatively, rpm2tgz could be patched:
Code:
--- rpm2targz~ 2012-12-29 00:07:35.221098034 -0500
+++ rpm2targz 2012-12-29 00:07:46.276867533 -0500
@@ -146,7 +146,7 @@
isSource=0
fi
else # use file. This works fine on Slackware, and is the default.
- if file $i | grep RPM | grep -w src 1> /dev/null 2> /dev/null ; then
+ if file -b $i | grep RPM | grep -w src 1> /dev/null 2> /dev/null ; then
isSource=1
else
isSource=0