Changeset 76


Ignore:
Timestamp:
11/16/06 16:46:56 (18 years ago)
Author:
kdeugau
Message:

/trunk

Add basic support for %attr
Bugfix --showpkgs to not show "empty" packages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r75 r76  
    153153    my $pkgfullname = "$pkgdata{$pkg}{name}_$pkgdata{$pkg}{version}-$pkgdata{main}{release}_i386.deb";
    154154
    155     print "$pkgfullname\n";
     155    print "$pkgfullname\n" if $filelist{$pkg};
    156156  }
    157157  exit 0;
     
    551551          # need to update this to deal (properly) with %dir, %attr, etc
    552552          next if /^\%dir/;
    553           next if /^\%attr/;
    554553          next if /^\%defattr/;
    555554
    556555          # Debian dpkg doesn't speak "%docdir".  Meh.
    557556          next if /^\%docdir/;
     557
     558##fixme
     559# Note that big chunks of this section don't match rpm's behaviour;  among other things,
     560# rpm accepts more than one %-directive on one line for a file or set of files.
     561          # make sure files get suitable permissions and so on
     562          if (/^\%attr/) {
     563            # We're going to collapse whitespace before processing.  PTHBT.
     564            # While this breaks pathnames with spaces, anyone expecting command-line
     565            # tools with spaces to work (never mind work *properly* or *well*) under
     566            # any *nix has their head so far up their ass they can see out their mouth.
     567            my ($args,$filelist) = split /\)/;
     568            $filelist{$pkgname} .= " $filelist";
     569            $args =~ s/\s+//g;
     570            $args =~ s/"//g;    # don't think quotes are ever necessary, but they're *allowed*
     571            my ($perms,$owner,$group) = ($args =~ /\((\d+),([a-zA-Z0-9-]+),([a-zA-Z0-9-]+)/);
     572# due to Debian's total lack of real permissions-processing in its actual package
     573# handling component (dpkg-deb), this can't really be done "properly".  We'll have
     574# to add chown/chmod commands to the postinst instead.  Feh.
     575            $pkgdata{$pkgname}{'post'} .= "chmod $perms $filelist\n" if $perms ne '-';
     576            $pkgdata{$pkgname}{'post'} .= "chown $owner $filelist\n" if $owner ne '-';
     577            $pkgdata{$pkgname}{'post'} .= "chgrp $group $filelist\n" if $group ne '-';
     578          }
    558579
    559580          # %doc needs extra processing, because it can be a space-separated list.
Note: See TracChangeset for help on using the changeset viewer.