diff options
author | P. J. McDermott <pj@pehjota.net> | 2014-08-18 16:37:33 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2014-08-18 16:37:33 (EDT) |
commit | 54685daf378cd4cf9f521541e218ba1ab9d66e5d (patch) | |
tree | 293cfc664e36ea5ddbf949d11b2adb475d2c0d87 /lib | |
parent | 7aa14bff1aecd178c6663925a3674b24af7ab4a3 (diff) |
feed_download(): Add feed_idx parameter
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cmd/install.sh | 4 | ||||
-rw-r--r-- | lib/feed.sh | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/cmd/install.sh b/lib/cmd/install.sh index f9ac390..4197fbc 100644 --- a/lib/cmd/install.sh +++ b/lib/cmd/install.sh @@ -87,10 +87,10 @@ cmd_install_find_pkgs() while read -r feed_idx feed; do feed_download "${feed}" \ >"${chroot}/var/lib/opkg/lists/${feed_idx}" - feed_find_pkgs 'profile_include_pkg' "$(profile_dep_fields)" \ + feed_find_pkgs "${chroot}/var/lib/opkg/lists/${feed_idx}" \ + "$(profile_dep_fields)" 'profile_include_pkg' \ "${chroot}/.prokit/${feed_idx}.depends" \ "${chroot}/.prokit/${feed_idx}.filenames" \ - <"${chroot}/var/lib/opkg/lists/${feed_idx}" >>"${chroot}/.prokit/packages" done <<-EOF $(profile_feeds "${arch}" "${plat}" "${suite}") diff --git a/lib/feed.sh b/lib/feed.sh index 4b1d123..598614d 100644 --- a/lib/feed.sh +++ b/lib/feed.sh @@ -44,10 +44,11 @@ feed_download() # TODO: Write to a filenames file. feed_find_pkgs() { - local pkg_cb="${1}" + local feed_idx="${1}" local dep_fields="${2}" - local deps_file="${3}" - local fnames_file="${4}" + local pkg_cb="${3}" + local deps_file="${4}" + local fnames_file="${5}" feed_pkg_cb="${pkg_cb}" feed_dep_fields=" $(printf '%s ' ${dep_fields})" @@ -62,7 +63,7 @@ feed_find_pkgs() feed_pkg='' feed_deps='' - parse_control '-' feed_field_cb feed_para_cb 'Package' + parse_control "${feed_idx}" feed_field_cb feed_para_cb 'Package' fclose ${feed_deps_fd} |