Bug 12964 - Support 'don't install this package' option during install
Summary: Support 'don't install this package' option during install
Status: RESOLVED WORKSFORME
Alias: None
Product: opkg
Classification: Yocto Project Subprojects
Component: opkg (show other bugs)
Version: 0.3.6
Hardware: x86 Multiple
: Undecided enhancement
Target Milestone: ---
Assignee: Alejandro del Castillo
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2018-10-17 10:00 UTC by Ross Burton
Modified: 2018-10-17 16:39 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2018-10-17 10:00:47 UTC
dnf supports -x to exclude packages from the operation.  For example during a rootfs construction:

$ dnf install rpm -x python3-core
[...]
Error:
 Problem 1: conflicting requests
  - nothing provides python3-core needed by dnf-2.7.5-r0.corei7_64
 Problem 2: conflicting requests
  - nothing provides python3-core needed by rpm-1:4.14.2-r0.corei7_64

The same can be done with dpkg by using pins and setting a -1 priority.

Can something similar be added to opkg?
Comment 1 Alejandro del Castillo 2018-10-17 16:36:58 UTC
Opkg already has a flag to do that (--add-exclude). In the following example, a DEPENDS on b:

[adelcast@delcastillo3 tests]$ opkg -o /tmp/opkg --add-exclude b install a

Collected errors:
 * Solver encountered 1 problem(s):
 * Problem 1/1:
 *   - nothing provides b needed by a-1.0.all
 * 
 * Solution 1:
 *   - do not ask to install a package providing a

[adelcast@delcastillo3 tests]$ opkg -o /tmp/opkg install a
Installing b (1.0) on root
Downloading file:/tmp/opk/b_1.0_all.opk.
Installing a (1.0) on root
Downloading file:/tmp/opk/a_1.0_all.opk.
Comment 2 Ross Burton 2018-10-17 16:39:48 UTC
I looked at the source and everything to verify it didn't exist before filing this...  :(