Re: Create a RPM package that install other RPM package!

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

 



Hey guys, my solution that works is...

--------------- bit of my spec file
%post

export XDG_UTILS_INSTALL_MODE="system"
export prefix=$RPM_INSTALL_PREFIX
export adobeair="adobeair1.0"
export adobecer="adobe-certs"

# adobe air
if rpm -q ${adobeair} 1> /devnull 2>&1; then
  echo " (*) A runtime do ADOBE Air ja esta instalada, continuando..."
else
  echo " (*) Aguarde, instalando Runtime do ADOBE AIR..."
(
lock=/tmp/xxx-install.lock
rm -f $lock
while true; do
 if [ ! -f $lock ];then
   echo "(*) Executando instalacao apartir do AdobeAIRInstaller.bin, aguarde..."
   sleep 3
   rpm --nodeps -e ${adobeair} 1> /dev/null 2>&1
   rpm --nodeps -e ${adobecer} 1> /dev/null 2>&1
   ${prefix}/usr/share/xxx/bin/AdobeAIRInstaller.bin -silent 1> /dev/null 2>&1
   echo "(*) Instalacao do AdobeAIRInstaller.bin foi feita com sucesso!"
   rm -f ${prefix}/usr/share/xxx/bin/AdobeAIRInstaller.bin
   sync
   exit
 fi
 sleep 1
done
) &
fi

# xdg icones
for i in 16 32 48 128; do
  icon_size="$i"
  icon_path="$prefix/usr/share/xxx/share/assets/png/positivoIcon$i.png"

  xdg-icon-resource install --noupdate --novendor --context apps
--mode system --size "$icon_size" "$icon_path" 1>/dev/null 2>&1
  xdg-icon-resource install --noupdate --novendor --theme gnome
--context apps --mode system --size "$icon_size" "$icon_path"
1>/dev/null 2>&1
done
.............................. bit of my spec file

So, thanks for all helps and tips!
[]s
--
Regards,
+--------------------------------------------+
 Jorge Pereira,
 http://blog.jorgepereira.com.br/
+--------------------------------------------+



On Wed, Mar 4, 2009 at 1:07 PM, devzero2000 <pinto.elia@xxxxxxxxx> wrote:
> On Wed, Mar 4, 2009 at 4:34 PM, Derek Atkins <warlord@xxxxxxx> wrote:
>>
>> Quoting seth vidal <skvidal@xxxxxxxxxxxxxxxxx>:
>>
>>> On Wed, 2009-03-04 at 10:06 -0500, Derek Atkins wrote:
>>>>
>>>> seth vidal <skvidal@xxxxxxxxxxxxxxxxx> writes:
>>>>
>>>> > On Wed, 2009-03-04 at 11:30 -0300, Jorge Pereira wrote:
>>>> >> Hello Everyone!
>>>> >>
>>>> >> I have an RPM package for a given application, and this package works
>>>> >> perfectly!
>>>> >> so now I need to make sure this package is a dependency, if not
>>>> >> installed it will
>>>> >> automatically install another RPM package that turns inside the
>>>> >> package!
>>>> >>
>>>> >> Example:
>>>> >>
>>>> >> i have the RPM "package-001.rpm" that depends of "adobe-air1.xx.rpm",
>>>> >> if package of adboe-air is not installed, i need run eg something
>>>> >> like
>>>> >> rpm -ivh /path/install/adobe-air1.xx.rpm
>>>> >>
>>>> >> just is a some example! i try but don't works becouse the resource is
>>>> >> locked by
>>>> >> first instance of "rpm -ivh", this is possible?
>>>> >>
>>>> >
>>>> > no. It's not possible.
>>>>
>>>> Actually, I was trying to solve this and I got it to work by
>>>> moving the transaction lock out of the way, performing the secondary
>>>> rpm operation, and then moving the rpm lock back into place.
>>>>
>>>
>>> this falls into the category of extraordinarily bad ideas. Seriously,
>>> don't encourage others to break the transaction lock.
>>
>> If RPM supported it natively I wouldn't have to.   But I'm distributing
>> third-party software that's in multiple RPMs but I want my users to
>> only have to manually download a single file.  I have limited options.
>> My choices are:
>>
>> 1) a shar-like self-extracting archive that contains and installs the
>>  necessary RPMS, or
>> 2) an RPM that contains and installs additional RPMs.
>>
>> Saying "use yum" just doesn't solve the problem I'm trying to solve.
>> But between these choices I prefer options 2.
>>
>>> -sv
>>
>> -derek
>
> Un RPM PACKAGE BUNDLE example included. It WORKFORME.
>
> [machbuild@rhel5 SPECS]$su -c "rpm -Uvh
> /home/machbuild/rpmbuild/RPMS/rpm-package-bundle-1.0-1.noarch.rpm"
> Preparazione in corso...    ###########################################
> [100%]
>    1:rpm-package-bundle     ###########################################
> [100%]
> [machbuild@rhel5 SPECS]$ rpm -q A
> A-1.0-1
> [machbuild@rhel5 SPECS]$ rpm -q B
> B-1.0-1
> [machbuild@rhel5 SPECS]$ su -c "rpm -e rpm-package-bundle"
> [machbuild@rhel5 SPECS]$ rpm -q rpm-package-bundle
> package rpm-package-bundle is not installed
> [machbuild@rhel5 SPECS]$
> [machbuild@i858shlf SPECS]$ rpm -q A
> package A is not installed
> [machbuild@i858shlf SPECS]$ rpm -q B
> package B is not installed
>
>
> hth
>
>
>>
>> --
>>      Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
>>      Member, MIT Student Information Processing Board  (SIPB)
>>      URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
>>      warlord@xxxxxxx                        PGP key available
>>
>> _______________________________________________
>> Rpm-list mailing list
>> Rpm-list@xxxxxxxxxxxxx
>> http://lists.rpm.org/mailman/listinfo/rpm-list
>
>
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@xxxxxxxxxxxxx
> http://lists.rpm.org/mailman/listinfo/rpm-list
>
>
_______________________________________________
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