Compare commits

...

4 Commits

Author SHA1 Message Date
helixarch
7a38d3df70
Add files via upload
Bug fixes
2025-04-17 23:18:09 +03:00
helixarch
1942d4368e
Update README.md 2025-04-17 20:57:02 +03:00
helixarch
af094c7b2b
Update README.md 2025-04-17 20:55:34 +03:00
helixarch
26ed775990
Add files via upload
Bug fixes
2025-04-17 20:51:24 +03:00
2 changed files with 2307 additions and 2273 deletions

View File

@ -31,7 +31,7 @@ A script for converting .deb packages into Arch Linux packages, focused on accur
**Q: How do I use debtap?**
**A:** The syntax is quite simple actually: `debtap [options] package_filename`
**A:** The syntax is quite simple actually: `Syntax: debtap -o output_directory [other_options] package_filename`
For example: `debtap world-of-goo-demo_1.0_i386.deb`
Any recommendations or questions for debtap are welcomed!
@ -47,4 +47,5 @@ Available options:
-w --wipeout Wipeout versions from all dependencies, conflicts etc.
-p --pkgbuild Additionally generate a PKGBUILD file
-P --Pkgbuild Generate a PKGBUILD file only
-o --output Output directory for generated package and/or pkgbuild (optional)
-v --version     Print version

259
debtap
View File

@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
Version=3.6
Version=3.6.0
# Defining colors and bold letters
lightgreen='\e[1;32m'
@ -402,42 +402,42 @@ echo -e "${lightgreen}==>${NC} ${bold}Generating .PKGINFO file...${normal}"
# Generating pkgname field
if [[ $pseudo == set ]] && [[ $(ls -A usr/lib32 2> /dev/null) ]] && [[ ! $(ls -A usr/bin 2> /dev/null) ]]; then
for i in {git,bzr,darcs,hg}; do
if [[ $(grep -i ^Version: control | gawk '{print $2}' | grep -q $i; echo $?) == 0 ]]; then
echo "pkgname = lib32-$(grep -i ^Package: control | gawk '{print $2}' | tr '[:upper:]' '[:lower:]')"-$i | sed s"/-$i-$i$/-$i/" | sed s'/--/-/g' > .PKGINFO
if [[ $(grep -i ^Version: control | gawk -F : '{print $2}' | sed s'/^ //' | grep -q $i; echo $?) == 0 ]]; then
echo "pkgname = lib32-$(grep -i ^Package: control | gawk -F : '{print $2}' | sed s'/^ //' | tr '[:upper:]' '[:lower:]')"-$i | sed s"/-$i-$i$/-$i/" | sed s'/--/-/g' > .PKGINFO
fi
done
if [[ $(grep -i ^Version: control | gawk '{print $2}' | grep -q svn; echo $?) == 0 ]]; then
echo "pkgname = lib32-$(grep -i ^Package: control | gawk '{print $2}' | tr '[:upper:]' '[:lower:]')"-svn | sed s'/-svn-svn$/-svn/' | sed s'/--/-/g' > .PKGINFO
if [[ $(grep -i ^Version: control | gawk -F : '{print $2}' | sed s'/^ //' | grep -q svn; echo $?) == 0 ]]; then
echo "pkgname = lib32-$(grep -i ^Package: control | gawk -F : '{print $2}' | sed s'/^ //' | tr '[:upper:]' '[:lower:]')"-svn | sed s'/-svn-svn$/-svn/' | sed s'/--/-/g' > .PKGINFO
fi
for i in {cvs,CVS}; do
if [[ $(grep -i ^Version: control | gawk '{print $2}' | grep -q $i; echo $?) == 0 ]]; then
echo "pkgname = lib32-$(grep -i ^Package: control | gawk '{print $2}' | tr '[:upper:]' '[:lower:]')"-cvs | sed s'/-cvs-cvs$/-cvs/' | sed s'/--/-/g' > .PKGINFO
if [[ $(grep -i ^Version: control | gawk -F : '{print $2}' | sed s'/^ //' | grep -q $i; echo $?) == 0 ]]; then
echo "pkgname = lib32-$(grep -i ^Package: control | gawk -F : '{print $2}' | sed s'/^ //' | tr '[:upper:]' '[:lower:]')"-cvs | sed s'/-cvs-cvs$/-cvs/' | sed s'/--/-/g' > .PKGINFO
fi
done
if [[ $(grep -i ^Version: control | gawk '{print $2}' | grep -q "svn\|git\|cvs\|CVS\|bzr\|darcs\|hg"; echo $?) != 0 ]]; then
echo "pkgname = lib32-$(grep -i ^Package: control | gawk '{print $2}' | tr '[:upper:]' '[:lower:]')" | sed s'/--/-/g' > .PKGINFO
if [[ $(grep -i ^Version: control | gawk -F : '{print $2}' | sed s'/^ //' | grep -q "svn\|git\|cvs\|CVS\|bzr\|darcs\|hg"; echo $?) != 0 ]]; then
echo "pkgname = lib32-$(grep -i ^Package: control | gawk -F : '{print $2}' | sed s'/^ //' | tr '[:upper:]' '[:lower:]')" | sed s'/--/-/g' > .PKGINFO
fi
else
for i in {git,bzr,darcs,hg}; do
if [[ $(grep -i ^Version: control | gawk '{print $2}' | grep -q $i; echo $?) == 0 ]]; then
echo "pkgname = $(grep -i ^Package: control | gawk '{print $2}' | tr '[:upper:]' '[:lower:]')"-$i | sed s"/-$i-$i$/-$i/" | sed s'/--/-/g' > .PKGINFO
if [[ $(grep -i ^Version: control | gawk -F : '{print $2}' | sed s'/^ //' | grep -q $i; echo $?) == 0 ]]; then
echo "pkgname = $(grep -i ^Package: control | gawk -F : '{print $2}' | sed s'/^ //' | tr '[:upper:]' '[:lower:]')"-$i | sed s"/-$i-$i$/-$i/" | sed s'/--/-/g' > .PKGINFO
fi
done
if [[ $(grep -i ^Version: control | gawk '{print $2}' | grep -q svn; echo $?) == 0 ]]; then
echo "pkgname = $(grep -i ^Package: control | gawk '{print $2}' | tr '[:upper:]' '[:lower:]')"-svn | sed s'/-svn-svn$/-svn/' | sed s'/--/-/g' > .PKGINFO
if [[ $(grep -i ^Version: control | gawk -F : '{print $2}' | sed s'/^ //' | grep -q svn; echo $?) == 0 ]]; then
echo "pkgname = $(grep -i ^Package: control | gawk -F : '{print $2}' | sed s'/^ //' | tr '[:upper:]' '[:lower:]')"-svn | sed s'/-svn-svn$/-svn/' | sed s'/--/-/g' > .PKGINFO
fi
for i in {cvs,CVS}; do
if [[ $(grep -i ^Version: control | gawk '{print $2}' | grep -q $i; echo $?) == 0 ]]; then
echo "pkgname = $(grep -i ^Package: control | gawk '{print $2}' | tr '[:upper:]' '[:lower:]')"-cvs | sed s'/-cvs-cvs$/-cvs/' | sed s'/--/-/g' > .PKGINFO
if [[ $(grep -i ^Version: control | gawk -F : '{print $2}' | sed s'/^ //' | grep -q $i; echo $?) == 0 ]]; then
echo "pkgname = $(grep -i ^Package: control | gawk -F : '{print $2}' | sed s'/^ //' | tr '[:upper:]' '[:lower:]')"-cvs | sed s'/-cvs-cvs$/-cvs/' | sed s'/--/-/g' > .PKGINFO
fi
done
if [[ $(grep -i ^Version: control | gawk '{print $2}' | grep -q "svn\|git\|cvs\|CVS\|bzr\|darcs\|hg"; echo $?) != 0 ]]; then
echo "pkgname = $(grep -i ^Package: control | gawk '{print $2}' | tr '[:upper:]' '[:lower:]')" | sed s'/demo$/-demo/' | sed s'/trial$/-trial/' | sed s'/--/-/g' > .PKGINFO
if [[ $(grep -i ^Version: control | gawk -F : '{print $2}' | sed s'/^ //' | grep -q "svn\|git\|cvs\|CVS\|bzr\|darcs\|hg"; echo $?) != 0 ]]; then
echo "pkgname = $(grep -i ^Package: control | gawk -F : '{print $2}' | sed s'/^ //' | tr '[:upper:]' '[:lower:]')" | sed s'/demo$/-demo/' | sed s'/trial$/-trial/' | sed s'/--/-/g' > .PKGINFO
fi
fi
# Generating pkgver field
version=$(grep -i ^Version: control | gawk '{print $2}' | sed -e s'/[+~]/-/g' -e s'/[-._]alpha/alpha/' -e s'/[-._]beta/beta/' -e s'/[-._]pre/pre/' -e s'/[-._]rc/rc/' -e s'/[-._]dfsg/dfsg/' | gawk -F 'dev' '{print $1}' | sed -e s'/-\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+\.[0-9]\+//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]*[a-z]*[0-9]*//g' -e s'/--/-/g' -e s'/\.\././g' | sed s'/\.$//')
version=$(grep -i ^Version: control | gawk -F : '{print $2}' | sed s'/^ //' | sed -e s'/[+~]/-/g' -e s'/[-._]alpha/alpha/' -e s'/[-._]beta/beta/' -e s'/[-._]pre/pre/' -e s'/[-._]rc/rc/' -e s'/[-._]dfsg/dfsg/' | gawk -F 'dev' '{print $1}' | sed -e s'/-\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+\.[0-9]\+//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]*[a-z]*[0-9]*//g' -e s'/--/-/g' -e s'/\.\././g' | sed s'/\.$//')
for i in {git,bzr,darcs,hg}; do
if [[ $(echo $version | grep -q $i; echo $?) == 0 ]]; then
echo "pkgver = $(echo $version | gawk -F "$i" '{print $2}' | gawk -F '-' '{print $1}')"-1 >> .PKGINFO
@ -461,15 +461,15 @@ if [[ $(echo $version | grep -q "svn\|git\|cvs\|CVS\|bzr\|darcs\|hg"; echo $?) !
fi
# Generating pkgdesc field
if [[ $(echo $(grep -v ":\| \." control) | grep -iq "$(grep -i ^Description: control | sed s'/^Description: //i' | sed s'/\.//')"; echo $?) == 0 ]]; then
if [[ $(echo $(grep -v ":\| \." control) | grep -iq "$(grep -i ^Description: control | sed -e s'/^Description://i' -e s'/^ //' | sed s'/\.//')"; echo $?) == 0 ]]; then
description=$(echo $(echo "$(grep -v ":\| \." control)") | sed s'/^\s*./\U&\E/g' | sed s'/\(\. \|\! \|\? \)\s*./\U&\E/g')
else
description=$(echo $(echo "$(grep -i ^Description: control | sed s'/^Description: //i' | sed 's/.*/\u&/')" | sed s'/\.//'). $(grep -v ":\| \." control) | sed s'/^\s*./\U&\E/g' | sed s'/\(\. \|\! \|\? \)\s*./\U&\E/g' | sed s'/\!\./\!/g' | sed s'/\?\./\?/g')
description=$(echo $(echo "$(grep -i ^Description: control | sed -e s'/^Description://i' -e s'/^ //' | sed 's/.*/\u&/')" | sed s'/\.//'). $(grep -v ":\| \." control) | sed s'/^\s*./\U&\E/g' | sed s'/\(\. \|\! \|\? \)\s*./\U&\E/g' | sed s'/\!\./\!/g' | sed s'/\?\./\?/g')
fi
echo "pkgdesc = $description" >> .PKGINFO
# Generating url field
echo "url = $(grep -i ^Homepage: control | gawk '{print $2}')" | sed s'/\/$//' >> .PKGINFO
echo "url = $(grep -i ^Homepage: control | sed -e s'/^Homepage://i' -e s'/^ //')" | sed s'/\/$//' >> .PKGINFO
# Generating builddate (which is actually packaging date) field
echo "builddate = $(date -u "+%s")" >> .PKGINFO
@ -487,7 +487,7 @@ fi
# Generating arch field
if [[ $pseudo != set ]]; then
echo "arch = $(grep -i ^Architecture: control | gawk '{print $2}' | sed -e s'/i386/i686/' -e s'/amd64/x86_64/' -e s'/armhf/armv7h/' -e s'/arm64/aarch64/' -e s'/all/any/')" >> .PKGINFO
echo "arch = $(grep -i ^Architecture: control | gawk -F : '{print $2}' | sed s'/^ //' | sed -e s'/i386/i686/' -e s'/amd64/x86_64/' -e s'/armhf/armv7h/' -e s'/arm64/aarch64/' -e s'/all/any/')" >> .PKGINFO
else
echo "arch = x86_64" >> .PKGINFO
fi
@ -561,27 +561,28 @@ echo -e "\n${lightgreen}***${NC} ${bold}Creation of .PKGINFO file in progress. I
# The packages names translator function
packages-names-translator() {
# First method of translating .deb packages names into Arch Linux packages names, more accurate, comparing contents of .deb packages with Arch Linux packages contents
for debian_package_name in $(gawk '{print $1}' $(ls | grep initial-check-list)); do
# First method of translating .deb packages names into Arch Linux packages names, more accurate, comparing contents of .deb packages with Arch Linux packages contents
for debian_package_name in $(gawk '{print $1}' $(ls | grep initial-check-list)); do
for debian_package_file in $(grep "/$debian_package_name$" /var/cache/debtap/debian-main-packages-files /var/cache/debtap/debian-non-free-packages-files /var/cache/debtap/debian-contrib-packages-files | grep 'bin\|opt\|\.so' | gawk '{print $1}' | sed s'/\// /g' | gawk '{print $NF}'); do
echo $debian_package_file $(grep "^$debian_package_name$\|^$debian_package_name " $(ls | grep initial-check-list) | gawk '{print $2}')
echo $debian_package_file $(grep "^$debian_package_name$\|^$debian_package_name " $(ls | grep initial-check-list) | gawk -F : '{print $2}')
done >> $debian_package_name-tempfile03
done
done
for i in $(ls | grep tempfile03); do
for i in $(ls | grep tempfile03); do
for j in $(gawk '{print $1}' $i); do
for k in $(pkgfile -q $j); do
echo $k$(head -1 $i | gawk '{print $2$3}')
done
done >> $(echo $i | sed s'/tempfile03/tempfile04/')
done
done
touch tempfile05
for debian_package_name in $(gawk '{print $1}' $(ls | grep initial-check-list)); do
touch tempfile05
for debian_package_name in $(gawk '{print $1}' $(ls | grep initial-check-list)); do
grep -q "^$debian_package_name$" tempfile05 || echo $debian_package_name >> tempfile05
done
done
for i in $(for j in $(cat tempfile05); do echo $j-tempfile04; done); do
touch tempfile06
for i in $(for j in $(cat tempfile05); do echo $j-tempfile04; done); do
k=$(sort $i | uniq -c | gawk '{print $1}' | sort -n | tail -1)
if [[ $(sort $i | uniq -c | gawk '{print $1}' | sort -n | grep "^$k$" | wc -l) -ge 2 ]]; then
for l in $(cat $i); do
@ -594,32 +595,36 @@ for i in $(for j in $(cat tempfile05); do echo $j-tempfile04; done); do
else
echo >> tempfile06
fi
done
done
cat tempfile06 | sed s'/=/ = /g' | sed s'/>/ > /g' | sed s'/</ < /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' | sed s'/^lib32-\|-multilib$//g' > tempfile07
cat tempfile06 | sed s'/=/ = /g' | sed s'/>/ > /g' | sed s'/</ < /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' | sed s'/^lib32-\|-multilib$//g' > tempfile07
cat tempfile07 | while read line; do
if [[ $(cat tempfile07 | wc -l) == 0 ]]; then
echo >> tempfile07
fi
cat tempfile07 | while read line; do
if [[ $(echo "$line" | wc -w) -eq 0 ]]; then
echo >> final-check-list
elif [[ $(echo "$line" | wc -w) -eq 1 ]] || [[ $(echo "$line" | wc -w) -eq 3 ]]; then
echo "$(echo "$line" | gawk '{print $1}') $(echo "$line" | gawk '{print $2}') $(echo "$line" | gawk '{print $3}')" >> final-check-list
echo "$line" | gawk '{print $1,$2,$3}' >> final-check-list
elif [[ $(echo "$line" | wc -w) -eq 5 ]]; then
echo "$(echo "$line" | gawk '{print $1}') $(echo "$line" | gawk '{print $2}') $(echo "$line" | gawk '{print $3}')" >> final-check-list
echo "$(echo "$line" | gawk '{print $1}') $(echo "$line" | gawk '{print $4}') $(echo "$line" | gawk '{print $5}')" >> final-check-list
echo "$line" | gawk '{print $1,$2,$3}' >> final-check-list
echo "$line" | gawk '{print $1,$4,$5}' >> final-check-list
fi
done
done
for i in $(eval echo {1..$(cat $(ls | grep initial-check-list) | wc -l)}); do
for i in $(eval echo {1..$(cat $(ls | grep initial-check-list) | wc -l)}); do
if [[ $(sed -n ""$i"{p;q;}" final-check-list | gawk '{print $1}') == "" ]]; then
echo $(sed -n ""$i"{p;q;}" $(ls | grep initial-check-list)) >> untranslated
echo $(sed -n ""$i"{p;q;}" $(ls | grep initial-check-list) | gawk '{print $1}') >> untranslated-names-only
elif [[ $(echo " $(echo $(grep ^pkgname .PKGINFO | gawk '{print $3}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//'){-svn,-git,-cvs,-bzr,-darcs,-hg,}) " | grep -q " $(sed -n ""$i"{p;q;}" final-check-list | gawk '{print $1}') "; echo $?) == 0 ]]; then
echo $(sed -n ""$i"{p;q;}" $(ls | grep initial-check-list) | sed s'/ //') >> missing-files
fi
done
done
# Second method of translating remaining untranslated .deb packages names into Arch Linux packages names, same as first method, but searches in Ubuntu database for packages contents instead of Debian database
if [[ -e untranslated-names-only ]]; then
# Second method of translating remaining untranslated .deb packages names into Arch Linux packages names, same as first method, but searches in Ubuntu database for packages contents instead of Debian database
if [[ -e untranslated-names-only ]] && [[ $(cat untranslated-names-only 2> /dev/null) != "" ]]; then
for ubuntu_package_name in $(sort -u untranslated-names-only); do
for ubuntu_package_file in $(grep "/$ubuntu_package_name$" /var/cache/debtap/ubuntu-packages-files | grep 'bin\|opt\|\.so' | gawk '{print $1}' | sed s'/\// /g' | gawk '{print $NF}'); do
echo $ubuntu_package_file $(grep "^$ubuntu_package_name$\|^$ubuntu_package_name " untranslated | gawk '{print $2}')
@ -639,6 +644,7 @@ if [[ -e untranslated-names-only ]]; then
grep -q "^$ubuntu_package_name$" tempfile10 || echo $ubuntu_package_name >> tempfile10
done
touch tempfile11
for i in $(for j in $(cat tempfile10); do echo $j-tempfile09; done); do
k=$(sort $i | uniq -c | gawk '{print $1}' | sort -n | tail -1)
if [[ $(sort $i | uniq -c | gawk '{print $1}' | sort -n | grep "^$k$" | wc -l) -ge 2 ]]; then
@ -656,14 +662,18 @@ if [[ -e untranslated-names-only ]]; then
cat tempfile11 | sed s'/=/ = /g' | sed s'/>/ > /g' | sed s'/</ < /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' | sed s'/^lib32-\|-multilib$//g' > tempfile12
if [[ $(cat tempfile12 | wc -l) == 0 ]]; then
echo >> tempfile12
fi
cat tempfile12 | while read line; do
if [[ $(echo "$line" | wc -w) -eq 0 ]]; then
echo >> final-check-list
elif [[ $(echo "$line" | wc -w) -eq 1 ]] || [[ $(echo "$line" | wc -w) -eq 3 ]]; then
echo "$(echo "$line" | gawk '{print $1}') $(echo "$line" | gawk '{print $2}') $(echo "$line" | gawk '{print $3}')" >> final-check-list
echo "$line" | gawk '{print $1,$2,$3}' >> final-check-list
elif [[ $(echo "$line" | wc -w) -eq 5 ]]; then
echo "$(echo "$line" | gawk '{print $1}') $(echo "$line" | gawk '{print $2}') $(echo "$line" | gawk '{print $3}')" >> final-check-list
echo "$(echo "$line" | gawk '{print $1}') $(echo "$line" | gawk '{print $4}') $(echo "$line" | gawk '{print $5}')" >> final-check-list
echo "$line" | gawk '{print $1,$2,$3}' >> final-check-list
echo "$line" | gawk '{print $1,$4,$5}' >> final-check-list
fi
done
@ -677,10 +687,10 @@ if [[ -e untranslated-names-only ]]; then
done
rm -rf untranslated untranslated-names-only
fi
fi
# Third method of translating remaining untranslated .deb packages names into Arch Linux packages names, less accurate, comparing .deb packages names with Arch Linux packages names
if [[ -e new-untranslated-names-only ]]; then
# Third method of translating remaining untranslated .deb packages names into Arch Linux packages names, less accurate, comparing .deb packages names with Arch Linux packages names
if [[ -e new-untranslated-names-only ]] && [[ $(cat new-untranslated-names-only 2> /dev/null) != "" ]]; then
for i in $(sort -u new-untranslated-names-only | grep -v python-support); do
j=$(echo "$i" | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//')
@ -2656,24 +2666,24 @@ if [[ -e new-untranslated-names-only ]]; then
done
rm -rf new-untranslated-names-only
fi
fi
# Appending untranslated packages names (if any exist) to the translated packages names list
if [[ $(cat new-untranslated 2> /dev/null | wc -l) -ne 0 ]]; then
# Appending untranslated packages names (if any exist) to the translated packages names list
if [[ -e new-untranslated-names ]] && [[ $(cat new-untranslated-names 2> /dev/null) != "" ]]; then
tac new-untranslated | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
gawk '{print $1}' new-untranslated | sort -u > $(echo $(ls | grep initial-check-list) | sed s'/initial-check-list/untranslated-names-only/')
fi
rm -rf new-untranslated
fi
rm -rf new-untranslated
# Sorting packages with missing files (if any exist)
if [[ -e missing-files ]]; then
# Sorting packages with missing files (if any exist)
if [[ -e missing-files ]]; then
sort -u missing-files > $(echo $(ls | grep initial-check-list) | sed s'/initial-check-list/missing-files/')
rm -rf missing-files
fi
fi
# Special rules for optional dependencies
if [[ -e optional-dependencies-untranslated-names-only ]]; then
if [[ -e dependencies-untranslated-names-only ]]; then
# Special rules for optional dependencies
if [[ -e optional-dependencies-untranslated-names-only ]]; then
if [[ $(cat dependencies-untranslated-names-only) != "" ]]; then
for i in $(cat optional-dependencies-untranslated-names-only); do
if [[ $(grep -q "^$i$" dependencies-untranslated-names-only; echo $?) != 0 ]]; then
echo "$i" >> optional-dependencies-untranslated-names-only-1
@ -2683,19 +2693,19 @@ if [[ -e optional-dependencies-untranslated-names-only ]]; then
else
mv optional-dependencies-untranslated-names-only optional-dependencies-untranslated-names-only-1
fi
fi
fi
# Appending ready translated names (if any needed) to the translated packages names list
grep -q "^fonts-freefont-ttf$\|^fonts-freefont-ttf " tempfile02 && echo ttf-freefont >> final-check-list
grep -q "^fonts-liberation$\|^fonts-liberation " tempfile02 && echo ttf-liberation >> final-check-list
grep -q "^ttf-mscorefonts-installer$\|^ttf-mscorefonts-installer " tempfile02 && echo ttf-ms-fonts >> final-check-list
grep -q "^default-jre$\|^default-jre " tempfile02 && echo java-runtime >> final-check-list
grep -q "^python:any$\|^python:any " tempfile02 && echo python >> final-check-list
grep "^openjdk-[0-9]+-jdk$\|^openjdk-[0-9]+-jdk " tempfile02 | sort -uV | tail -1 | sed s"/openjdk-\([0-9]\+\)-jdk/jdk\1-openjdk/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
grep "^openjdk-[0-9]+-jre\(-headless\)\?$\|^openjdk-[0-9]+-jre\(-headless\)\? " tempfile02 | sort -uV | tail -1 | sed s"/openjdk-\([0-9]\+\)-jre/jre\1-openjdk/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
grep "^libstdc[0-9]+$\|libstdc[0-9]+ " tempfile02 | sort -uV | tail -1 | sed s"/libstdc\([0-9]\+\)/$(pacman -Ssq libstdc | sort -uV | tail -1)/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
grep "^qt[0-9]+-default$\|qt[0-9]+-default " tempfile02 | sed s"/qt\([0-9]\+\)-default/qt\1-base/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
if [[ $pseudo != set ]]; then
# Appending ready translated names (if any needed) to the translated packages names list
grep -q "^fonts-freefont-ttf$\|^fonts-freefont-ttf " tempfile02 && echo ttf-freefont >> final-check-list
grep -q "^fonts-liberation$\|^fonts-liberation " tempfile02 && echo ttf-liberation >> final-check-list
grep -q "^ttf-mscorefonts-installer$\|^ttf-mscorefonts-installer " tempfile02 && echo ttf-ms-fonts >> final-check-list
grep -q "^default-jre$\|^default-jre " tempfile02 && echo java-runtime >> final-check-list
grep -q "^python:any$\|^python:any " tempfile02 && echo python >> final-check-list
grep "^openjdk-[0-9]+-jdk$\|^openjdk-[0-9]+-jdk " tempfile02 | sort -uV | tail -1 | sed s"/openjdk-\([0-9]\+\)-jdk/jdk\1-openjdk/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
grep "^openjdk-[0-9]+-jre\(-headless\)\?$\|^openjdk-[0-9]+-jre\(-headless\)\? " tempfile02 | sort -uV | tail -1 | sed s"/openjdk-\([0-9]\+\)-jre/jre\1-openjdk/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
grep "^libstdc[0-9]+$\|libstdc[0-9]+ " tempfile02 | sort -uV | tail -1 | sed s"/libstdc\([0-9]\+\)/$(pacman -Ssq libstdc | sort -uV | tail -1)/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
grep "^qt[0-9]+-default$\|qt[0-9]+-default " tempfile02 | sed s"/qt\([0-9]\+\)-default/qt\1-base/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
if [[ $pseudo != set ]]; then
grep -q "^xlibs$\|^xlibs " tempfile02 && echo libx11 >> final-check-list
grep -q "^libgl1$\|^libgl1 " tempfile02 && echo libgl >> final-check-list
grep -q "^libglu1$\|^libglu1 " tempfile02 && echo glu >> final-check-list
@ -2703,7 +2713,7 @@ if [[ $pseudo != set ]]; then
grep "^libpangomm$\|^libpangomm " tempfile02 | sed s"/libpangomm/pangomm/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
grep "^libcupsys2$\|^libcupsys2 " tempfile02 | sed s"/libcupsys2/libcups/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
grep "^jackd[0-9]*$\|^jackd-[0-9]* " tempfile02 | sort -uV | tail -1 | sed s"/jackd\([0-9]\*\)/jack\1/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
else
else
grep -q "^xlibs$\|^xlibs " tempfile02 && echo lib32-libx11 >> final-check-list
grep -q "^libgl1$\|^libgl1 " tempfile02 && echo lib32-libgl >> final-check-list
grep -q "^libglu1$\|^libglu1 " tempfile02 && echo lib32-glu >> final-check-list
@ -2711,15 +2721,17 @@ else
grep "^libpangomm$\|^libpangomm " tempfile02 | sed s"/libpangomm/lib32-pangomm/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
grep "^libcupsys2$\|^libcupsys2 " tempfile02 | sed s"/libcupsys2/lib32-libcups/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
grep "^jackd[0-9]*$\|^jackd-[0-9]* " tempfile02 | sort -uV | tail -1 | sed s"/jackd\([0-9]\*\)/lib32-jack\1/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/</< /g' | sed s'/> =/>=/g' | sed s'/< =/<=/g' >> final-check-list
fi
fi
# Stripping unnecessary symbols and words from packages versions
grep -v "^$" final-check-list | while read line; do
# Stripping unnecessary symbols and words from packages versions
touch tempfile13
grep -v "^$" final-check-list | while read line; do
echo "$(echo "$line" | gawk '{print $1}') $(echo "$line" | gawk '{print $2}') $(echo "$line" | gawk '{print $3}' | sed s'/^[^:]*://' | sed -e s'/[+~]/-/g' -e s'/[-._]alpha/alpha/' -e s'/[-._]beta/beta/' -e s'/[-._]pre/pre/' -e s'/[-._]rc/rc/' -e s'/[-._]dfsg/dfsg/' | gawk -F 'dev' '{print $1}' | sed -e s'/-\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+\.[0-9]\+//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]*[a-z]*[0-9]*//g' -e s'/--/-/g' -e s'/\.\././g' | sed s'/\.$//')" >> tempfile13
done
done
# Special rules for version control systems
cat tempfile13 | while read line; do
# Special rules for version control systems
touch tempfile14
cat tempfile13 | while read line; do
for i in {git,bzr,darcs,hg}; do
if [[ $(echo "$line" | gawk '{print $3}' | grep -q $i; echo $?) == 0 ]]; then
echo "$(echo $(echo "$line" | gawk '{print $1}')-$i | sed s"/-$i-$i$/-$i/") $(echo "$line" | gawk '{print $2}') $(echo "$line" | gawk '{print $3}' | gawk -F "$i" '{print $2}' | gawk -F '-' '{print $1}')" >> tempfile14
@ -2741,12 +2753,13 @@ cat tempfile13 | while read line; do
if [[ $(echo "$line" | gawk '{print $3}' | grep -q "svn\|git\|cvs\|CVS\|bzr\|darcs\|hg"; echo $?) != 0 ]]; then
echo "$(echo "$line" | gawk '{print $1}') $(echo "$line" | gawk '{print $2}') $(echo "$line" | gawk '{print $3}' | gawk -F '-[0-9]' '{print $1}' | sed s'/-/./')" >> tempfile14
fi
done
done
if [[ $pseudo != set ]]; then
if [[ $pseudo != set ]]; then
mv tempfile14 tempfile15
else
else
# Special rules for multilib packages
touch tempfile15
cat tempfile14 | while read line; do
i=$(echo "$line" | gawk '{print $1}')
pacman -Ssq "lib32-$i" > result
@ -2754,10 +2767,10 @@ else
grep -q "^lib32-$i$" result /var/cache/debtap/aur-packages || echo "$line" >> tempfile15
done
rm -rf result
fi
fi
# Special rules for non optional dependencies
if [[ -e dependencies-initial-check-list ]]; then
# Special rules for non optional dependencies
if [[ -e dependencies-initial-check-list ]]; then
grep -q qt tempfile15 && echo hicolor-icon-theme >> tempfile15
grep -q gtk tempfile15 && echo -e "hicolor-icon-theme\ndesktop-file-utils" >> tempfile15
grep -q ^Python-Version: control && echo python$(grep ^Python-Version: control | gawk '{print $2}' | sed s'/\.//g') >> tempfile15
@ -2773,25 +2786,25 @@ if [[ -e dependencies-initial-check-list ]]; then
fi
done
mv tempfile15-1 tempfile15
fi
fi
# Sorting packages names and versions
sort -u tempfile15 > tempfile16
# Sorting packages names and versions
sort -u tempfile15 > tempfile16
# Sorting only packages names
gawk '{print $1}' tempfile16 | sort -u > tempfile17
# Sorting only packages names
gawk '{print $1}' tempfile16 | sort -u > tempfile17
# Removing packages names that are the same with the name of the package to be converted from translated packages list (if any exist)
touch tempfile18
for i in $(cat tempfile17); do
# Removing packages names that are the same with the name of the package to be converted from translated packages list (if any exist)
touch tempfile18
for i in $(cat tempfile17); do
if [[ $(echo " $(echo $(grep ^pkgname .PKGINFO | gawk '{print $3}' | sed s'/-svn$\|-git$\|-cvs$\|-bzr$\|-darcs$\|-hg$//'){-svn,-git,-cvs,-bzr,-darcs,-hg,}) " | grep -q " $(echo $i | sed s'/^lib32-\|-multilib$//') "; echo $?) != 0 ]]; then
echo "$i" >> tempfile18
grep "^$i$\|^$i " tempfile16 >> $i-tempfile19
fi
done
done
touch tempfile22
if [[ $wipeout != set ]] && [[ $(ls *-tempfile19 &> /dev/null; echo $?) == 0 ]]; then
touch tempfile22
if [[ $wipeout != set ]] && [[ $(ls *-tempfile19 &> /dev/null; echo $?) == 0 ]]; then
# Isolating versions from packages
for i in $(ls | grep tempfile19); do
if [[ $(grep -q "=\|>\|<" $i; echo $?) != 0 ]]; then
@ -2829,7 +2842,7 @@ if [[ $wipeout != set ]] && [[ $(ls *-tempfile19 &> /dev/null; echo $?) == 0 ]];
grep "<" $i | head -1 | sed s'/ //g' >> tempfile22
fi
done
fi
fi
}
# Generating replacements fields
@ -2841,6 +2854,9 @@ if [[ $(grep -q ^Replaces: control; echo $?) == 0 ]]; then
done
sed -e s'/(/ /g' -e s'/)//g' tempfile01 | sort > tempfile02
grep -v '^xlibs$\|^xlibs \|^libgl1$\|^libgl1 \|^libglu1$\|^libglu1 \|^default-jre$\|^default-jre \|^openjdk-[0-9]+-[jdk|jre]\|^libstdc[0-9]+$\|^libstdc[0-9]+ \|^qt[0-9]+-default$\|^qt[0-9]+-default \|^python:any$\|^python:any \|^libpango\|^libcupsys2$\|^libcupsys2 \|^jackd[0-9]*$\|^jackd[0-9]* \|^fonts-freefont-ttf$\|^fonts-freefont-ttf \|^fonts-liberation$\|^fonts-liberation \|^ttf-mscorefonts-installer$\|^ttf-mscorefonts-installer \|^dpkg$\|^dpkg \|^apt$\|^apt \|^apt-get$\|^apt-get \|^aptitude$\|^aptitude \|^debconf' tempfile02 > replacements-initial-check-list
if [[ $(cat replacements-initial-check-list | wc -l) == 0 ]]; then
echo >> replacements-initial-check-list
fi
packages-names-translator
if [[ $wipeout != set ]]; then
for i in $(sort -u tempfile22); do echo "replaces = $i" >> .PKGINFO; done
@ -2849,6 +2865,7 @@ if [[ $(grep -q ^Replaces: control; echo $?) == 0 ]]; then
fi
rm -rf *tempfile* replacements-initial-check-list final-check-list
fi
touch replacements-untranslated-names-only
# Generating conflicts fields
if [[ $(grep -q ^Conflicts: control; echo $?) == 0 ]]; then
@ -2859,6 +2876,9 @@ if [[ $(grep -q ^Conflicts: control; echo $?) == 0 ]]; then
done
sed -e s'/(/ /g' -e s'/)//g' tempfile01 | sort > tempfile02
grep -v 'xlibs$\|^xlibs \|^libgl1$\|^libgl1 \|^libglu1$\|^libglu1 \|^default-jre$\|^default-jre \|^openjdk-[0-9]+-[jdk|jre]\|^libstdc[0-9]+$\|^libstdc[0-9]+ \|^qt[0-9]+-default$\|^qt[0-9]+-default \|^python:any$\|^python:any \|^libpango\|^libcupsys2$\|^libcupsys2 \|^jackd[0-9]*$\|^jackd[0-9]* \|^fonts-freefont-ttf$\|^fonts-freefont-ttf \|^fonts-liberation$\|^fonts-liberation \|^ttf-mscorefonts-installer$\|^ttf-mscorefonts-installer \|^dpkg$\|^dpkg \|^apt$\|^apt \|^apt-get$\|^apt-get \|^aptitude$\|^aptitude \|^debconf' tempfile02 > conflicts-initial-check-list
if [[ $(cat conflicts-initial-check-list | wc -l) == 0 ]]; then
echo >> conflicts-initial-check-list
fi
packages-names-translator
if [[ $wipeout != set ]]; then
for i in $(sort -u tempfile22); do echo "conflict = $i" >> .PKGINFO; done
@ -2867,6 +2887,7 @@ if [[ $(grep -q ^Conflicts: control; echo $?) == 0 ]]; then
fi
rm -rf *tempfile* conflicts-initial-check-list final-check-list
fi
touch conflicts-untranslated-names-only
# Generating provisions fields
if [[ $(grep -q ^Provides: control; echo $?) == 0 ]]; then
@ -2877,6 +2898,9 @@ if [[ $(grep -q ^Provides: control; echo $?) == 0 ]]; then
done
sed -e s'/(/ /g' -e s'/)//g' tempfile01 | sort > tempfile02
grep -v 'xlibs$\|^xlibs \|^libgl1$\|^libgl1 \|^libglu1$\|^libglu1 \|^default-jre$\|^default-jre \|^openjdk-[0-9]+-[jdk|jre]\|^libstdc[0-9]+$\|^libstdc[0-9]+ \|^qt[0-9]+-default$\|^qt[0-9]+-default \|^python:any$\|^python:any \|^libpango\|^libcupsys2$\|^libcupsys2 \|^jackd[0-9]*$\|^jackd[0-9]* \|^fonts-freefont-ttf$\|^fonts-freefont-ttf \|^fonts-liberation$\|^fonts-liberation \|^ttf-mscorefonts-installer$\|^ttf-mscorefonts-installer \|^dpkg$\|^dpkg \|^apt$\|^apt \|^apt-get$\|^apt-get \|^aptitude$\|^aptitude \|^debconf' tempfile02 > provisions-initial-check-list
if [[ $(cat provisions-initial-check-list | wc -l) == 0 ]]; then
echo >> provisions-initial-check-list
fi
packages-names-translator
if [[ $wipeout != set ]] && [[ $pkgbuild != set ]] && [[ $Pkgbuild != set ]]; then
for i in $(sort -u tempfile22); do echo "provides = $i" >> .PKGINFO; done
@ -2885,6 +2909,7 @@ if [[ $(grep -q ^Provides: control; echo $?) == 0 ]]; then
fi
rm -rf *tempfile* provisions-initial-check-list final-check-list
fi
touch provisions-untranslated-names-only
# Generating backups fields
if [[ -e conffiles ]]; then
@ -2911,6 +2936,9 @@ if [[ $(grep -q '^Depends:\|^Pre-Depends:' control; echo $?) == 0 ]]; then
done
sed -e s'/(/ /g' -e s'/)//g' tempfile01 | sort > tempfile02
grep -v 'xlibs$\|^xlibs \|^libgl1$\|^libgl1 \|^libglu1$\|^libglu1 \|^default-jre$\|^default-jre \|^openjdk-[0-9]+-[jdk|jre]\|^libstdc[0-9]+$\|^libstdc[0-9]+ \|^qt[0-9]+-default$\|^qt[0-9]+-default \|^python:any$\|^python:any \|^libpango\|^libcupsys2$\|^libcupsys2 \|^jackd[0-9]*$\|^jackd[0-9]* \|^fonts-freefont-ttf$\|^fonts-freefont-ttf \|^fonts-liberation$\|^fonts-liberation \|^ttf-mscorefonts-installer$\|^ttf-mscorefonts-installer \|^dpkg$\|^dpkg \|^apt$\|^apt \|^apt-get$\|^apt-get \|^aptitude$\|^aptitude \|^debconf' tempfile02 > dependencies-initial-check-list
if [[ $(cat dependencies-initial-check-list | wc -l) == 0 ]]; then
echo >> dependencies-initial-check-list
fi
packages-names-translator
if [[ $wipeout != set ]]; then
for i in $(sort -u tempfile22); do echo "depend = $i" >> .PKGINFO; done
@ -2919,6 +2947,7 @@ if [[ $(grep -q '^Depends:\|^Pre-Depends:' control; echo $?) == 0 ]]; then
fi
rm -rf *tempfile* dependencies-initial-check-list final-check-list
fi
touch dependencies-untranslated-names-only
# Generating optional dependencies fields
if [[ $(grep -q '^Recommends:\|^Suggests:' control; echo $?) == 0 ]]; then
@ -2929,6 +2958,9 @@ if [[ $(grep -q '^Recommends:\|^Suggests:' control; echo $?) == 0 ]]; then
done
sed -e s'/(/ /g' -e s'/)//g' tempfile01 | sort > tempfile02
grep -v 'xlibs$\|^xlibs \|^libgl1$\|^libgl1 \|^libglu1$\|^libglu1 \|^default-jre$\|^default-jre \|^openjdk-[0-9]+-[jdk|jre]\|^libstdc[0-9]+$\|^libstdc[0-9]+ \|^qt[0-9]+-default$\|^qt[0-9]+-default \|^python:any$\|^python:any \|^libpango\|^libcupsys2$\|^libcupsys2 \|^jackd[0-9]*$\|^jackd[0-9]* \|^fonts-freefont-ttf$\|^fonts-freefont-ttf \|^fonts-liberation$\|^fonts-liberation \|^ttf-mscorefonts-installer$\|^ttf-mscorefonts-installer \|^dpkg$\|^dpkg \|^apt$\|^apt \|^apt-get$\|^apt-get \|^aptitude$\|^aptitude \|^debconf' tempfile02 > optional-dependencies-initial-check-list
if [[ $(cat optional-dependencies-initial-check-list | wc -l) == 0 ]]; then
echo >> optional-dependencies-initial-check-list
fi
packages-names-translator
if [[ $wipeout != set ]]; then
for i in $(sort -u tempfile22); do
@ -2946,8 +2978,9 @@ if [[ $(grep -q '^Recommends:\|^Suggests:' control; echo $?) == 0 ]]; then
fi
rm -rf *tempfile* optional-dependencies-initial-check-list final-check-list
fi
touch optional-dependencies-untranslated-names-only-1
# Moving report files to /tmp/debtap (if any exist)
# Moving report files to /tmp/debtap
rm -rf /tmp/debtap 2> /dev/null
mkdir /tmp/debtap 2> /dev/null
if [[ $? != 0 ]]; then
@ -2957,49 +2990,49 @@ mv *untranslated* /tmp/debtap 2> /dev/null
mv *missing-files /tmp/debtap 2> /dev/null
# Report of (warning messages for) untranslated packages names and packages with missing files (if any exist)
if [[ -e /tmp/debtap/dependencies-untranslated-names-only ]]; then
if [[ $(cat /tmp/debtap/dependencies-untranslated-names-only) != "" ]]; then
echo -e "\n${lightred}Warning: These dependencies (depend = fields) could not be translated into Arch Linux packages names:${NC}"
echo $(cat /tmp/debtap/dependencies-untranslated-names-only) | sed s'/ /, /g'
echo $($(cat /tmp/debtap/dependencies-untranslated-names-only)) | sed s'/ /, /g'
fi
if [[ -e /tmp/debtap/dependencies-missing-files ]]; then
if [[ -e /tmp/debtap/dependencies-untranslated-names-only ]]; then
if [[ $(cat /tmp/debtap/dependencies-untranslated-names-only) != "" ]]; then
echo -e "${lightred}Warning: These packages names could not be included as dependencies, because debtap has translated them into the same name with the package for conversion. This happens sometimes when you convert packages that already exist in your repositories (which is a bad idea in general). The following packages contain files that are already included in the package from your repositories (without these files your converted package may be dysfunctional):${NC}"
else
echo -e "\n${lightred}Warning: These packages names could not be included as dependencies, because debtap has translated them into the same name with the package for conversion. This happens sometimes when you convert packages that already exist in your repositories (which is a bad idea in general). The following packages contain files that are already included in the package from your repositories (without these files your converted package may be dysfunctional):${NC}"
fi
echo $(cat /tmp/debtap/dependencies-missing-files) | sed s'/ /, /g'
fi
if [[ -e /tmp/debtap/optional-dependencies-untranslated-names-only-1 ]]; then
if [[ -e /tmp/debtap/dependencies-untranslated-names-only ]] || [[ -e /tmp/debtap/dependencies-missing-files ]]; then
if [[ $(cat /tmp/debtap/optional-dependencies-untranslated-names-only-1) != "" ]]; then
if [[ $(cat /tmp/debtap/dependencies-untranslated-names-only) != "" ]] || [[ -e /tmp/debtap/dependencies-missing-files ]]; then
echo -e "${lightred}Warning: These optional dependencies (optdepend = fields) could not be translated into Arch Linux packages names:${NC}"
else
echo -e "\n${lightred}Warning: These optional dependencies (optdepend = fields) could not be translated into Arch Linux packages names:${NC}"
fi
echo $(cat /tmp/debtap/optional-dependencies-untranslated-names-only-1) | sed s'/ /, /g'
echo $($(cat /tmp/debtap/optional-dependencies-untranslated-names-only-1)) | sed s'/ /, /g'
fi
if [[ -e /tmp/debtap/replacements-untranslated-names-only ]]; then
if [[ -e /tmp/debtap/dependencies-untranslated-names-only ]] || [[ -e /tmp/debtap/dependencies-missing-files ]] || [[ -e /tmp/debtap/optional-dependencies-untranslated-names-only-1 ]]; then
if [[ $(cat /tmp/debtap/replacements-untranslated-names-only) != "" ]]; then
if [[ $(cat /tmp/debtap/dependencies-untranslated-names-only) != "" ]] || [[ -e /tmp/debtap/dependencies-missing-files ]] || [[ $(cat /tmp/debtap/optional-dependencies-untranslated-names-only-1) != "" ]]; then
echo -e "${lightred}Warning: These replacements (replaces = fields) could not be translated into Arch Linux packages names:${NC}"
else
echo -e "\n${lightred}Warning: These replacements (replaces = fields) could not be translated into Arch Linux packages names:${NC}"
fi
echo $(cat /tmp/debtap/replacements-untranslated-names-only) | sed s'/ /, /g'
echo $($(cat /tmp/debtap/replacements-untranslated-names-only)) | sed s'/ /, /g'
fi
if [[ -e /tmp/debtap/conflicts-untranslated-names-only ]]; then
if [[ -e /tmp/debtap/dependencies-untranslated-names-only ]] || [[ -e /tmp/debtap/dependencies-missing-files ]] || [[ -e /tmp/debtap/optional-dependencies-untranslated-names-only-1 ]] || [[ -e /tmp/debtap/replacements-untranslated-names-only ]]; then
if [[ $(cat /tmp/debtap/conflicts-untranslated-names-only) != "" ]]; then
if [[ $(cat /tmp/debtap/dependencies-untranslated-names-only) != "" ]] || [[ -e /tmp/debtap/dependencies-missing-files ]] || [[ $(cat /tmp/debtap/optional-dependencies-untranslated-names-only-1) != "" ]] || [[ $(cat /tmp/debtap/replacements-untranslated-names-only) != "" ]]; then
echo -e "${lightred}Warning: These conflicts (conflict = fields) could not be translated into Arch Linux packages names:${NC}"
else
echo -e "\n${lightred}Warning: These conflicts (conflict = fields) could not be translated into Arch Linux packages names:${NC}"
fi
echo $(cat /tmp/debtap/conflicts-untranslated-names-only) | sed s'/ /, /g'
echo $($(cat /tmp/debtap/conflicts-untranslated-names-only)) | sed s'/ /, /g'
fi
if [[ -e /tmp/debtap/provisions-untranslated-names-only ]]; then
if [[ -e /tmp/debtap/dependencies-untranslated-names-only ]] || [[ -e /tmp/debtap/dependencies-missing-files ]] || [[ -e /tmp/debtap/optional-dependencies-untranslated-names-only-1 ]] || [[ -e /tmp/debtap/replacements-untranslated-names-only ]] || [[ -e /tmp/debtap/conflicts-untranslated-names-only ]]; then
if [[ $(cat /tmp/debtap/provisions-untranslated-names-only) != "" ]]; then
if [[ $(cat /tmp/debtap/dependencies-untranslated-names-only) != "" ]] || [[ -e /tmp/debtap/dependencies-missing-files ]] || [[ $(cat /tmp/debtap/optional-dependencies-untranslated-names-only-1) != "" ]] || [[ $(cat /tmp/debtap/replacements-untranslated-names-only) != "" ]] || [[ $(cat /tmp/debtap/conflicts-untranslated-names-only) != "" ]]; then
echo -e "${lightred}Warning: These provisions (provides = fields) could not be translated into Arch Linux packages names:${NC}"
else
echo -e "\n${lightred}Warning: These provisions (provides = fields) could not be translated into Arch Linux packages names:${NC}"
fi
echo $(cat /tmp/debtap/provisions-untranslated-names-only) | sed s'/ /, /g'
echo $($(cat /tmp/debtap/provisions-untranslated-names-only)) | sed s'/ /, /g'
fi
# Generating .INSTALL file (if necessary)