Opened 7 years ago

Closed 3 years ago

#9133 closed enhancement (invalid)

diff removed, but not scriptable replacement available

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: diff cmp busybox Cc:


Changeset 25494 disabled the busybox 'diff' command by default ... while I understand the requirement to save space, the removal of a very standard unix command is somewhat frustrating, especially for those of us who have already been using it in the past. Could we at least have a compromise, enable the busybox 'cmp' command so that we can easily compare files from scripts - I hope that it is simple enough that it will not take up much space. Many thanks, Max.

Attachments (0)

Change History (5)

comment:1 Changed 7 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

enabled in r26356

comment:2 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:3 Changed 3 years ago by mystica555

  • Resolution fixed deleted
  • Status changed from closed to reopened

I don't think that CMP is a useful replacement.

I would much prefer a tool that produces unified diffs being available for use in scripting on my router, to perhaps automate configuration merging, and definitely for interactive work.

Curious: how much space was saved by removing 'diff'? how much less space is saved by now having 'cmp'? is it a terribly large amount when considering LZMA?

An update process for a config file that informs me in well-learned manner of unified diff, which lines are different, and where, is quite a lot more useful than

root@OpenWrt:~# cmp /etc/config/qos /etc/config/qos-opkg
/etc/config/qos /etc/config/qos-opkg differ: char 120, line 6

Yes, I can go in with vi; but not all changes are shown, and I do not know what, if anything, past char 120 has changed.

comment:4 Changed 3 years ago by mystica555

In fact, there's not even a diffutils package to compensate for this removal... Perhaps making one would be a good interim solution?

comment:5 Changed 3 years ago by jow

  • Resolution set to invalid
  • Status changed from reopened to closed

Diffutils is available in 15.05

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.