Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mommy fails tests when installed with yay #45

Closed
dsprenkels opened this issue Mar 1, 2023 · 6 comments
Closed

mommy fails tests when installed with yay #45

dsprenkels opened this issue Mar 1, 2023 · 6 comments
Assignees
Labels
bug Something isn't working packaging Packaging and distribution of the software

Comments

@dsprenkels
Copy link
Contributor

On Arch Linux, mommy fails to install when installed with yay. However, the same error does not occur with makepkg.

==> Starting check()...
Running: /usr/bin/sh [bash 5.1.16(1)-release]
..FFFF..........................................................

Examples:
  1) mommy command-line options -h/--help: help information outputs help information using -h
     When run ../../main/sh/mommy -h

     1.1) The word 1 of output should equal mommy(1)

            expected: "mommy(1)"
                 got: <unset>

          # src/test/sh/mommy_spec.sh:36

     1.2) The status should be success

            expected: success (zero)
                 got: failure (non-zero) [status: 16]

          # src/test/sh/mommy_spec.sh:37

     1.3) WARNING: There was output to stderr but not found expectation

            stderr: /usr/bin/man: ../../main/sh/../resources/mommy.1: No such file or directory
            No manual entry for ../../main/sh/../resources/mommy.1

          # src/test/sh/mommy_spec.sh:34-38

  2) mommy command-line options -h/--help: help information outputs help information using --help
     When run ../../main/sh/mommy --help

     2.1) The word 1 of output should equal mommy(1)

            expected: "mommy(1)"
                 got: <unset>

          # src/test/sh/mommy_spec.sh:42

     2.2) The status should be success

            expected: success (zero)
                 got: failure (non-zero) [status: 16]

          # src/test/sh/mommy_spec.sh:43

     2.3) WARNING: There was output to stderr but not found expectation

            stderr: /usr/bin/man: ../../main/sh/../resources/mommy.1: No such file or directory
            No manual entry for ../../main/sh/../resources/mommy.1

          # src/test/sh/mommy_spec.sh:40-44

  3) mommy command-line options -h/--help: help information outputs help information even when -h is not the first option
     When run ../../main/sh/mommy -s 432 -h

     3.1) The word 1 of output should equal mommy(1)

            expected: "mommy(1)"
                 got: <unset>

          # src/test/sh/mommy_spec.sh:48

     3.2) The status should be success

            expected: success (zero)
                 got: failure (non-zero) [status: 16]

          # src/test/sh/mommy_spec.sh:49

     3.3) WARNING: There was output to stderr but not found expectation

            stderr: /usr/bin/man: ../../main/sh/../resources/mommy.1: No such file or directory
            No manual entry for ../../main/sh/../resources/mommy.1

          # src/test/sh/mommy_spec.sh:46-50

  4) mommy command-line options -h/--help: help information outputs help information even when --help is not the first option
     When run ../../main/sh/mommy -s 221 --help

     4.1) The word 1 of output should equal mommy(1)

            expected: "mommy(1)"
                 got: <unset>

          # src/test/sh/mommy_spec.sh:54

     4.2) The status should be success

            expected: success (zero)
                 got: failure (non-zero) [status: 16]

          # src/test/sh/mommy_spec.sh:55

     4.3) WARNING: There was output to stderr but not found expectation

            stderr: /usr/bin/man: ../../main/sh/../resources/mommy.1: No such file or directory
            No manual entry for ../../main/sh/../resources/mommy.1

          # src/test/sh/mommy_spec.sh:52-56

Finished in 5.95 seconds (user 7.44 seconds, sys 2.96 seconds)
64 examples, 4 failures


Failure examples / Errors: (Listed here affect your suite's status)

shellspec src/test/sh/mommy_spec.sh:34 # 1) mommy command-line options -h/--help: help information outputs help information using -h FAILED
shellspec src/test/sh/mommy_spec.sh:40 # 2) mommy command-line options -h/--help: help information outputs help information using --help FAILED
shellspec src/test/sh/mommy_spec.sh:46 # 3) mommy command-line options -h/--help: help information outputs help information even when -h is not the first option FAILED
shellspec src/test/sh/mommy_spec.sh:52 # 4) mommy command-line options -h/--help: help information outputs help information even when --help is not the first option FAILED

==> ERROR: A failure occurred in check().
    Aborting...
 -> error making: mommy
@FWDekker FWDekker self-assigned this Mar 1, 2023
@FWDekker FWDekker added bug Something isn't working packaging Packaging and distribution of the software labels Mar 1, 2023
@FWDekker
Copy link
Owner

FWDekker commented Mar 1, 2023

strange, I cannot reproduce this error. after running yay mommy and selecting the right package, installation succeeds as expected. with which command exactly did you install mommy?

the errors you have indicate that the manual pages were not installed correctly, or that you do not have the man command available in sh. do you already have man-db installed? man-db is currently a requirement, but should be installed automatically by yay if you don't have it. (see also #41) man-db should be temporarily installed during the check process, so it's somewhat surprising to me that the tests fail 🤔

if you do have man-db installed, then perhaps you modified your system so that packages are installed in a non-standard location? if so, the man page may end up not being placed on the man path, and man does not work. do you have any idea if that might be the case?

@FWDekker
Copy link
Owner

FWDekker commented Mar 3, 2023

I've spent some more time investigating this after I encountered the bug myself while running archlinux in a docker environment. in my case, this was caused by NoExtract = usr/share/man/* in my pacman-conf. so you can temporarily work around this by disabling that part of the config, but i'll look into detecting whether the directory is not extracted and disabling the tests if that is the case

could you maybe run pacman-conf | grep "usr/share/man" and tell me if that command has any output?

@dsprenkels
Copy link
Contributor Author

dsprenkels commented Mar 8, 2023

Unfortunately, NoExtract is empty in my setup. (I.e., pacman-conf | grep "usr/share/man" returns nothing). Otherwise my pacman setup also has all settings set to their default values.

@FWDekker
Copy link
Owner

FWDekker commented Mar 8, 2023

Strange. Luckily, I expect the installation problem to be solved with the next release of mommy, since the build procedure and check function will have been rewritten completely. However, I think man mommy and mommy --help will not work on your system, so I'd still like to figure out what the cause of this is. Does the directory /usr/share/man/man1 exist?

@FWDekker
Copy link
Owner

FWDekker commented Mar 9, 2023

mommy v1.2.2 has now been released, so since this version doesn't check the manual pages during installation, you should no longer encounter this bug.

however, running mommy --help or man mommy may not necessarily work. if you encounter any problems with that, please let me know :-)

@dsprenkels
Copy link
Contributor Author

Everything works as expected now! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working packaging Packaging and distribution of the software
Projects
None yet
Development

No branches or pull requests

2 participants