+2007-11-19 Guillem Jover <guillem@debian.org>
+
+ * pkg-deb/build.c (arbitrary_fields): Add Package-Type,
+ Subarchitecture, Kernel-Version and Installer-Menu-Item.
+ * scripts/dpkg-scanpackages.pl (@fieldpri): Likewise.
+ (%field_case): Add type argument.
+ (usage): Document --type argument, and mark --udeb as obsolete.
+ * scripts/dpkg-gencontrol.pl: Parse Package-Type, Subarchitecture,
+ Kernel-Version and Installer-Menu-Item from control file binary
+ stanza. Warn if udeb specific fields are used on non-udeb packages.
+ Add package with proper extension to the files list file.
+ (@control_fields): Add Package-Type, Subarchitecture, Kernel-Version
+ and Installer-Menu-Item.
+ ($package_type): New variable.
+ * scripts/dpkg-genchanges.pl: Ignore Package-Type, Subarchitecture,
+ Kernel-Version and Installer-Menu-Item fields.
+ * scripts/dpkg-source.pl: Likewise.
+
2007-11-15 Guillem Jover <guillem@debian.org>
* scripts/Dpkg/Arch.pm (read_cputable): Force a sane input record
* Make dpkg bootstrappable.
- * Support udeb natively:
- - Add field Package-Type and friends.
- - Generate proper Packages files. (#383916)
-
1.14.y
------
* Add support for format strings in Dpkg::ErrorHandling functions.
* Move build and host arch detection code from dpkg-architecture to
Dpkg::Arch.
+ * Add initial udeb support:
+ - Support new fields fields Package-Type, Subarchitecture, Kernel-Version
+ and Installer-Menu-Item. Closes: #383916
+ - New '--type' option for dpkg-scanpackages.
[ Updated dselect translations ]
* Czech (Miroslav Kure).
};
const char *arbitrary_fields[]= {
+ "Package-Type",
+ "Subarchitecture",
+ "Kernel-Version",
+ "Installer-Menu-Item",
"Homepage",
"Tag",
NULL
+2007-11-19 Guillem Jover <guillem@debian.org>
+
+ * dpkg-scanpackages.1: Document --type, and mark --udeb as obsolete.
+
2007-11-04 Robert Luberda <robert@debian.org>
* po/pl.po: Update to 1258t10f77u, fix typos
.\" You should have received a copy of the GNU General Public
.\" License along with dpkg; if not, write to the Free Software
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-.TH dpkg\-scanpackages 1 "2007-09-08" "Debian Project" "dpkg utilities"
+.TH dpkg\-scanpackages 1 "2007-11-19" "Debian Project" "dpkg utilities"
.SH NAME
dpkg\-scanpackages \- create Packages index files
.
.
.SH OPTIONS
.TP
+.BR \-t ", " \-\-type " \fItype\fP"
+Scan for *.\fItype\fP packages, instead of *.deb.
+.TP
.BR \-u ", " \-\-udeb
-Scan for \fI*.udeb\fP, instead of \fI*.deb\fP.
+\fBObsolete\fP alias for \fB-tudeb\fP.
.TP
.BR \-a ", " \-\-arch " \fIarch\fP"
Use a pattern consisting of \fI*_all.deb\fP and \fI*_arch.deb\fP instead of
$v = '';
}
push(@archvalues,$v) unless !$v || $archadded{$v}++;
- } elsif (m/^(Package|Essential|Pre-Depends|Depends|Provides)$/ ||
- m/^(Recommends|Suggests|Enhances|Conflicts|Breaks|Replaces)$/ ||
- m/^Tag$/i ||
+ } elsif (m/^(Package|Package-Type|Kernel-Version|Essential)$/ ||
+ m/^(Tag|Installer-Menu-Item|Subarchitecture)$/i ||
+ m/^(Pre-Depends|Depends|Recommends|Suggests|Provides)$/ ||
+ m/^(Enhances|Conflicts|Breaks|Replaces)$/ ||
m/^X[BS]+-/i) {
} else {
&unknown(_g("package's section of control info file"));
textdomain("dpkg-dev");
-my @control_fields = (qw(Package Source Version Architecture Essential Origin
- Bugs Maintainer Installed-Size), @pkg_dep_fields,
+my @control_fields = (qw(Package Package-Type Source Version Kernel-Version
+ Architecture Subarchitecture Installer-Menu-Item
+ Essential Origin Bugs Maintainer Installed-Size),
+ @pkg_dep_fields,
qw(Section Priority Homepage Description Tag));
my $controlfile = 'debian/control';
my %override;
my (%spvalue, %spdefault);
my $oppackage;
+my $package_type = 'deb';
sub version {
else { $_ = "C $_"; &unknown(_g('general section of control info file')); }
} elsif (s/^C$myindex //) {
#print STDERR "P key >$_< value >$v<\n";
- if (m/^(Package|Description|Homepage|Tag|Essential)$/) {
+ if (m/^(Package|Package-Type|Description|Homepage|Tag|Essential)$/ ||
+ m/^(Subarchitecture|Kernel-Version|Installer-Menu-Item)$/) {
$f{$_}= $v;
} elsif (exists($pkg_dep_fields{$_})) {
# Delay the parsing until later
}
$oppackage= $f{'Package'};
+$package_type = $f{'Package-Type'} if (defined($f{'Package-Type'}));
+
+if ($package_type ne 'udeb') {
+ for my $f (qw(Subarchitecture Kernel-Version Installer-Menu-Item)) {
+ warning(_g("%s package with udeb specific field %s"), $package_type, $f)
+ if defined($f{$f});
+ }
+}
+
my $verdiff = $f{'Version'} ne $substvar{'source:Version'} ||
$f{'Version'} ne $sourceversion;
if ($oppackage ne $sourcepackage || $verdiff) {
binmode(X);
while (<X>) {
chomp;
- next if m/^([-+0-9a-z.]+)_[^_]+_([\w-]+)\.deb /
+ next if m/^([-+0-9a-z.]+)_[^_]+_([\w-]+)\.(a-z+) /
&& ($1 eq $oppackage)
+ && ($3 eq $package_type)
&& (debarch_eq($2, $f{'Architecture'})
|| debarch_eq($2, 'all'));
print(Y "$_\n") || &syserr(_g("copy old entry to new files list file"));
}
my $sversion = $f{'Version'};
$sversion =~ s/^\d+://;
-$forcefilename=sprintf("%s_%s_%s.deb", $oppackage,$sversion,$f{'Architecture'})
+$forcefilename = sprintf("%s_%s_%s.%s", $oppackage, $sversion, $f{'Architecture'},
+ $package_type)
unless ($forcefilename);
print(Y &substvars(sprintf("%s %s %s\n", $forcefilename,
&spfileslistvalue('Section'), &spfileslistvalue('Priority'))))
package_revision => 'revision',
);
-my @fieldpri = (qw(Package Source Version Architecture Essential Origin Bugs
- Maintainer Installed-Size), @pkg_dep_fields, qw(Filename
- Size MD5sum Section Priority Homepage Description Tag));
+my @fieldpri = (qw(Package Package-Type Source Version Kernel-Version
+ Architecture Subarchitecture Essential Origin Bugs
+ Maintainer Installed-Size Installer-Menu-Item),
+ @pkg_dep_fields, qw(Filename Size MD5sum Section Priority
+ Homepage Description Tag));
# This maps the fields into the proper case
my %field_case;
my %options = (help => sub { &usage; exit 0; },
version => \&version,
+ type => undef,
udeb => 0,
arch => undef,
multiversion => 0,
);
-my $result = GetOptions(\%options,'help|h|?','version','udeb|u!','arch|a=s','multiversion|m!');
+my $result = GetOptions(\%options,
+ 'help|h|?', 'version', 'type|t=s', 'udeb|u!',
+ 'arch|a=s', 'multiversion|m!');
sub version {
printf _g("Debian %s version %s.\n"), $progname, $version;
"Usage: %s [<option> ...] <binarypath> [<overridefile> [<pathprefix>]] > Packages
Options:
- -u, --udeb scan for udebs.
+ -t, --type <type> scan for <type> packages (default is 'deb').
+ -u, --udeb scan for udebs (obsolete alias for -tudeb).
-a, --arch <arch> architecture to scan for.
-m, --multiversion allow multiple versions of a single package.
-h, --help show this help message.
exit 1;
}
-my $udeb = $options{udeb};
+my $type = defined($options{type}) ? $options{type} :
+ $options{udeb} ? 'udeb' : 'deb';
my $arch = $options{arch};
-my $ext = $options{udeb} ? 'udeb' : 'deb';
my @find_args;
if ($options{arch}) {
- @find_args = ('(','-name',"*_all.$ext",'-o','-name',"*_${arch}.$ext",')',);
+ @find_args = ('(', '-name', "*_all.$type", '-o',
+ '-name', "*_${arch}.$type", ')');
}
else {
- @find_args = ('-name',"*.$ext");
+ @find_args = ('-name', "*.$type");
}
push @find_args, '-follow';
$f{'Architecture'}= join(' ',@sourcearch);
} elsif (s/^X[BC]*S[BC]*-//i) {
$f{$_}= $v;
- } elsif (m/^(Package|Essential|Pre-Depends|Depends|Provides)$/i ||
+ } elsif (m/^(Package|Package-Type|Essential|Kernel-Version)$/ ||
+ m/^(Subarchitecture|Installer-Menu-Item)$/i ||
+ m/^(Pre-Depends|Depends|Provides)$/i ||
m/^(Recommends|Suggests|Conflicts|Replaces)$/i ||
m/^(Breaks|Enhances|Description|Tag|Section|Priority)$/i ||
m/^X[BC]+-/i) {