diff mbox series

[OpenWrt-Devel] Dependency problem after changing package name

Message ID 3f540e31-e4ee-1575-fd4d-3b2225aec3b0@gmail.com
State Not Applicable
Headers show
Series [OpenWrt-Devel] Dependency problem after changing package name | expand

Commit Message

Rafał Miłecki June 22, 2019, 11:37 a.m. UTC
I renamed locally package "lua" to "luax" and updated dependency of
"lua-examples". A pretty simple change.


After that change I can't build OpenWrt anymore.

# make V=s
(...)
Collected errors:
  * satisfy_dependencies_for: Cannot satisfy the following dependencies for lua-examples:
  *      luax
  * opkg_install_cmd: Cannot install package lua-examples.
make[2]: *** [package/Makefile:68: package/install] Error 255
(...)

# ./scripts/diffconfig.sh | grep -v "CONFIG_TARGET_DEVICE_"
CONFIG_TARGET_bcm53xx=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_ALL_PROFILES=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
CONFIG_PACKAGE_libiwinfo=y
CONFIG_PACKAGE_liblua=y
CONFIG_PACKAGE_lua-examples=y
CONFIG_PACKAGE_luax=y


I've verified this problem occurs when building from a scratch.

# git clone git@git.openwrt.org:openwrt/openwrt.git openwrt-19.07-tmp
# git checkout c26420b9145759ca99aceef0510ab8b725867c7e
# patch -p1 < ~/lua.diff
# make menuconfig
# make V=s


Any idea what's causing it? Is that some bug in handling dependencies in
OpenWrt? I noticed this while testing
[PATCH 2/2] lua: rename package to lua5.1

Comments

Rafał Miłecki June 22, 2019, 11:49 a.m. UTC | #1
On 22.06.2019 13:37, Rafał Miłecki wrote:
> I renamed locally package "lua" to "luax" and updated dependency of
> "lua-examples". A pretty simple change.
> 
> 
> After that change I can't build OpenWrt anymore.
> 
> # make V=s
> (...)
> Collected errors:
>   * satisfy_dependencies_for: Cannot satisfy the following dependencies for lua-examples:
>   *      luax
>   * opkg_install_cmd: Cannot install package lua-examples.
> make[2]: *** [package/Makefile:68: package/install] Error 255
> (...)

Jonas has just helped me. I forgot to change
Package/lua/install
to
Package/luax/install

Is that possible to make error message somehow more meaningful?
Jonas Gorski June 22, 2019, 12:24 p.m. UTC | #2
On Sat, 22 Jun 2019 at 13:50, Rafał Miłecki <zajec5@gmail.com> wrote:
>
> On 22.06.2019 13:37, Rafał Miłecki wrote:
> > I renamed locally package "lua" to "luax" and updated dependency of
> > "lua-examples". A pretty simple change.
> >
> >
> > After that change I can't build OpenWrt anymore.
> >
> > # make V=s
> > (...)
> > Collected errors:
> >   * satisfy_dependencies_for: Cannot satisfy the following dependencies for lua-examples:
> >   *      luax
> >   * opkg_install_cmd: Cannot install package lua-examples.
> > make[2]: *** [package/Makefile:68: package/install] Error 255
> > (...)
>
> Jonas has just helped me. I forgot to change
> Package/lua/install
> to
> Package/luax/install
>
> Is that possible to make error message somehow more meaningful?

At this stage the damage is already done, and opkg does not know about
any of the Makefile stuff. We can try to warn when creating the ipks
though; something like
https://git.openwrt.org/76971461b77d8ace7c4ff208de0510301e75ecc1
should do the trick.


Regards
Jonas


>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
diff mbox series

Patch

diff --git a/package/utils/lua/Makefile b/package/utils/lua/Makefile
index 077a60fbf3..3075c8dc18 100644
--- a/package/utils/lua/Makefile
+++ b/package/utils/lua/Makefile
@@ -54,13 +54,13 @@  $(call Package/lua/Default/description)
   This package contains the Lua shared libraries, needed by other programs.
  endef

-define Package/lua
+define Package/luax
  $(call Package/lua/Default)
    DEPENDS:=+liblua
    TITLE+= (interpreter)
  endef

-define Package/lua/description
+define Package/luax/description
  $(call Package/lua/Default/description)
   This package contains the Lua language interpreter.
  endef
@@ -78,7 +78,7 @@  endef

  define Package/lua-examples
  $(call Package/lua/Default)
-  DEPENDS:=lua
+  DEPENDS:=luax
    TITLE+= (examples)
  endef

@@ -169,8 +169,7 @@  define Package/lua-examples/install
  endef

  $(eval $(call BuildPackage,liblua))
-$(eval $(call BuildPackage,lua))
+$(eval $(call BuildPackage,luax))
  $(eval $(call BuildPackage,luac))
  $(eval $(call BuildPackage,lua-examples))
  $(eval $(call HostBuild))
-