1. 14 Jun, 2019 2 commits
    • Yousong Zhou's avatar
      alternatives: remove duplicate 'const' specifier · dcbc142e
      Yousong Zhou authored
      To quash warnings from GCC 7.
      
      	/home/yunion/git-repo/openwrt/openwrt/build_dir/target-mips_24kc_musl/linux-malta_be/opkg-2019-06-14-21b7bd73
      
      /libopkg/pkg_alternatives.c:35:42: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
      	 static const struct alternative_provider const providers[] = {
      						  ^~~~~
      Signed-off-by: default avatarYousong Zhou <zhouyousong@yunionyun.com>
      dcbc142e
    • Yousong Zhou's avatar
      alternatives: special-case busybox as alternatives provider · 21b7bd73
      Yousong Zhou authored
      
      
      Almost all busybox applets are alternatives to some other existing
      "full" utilities.  To lift the maintenance burden of enumerating CONFIG
      symbols, symlink path of each applet, we special case busybox here as a
      known alternatives provider.
      
      All file pathes provided by busybox will serve as fallback alternatives
      with -inf priority.  Packages intending to switch to using alternatives
      mechanism will also not need to depend on the same kind of change be
      applied on busybox in base system
      
      v3 <- v2 continue to next when fetching provider pkg failed
      v2 <- v1 Move busybox-specific part into data section
      Signed-off-by: default avatarYousong Zhou <zhouyousong@yunionyun.com>
      Acked-by: default avatarJo-Philipp Wich <jo@mein.io>
      21b7bd73
  2. 31 Jan, 2019 2 commits
  3. 18 Jan, 2019 3 commits
  4. 17 Jan, 2019 2 commits
  5. 15 Jan, 2019 2 commits
  6. 14 Dec, 2018 1 commit
  7. 30 Oct, 2018 1 commit
    • Jo-Philipp Wich's avatar
      libopkg: don't print unresolved dependencies twice · e3d73300
      Jo-Philipp Wich authored
      
      
      Sometimes opkg ends up reporting unresolved dependencies multiple
      times while also missing a newline between consecutive error lines,
      making the error message output looking garbled and confusing.
      
      Add some logic to skip repeated unresolved dependencies and ensure
      that message lines are properly terminated by newlines.
      Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
      e3d73300
  8. 07 Dec, 2017 6 commits
  9. 04 Dec, 2017 1 commit
  10. 28 Jul, 2017 1 commit
    • Jo-Philipp Wich's avatar
      pkg_parse: fix segfault when parsing descriptions with leading newlines · 4bd8601e
      Jo-Philipp Wich authored
      
      
      During parsing of multi-line descriptions that begin with a newline
      character, the description pointer will be NULL when the first
      continuation line is encountered, causing the strlen() invocation
      on the description pointer to segfault.
      
      This is caused by the fact that the parse_simple() helper used for
      parsing the initial description line returns NULL instead of an
      empty string when encountering only whitespace after the field name.
      
      Rework the continuation line parsing code to not assume an initialized
      pointer by checking before calling strlen() and avoiding realloc()
      on a NULL pointer.
      
      Fixes FS#933.
      Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
      4bd8601e
  11. 11 Jul, 2017 1 commit
    • Yousong Zhou's avatar
      pkg_alternatives: pass if the desired symlink already exists · 52fc0069
      Yousong Zhou authored
      This can happen when opkg installs, then configures multiple
      alternatives in a batch.  Symlink to the highest prio alternative will
      be created in the initial configuring stage causing later symlink call
      fail with EEXIST
      
          Configuring busybox.
          ...
          symlink("/sbin/ip-full", "/home/yousong/j/t/lede-imagebuilder-mvebu.Linux-x86_64/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/root-mvebu/sbin/ip") = 0
          ...
          Configuring ip-full.
          ...
          symlink("/sbin/ip-full", "/home/yousong/j/t/lede-imagebuilder-mvebu.Linux-x86_64/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/root-mvebu/sbin/ip") = -1 EEXIST (File exists)
          ...
      
      While at it, "mkdir -p" dirname(path_in_dest) before symlink in case the
      following symlink call may fail with ENOENT
      
      Ref: https://github.com/openwrt/packages/issues/4567
      
      Reported-by: default avatarAner Andros <aa@anerandros.info>
      Signed-off-by: default avatarYousong Zhou <yszhou4tech@gmail.com>
      52fc0069
  12. 11 May, 2017 1 commit
    • Alexandru Ardelean's avatar
      opkg: add --no-check-certificate argument · c668fcec
      Alexandru Ardelean authored
      
      
      For cases when artifacts are stored on https:// accessible
      locations and you don't want to install ca-certificates
      (for various reasons).
      
      I'll admit, using SSL like this is not recommended,
      but since wget (even uclient-fetch) allows the
      --no-check-certificate option, it would be nice
      for opkg to support setting it if needed/configured.
      Signed-off-by: default avatarAlexandru Ardelean <ardeleanalex@gmail.com>
      c668fcec
  13. 03 May, 2017 1 commit
  14. 02 May, 2017 2 commits
    • Yousong Zhou's avatar
      pkg: alternatives support · 546bc723
      Yousong Zhou authored
      
      
      It's a list of specs of the following form seprated by commas to describe
      alternatives provided by the package
      
          <prio>:<path>:<altpath>
      
      where <path> will be a symbolic link to <altpath> of the highest <prio>
      
      Size comparison on x86_64 after the change
      
          function                                             old     new   delta
          pkg_alternatives_update                                -     587    +587
          pkg_parse_line                                      2101    2609    +522
          .rodata                                            24594   24738    +144
          pkg_formatted_field                                 2385    2528    +143
          pkg_deinit                                           427     486     +59
          pkg_print_status                                     264     280     +16
          opkg_configure                                        59      69     +10
          xreadlink                                            120     128      +8
          opkg_remove_pkg                                     1079    1087      +8
          ------------------------------------------------------------------------------
          (add/remove: 2/0 grow/shrink: 8/0 up/down: 1483/0)           Total: 1497 bytes
      Signed-off-by: default avatarYousong Zhou <yszhou4tech@gmail.com>
      546bc723
    • Yousong Zhou's avatar
      7a969726
  15. 09 Apr, 2017 1 commit
  16. 15 Mar, 2017 13 commits