OpenSDE Framework (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.5 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: target/share/squashfs.in
  5. # Copyright (C) 2011 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; version 2 of the License. A copy of the
  12. # GNU General Public License can be found in the file COPYING.
  13. # --- SDE-COPYRIGHT-NOTE-END ---
  14. # source overlay functions, to wrap overlay_apply behind squashfs_install_overlay
  15. #
  16. . "$base/lib/overlay/overlay-functions.in"
  17. # functions
  18. #
  19. # list the packages active for stage 1
  20. squashfs_list_packages() {
  21. grep '^X' $base/config/$config/packages | cut -d' ' -f5
  22. }
  23. # install a package based on the flist and a given filter
  24. squashfs_install_flist() {
  25. local pkg_name="$1" sandbox="$2" rootfs="$3"
  26. local flist="$sandbox/var/adm/flists/$pkg_name"
  27. shift 3
  28. sed "$@" "$flist" | cut -f2- -d' ' |
  29. tar -C "$sandbox/" -cf- --no-recursion --files-from=- |
  30. tar -C "$rootfs" -xf-
  31. }
  32. # weak functions
  33. #
  34. squashfs_install_overlay() {
  35. local x="$1/squashfs"
  36. [ ! -d "$x" ] || overlay_apply "$x" "$2"
  37. }
  38. # should this package be extracted by flist or not?
  39. # squashfs_install <pkg_name> <sandbox> <rootfs>
  40. squashfs_install() { true; }
  41. # what arguments should it pass to sed to filter the flist?
  42. # squashfs_install_pattern <pkg_name> <default_patterns>
  43. squashfs_install_pattern() { shift; echo "$@"; }