files.req: reserve second field in *-files.req.list for owner package name
This commit is contained in:
parent
c4f579077e
commit
dae2eb7249
@ -1,3 +1,4 @@
|
||||
#!/bin/sh -efu
|
||||
dirlist=$(set +f; grep -h ^/. @RPMCONFIGDIR@/*-files.req.list)
|
||||
cut -f1 |fgrep "$dirlist" || [ $? = 1 ]
|
||||
dirlist=$(set +f; grep -h ^/. @RPMCONFIGDIR@/*-files.req.list |
|
||||
while read -r d pkg; do echo "${d%/}"; done)
|
||||
cut -f1 |fgrep "${dirlist:?}" || [ $? = 1 ]
|
||||
|
@ -7,13 +7,19 @@ dirlist=$(set +f; grep -h ^/. @RPMCONFIGDIR@/*-files.req.list |sort -ur)
|
||||
|
||||
FilesReq()
|
||||
{
|
||||
local f="$1" d=; shift
|
||||
for d in $dirlist; do
|
||||
local f="$1"; shift
|
||||
echo "${dirlist:?}" |
|
||||
while read -r d pkg; do
|
||||
d=${d%/}
|
||||
case "$f" in
|
||||
"${RPM_BUILD_ROOT-}$d"/*)
|
||||
echo "$d"
|
||||
return ;;
|
||||
break ;;
|
||||
"${RPM_BUILD_ROOT-}$d")
|
||||
[ -z "${pkg-}" -o -z "${RPM_SUBPACKAGE_NAME-}" ] ||
|
||||
[ "$pkg" = "$RPM_SUBPACKAGE_NAME" ] ||
|
||||
Warning "$f: directory belongs to $pkg"
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user