Skip to content
Snippets Groups Projects
  • Karel Kočí's avatar
    1aa80ce3
    scripts/feeds: generate index after all feeds are updated · 1aa80ce3
    Karel Kočí authored
    
    This separates index update from feed update. The result is that all
    requested feeds are first updated and only then indexed.
    
    The reason for this change is to prevent errors being reported and
    potentially invalid index being generated thanks to cross feeds
    dependency.
    The feeds script pulls in default all feeds as they come and on install
    prefers packages from first feeds (unless special feed is requested).
    Thus order of feeds in some way specifies preferences. This is handy for
    downstream distributions as they can simply override any package from
    upstream feeds by placing their feed before them. This removes need to
    patch or fork upstream feeds.
    The problem is that such feed most likely depends in some way also on
    subsequent feeds. The most likely feeds are 'packages' or 'luci'. The
    example would be Python package that needs 'python.mk' from 'packages'
    feed. Ordering custom feed after dependent feeds is sometimes just not
    possible because of preference requirement described before.
    The solution is to just first pull all feeds and generate indexes only
    after that. In the end this ensures that index is generated correctly at
    first try without any error.
    
    In terms of code this removes 'perform_update' argument from
    'update_feed' as with index update removal the update is the only action
    performed in that subroutine. Thus this moves condition to 'update'
    subroutine.
    
    Signed-off-by: default avatarKarel Kočí <karel.koci@nic.cz>
    1aa80ce3
    History
    scripts/feeds: generate index after all feeds are updated
    Karel Kočí authored
    
    This separates index update from feed update. The result is that all
    requested feeds are first updated and only then indexed.
    
    The reason for this change is to prevent errors being reported and
    potentially invalid index being generated thanks to cross feeds
    dependency.
    The feeds script pulls in default all feeds as they come and on install
    prefers packages from first feeds (unless special feed is requested).
    Thus order of feeds in some way specifies preferences. This is handy for
    downstream distributions as they can simply override any package from
    upstream feeds by placing their feed before them. This removes need to
    patch or fork upstream feeds.
    The problem is that such feed most likely depends in some way also on
    subsequent feeds. The most likely feeds are 'packages' or 'luci'. The
    example would be Python package that needs 'python.mk' from 'packages'
    feed. Ordering custom feed after dependent feeds is sometimes just not
    possible because of preference requirement described before.
    The solution is to just first pull all feeds and generate indexes only
    after that. In the end this ensures that index is generated correctly at
    first try without any error.
    
    In terms of code this removes 'perform_update' argument from
    'update_feed' as with index update removal the update is the only action
    performed in that subroutine. Thus this moves condition to 'update'
    subroutine.
    
    Signed-off-by: default avatarKarel Kočí <karel.koci@nic.cz>