On Wed, 27 Apr 2011 10:35:10 +0300 (EEST)
Mehmet Emre Atasever <uludag-comm...@pardus.org.tr> wrote:

> Author: memre
> Date: Wed Apr 27 10:35:10 2011
> New Revision: 36762
> 
> Modified:
>    trunk/pisi/pisi-spec.rng
>    trunk/pisi/pisi/operations/build.py
> Log:
> pisi should manage <ExcludeArch> tags with regex
> 
> ---
>  pisi-spec.rng            |    3 ++-
>  pisi/operations/build.py |   12 ++++++++----
>  2 files changed, 10 insertions(+), 5 deletions(-)
> 
> Modified: trunk/pisi/pisi-spec.rng
> =================================================================
> --- trunk/pisi/pisi-spec.rng  (original)
> +++ trunk/pisi/pisi-spec.rng  Wed Apr 27 10:35:10 2011
> @@ -175,8 +175,9 @@
>      <define name="ExcludeArch">
>          <element name="ExcludeArch">
>              <choice>
> -                <value>i686</value>
> +                <value>i[3-6]86</value>
>                  <value>x86_64</value>
> +                <value>arm.*</value>
>              </choice>
>          </element>
>      </define>
> 
> Modified: trunk/pisi/pisi/operations/build.py
> =================================================================
> --- trunk/pisi/pisi/operations/build.py       (original)
> +++ trunk/pisi/pisi/operations/build.py       Wed Apr 27 10:35:10
> 2011 @@ -311,11 +311,15 @@
>      def build(self):
>          """Build the package in one shot."""
>  
> +        # excludeArch should accept regex.
> +        # eg. <exludeArch>arm.*</exludeArch> armv7l, armv5te matches
> +        #     <exludeArch>i[3-6]86</exludeArch> i386, i486, i586,
> i686 matches architecture = ctx.config.values.general.architecture
> -        if architecture in self.spec.source.excludeArch:
> -            raise ExcludedArchitectureException(
> -                    _("pspec.xml avoids this package from building
> for '%s'")
> -                    % architecture)
> +        for arch in self.spec.source.excludeArch:
> +            if re.match(arch, architecture):
> +                raise ExcludedArchitectureException(
> +                        _("pspec.xml avoids this package from
> building for '%s'")
> +                        % architecture)
>  
>          ctx.ui.status(_("Building source package: %s")
>                        % self.spec.source.name)


Bunları direk commit etmemen gerekiyordu. Daha senin yaptığın
değişikliklerin pisi mainstream gireceğine karar verildiğini
hatırlamıyorum.

-- 
Mete Alpaslan <m...@pardus.org.tr>
_______________________________________________
Gelistirici mailing list
Gelistirici@pardus.org.tr
http://liste.pardus.org.tr/mailman/listinfo/gelistirici

Cevap