Package Details: todotxt 2.12.0.post2-2

Git Clone URL: https://aur.archlinux.org/todotxt.git (read-only, click to copy)
Package Base: todotxt
Description: Simple and extensible shell script for managing your todo.txt file
Upstream URL: https://github.com/todotxt/todo.txt-cli
Keywords: todo todo.txt
Licenses: GPL3
Submitter: darose
Maintainer: willemw
Last Packager: willemw
Votes: 142
Popularity: 0.004642
First Submitted: 2006-11-28 22:41 (UTC)
Last Updated: 2022-05-07 11:34 (UTC)

Dependencies (2)

Required by (1)

Sources (1)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 Next › Last »

billypilgrim commented on 2021-07-27 08:37 (UTC)

Is bash completion broken for other peeps? I'm not sure which update broke things, but it definitely used to work for me :-(

willemw commented on 2021-07-20 20:04 (UTC)

I did think it had something to do with some environment setting (XDG, for example). Yesterday I made a similar fix for testing the backintime-git package.

serxxx commented on 2021-07-20 19:57 (UTC)

This is being addressed upstream.

serxxx commented on 2021-07-20 09:03 (UTC) (edited on 2021-07-20 09:05 (UTC) by serxxx)

According to https://github.com/todotxt/todo.txt-cli/issues/347#issuecomment-882713620, the failures are caused by:

1, Users having XDG_CONFIG_HOME set, and
2, having a $XDG_CONFIG_HOME/todo/config file

Unsetting $XDG_CONFIG_HOME causes the tests to pass. While I don't yet know whether this will be changed upstream, AFAIK that's not an invalid user set-up and seems to cause false failures -- it might be good to have the PKGBUILD unset the variable before running the tests.

willemw commented on 2021-07-19 10:17 (UTC)

Tried the same yay command: all tests pass. Is it downloading the correct version?

==> Retrieving sources...
  -> Cloning todotxt-2.12.0.post1 git repo...

Do you get the same result building with makepkg (after git clone) or in a clean chroot environment?

The first test already fails: "FAIL 1: no config file". You can run tests in verbose or debug mode: TEST_OPTIONS=--verbose makepkg

I get this with the first test in verbose mode:

==> Starting check()...               
* expecting success:                           
    todo.sh > output 2>&1 || test_cmp expect output

Fatal Error: Cannot read configuration file /home/willem/todotxt/src/todotxt-2.12.0.post1/tests/trash directory.t0000-config/.todo/config
*   ok 1: no config file

serxxx commented on 2021-07-19 09:29 (UTC) (edited on 2021-07-19 10:05 (UTC) by serxxx)

@willemw, I see the same problem as @dreieck. FWIW, I cloned the upstream repository and get the same test failures with make test.

10018» yay -Sy --noconfirm --answerclean All todotxt                                                  ~
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community                           5.6 MiB  5.27 MiB/s 00:01 [----------------------------------] 100%
 multilib is up to date
