Re: Is there a way to turn off %pretrans?

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

 



The %pretrans: is a leftover from when others were creating the package.   It was never an issue until KS. 



On Monday, April 4, 2016 2:43 AM, Thierry Vignaud <thierry.vignaud@xxxxxxxxx> wrote:


On 3 April 2016 at 03:21, doc <drplastic99@xxxxxxxxx> wrote:

> A customer is using RedHat Kickstart to install packages on bare metal
> machines.  Unfortunately, the %pretrans in the first package fails because
> /bin/sh hasn't been installed.  What I'm being told is that the following
> %pretrans scriptlet is not supported by RedHat Kickstart.
>
> %pretrans
> [ -n "$VERBOSE" ] && set -x ; :
>
>
> Am I missing something?


If's RHEL7, then using sg like "Requires(pretrans): coreutils bash" should work.
(actually anything using rpm-4.9+ would support this)

Though rpm should emits such requires automatically (well for the
shell, not for the commands you'll actually be using)
eg:
$ rpm -qpR -v RPMS/x86_64/foobar-1-1.x86_64.rpm
interp,posttrans: /bin/sh
interp,pretrans: /bin/sh

With that, rpmlib should order packages installation such as bash is
installed prior to this package.
(unless there's a dependency cycle, in which case rpm will randomly
break a dep when ordering packages)
Else you cannot guaranty that bash will be installed first.

But here, I don't see that's the issue.
Actually I don't see the point in this %pretrans:
- is VERBOSE set in the KS ?
  Debugging should be done by packager, not in KS...
- set -x will ony be valid for the %pretrans, not for other scriptlets
  (and not for other packages)
  Basically, each scriptlet runs its own interpreter (either /bin/sh,
perl, python, lua, ... whatever you choose)
What's the purpose here? to see what happen with %pretrans?
Debugging should be done by packager, not in KS...

So:
- What version of RHEL is used?
- What's the actual failure?
- What's the actual error message?
- Is that the whole %pretrans ?



_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux