[FS#3849] opkg: Feature request: Add possibility to read packages from a file instead from the command line.

OpenWrt Bugs openwrt-bugs at lists.openwrt.org
Fri Jun 4 02:47:00 PDT 2021


The following task has a new comment added:

FS#3849 - opkg: Feature request: Add possibility to read packages from a file instead from the command line.
User who did this - Drei Eck (dreieck)

>  From "''man 1 xargs''":
> > The command line for command is built up until it reaches a system-defined limit (unless the -n and -L options are used). The specified command will be invoked as many times as necessary to use up the list of input items. In general, there will be many fewer invocations of command than there were items in the input. This will normally have significant performance benefits.

OK, thanks!, but then this would mean that ''opkg'' does not see all packages at once and cannot do dependency handling correctly.

We also cannot install with ''--force-depends'', since it turns out every now and then that the configuration (''make menuconfig'') by itself does not always make sure that all dependencies are met or that conflicting packages are excluded, sometimes this only get noticed in the install step.

So ''opkg'' would need to know at once about //all// packages to be installed.

(It seems even that when ''opkg'' misses some packages it could refuse to install other packages because of some spurious "incompatible with the architectures configured". Below is an output of the install step of ''make -j1 V=sc'' with a change to the makefile that installs every package one by one:

IPKG_NO_SCRIPT=1 IPKG_INSTROOT=/home/felics/download/Router-OS/OpenWRT/OpenWRT/21.02/source/openwrt-21.02.0-rc1/build_dir/target-i386_pentium-mmx_musl/root-x86 TMPDIR=/home/felics/download/Router-OS/OpenWRT/OpenWRT/21.02/source/openwrt-21.02.0-rc1/build_dir/target-i386_pentium-mmx_musl/root-x86/tmp /home/felics/download/Router-OS/OpenWRT/OpenWRT/21.02/source/openwrt-21.02.0-rc1/staging_dir/host/bin/opkg --offline-root /home/felics/download/Router-OS/OpenWRT/OpenWRT/21.02/source/openwrt-21.02.0-rc1/build_dir/target-i386_pentium-mmx_musl/root-x86 --force-postinstall --add-dest root:/ --add-arch all:100 --add-arch i386_pentium-mmx:200 install /home/felics/download/Router-OS/OpenWRT/OpenWRT/21.02/source/openwrt-21.02.0-rc1/bin/targets/x86/geode/packages/base-files_1-r16046-59980f7aaf_i386_pentium-mmx.ipk
Unknown package 'base-files'.
Collected errors:
 * pkg_hash_fetch_best_installation_candidate: Packages for base-files found, but incompatible with the architectures configured
 * opkg_install_cmd: Cannot install package base-files.
make[2]: *** [package/Makefile:79: package/install] Error 255


Using ''xargs'' then as you cited can also break up the command line and might lead to similar problems, since it is not guaranteed that all packages that belong to each other are grouped into one call to ''opkg''

More information can be found at the following URL:

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.

More information about the openwrt-bugs mailing list