Changeset 33472


Ignore:
Timestamp:
2012-09-19T17:09:30+02:00 (4 years ago)
Author:
florian
Message:

[package] avahi: Makefile fix to honor configuration changes

his patch is to fix a long-standing problem with avahi builds:
if you change the configuration, sometimes the relevant packages are not
correctly rebuilt; see, for example, ticket #11110.

Background: avahi can be built in two modes: with or without D-BUS support.
If you switch builds from one mode to the other and then back again, the
packages will not
always be rebuilt as required. For example, if you choose to build avahi (1)
without D-BUS support,
then (2) with D-BUS support and then (3) without D-BUS support, the packages
will not
be rebuilt the third time, and you'll be left with the packages
from the second build -- packages that require D-BUS support.

The patch works by deleting the ".build" file belonging to the mode not
currently chosen, so
that if that mode is chosen again in the future, its packages will always be
rebuilt.

A few small corrections to the explanatory text are included.

Signed-off-by <mikebrady@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/libs/avahi/Makefile

    r33466 r33472  
    99 
    1010ifeq ($(BUILD_VARIANT),dbus) 
    11 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-dbus/$(PKG_NAME)-$(PKG_VERSION) 
     11PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)/dbus/$(PKG_NAME)-$(PKG_VERSION) 
     12PKG_ALT_DIR=$(BUILD_DIR)/$(PKG_NAME)/nodbus/$(PKG_NAME)-$(PKG_VERSION) 
    1213else 
    13 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-nodbus/$(PKG_NAME)-$(PKG_VERSION) 
     14PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)/nodbus/$(PKG_NAME)-$(PKG_VERSION) 
     15PKG_ALT_DIR=$(BUILD_DIR)/$(PKG_NAME)/dbus/$(PKG_NAME)-$(PKG_VERSION) 
    1416endif 
    1517 
     
    1719PKG_NAME:=avahi 
    1820PKG_VERSION:=0.6.31 
    19 PKG_RELEASE:=4 
     21PKG_RELEASE:=5 
    2022 
    2123 
     
    6971 used by other programs. Specifically, it provides 
    7072 libavahi-core and libavahi-common libraries. 
    71  By default, it is compiled without D-Bus support, 
    72  i.e. the --disable-dbus compilation flag is set. 
     73 By default, it is built without D-Bus support, 
     74 i.e. the --disable-dbus configuration flag is set. 
    7375 To enable D-Bus support, select the package 
    7476 libavahi-dbus-support. 
     
    143145 . 
    144146 The libavahi-dbus-support package enables 
    145  D-Bus support in libavahi, needed to support 
     147 D-Bus support in avahi, needed to support 
    146148 the libavahi-client library and avahi-utils. 
    147  Selecting this package modifies the contents of the 
    148  libavahi package by setting the --enable-dbus compilation flag; 
     149 Selecting this package modifies the build configuration 
     150 so that avahi packages are built with support for D-BUS enabled; 
    149151 it does not generate a separate binary of its own. 
    150152 It also automatically adds the D-Bus package to the build. 
     
    250252 
    251253define Package/libavahi-dbus-support/install 
    252         $(INSTALL_DIR) $(1)/usr/lib 
     254        $(INSTALL_DIR) $(1)/etc/dbus-1/system.d 
     255        $(CP) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/* $(1)/etc/dbus-1/system.d 
    253256endef 
    254257 
    255258define Package/libavahi/install 
     259        # The next line removes the ".build" file from the "other" build. 
     260        # The effect is that, if the other build is re-selected in the future, 
     261        # the build system will be forced to replace all the code in the 
     262        # installer packages, removing anything from the current build. 
     263        # "Other" means this: if the current build is "dbus", the other is "nodebus", 
     264        # and if the current build is "nodbus", the other is "dbus". 
     265        $(RM) -f $(PKG_ALT_DIR)/.built 
    256266        $(INSTALL_DIR) $(1)/usr/lib 
    257267        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/ 
    258 ifeq ($(BUILD_VARIANT),dbus) 
    259         $(INSTALL_DIR) $(1)/etc/dbus-1/system.d 
    260         $(CP) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/* $(1)/etc/dbus-1/system.d 
    261 endif 
    262268endef 
    263269 
Note: See TracChangeset for help on using the changeset viewer.