Skip to content
Snippets Groups Projects
Verified Commit ddec4d9b authored by Karel Koci's avatar Karel Koci :metal:
Browse files

compile_pkgs: fix problem with ignored packages from feeds

This fixes problem with ignored packages that were introduced by patch.
What this does is that it installs packages after patching is done. It
also first updates indexes again before installation.

Because this feature was originally split between two function but
patch_feeds had to be inserted to the middle of get_feeds I decided to
drop both and used upper repatch_feeds instead. This means that we are
no longer able to get and patch feeds separately but I think that this
separation was almost useless.
parent e5f7aebe
No related merge requests found
......@@ -292,22 +292,6 @@ repo_checkout() {
done < "$src_dir/feeds.conf"
}
available_commands+=( ["patch_feeds"]="Apply patches to the feeds" )
patch_feeds() {
_report "Patching feeds"
for feed in "$src_dir"/patches/*; do
[ -d "$feed" ] || continue
feed_name="$(basename "$feed")"
[ -d "$build_dir/feeds/$feed_name" ] || continue
for patch in "$feed"/*/*.patch; do
[ -f "$patch" ] || continue
pushd "$build_dir/feeds/$feed_name" >/dev/null
_git am --reject "$patch"
popd >/dev/null
done
done
}
available_commands+=( ["clean_ccache"]="Clean persistent ccache paths" )
clean_ccache() {
if [ "$(which ccache)" ]; then
......@@ -405,13 +389,29 @@ _mapfile_disabled_if_exists() {
fi
}
available_commands+=( ["get_feeds"]="Recreate configured feeds" )
get_feeds() {
available_commands+=( ["repatch_feeds"]="Cleanup feeds, update them and patch them" )
repatch_feeds() {
_report "Getting feeds"
update_mirror
set_local_feeds
_perl ./scripts/feeds clean -a
_perl ./scripts/feeds update -a
_report "Patching feeds"
for feed in "$src_dir"/patches/*; do
[ -d "$feed" ] || continue
feed_name="$(basename "$feed")"
[ -d "$build_dir/feeds/$feed_name" ] || continue
for patch in "$feed"/*/*.patch; do
[ -f "$patch" ] || continue
pushd "$build_dir/feeds/$feed_name" >/dev/null
_git am --reject "$patch"
popd >/dev/null
done
done
_report "Installing feeds packages"
_perl ./scripts/feeds update -a -i
_perl ./scripts/feeds install -a
local disabled_packages=()
_mapfile_disabled_if_exists "$src_dir/disabled_packages/common"
......@@ -420,12 +420,6 @@ get_feeds() {
_perl ./scripts/feeds uninstall "${disabled_packages[@]}"
}
available_commands+=( ["repatch_feeds"]="Cleanup feeds, update them and patch them (Implies: get_feeds patch_feeds)" )
repatch_feeds() {
get_feeds
patch_feeds
}
available_commands+=( ["prefetch"]="Runs make download" )
prefetch() {
_openwrt_make -j"$BUILD_JOBS" download
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment