Changeset 185


Ignore:
Timestamp:
06/07/15 11:50:22 (9 years ago)
Author:
kdeugau
Message:

/trunk

Allow empty packages, as long as they have something in the dependency list.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r184 r185  
    12561256    }
    12571257
    1258     # Skip building a package if it doesn't actually have any files.  NB:  This
    1259     # differs slightly from rpm's behaviour where a package *will* be built -
    1260     # even without any files - if %files is specified anywhere.  I can think
    1261     # of odd corner cases where that *may* be desireable.
    1262     next if (!$filelist{$pkg} or $filelist{$pkg} =~ /^\s*$/);
     1258    # Skip building a package that doesn't have any files or dependencies.  True
     1259    # metapackages don't have any files, but they depend on a bunch of things.
     1260    # Packages with neither have, essentially, no content.
     1261    next if
     1262        (!$filelist{$pkg} or $filelist{$pkg} =~ /^\s*$/) &&
     1263        (!$pkgdata{$pkg}{requires});
     1264    $filelist{$pkg} = '' if !$filelist{$pkg};
    12631265
    12641266    # Gotta do this first, otherwise we don't have a place to move files from %files
     
    12661268
    12671269    # Eliminate any lingering % macros
    1268     $filelist{$pkg} = expandmacros $filelist{$pkg}, 'g';
     1270    $filelist{$pkg} = expandmacros $filelist{$pkg}, 'gp';
    12691271
    12701272    my @pkgfilelist = split ' ', $filelist{$pkg};
     
    19311933    # ASS-U-ME and make life a little simpler.
    19321934    if ($macrostring =~ /\%\{\_\_([a-z0-9_-]+)\}/) {
     1935# see /usr/lib/rpm/macros for most of the list.  we should arguably just parse that file, but..  ow.
    19331936      $macrostring =~ s|%{__([a-z0-9_-]+)}|$1|g;
    19341937    }
Note: See TracChangeset for help on using the changeset viewer.