Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ncdu for openSUSE:Factory checked in at 2021-11-07 00:20:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ncdu (Old) and /work/SRC/openSUSE:Factory/.ncdu.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ncdu" Sun Nov 7 00:20:14 2021 rev:14 rq:929928 version:1.16 Changes: -------- --- /work/SRC/openSUSE:Factory/ncdu/ncdu.changes 2020-08-20 22:33:56.340124728 +0200 +++ /work/SRC/openSUSE:Factory/.ncdu.new.1890/ncdu.changes 2021-11-07 00:20:16.688557683 +0100 @@ -1,0 +2,13 @@ +Fri Nov 5 08:36:30 UTC 2021 - Ferdinand Thiessen <r...@fthiessen.de> + +- Update to 1.16 + * Increase width of size bar depending on terminal size + * Set/increment $NCDU_LEVEL variable when spawning a shell + * Indicate whether apparent size or disk usage is being displayed + * Display setuid, setgid and sticky bits in file flags in extended mode + * Fix error handling while reading --exclude-from file + * Improve JSON import to allow for several future extensions to the format + * Export link count in JSON dumps + * Don't export inode in JSON dumps for non-hardlinks + +------------------------------------------------------------------- Old: ---- ncdu-1.15.1.tar.gz ncdu-1.15.1.tar.gz.asc New: ---- ncdu-1.16.tar.gz ncdu-1.16.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ncdu.spec ++++++ --- /var/tmp/diff_new_pack.FnqxHm/_old 2021-11-07 00:20:17.164557735 +0100 +++ /var/tmp/diff_new_pack.FnqxHm/_new 2021-11-07 00:20:17.168557735 +0100 @@ -1,7 +1,7 @@ # # spec file for package ncdu # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: ncdu -Version: 1.15.1 +Version: 1.16 Release: 0 Summary: NCurses Disk Usage License: MIT ++++++ ncdu-1.15.1.tar.gz -> ncdu-1.16.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/COPYING new/ncdu-1.16/COPYING --- old/ncdu-1.15.1/COPYING 2020-04-21 13:45:28.000000000 +0200 +++ new/ncdu-1.16/COPYING 2021-07-02 13:25:13.000000000 +0200 @@ -1,4 +1,4 @@ -Copyright (c) 2007-2020 Yoran Heling +Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/ChangeLog new/ncdu-1.16/ChangeLog --- old/ncdu-1.15.1/ChangeLog 2020-06-10 12:23:48.000000000 +0200 +++ new/ncdu-1.16/ChangeLog 2021-07-02 13:04:21.000000000 +0200 @@ -1,3 +1,13 @@ +1.16 - 2021-07-02 + - Increase width of size bar depending on terminal size (Christian G??ttsche) + - Set/increment $NCDU_LEVEL variable when spawning a shell + - Indicate whether apparent size or disk usage is being displayed + - Display setuid, setgid and sticky bits in file flags in extended mode + - Fix error handling while reading --exclude-from file + - Improve JSON import to allow for several future extensions to the format + - Export link count in JSON dumps + - Don't export inode in JSON dumps for non-hardlinks + 1.15.1 - 2020-06-10 - (Linux) Fix build on older Linux systems (Christian G??ttsche) - (MacOS) Revert "Exclude firmlinks by default" behavior (until we have a better solution) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/Makefile.in new/ncdu-1.16/Makefile.in --- old/ncdu-1.15.1/Makefile.in 2020-06-10 12:25:23.000000000 +0200 +++ new/ncdu-1.16/Makefile.in 2021-07-02 13:28:10.000000000 +0200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -187,8 +187,8 @@ NROFF = nroff MANS = $(man_MANS) HEADERS = $(noinst_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -224,6 +224,8 @@ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -313,6 +315,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -707,6 +710,10 @@ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -749,6 +756,8 @@ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -764,7 +773,7 @@ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -962,10 +971,10 @@ check-am clean clean-binPROGRAMS clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-compile distclean-generic \ - distclean-hdr distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-data \ + dist-zstd distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 install-pdf \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/README new/ncdu-1.16/README --- old/ncdu-1.15.1/README 2020-06-10 12:24:01.000000000 +0200 +++ new/ncdu-1.16/README 2021-07-02 13:25:55.000000000 +0200 @@ -1,5 +1,5 @@ -ncdu 1.15.1 -=========== +ncdu 1.16 +========= DESCRIPTION @@ -33,7 +33,7 @@ COPYING - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/aclocal.m4 new/ncdu-1.16/aclocal.m4 --- old/ncdu-1.15.1/aclocal.m4 2020-06-10 12:25:22.000000000 +0200 +++ new/ncdu-1.16/aclocal.m4 2021-07-02 13:28:09.000000000 +0200 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.3 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -296,7 +296,7 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -311,7 +311,7 @@ [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], +m4_if([$1], [1.16.3], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -327,14 +327,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl +[AM_AUTOMAKE_VERSION([1.16.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -386,7 +386,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -417,7 +417,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -608,7 +608,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -647,7 +647,9 @@ done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -674,7 +676,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -871,7 +873,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -892,7 +894,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -913,7 +915,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -956,7 +958,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -977,12 +979,7 @@ [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -995,7 +992,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1024,7 +1021,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1071,7 +1068,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1090,7 +1087,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1171,7 +1168,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1231,7 +1228,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1259,7 +1256,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1278,7 +1275,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/compile new/ncdu-1.16/compile --- old/ncdu-1.15.1/compile 2020-05-30 10:09:16.000000000 +0200 +++ new/ncdu-1.16/compile 2021-07-02 13:28:10.000000000 +0200 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # Written by Tom Tromey <tro...@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/configure new/ncdu-1.16/configure --- old/ncdu-1.15.1/configure 2020-06-10 12:25:23.000000000 +0200 +++ new/ncdu-1.16/configure 2021-07-02 13:28:09.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ncdu 1.15.1. +# Generated by GNU Autoconf 2.69 for ncdu 1.16. # # Report bugs to <proje...@yorhel.nl>. # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='ncdu' PACKAGE_TARNAME='ncdu' -PACKAGE_VERSION='1.15.1' -PACKAGE_STRING='ncdu 1.15.1' +PACKAGE_VERSION='1.16' +PACKAGE_STRING='ncdu 1.16' PACKAGE_BUGREPORT='proje...@yorhel.nl' PACKAGE_URL='' @@ -697,6 +697,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -779,6 +780,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1031,6 +1033,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1168,7 +1179,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1281,7 +1292,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ncdu 1.15.1 to adapt to many kinds of systems. +\`configure' configures ncdu 1.16 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1321,6 +1332,7 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1347,7 +1359,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ncdu 1.15.1:";; + short | recursive ) echo "Configuration of ncdu 1.16:";; esac cat <<\_ACEOF @@ -1457,7 +1469,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ncdu configure 1.15.1 +ncdu configure 1.16 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2059,7 +2071,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ncdu $as_me 1.15.1, which was +It was created by ncdu $as_me 1.16, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2615,12 +2627,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -2925,7 +2932,7 @@ # Define the identity of the package. PACKAGE='ncdu' - VERSION='1.15.1' + VERSION='1.16' cat >>confdefs.h <<_ACEOF @@ -5894,7 +5901,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ncdu $as_me 1.15.1, which was +This file was extended by ncdu $as_me 1.16, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5960,7 +5967,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ncdu config.status 1.15.1 +ncdu config.status 1.16 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -6769,7 +6776,9 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/configure.ac new/ncdu-1.16/configure.ac --- old/ncdu-1.15.1/configure.ac 2020-06-10 12:23:57.000000000 +0200 +++ new/ncdu-1.16/configure.ac 2021-07-02 13:28:05.000000000 +0200 @@ -1,5 +1,5 @@ -AC_INIT([ncdu],[1.15.1],[proje...@yorhel.nl]) +AC_INIT([ncdu],[1.16],[proje...@yorhel.nl]) AC_CONFIG_SRCDIR([src/global.h]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([foreign std-options subdir-objects]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/depcomp new/ncdu-1.16/depcomp --- old/ncdu-1.15.1/depcomp 2020-05-30 10:09:16.000000000 +0200 +++ new/ncdu-1.16/depcomp 2021-07-02 13:28:10.000000000 +0200 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/doc/ncdu.pod new/ncdu-1.16/doc/ncdu.pod --- old/ncdu-1.15.1/doc/ncdu.pod 2020-06-07 09:56:45.000000000 +0200 +++ new/ncdu-1.16/doc/ncdu.pod 2021-07-02 13:28:47.000000000 +0200 @@ -287,6 +287,12 @@ export NCDU_SHELL=vifm ncdu +Ncdu will set the C<NCDU_LEVEL> environment variable or increment it before +spawning the shell. This variable allows you to detect when your shell is +running from within ncdu, which can be useful to avoid nesting multiple +instances of ncdu. Ncdu itself does not (currently) warn when attempting to run +nested instances. + =item q Quit @@ -428,8 +434,8 @@ On macOS 10.15 and later, running ncdu on the root directory without `--exclude-firmlinks` may cause directories to be scanned and counted multiple -times. Firmlink cycles are currently (1.15.1) not detected, so it may also -cause ncdu to get stuck in an infinite loop and eventually run out of memory. +times. Firmlink cycles are currently (1.16) not detected, so it may also cause +ncdu to get stuck in an infinite loop and eventually run out of memory. Please report any other bugs you may find at the bug tracker, which can be found on the web site at https://dev.yorhel.nl/ncdu diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/install-sh new/ncdu-1.16/install-sh --- old/ncdu-1.15.1/install-sh 2020-05-30 10:09:16.000000000 +0200 +++ new/ncdu-1.16/install-sh 2021-07-02 13:28:10.000000000 +0200 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2018-03-11.20; # UTC +scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -69,6 +69,11 @@ # Desired mode of installed file. mode=0755 +# Create dirs (including intermediate dirs) using mode 755. +# This is like GNU 'install' as of coreutils 8.32 (2020). +mkdir_umask=22 + +backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= @@ -99,18 +104,28 @@ --version display version info and exit. -c (ignored) - -C install only if different (preserve the last data modification time) + -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. + -p pass -p to $cpprog. -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + +By default, rm is invoked with -f; when overridden with RMPROG, +it's up to you to specify -f if you want it. + +If -S is not specified, no backups are attempted. + +Email bug reports to bug-autom...@gnu.org. +Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do @@ -137,8 +152,13 @@ -o) chowncmd="$chownprog $2" shift;; + -p) cpprog="$cpprog -p";; + -s) stripcmd=$stripprog;; + -S) backupsuffix="$2" + shift;; + -t) is_target_a_directory=always dst_arg=$2 @@ -255,6 +275,10 @@ dstdir=$dst test -d "$dstdir" dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command @@ -301,22 +325,6 @@ if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then @@ -326,52 +334,49 @@ fi posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - # Note that $RANDOM variable is not portable (e.g. dash); Use it - # here however when possible just to lower collision chance. - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - - trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - - # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writeable /tmp, make sure that the '$tmpdir' - # directory is successfully created first before we actually test - # 'mkdir -p' feature. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; - esac;; + # The $RANDOM variable is not portable (e.g., dash). Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap ' + ret=$? + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null + exit $ret + ' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p'. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; esac if @@ -382,7 +387,7 @@ then : else - # The umask is ridiculous, or mkdir does not conform to POSIX, + # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. @@ -411,7 +416,7 @@ prefixes= else if $posix_mkdir; then - (umask=$mkdir_umask && + (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 @@ -451,7 +456,18 @@ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -477,6 +493,13 @@ then rm -f "$dsttmp" else + # If $backupsuffix is set, and the file being installed + # already exists, attempt a backup. Don't worry if it fails, + # e.g., if mv doesn't support -f. + if test -n "$backupsuffix" && test -f "$dst"; then + $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null + fi + # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || @@ -491,9 +514,9 @@ # file should still install successfully. { test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || + $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/missing new/ncdu-1.16/missing --- old/ncdu-1.15.1/missing 2020-05-30 10:09:16.000000000 +0200 +++ new/ncdu-1.16/missing 2021-07-02 13:28:10.000000000 +0200 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/ncdu.1 new/ncdu-1.16/ncdu.1 --- old/ncdu-1.15.1/ncdu.1 2020-06-07 09:57:00.000000000 +0200 +++ new/ncdu-1.16/ncdu.1 2021-07-02 13:34:05.000000000 +0200 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "NCDU 1" -.TH NCDU 1 "2020-06-07" "ncdu-1.15" "ncdu manual" +.TH NCDU 1 "2021-07-02" "ncdu-1.16" "ncdu manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -365,6 +365,12 @@ \& export NCDU_SHELL=vifm \& ncdu .Ve +.Sp +Ncdu will set the \f(CW\*(C`NCDU_LEVEL\*(C'\fR environment variable or increment it before +spawning the shell. This variable allows you to detect when your shell is +running from within ncdu, which can be useful to avoid nesting multiple +instances of ncdu. Ncdu itself does not (currently) warn when attempting to run +nested instances. .IP "q" 4 .IX Item "q" Quit @@ -490,8 +496,8 @@ .PP On macOS 10.15 and later, running ncdu on the root directory without `\-\-exclude\-firmlinks` may cause directories to be scanned and counted multiple -times. Firmlink cycles are currently (1.15.1) not detected, so it may also -cause ncdu to get stuck in an infinite loop and eventually run out of memory. +times. Firmlink cycles are currently (1.16) not detected, so it may also cause +ncdu to get stuck in an infinite loop and eventually run out of memory. .PP Please report any other bugs you may find at the bug tracker, which can be found on the web site at https://dev.yorhel.nl/ncdu diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/browser.c new/ncdu-1.16/src/browser.c --- old/ncdu-1.15.1/src/browser.c 2020-05-30 18:46:37.000000000 +0200 +++ new/ncdu-1.16/src/browser.c 2021-07-02 13:26:02.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -132,13 +132,13 @@ static void browse_draw_graph(struct dir *n, int *x) { float pc = 0.0f; - int o, i; + int o, i, bar_size = wincols/7 > 10 ? wincols/7 : 10; enum ui_coltype c = n->flags & FF_BSEL ? UIC_SEL : UIC_DEFAULT; if(!graph) return; - *x += graph == 1 ? 13 : graph == 2 ? 9 : 20; + *x += graph == 1 ? (bar_size + 3) : graph == 2 ? 9 : (bar_size + 10); if(n == dirlist_parent) return; @@ -157,11 +157,11 @@ if(graph == 3) addch(' '); - /* graph (10 columns) */ + /* graph (10+ columns) */ if(graph == 1 || graph == 3) { uic_set(c == UIC_SEL ? UIC_GRAPH_SEL : UIC_GRAPH); - o = (int)(10.0f*(float)(show_as ? n->asize : n->size) / (float)(show_as ? dirlist_maxa : dirlist_maxs)); - for(i=0; i<10; i++) + o = (int)((float)bar_size*((float)(show_as ? n->asize : n->size) / (float)(show_as ? dirlist_maxa : dirlist_maxs))); + for(i=0; i<bar_size; i++) addch(i < o ? '#' : ' '); } @@ -288,9 +288,13 @@ uic_set(UIC_HD); mvhline(winrows-1, 0, ' ', wincols); if(t) { + if(!show_as) attron(A_BOLD); mvaddstr(winrows-1, 0, " Total disk usage: "); + if(!show_as) attroff(A_BOLD); printsize(UIC_HD, t->parent->size); + if(show_as) attron(A_BOLD); addstrc(UIC_HD, " Apparent size: "); + if(show_as) attroff(A_BOLD); uic_set(UIC_NUM_HD); printsize(UIC_HD, t->parent->asize); addstrc(UIC_HD, " Items: "); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/browser.h new/ncdu-1.16/src/browser.h --- old/ncdu-1.15.1/src/browser.h 2020-04-21 13:45:28.000000000 +0200 +++ new/ncdu-1.16/src/browser.h 2021-07-02 13:26:04.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/delete.c new/ncdu-1.16/src/delete.c --- old/ncdu-1.15.1/src/delete.c 2020-05-30 18:46:37.000000000 +0200 +++ new/ncdu-1.16/src/delete.c 2021-07-02 13:26:07.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/delete.h new/ncdu-1.16/src/delete.h --- old/ncdu-1.15.1/src/delete.h 2020-04-21 13:45:28.000000000 +0200 +++ new/ncdu-1.16/src/delete.h 2021-07-02 13:26:09.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/dir.h new/ncdu-1.16/src/dir.h --- old/ncdu-1.15.1/src/dir.h 2020-05-30 19:30:39.000000000 +0200 +++ new/ncdu-1.16/src/dir.h 2021-07-02 13:26:11.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -69,7 +69,7 @@ * The function should return non-zero on error, at which point errno is * assumed to be set to something sensible. */ - int (*item)(struct dir *, const char *, struct dir_ext *); + int (*item)(struct dir *, const char *, struct dir_ext *, unsigned int); /* Finalizes the output to go to the next program state or exit ncdu. Called * after item(NULL) has been called for the root item or before any item() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/dir_common.c new/ncdu-1.16/src/dir_common.c --- old/ncdu-1.15.1/src/dir_common.c 2020-05-30 18:46:37.000000000 +0200 +++ new/ncdu-1.16/src/dir_common.c 2021-07-02 13:26:13.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/dir_export.c new/ncdu-1.16/src/dir_export.c --- old/ncdu-1.15.1/src/dir_export.c 2020-05-30 18:46:37.000000000 +0200 +++ new/ncdu-1.16/src/dir_export.c 2021-07-02 13:26:16.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -74,7 +74,7 @@ } -static void output_info(struct dir *d, const char *name, struct dir_ext *e) { +static void output_info(struct dir *d, const char *name, struct dir_ext *e, unsigned int nlink) { if(!extended_info || !(d->flags & FF_EXT)) e = NULL; @@ -96,8 +96,6 @@ fputs(",\"dev\":", stream); output_int(d->dev); } - fputs(",\"ino\":", stream); - output_int(d->ino); if(e) { fputs(",\"uid\":", stream); @@ -111,8 +109,12 @@ } /* TODO: Including the actual number of links would be nicer. */ - if(d->flags & FF_HLNKC) - fputs(",\"hlnkc\":true", stream); + if(d->flags & FF_HLNKC) { + fputs(",\"ino\":", stream); + output_int(d->ino); + fputs(",\"hlnkc\":true,\"nlink\":", stream); + output_int(nlink); + } if(d->flags & FF_ERR) fputs(",\"read_error\":true", stream); /* excluded/error'd files are "unknown" with respect to the "notreg" field. */ @@ -136,7 +138,7 @@ * item() call do we check for ferror(). This greatly simplifies the code, but * assumes that calls to fwrite()/fput./etc don't do any weird stuff when * called with a stream that's in an error state. */ -static int item(struct dir *item, const char *name, struct dir_ext *ext) { +static int item(struct dir *item, const char *name, struct dir_ext *ext, unsigned int nlink) { if(!item) { nstack_pop(&stack); if(!stack.top) { /* closing of the root item */ @@ -152,7 +154,7 @@ /* File header. * TODO: Add scan options? */ if(!stack.top) { - fputs("[1,1,{\"progname\":\""PACKAGE"\",\"progver\":\""PACKAGE_VERSION"\",\"timestamp\":", stream); + fputs("[1,2,{\"progname\":\""PACKAGE"\",\"progver\":\""PACKAGE_VERSION"\",\"timestamp\":", stream); output_int((uint64_t)time(NULL)); fputc('}', stream); } @@ -161,7 +163,7 @@ if(item->flags & FF_DIR) fputc('[', stream); - output_info(item, name, ext); + output_info(item, name, ext, nlink); if(item->flags & FF_DIR) nstack_push(&stack, item->dev); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/dir_import.c new/ncdu-1.16/src/dir_import.c --- old/ncdu-1.15.1/src/dir_import.c 2020-05-30 18:46:37.000000000 +0200 +++ new/ncdu-1.16/src/dir_import.c 2021-07-02 13:26:18.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -72,6 +72,7 @@ /* scratch space */ struct dir *buf_dir; struct dir_ext buf_ext[1]; + unsigned int nlink; char buf_name[MAX_VAL]; char val[MAX_VAL]; @@ -421,7 +422,7 @@ /* Reads a JSON object representing a struct dir/dir_ext item. Writes to - * ctx->buf_dir, ctx->buf_ext and ctx->buf_name. */ + * ctx->buf_dir, ctx->buf_ext, ctx->buf_name and ctx->nlink. */ static int iteminfo(void) { uint64_t iv; @@ -464,12 +465,23 @@ C(rint64(&iv, UINT64_MAX)); ctx->buf_dir->flags |= FF_EXT; ctx->buf_ext->mtime = iv; + // Accept decimal numbers, but discard the fractional part because our data model doesn't support it. + if(*ctx->buf == '.') { + con(1); + while(*ctx->buf >= '0' && *ctx->buf <= '9') + con(1); + } } else if(strcmp(ctx->val, "hlnkc") == 0) { /* hlnkc */ if(*ctx->buf == 't') { C(rlit("true", 4)); ctx->buf_dir->flags |= FF_HLNKC; } else C(rlit("false", 5)); + } else if(strcmp(ctx->val, "nlink") == 0) { /* nlink */ + C(rint64(&iv, UINT32_MAX)); + if(iv > 1) + ctx->buf_dir->flags |= FF_HLNKC; + ctx->nlink = iv; } else if(strcmp(ctx->val, "read_error") == 0) { /* read_error */ if(*ctx->buf == 't') { C(rlit("true", 4)); @@ -526,6 +538,7 @@ memset(ctx->buf_dir, 0, offsetof(struct dir, name)); memset(ctx->buf_ext, 0, sizeof(struct dir_ext)); + ctx->nlink = 0; *ctx->buf_name = 0; ctx->buf_dir->flags |= isdir ? FF_DIR : FF_FILE; ctx->buf_dir->dev = dev; @@ -539,16 +552,16 @@ dir_curpath_enter(ctx->buf_name); if(isdir) { - if(dir_output.item(ctx->buf_dir, ctx->buf_name, ctx->buf_ext)) { + if(dir_output.item(ctx->buf_dir, ctx->buf_name, ctx->buf_ext, ctx->nlink)) { dir_seterr("Output error: %s", strerror(errno)); return 1; } C(itemdir(dev)); - if(dir_output.item(NULL, 0, NULL)) { + if(dir_output.item(NULL, 0, NULL, 0)) { dir_seterr("Output error: %s", strerror(errno)); return 1; } - } else if(dir_output.item(ctx->buf_dir, ctx->buf_name, ctx->buf_ext)) { + } else if(dir_output.item(ctx->buf_dir, ctx->buf_name, ctx->buf_ext, ctx->nlink)) { dir_seterr("Output error: %s", strerror(errno)); return 1; } @@ -561,8 +574,14 @@ static int footer(void) { - C(cons()); - E(*ctx->buf != ']', "Expected ']'"); + while(1) { + C(cons()); + if(*ctx->buf == ']') + break; + E(*ctx->buf != ',', "Expected ',' or ']'"); + con(1); + C(cons() || rval()); + } con(1); C(cons()); E(*ctx->buf, "Trailing garbage"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/dir_mem.c new/ncdu-1.16/src/dir_mem.c --- old/ncdu-1.15.1/src/dir_mem.c 2020-05-30 18:46:37.000000000 +0200 +++ new/ncdu-1.16/src/dir_mem.c 2021-07-02 13:26:22.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -109,8 +109,9 @@ } -static int item(struct dir *dir, const char *name, struct dir_ext *ext) { +static int item(struct dir *dir, const char *name, struct dir_ext *ext, unsigned int nlink) { struct dir *t, *item; + (void)nlink; /* Go back to parent dir */ if(!dir) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/dir_scan.c new/ncdu-1.16/src/dir_scan.c --- old/ncdu-1.15.1/src/dir_scan.c 2020-06-07 10:02:27.000000000 +0200 +++ new/ncdu-1.16/src/dir_scan.c 2021-07-02 13:26:25.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -57,6 +57,7 @@ /* scratch space */ static struct dir *buf_dir; static struct dir_ext buf_ext[1]; +static unsigned int buf_nlink; #if HAVE_LINUX_MAGIC_H && HAVE_SYS_STATFS_H && HAVE_STATFS @@ -120,8 +121,11 @@ else if(S_ISDIR(fs->st_mode)) buf_dir->flags |= FF_DIR; - if(!S_ISDIR(fs->st_mode) && fs->st_nlink > 1) + if(!S_ISDIR(fs->st_mode) && fs->st_nlink > 1) { buf_dir->flags |= FF_HLNKC; + buf_nlink = fs->st_nlink; + } else + buf_nlink = 0; if(dir_scan_smfs && curdev != buf_dir->dev) buf_dir->flags |= FF_OTHFS; @@ -193,7 +197,7 @@ if(chdir(name)) { dir_setlasterr(dir_curpath); buf_dir->flags |= FF_ERR; - if(dir_output.item(buf_dir, name, buf_ext) || dir_output.item(NULL, 0, NULL)) { + if(dir_output.item(buf_dir, name, buf_ext, buf_nlink) || dir_output.item(NULL, 0, NULL, 0)) { dir_seterr("Output error: %s", strerror(errno)); return 1; } @@ -203,7 +207,7 @@ if((dir = dir_read(&fail)) == NULL) { dir_setlasterr(dir_curpath); buf_dir->flags |= FF_ERR; - if(dir_output.item(buf_dir, name, buf_ext) || dir_output.item(NULL, 0, NULL)) { + if(dir_output.item(buf_dir, name, buf_ext, buf_nlink) || dir_output.item(NULL, 0, NULL, 0)) { dir_seterr("Output error: %s", strerror(errno)); return 1; } @@ -218,12 +222,12 @@ if(fail) buf_dir->flags |= FF_ERR; - if(dir_output.item(buf_dir, name, buf_ext)) { + if(dir_output.item(buf_dir, name, buf_ext, buf_nlink)) { dir_seterr("Output error: %s", strerror(errno)); return 1; } fail = dir_walk(dir); - if(dir_output.item(NULL, 0, NULL)) { + if(dir_output.item(NULL, 0, NULL, 0)) { dir_seterr("Output error: %s", strerror(errno)); return 1; } @@ -308,11 +312,11 @@ if(buf_dir->flags & FF_DIR && !(buf_dir->flags & (FF_ERR|FF_EXL|FF_OTHFS|FF_KERNFS|FF_FRMLNK))) fail = dir_scan_recurse(name); else if(buf_dir->flags & FF_DIR) { - if(dir_output.item(buf_dir, name, buf_ext) || dir_output.item(NULL, 0, NULL)) { + if(dir_output.item(buf_dir, name, buf_ext, 0) || dir_output.item(NULL, 0, NULL, 0)) { dir_seterr("Output error: %s", strerror(errno)); fail = 1; } - } else if(dir_output.item(buf_dir, name, buf_ext)) { + } else if(dir_output.item(buf_dir, name, buf_ext, buf_nlink)) { dir_seterr("Output error: %s", strerror(errno)); fail = 1; } @@ -333,6 +337,7 @@ dir_curpath_enter(cur); memset(buf_dir, 0, offsetof(struct dir, name)); memset(buf_ext, 0, sizeof(struct dir_ext)); + buf_nlink = 0; fail = dir_scan_item(cur); dir_curpath_leave(); } @@ -350,6 +355,7 @@ memset(buf_dir, 0, offsetof(struct dir, name)); memset(buf_ext, 0, sizeof(struct dir_ext)); + buf_nlink = 0; if((path = path_real(dir_curpath)) == NULL) dir_seterr("Error obtaining full path: %s", strerror(errno)); @@ -376,13 +382,13 @@ buf_dir->flags |= FF_ERR; stat_to_dir(&fs); - if(dir_output.item(buf_dir, dir_curpath, buf_ext)) { + if(dir_output.item(buf_dir, dir_curpath, buf_ext, buf_nlink)) { dir_seterr("Output error: %s", strerror(errno)); fail = 1; } if(!fail) fail = dir_walk(dir); - if(!fail && dir_output.item(NULL, 0, NULL)) { + if(!fail && dir_output.item(NULL, 0, NULL, 0)) { dir_seterr("Output error: %s", strerror(errno)); fail = 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/dirlist.c new/ncdu-1.16/src/dirlist.c --- old/ncdu-1.15.1/src/dirlist.c 2020-05-30 18:46:37.000000000 +0200 +++ new/ncdu-1.16/src/dirlist.c 2021-07-02 13:26:27.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/dirlist.h new/ncdu-1.16/src/dirlist.h --- old/ncdu-1.15.1/src/dirlist.h 2020-04-21 13:45:28.000000000 +0200 +++ new/ncdu-1.16/src/dirlist.h 2021-07-02 13:26:31.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/exclude.c new/ncdu-1.16/src/exclude.c --- old/ncdu-1.15.1/src/exclude.c 2020-05-30 18:46:37.000000000 +0200 +++ new/ncdu-1.16/src/exclude.c 2021-07-02 13:26:33.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -68,8 +68,9 @@ exclude_add(buf); } + len = ferror(f); fclose(f); - return 0; + return len; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/exclude.h new/ncdu-1.16/src/exclude.h --- old/ncdu-1.15.1/src/exclude.h 2020-05-30 18:46:37.000000000 +0200 +++ new/ncdu-1.16/src/exclude.h 2021-07-02 13:26:35.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/global.h new/ncdu-1.16/src/global.h --- old/ncdu-1.15.1/src/global.h 2020-06-07 10:02:19.000000000 +0200 +++ new/ncdu-1.16/src/global.h 2021-07-02 13:26:40.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/help.c new/ncdu-1.16/src/help.c --- old/ncdu-1.15.1/src/help.c 2020-05-30 18:46:37.000000000 +0200 +++ new/ncdu-1.16/src/help.c 2021-07-02 13:26:42.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/help.h new/ncdu-1.16/src/help.h --- old/ncdu-1.15.1/src/help.h 2020-05-30 18:46:37.000000000 +0200 +++ new/ncdu-1.16/src/help.h 2021-07-02 13:26:45.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/main.c new/ncdu-1.16/src/main.c --- old/ncdu-1.15.1/src/main.c 2020-06-07 10:02:11.000000000 +0200 +++ new/ncdu-1.16/src/main.c 2021-07-02 13:26:47.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/path.c new/ncdu-1.16/src/path.c --- old/ncdu-1.15.1/src/path.c 2020-04-21 13:45:28.000000000 +0200 +++ new/ncdu-1.16/src/path.c 2021-07-02 13:26:49.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/path.h new/ncdu-1.16/src/path.h --- old/ncdu-1.15.1/src/path.h 2020-05-30 19:30:39.000000000 +0200 +++ new/ncdu-1.16/src/path.h 2021-07-02 13:26:51.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/quit.c new/ncdu-1.16/src/quit.c --- old/ncdu-1.15.1/src/quit.c 2020-04-21 13:45:28.000000000 +0200 +++ new/ncdu-1.16/src/quit.c 2021-07-02 13:26:53.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2015-2020 Yoran Heling + Copyright (c) 2015-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/quit.h new/ncdu-1.16/src/quit.h --- old/ncdu-1.15.1/src/quit.h 2020-04-21 13:45:28.000000000 +0200 +++ new/ncdu-1.16/src/quit.h 2021-07-02 13:26:56.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2015-2020 Yoran Heling + Copyright (c) 2015-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/shell.c new/ncdu-1.16/src/shell.c --- old/ncdu-1.15.1/src/shell.c 2020-05-30 18:46:37.000000000 +0200 +++ new/ncdu-1.16/src/shell.c 2021-07-02 13:26:57.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Shell support: Copyright (c) 2014 Thomas Jarosch Permission is hereby granted, free of charge, to any person obtaining @@ -34,6 +34,22 @@ #include <unistd.h> #include <sys/wait.h> +static void set_level(void) { + static int done = 0; + char nlvl[2]; + if(done) + return; + const char *lvl = getenv("NCDU_LEVEL"); + // too lazy to count beyond 9 + if(lvl && *lvl >= '1' && *lvl < '9' && lvl[1] == 0) { + nlvl[0] = 1 + *lvl; + nlvl[1] = 0; + setenv("NCDU_LEVEL", nlvl, 1); + } else + setenv("NCDU_LEVEL", "1", 1); + done++; +} + void shell_draw() { const char *full_path; int res; @@ -59,6 +75,7 @@ shell = DEFAULT_SHELL; } + set_level(); res = system(shell); /* resume ncurses mode */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/shell.h new/ncdu-1.16/src/shell.h --- old/ncdu-1.15.1/src/shell.h 2020-05-30 18:46:37.000000000 +0200 +++ new/ncdu-1.16/src/shell.h 2021-07-02 13:27:00.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Shell support: Copyright (c) 2014 Thomas Jarosch Permission is hereby granted, free of charge, to any person obtaining diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/util.c new/ncdu-1.16/src/util.c --- old/ncdu-1.15.1/src/util.c 2020-05-30 19:30:39.000000000 +0200 +++ new/ncdu-1.16/src/util.c 2021-07-02 13:27:02.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -134,13 +134,13 @@ : ft == S_IFBLK ? 'b' : '?'; buf[1] = mode & 0400 ? 'r' : '-'; buf[2] = mode & 0200 ? 'w' : '-'; - buf[3] = mode & 0100 ? 'x' : '-'; + buf[3] = mode &04000 ? 's' : mode & 0100 ? 'x' : '-'; buf[4] = mode & 0040 ? 'r' : '-'; buf[5] = mode & 0020 ? 'w' : '-'; - buf[6] = mode & 0010 ? 'x' : '-'; + buf[6] = mode &02000 ? 's' : mode & 0010 ? 'x' : '-'; buf[7] = mode & 0004 ? 'r' : '-'; buf[8] = mode & 0002 ? 'w' : '-'; - buf[9] = mode & 0001 ? 'x' : '-'; + buf[9] = mode &01000 ? (S_ISDIR(mode) ? 't' : 'T') : mode & 0001 ? 'x' : '-'; buf[10] = 0; return buf; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ncdu-1.15.1/src/util.h new/ncdu-1.16/src/util.h --- old/ncdu-1.15.1/src/util.h 2020-05-30 18:46:37.000000000 +0200 +++ new/ncdu-1.16/src/util.h 2021-07-02 13:27:05.000000000 +0200 @@ -1,6 +1,6 @@ /* ncdu - NCurses Disk Usage - Copyright (c) 2007-2020 Yoran Heling + Copyright (c) 2007-2021 Yoran Heling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the