Bug 12664 - dpkg depends on diff, pager. But neither diff nor pager available
: dpkg depends on diff, pager. But neither diff nor pager available
Status: NEW
Product: Maemo 5 Community SSU
general
: unspecified
: N900 Maemo
: Unspecified enhancement with 1 vote (vote)
: ---
Assigned To: unassigned
: general
:
:
:
:
  Show dependency tree
 
Reported: 2012-09-12 00:22 UTC by Joerg Reisenweber
Modified: 2012-09-12 10:29 UTC (History)
2 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Joerg Reisenweber (reporter) 2012-09-12 00:22:43 UTC
dpkg uses diff binary to prepare backups of altered config files, in case of
conflicts. Neither busybox nor anything else in default system provides diff.

apt-get resp dpkg throws error: 
  diff: applet not found
  pager: applet not found

see http://talk.maemo.org/showthread.php?p=1265002#post1265002

suggested fix: CSSU provides binaries for diff and less, and a symlink
pager->less
alternative: fix busybox basic to provide diff. Deprecated due to much higher
risk with only little benefit in saving <50k of rootfs.
Comment 1 Edoardo Spadolini 2012-09-12 00:28:47 UTC
The current busybox provides and conflicts with packages named "diff", so we'd
have to be careful not to cause silly situations with regards to HAM and
conflicts; there's a "less" package in extras, right now - and it also makes
the /usr/bin/pager symlink, so we could just include that one to fix the
problem with pager.
Comment 2 gregor herrmann 2012-09-12 01:00:01 UTC
(In reply to comment #1)
> The current busybox provides and conflicts with packages named "diff", so we'd
> have to be careful not to cause silly situations with regards to HAM and
> conflicts; 

Correct in general but I see no diff package anywhere.

> there's a "less" package in extras, right now - and it also makes
> the /usr/bin/pager symlink, so we could just include that one to fix the
> problem with pager.

/usr/bin/pager is managed via alternatives, on my system with 3 options:
- /bin/less (package less)
- /usr/bin/most (package most)
- /bin/more (package busybox but might as well be busybox-power ...)

Since there are considerations around handling busybox(-power) in CSSU going on
anyway, maybe making sure that bb has the diff and more symlinks/applets
activated would be enough?
Comment 3 Joerg Reisenweber (reporter) 2012-09-12 02:09:28 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > The current busybox provides and conflicts with packages named "diff", so we'd
> > have to be careful not to cause silly situations with regards to HAM and
> > conflicts; 
> 
> Correct in general but I see no diff package anywhere.

~ # busybox diff
diff: applet not found

IroN900:~# ls -l /usr/bin/gnu/diff
-rwxr-xr-x 1 root root 61316 2010-04-21 12:14 /usr/bin/gnu/diff

> 
> > there's a "less" package in extras, right now - and it also makes
> > the /usr/bin/pager symlink, so we could just include that one to fix the
> > problem with pager.
yes
~ # busybox pager
pager: applet not found
~ # ls -l /bin/less
-rwxr-xr-x    1 root     root       125124 Feb 11  2010 /bin/less
needs optification


> 
> /usr/bin/pager is managed via alternatives, on my system with 3 options:
> - /bin/less (package less)
> - /usr/bin/most (package most)
> - /bin/more (package busybox but might as well be busybox-power ...)

see above, busybox has no clue what's pager, since it doesn't notice the double
symlink (and wouldn't work with single symlink pager->busybox either). Only way
to exploit busybox was a small shell scriptie named pager that invokes more.

> 
> Since there are considerations around handling busybox(-power) in CSSU going on
> anyway, maybe making sure that bb has the diff and more symlinks/applets
> activated would be enough?
OK for busybox-power. But bb-p is an optional package, not replacing bb-basic.
For bb-basic I'd not like to mess with it just to fix this bug, when we have
proper diff binary that introduces zero risk to install.

OTOH I wonder if a fix for this very bug should be mandatory or also optional.
Or simply won't_fix since it's pretty easy for user to fix it by installing
whatever provides proper diff and pager
Comment 4 Andre Klapper maemo.org 2012-09-12 10:29:47 UTC
FYI, history of missing diff is https://bugs.maemo.org/show_bug.cgi?id=3032