Modify

Opened 3 years ago

Closed 3 years ago

#19668 closed defect (fixed)

Packages with a '.' in name cannot be installed/removed by opkg

Reported by: thess Owned by: developers
Priority: highest Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: Cc:

Description

Example: libusb-1.0

Bug is in /lib/functions.sh default_postinst and default_prerm

See issue: https://github.com/openwrt/packages/issues/1262

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by anonymous

Two lines originating from r42470 form the package name by cutting at the first dot. If package name contains dot, that leads to wrong name.

name=$(echo $(basename $1) | cut -d. -f1)

https://dev.openwrt.org/browser/trunk/package/base-files/files/lib/functions.sh#L168
https://dev.openwrt.org/browser/trunk/package/base-files/files/lib/functions.sh#L178

The error at github shows what happens: "libusb-1.control" instead of "libusb-1.0.control":

root@OpenWrt:~# opkg install libusb-1.0
 Installing libusb-1.0 (1.0.19-1) to root...
 Downloading http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/packages/base/libusb-1.0_1.0.19-1_ramips_24kec.ipk.
 Configuring libusb-1.0.
 grep: /usr/lib/opkg/info/libusb-1.control: No such file or directory
 cat: can't open '/usr/lib/opkg/info/libusb-1.list': No such file or directory

comment:2 Changed 3 years ago by jogo

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

Fixed in r45702, thanks for reporting.

Add Comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.