Problem with the limited size of the RPM buffer containing the macro parsing results

<[email protected]> Wed, 12 Mar 2008 10:59:38 +0100
Newsgroups gmane.linux.redhat.rpm.general
Message-ID <8F97125A217C9A4E919BA0B9121C247901F0F1EE@PUEXCBC0.nanterre.francetelecom.fr>
rpm : 4.4.7
platforms : HPUX 11.23 / ia64, aix 5.3

 

Hi,

I'm trying to build dynamically %pre and %post scriptlets for
sub-packages listed in a macro %{sd_packages} :

.rpmmacros:

...
%sd_SpecMakePatchPre() %(
  [ -z "%{?patch_version}" ] || {
    __packs="%{?*}"
    for __pack in ${__packs:-%{sd_packages}}; do
      __pack="${__pack%%%%:*}"
      __name_pack="%{sd_name_pack}"
 
__name_pack="${__name_pack:+${__name_pack}-}p%{patch_type}%{version}"
      echo
      echo "%pre ${__name_pack}";
      if [ -n "%{expand:%%{?%{sd_script_pre__ptv_name}:1}}" ]; then
        echo '%{expand:%%{?%{sd_script_pre__ptv_name}}}'
      else
        echo '%%{sd_script_pre__common}'
      fi
      echo '%{expand:%%sd_FileSaveDelivered '${__name_pack}'}'
    done
  }
)



and :

spec file:

%define sd_packages  %{sd_app_name}::.
%{sd_app_name}-src:01:services_communs:%{src_paths}

%sd_SpecMakePatchPre
...

My problem is that the buffer RPM uses to contain the
%sd_SpecMakePatchPre macro parsing result seems to have a limited size;
and the parsing result is truncated involving the following shell error
:

sh[2]: Syntax error at line 28 : `for' is not matched.

Is there a way to pass over or surround this limitation ?

Regards,

 

mailto: [email protected] <mailto:[email protected]>

phone: +33 1 43985883

_______________________________________________
Rpm-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rpm-list