Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9166789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:14:01+00:00 2026-06-17T15:14:01+00:00

There are some more things that the Requires tag does not satisfy. So i

  • 0

There are some more things that the Requires tag does not satisfy.
So i wrote a script to verify these things but where do I place them ?
And if not found then i want to quit installation prompting user to do the steps before attempting to install this rpm again.

writing exit 1 in %install tag fails to build the rpm using rpmbuild.
says %install has a bad exit code.

EDIT: let me provide you an example. What i initially wanted to test was is if Oracle Java 6 is present. If not then provide the path to Java6. If user fails to provide one … exit the RPM. Higher Java is not allowed and installation should not be successful without java. Cannot place it in Requires for a point if user does not want to install a java rpm package.

Hope i got my point through.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:14:02+00:00Added an answer on June 17, 2026 at 3:14 pm

    You can use the %pre section for this kind of task.

    The %pre script executes just before the package is to be installed.
    It is the rare package that requires anything to be done prior to
    installation; none of the 350 packages that comprise Red Hat Linux
    Linux 4.0 make use of it.

    Some guide to get you started; the script content (not used in a %pre section) comes from jpackage-utils, you will find some other good examples of scripts there:

      %pre
      # try to find jvm from java command
    
      # try javac first, or we might get the location of the jre instead - djw
      java=`which javac 2>/dev/null || :`
    
      # if we don't have the jdk, then maybe we have the jre - djw
      if [ -z "$java" ] ; then
        java=`which java 2>/dev/null || :`
      fi
    
      if [ -n "$java" ] ; then
        while [ -h "$java" ] ; do
          java=`readlink $java 2>/dev/null`
        done
        return
      fi
    
      echo "Can't find java virtual machine, aborting."
      exit 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there some kind of software that I can feed uploaded images to and
Is there some regex that can be passed to re-seq such that it will
This is about a legacy Access 2003 database that I've inherited. There's some code
There are web browser apps in the store which do many things that seem
Hey, I am in the process of refactoring a program that requires some amount
Removed the C tag, seeing as that was causing some confusion (it shouldn't have
I am aware that there were similar questions in past few years, but after
Are there some good resources tutorials or anyone has tried to implement a Capcha
Is there some way to define an abstract type as a parameter in an
Is there some crucial difference in writing the registry class in MVC with magic

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.