duplicates in models.dat and hpaio.desc
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HPLIP |
Triaged
|
Undecided
|
dwelch91 |
Bug Description
On my workstation with HPLIP 2.8.4:
models.dat contains several duplicates:
grep '^model[0-9]*=' /usr/share/
| grep -o '=.*' \
| tr '[:upper:]' '[:lower:]' \
| tr -c -d '[:alnum:]\n' \
| wc -l
1308
grep '^model[0-9]*=' /usr/share/
| grep -o '=.*' \
| tr '[:upper:]' '[:lower:]' \
| tr -c -d '[:alnum:]\n' \
| sort -u \
| wc -l
1283
grep '^model[0-9]*=' /usr/share/
| grep -o '=.*' \
| tr '[:upper:]' '[:lower:]' \
| tr -c -d '[:alnum:]\n' \
| sort \
| uniq -c -d
2 businessinkjet1000
2 deskjet3920
2 deskjet3940
2 deskjet690c
2 deskjet690cplus
2 hp910
2 hp915
2 hplaserjetm1120mfp
2 laserjerp2014
2 laserjet9040dn
2 officejet5105
2 officejet5110
2 officejet5110v
2 photosmart7760v
2 psc1110
2 psc1110v
2 psc1118
2 psc1300
2 psc1340allinone
2 psc1350allinone
2 psc1350vallinone
2 psc1350xiallinone
2 psc1355allinone
3 psc760
hpaio.desc contains tons of duplicates:
grep '^:model' /usr/share/
| grep -o '".*"' \
| tr '[:upper:]' '[:lower:]' \
| tr -c -d '[:alnum:]\n' \
| wc -l
1292
grep '^:model' /usr/share/
| grep -o '".*"' \
| tr '[:upper:]' '[:lower:]' \
| tr -c -d '[:alnum:]\n' \
| sort -u \
| wc -l
509
grep '^:model' /usr/share/
| grep -o '".*"' \
| tr '[:upper:]' '[:lower:]' \
| tr -c -d '[:alnum:]\n' \
| sort \
| uniq -c -d \
>/tmp/
Changed in hplip: | |
assignee: | nobody → kalosaurusrex |
status: | New → Fix Released |
Changed in hplip: | |
assignee: | kalosaurusrex → dwelch91 |
Furthermore hpaio.desc seems to contain
many (all?) plain printers too, i.e. devices
with "scan-type=0" in models.dat, e.g. my
"Deskjet 3320" for which no scanner unit
is available (in contrast to e.g. a LaserJet 1200
for which a scanner unit is available which
make it a LaserJet 1220).
Because hpaio.desc is currently totally broken,
I use for openSUSE 11.0 the attached script
which creates hpaio.desc from models.dat
and tests for scan-type != 0 in models.dat.
Currently I inherit the duplicates from models.dat
and I don't have e.g. a LaserJet 1200 in hpaio.desc
because it has "scan-type=0" in models.dat.
Nevertheless what the script creates is much better
than the upstream hpaio.desc.
The license of the script is under the same license as
the HPLIP package itself (i.e. feel free to use it and
adapt it to your needs).