...
  1 todotxt                          (Installed) (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> All
...
==> Starting check()...
rm -rf tests/test-results "tests/trash directory"*
cd tests && ./t0000-config.sh
* FAIL 1: no config file

    todo.sh > output 2>&1 || test_cmp expect output

*   ok 2: config file (default location 1)
*   ok 3: config file (default location 2)
*   ok 4: config file (default location 3)
* FAIL 5: config file (global config file)

    cp test.cfg "$TODOTXT_GLOBAL_CFG_FILE"
    todo.sh > output;
    test_cmp expect output && test -f used_config &&
        rm -f "$TODOTXT_GLOBAL_CFG_FILE"

*   ok 6: config file (command line)
*   ok 7: config file (env variable)
*   ok 8: config file (minimal)
* failed 2 among 8 test(s)
make: *** [Makefile:96: tests/t0000-config.sh] Error 1
==> ERROR: A failure occurred in check().
    Aborting...
error making: todotxt

Edit: Issue filed upstream: https://github.com/todotxt/todo.txt-cli/issues/347

willemw commented on 2021-07-06 17:24 (UTC)

@dreieck: Cannot reproduce that error. All tests pass. Tried it in a clean chroot, with makepkg and paru.

Try again after removing this package's build cache or try to build with "makepkg -si" and see if that works.

dreieck commented on 2021-07-06 13:36 (UTC) (edited on 2021-07-06 13:38 (UTC) by dreieck)

I get an error in check():

==> Starting check()...
rm -rf tests/test-results "tests/trash directory"*
cd tests && ./t0000-config.sh 
cd tests && ./t0001-null.sh 
cd tests && ./t0002-actions.sh 
cd tests && ./t0100-code-nobacktick.sh 
*   ok 1: no old-style backtick command substitution 1
* FAIL 1: no config file

    todo.sh > output 2>&1 || test_cmp expect output

*   ok 2: no old-style backtick command substitution 2
* passed all 2 test(s)
cd tests && ./t1000-addlist.sh 
* FAIL 1: custom action (default location 1)

    mkdir .todo.actions.d
    cp foo .todo.actions.d/
    todo.sh foo > output;
    test_cmp expect output && rm -rf .todo.actions.d

*   ok 1: null ls*   ok 2: config file (default location 1)

* FAIL 2: custom action (default location 2)*   ok 3: config file (default location 2)

    mkdir -p .todo/actions
    cp foo .todo/actions/
    todo.sh foo > output;
    test_cmp expect output && rm -rf .todo/actions


*   ok 4: config file (default location 3)
*   ok 3: custom action (env variable)*   ok 2: null list

* failed 2 among 3 test(s)
make: *** [Makefile:96: tests/t0002-actions.sh] Error 1
make: *** Waiting for unfinished jobs....
*   ok 1: basic add/list 1
* FAIL 5: config file (global config file)

    cp test.cfg "$TODOTXT_GLOBAL_CFG_FILE"
    todo.sh > output;
    test_cmp expect output && test -f used_config &&
        rm -f "$TODOTXT_GLOBAL_CFG_FILE"

*   ok 6: config file (command line)
*   ok 3: null list filter
*   ok 7: config file (env variable)*   ok 2: basic add/list 2

*   ok 8: config file (minimal)
* failed 2 among 8 test(s)*   ok 4: null lsp
*   ok 3: basic add/list 3make: *** [Makefile:96: tests/t0000-config.sh] Error 1


*   ok 4: basic add/list 4
*   ok 5: null listpri
*   ok 5: basic list filtering 1
*   ok 6: null listpri a
*   ok 6: basic list filtering 2
*   ok 7: case-insensitive filtering 1
*   ok 7: null lsa
*   ok 8: case-insensitive filtering 2
*   ok 9: add with symbols 1
*   ok 10: add with symbols 2
*   ok 8: null list
*   ok 11: add with symbols 3
*   ok 12: add with spaces 1
*   ok 9: null list filter
*   ok 10: null lsc
*   ok 13: add with spaces 2
*   ok 11: null listcon
*   ok 12: null lsprj*   ok 14: add with spaces 3

*   ok 13: null listproj
*   ok 15: add with CR 1
*   ok 14: null lf
*   ok 15: null listfile
*   ok 16: add with CR 2
*   ok 16: null listfile foo.txt
* passed all 16 test(s)
*   ok 17: add to file without EOL 1
*   ok 18: add to file without EOL 2
* passed all 18 test(s)
==> ERROR: A failure occurred in check().
    Aborting...

Does the test need to be run on a custom provided config file (FAIL 1: no config file)?

willemw commented on 2021-06-18 18:15 (UTC) (edited on 2021-06-18 18:15 (UTC) by willemw)

@dkaparis: When the next release comes out, this package will follow the releases as normal.

Version 2.12.0.post1 is a one-time in-between release version, at my discretion, that allows me to use the new "make; make install" build procedure. BTW, all the "make test" tests are passing. But if there are objections to this version, then I could change it back to 2.12.0.

dkaparis commented on 2021-06-18 17:56 (UTC)

What is the "2.12.0.post1" version?

I don't see such release at https://github.com/todotxt/todo.txt-cli/releases and we already have a todotxt-git package to track current git.