RPM dependency generator sanity check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings,

I recently implemented generators for Hare modules (provides and
requires so far) and my current work in progress does what it says on
the tin. However, trying to answer the question "what if the package
installs garbage" I was not able to fail a package build with the
dependency generators.

I made the scripts end with something written to stderr followed by an
explicit "exit 1", and I can see the error message, but then it just
succeeds. So my question is how to make RPM register that a dependency
generator failed and in turn fail the build?

Bear with me, this is only work in progress and I already started to
iron out a few kinks, and I have more to address, but I haven't
touched my COPR repositories after reaching the first "it works"
milestone, so don't look at the kinks.

You can grab the sources from here:

https://copr-dist-git.fedorainfracloud.org/cgit/dridi/harelang/hare.git/tree/

And on my system I use the following command to build packages with
automatic dependencies:

    rm -rf results_hare/ &&
    fedpkg mockbuild --with bootstrap &&
    mock --install results_hare/*/*/hare-rpm-macros-*.rpm &&
    rm -rf results_hare/ &&
    fedpkg mockbuild --no-clean

(I broke it down line by line for legibility. If there is a handy
all-in-one command for a bootstrapped build followed by a regular
build in fedpkg, I didn't find it and I'm interested.)

My default mock root points to rawhide. It takes a couple minutes to
complete, at which point I can observe virtual provides for Hare
modules:

    $ rpm -qpP results_hare/*/*/hare-stdlib-*.rpm | tail
    hare(unix) = 0.24.2-1.fc42
    hare(unix::hosts) = 0.24.2-1.fc42
    hare(unix::passwd) = 0.24.2-1.fc42
    hare(unix::poll) = 0.24.2-1.fc42
    hare(unix::resolvconf) = 0.24.2-1.fc42
    hare(unix::signal) = 0.24.2-1.fc42
    hare(unix::tty) = 0.24.2-1.fc42
    hare(uuid) = 0.24.2-1.fc42
    hare(wordexp) = 0.24.2-1.fc42
    hare-stdlib = 0.24.2-1.fc42

Like I said, if the hare.prov and hare.req script fail, the build
happily completes. I thought of using a burp script but those look
pretty arcane and I couldn't easily find a doc reference explaining
how to work with them (they look essentially ad-hoc).

How do I get rpmdeps to propagate the exit status of the scripts?

Thanks,
Dridi
-- 
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux