Commit ef9de567 authored by Leo's avatar Leo

remove tab chars before sorting packages

parent c43ee7c9
CHANGES with 11.2:
- make duplicate and upper package detection remove tab chars ('\t') before sorting
CHANGES with 11.1: CHANGES with 11.1:
- Include NEWS from version 10 to 11 - Include NEWS from version 10 to 11
......
...@@ -65,7 +65,7 @@ find_dupe() { ...@@ -65,7 +65,7 @@ find_dupe() {
upper_repo_depends() { upper_repo_depends() {
[ "$SKIP_UPPER_REPO_DEPENDS" ] && return 0 [ "$SKIP_UPPER_REPO_DEPENDS" ] && return 0
printf "%s\n" "$depends" | tr " " "\n" | sort -u | while read -r pkg; do printf "%s\n" "$depends" | tr " " "\n" | tr -d "\t" | sort -u | while read -r pkg; do
for p in $(find_repo "$pkg" "$_repo"); do for p in $(find_repo "$pkg" "$_repo"); do
printf "$apkbuild:: depends '$pkg' is in upper repo '$p'\n" printf "$apkbuild:: depends '$pkg' is in upper repo '$p'\n"
done done
...@@ -74,7 +74,7 @@ upper_repo_depends() { ...@@ -74,7 +74,7 @@ upper_repo_depends() {
duplicate_depends() { duplicate_depends() {
[ "$SKIP_DUPLICATE_DEPENDS" ] && return 0 [ "$SKIP_DUPLICATE_DEPENDS" ] && return 0
printf "%s\n" "$depends" | tr " " "\n" | sort | uniq -d | while read -r dup; do printf "%s\n" "$depends" | tr " " "\n" | tr -d "\t" | sort | uniq -d | while read -r dup; do
[ -z "$dup" ] && continue [ -z "$dup" ] && continue
printf "$apkbuild:: duplicate '$dup' in depends\n" printf "$apkbuild:: duplicate '$dup' in depends\n"
done done
...@@ -82,7 +82,7 @@ duplicate_depends() { ...@@ -82,7 +82,7 @@ duplicate_depends() {
upper_repo_makedepends() { upper_repo_makedepends() {
[ "$SKIP_UPPER_REPO_MAKEDEPENDS" ] && return 0 [ "$SKIP_UPPER_REPO_MAKEDEPENDS" ] && return 0
printf "%s\n" "$makedepends" | tr " " "\n" | sort -u | while read -r pkg; do printf "%s\n" "$makedepends" | tr " " "\n" | tr -d "\t" | sort -u | while read -r pkg; do
for p in $(find_repo "$pkg" "$_repo"); do for p in $(find_repo "$pkg" "$_repo"); do
printf "$apkbuild:: makedepends '$pkg' is in upper repo '$p'\n" printf "$apkbuild:: makedepends '$pkg' is in upper repo '$p'\n"
done done
...@@ -91,7 +91,7 @@ upper_repo_makedepends() { ...@@ -91,7 +91,7 @@ upper_repo_makedepends() {
duplicate_makedepends() { duplicate_makedepends() {
[ "$SKIP_DUPLICATE_MAKEDEPENDS" ] && return 0 [ "$SKIP_DUPLICATE_MAKEDEPENDS" ] && return 0
printf "%s\n" "$makedepends" | tr " " "\n" | sort | uniq -d | while read -r dup; do printf "%s\n" "$makedepends" | tr " " "\n" | tr -d "\t" | sort | uniq -d | while read -r dup; do
[ -z "$dup" ] && continue [ -z "$dup" ] && continue
printf "$apkbuild:: duplicate '$dup' in makedepends\n" printf "$apkbuild:: duplicate '$dup' in makedepends\n"
done done
...@@ -99,7 +99,7 @@ duplicate_makedepends() { ...@@ -99,7 +99,7 @@ duplicate_makedepends() {
upper_repo_checkdepends() { upper_repo_checkdepends() {
[ "$SKIP_UPPER_REPO_CHECKDEPENDS" ] && return 0 [ "$SKIP_UPPER_REPO_CHECKDEPENDS" ] && return 0
printf "%s\n" "$checkdepends" | tr " " "\n" | sort -u | while read -r pkg; do printf "%s\n" "$checkdepends" | tr " " "\n" | tr -d "\t" | sort -u | while read -r pkg; do
for p in $(find_repo "$pkg" "$_repo"); do for p in $(find_repo "$pkg" "$_repo"); do
printf "$apkbuild:: checkdepends '$pkg' is in upper repo '$p'\n" printf "$apkbuild:: checkdepends '$pkg' is in upper repo '$p'\n"
done done
...@@ -108,7 +108,7 @@ upper_repo_checkdepends() { ...@@ -108,7 +108,7 @@ upper_repo_checkdepends() {
duplicate_checkdepends() { duplicate_checkdepends() {
[ "$SKIP_DUPLICATE_CHECKDEPENDS" ] && return 0 [ "$SKIP_DUPLICATE_CHECKDEPENDS" ] && return 0
printf "%s\n" "$checkdepends" | tr " " "\n" | sort | uniq -d | while read -r dup; do printf "%s\n" "$checkdepends" | tr " " "\n" | tr -d "\t" | sort | uniq -d | while read -r dup; do
[ -z "$dup" ] && continue [ -z "$dup" ] && continue
printf "$apkbuild:: duplicate '$dup' in checkdepends\n" printf "$apkbuild:: duplicate '$dup' in checkdepends\n"
done done
...@@ -139,8 +139,8 @@ pkgname_dirname_mismatch() { ...@@ -139,8 +139,8 @@ pkgname_dirname_mismatch() {
depends_makedepends_checkdepends_overlap() { depends_makedepends_checkdepends_overlap() {
[ "$SKIP_DEPENDS_MAKEDEPENDS_CHECKDEPENDS_OVERLAP" ] && return 0 [ "$SKIP_DEPENDS_MAKEDEPENDS_CHECKDEPENDS_OVERLAP" ] && return 0
local _mkdeps _ckdeps d local _mkdeps _ckdeps d
_mkdeps="$(echo $makedepends | tr " " "\\n" | sort -u)" _mkdeps="$(echo $makedepends | tr " " "\\n" | tr -d "\t" | sort -u)"
_ckdeps="$(echo $checkdepends | tr " " "\\n" | sort -u)" _ckdeps="$(echo $checkdepends | tr " " "\\n" | tr -d "\t" | sort -u)"
[ -z "$_mkdeps" ] && [ -z "$_ckdeps" ] && return 0 [ -z "$_mkdeps" ] && [ -z "$_ckdeps" ] && return 0
for d in $depends; do for d in $depends; do
if printf "%s\\n" "$_mkdeps" | grep -q "^$d$"; then if printf "%s\\n" "$_mkdeps" | grep -q "^$d$"; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment