termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.17k stars 3.02k forks source link

[Bug]: xpdf install conflict with poppler #10069

Closed cj2kl closed 2 years ago

cj2kl commented 2 years ago

Problem description

xpdf install conflict with poppler du to same filename in both package

Preparing to unpack .../archives/xpdf_4.03-3_arm.deb ...
Unpacking xpdf (4.03-3) ...
dpkg: error processing archive /data/data/com.termux/cache/apt/archives/xpdf_4.03-3_arm.deb (--unpack):
 trying to overwrite '/data/data/com.termux/files/usr/bin/pdffonts', which is also in package poppler 21.08.0-5
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /data/data/com.termux/cache/apt/archives/xpdf_4.03-3_arm.deb
E: Sub-process /data/data/com.termux/files/usr/bin/dpkg returned an error code (1)
~ $

What steps will reproduce the bug?

pkg install xpdf

I created my own package database for searching and looking for what can be done by myself:

pkg list-all | awk -F'/' 'FNR>1{print $1}' > packages.lst
rm packages-show.txt
for item in `cat packages.lst` ; do pkg show "$item" >> packages-show.txt ; done

Then I search for dependencies for this class of app:

awk 'BEGIN{ORS=RS="\n\n";FS=OFS="\n"};/pdf|djv/{print}' packages-show.txt >pdf-djv-app-dep.txt
awk 'BEGIN{ORS=RS="\n\n";FS=OFS="\n"};/xpdf/{print}' packages-show.txt >xpdf-app-dep.txt
awk 'BEGIN{ORS=RS="\n\n";FS=OFS="\n"};/poppler/{print}' packages-show.txt >poppler-app-dep.txt

# I do a list of files from downloded packages
dpkg --contents ../../cache/apt/archives/poppler_21.08.0-5_arm.deb |awk '{print $6}'>poppler-files.lst
dpkg --contents ../../cache/apt/archives/xpdf_4.03-3_arm.deb |awk '{print $6}'>xpdf-files.lst

# I compare both list file
awk '{sub(/^[.]/,z); if($0 in a)print}; FNR==NR{a[$0]};' xpdf.lst poppler.lst >xpdf-poppler-inst-conflicts.txt

Here the list of file that are in both pakage:

/data/data/com.termux/files/usr/share/man/man1/pdfimages.1.gz
/data/data/com.termux/files/usr/share/man/man1/pdftoppm.1.gz
/data/data/com.termux/files/usr/share/man/man1/pdffonts.1.gz
/data/data/com.termux/files/usr/share/man/man1/pdftops.1.gz
/data/data/com.termux/files/usr/share/man/man1/pdftohtml.1.gz
/data/data/com.termux/files/usr/share/man/man1/pdftotext.1.gz
/data/data/com.termux/files/usr/share/man/man1/pdfinfo.1.gz
/data/data/com.termux/files/usr/share/man/man1/pdfdetach.1.gz
/data/data/com.termux/files/usr/bin/pdftoppm
/data/data/com.termux/files/usr/bin/pdffonts
/data/data/com.termux/files/usr/bin/pdftotext
/data/data/com.termux/files/usr/bin/pdfimages
/data/data/com.termux/files/usr/bin/pdfinfo
/data/data/com.termux/files/usr/bin/pdftops
/data/data/com.termux/files/usr/bin/pdfdetach
/data/data/com.termux/files/usr/bin/pdftohtml

What is the expected behavior?

I believe that having the same filenames in both package, cause the installation problem.

I dont know how to resolve this by myself.

Both package poppler and xpdf can coexist in a termux install.

System information

termux-info:

Application version:
0.118.0
Packages CPU architecture:
arm
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.org/apt/termux-main/ stable main
# sources.list.d/pointless.list
deb https://its-pointless.github.io/files/24 termux extras
# x11-repo (sources.list.d/x11.list)
deb https://packages.termux.org/apt/termux-x11 x11 main
Updatable packages:
cava/stable 0.8.1 arm [upgradable from: 0.8.0]
coreutils/stable 9.1 arm [upgradable from: 9.0]
htop/stable 3.1.2 arm [upgradable from: 3.0.5-2]
play-audio/stable 0.6 arm [upgradable from: 0.5-5]
qt5-qtbase/x11 5.15.3-4 arm [upgradable from: 5.15.3-3]
qt5-qtwebkit/x11 5.212.0-alpha4-9 arm [upgradable from: 5.212.0-alpha4-8]
termux-exec/stable 1:1.0 arm [upgradable from: 1:0.9]
tree/stable 2.0.2 arm [upgradable from: 1.8.0-2]
Android version:
9
Kernel build information:
Linux localhost 3.18.120-18304969 termux/x11-packages#2 SMP PREEMPT Sat May 16 15:39:54 KST 2020 armv8l Android
Device manufacturer:
samsung
Device model:
SM-T590
xtkoba commented 2 years ago

Thanks for the report. It will suffice to exclude those files from xpdf package (using TERMUX_PKG_RM_AFTER_INSTALL). Fix will be after the repo migration.