From: Wichert Akkerman Date: Thu, 21 Sep 2000 15:05:49 +0000 (+0000) Subject: add -S option to only upload sources X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74096a67bc1bff476b0af912c2d176e26928e976;p=dpkg add -S option to only upload sources --- diff --git a/ChangeLog b/ChangeLog index ad7d44a8..140d49f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ Thu Sep 21 16:29:32 CEST 2000 Wichert Akkerman * debian/shlibs-default.template: removed * debian/shlibs-{default,override}: new files * debian/rules: install shlibs-{default,override} in /etc/dpkg in dpkg-dev + * scripts/{dpkg-buildpackage.sh,dpkg-genchanges.pl}: add -S option to only + upload sources + * scripts/dpkg-source.1: document new -S option Sun Sep 17 01:50:34 CEST 2000 Wichert Akkerman diff --git a/scripts/dpkg-buildpackage.sh b/scripts/dpkg-buildpackage.sh index d8623dab..539416b9 100755 --- a/scripts/dpkg-buildpackage.sh +++ b/scripts/dpkg-buildpackage.sh @@ -23,6 +23,7 @@ Options: -r -a Debian architecture we build for -b binary-only, do not build source } also passed to -B binary-only, no arch-indep files } dpkg-genchanges + -S source only, no binary files } -v changes since version } -m maintainer for package is } -e maintainer for release is } only passed @@ -82,8 +83,12 @@ do -tc) cleansource=true ;; -t*) targetgnusystem="$value" ;; # Order DOES matter! -nc) noclean=true; if [ -z "$binaryonly" ]; then binaryonly=-b; fi ;; - -b) binaryonly=-b ;; - -B) binaryonly=-B; binarytarget=binary-arch ;; + -b) binaryonly=-b; [ "$sourceonly" ] && \ + { echo >&2 "$progname: cannot combine $1 and -S" ; exit 2 ; } ;; + -B) binaryonly=-B; binarytarget=binary-arch; [ "$sourceonly" ] && \ + { echo >&2 "$progname: cannot combine $1 and -S" ; exit 2 ; } ;; + -S) sourceonly=-S; [ "$binaryonly" ] && \ + { echo >&2 "$progname: cannot combine $binaryonly and $1" ; exit 2 ; } ;; -v*) since="$value" ;; -m*) maint="$value" ;; -e*) changedby="$value" ;; @@ -157,7 +162,7 @@ withecho () { "$@" } -set -- $binaryonly $sourcestyle +set -- $binaryonly $sourceonly $sourcestyle if [ -n "$maint" ]; then set -- "$@" "-m$maint" ; fi if [ -n "$changedby" ]; then set -- "$@" "-e$changedby" ; fi if [ -n "$since" ]; then set -- "$@" "-v$since" ; fi @@ -169,9 +174,10 @@ fi if [ x$binaryonly = x ]; then cd ..; withecho dpkg-source $diffignore -b "$dirn"; cd "$dirn" fi -withecho debian/rules build $archlist -withecho $rootcommand debian/rules $binarytarget $archlist - +if [ x$sourceonly != x ]; then + withecho debian/rules build $archlist + withecho $rootcommand debian/rules $binarytarget $archlist +fi if [ "$usepause" = "true" ] && [ x$binaryonly = x -o x$signchanges != x ] ; then echo Press the return key to start signing process read dummy_stuff @@ -197,6 +203,8 @@ elif fileomitted '\.diff\.gz'; then srcmsg='Debian-specific package; upload is full source' elif fileomitted '\.orig\.tar\.gz'; then srcmsg='diff-only upload (original source NOT included)' +elif fileomitted '\.deb'; then + srcmsg='source-only upload' else srcmsg='full upload (original source is included)' fi diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl index 23735e4f..bd635964 100755 --- a/scripts/dpkg-genchanges.pl +++ b/scripts/dpkg-genchanges.pl @@ -40,6 +40,7 @@ Usage: dpkg-genchanges [options ...] Options: -b binary-only build - no source files -B arch-specific - no source or arch-indep files + -S source-only upload -c get control info from this file -l get per-version info from this file -f get .deb files list from this file @@ -69,11 +70,16 @@ $i=100;grep($fieldimps{$_}=$i--, while (@ARGV) { $_=shift(@ARGV); if (m/^-b$/) { + $sourceonly && &usageerr("cannot combine -b or -B and -S"); $binaryonly= 1; } elsif (m/^-B$/) { + $sourceonly && &usageerr("cannot combine -b or -B and -S"); $archspecific=1; $binaryonly= 1; print STDERR "$progname: arch-specific upload - not including arch-independent packages\n"; + } elsif (m/^-S$/) { + $binaryonly && &usageerr("cannot combine -b or -B and -S"); + $sourceonly= 1; } elsif (m/^-s([iad])$/) { $sourcestyle= $1; } elsif (m/^-q$/) { @@ -115,38 +121,40 @@ while (@ARGV) { &parsechangelog; &parsecontrolfile; -$fileslistfile="./$fileslistfile" if $fileslistfile =~ m/^\s/; -open(FL,"< $fileslistfile") || &syserr("cannot read files list file"); -while() { - if (m/^(([-+.0-9a-z]+)_([^_]+)_([-\w]+)\.deb) (\S+) (\S+)$/) { - defined($p2f{"$2 $4"}) && - &warn("duplicate files list entry for package $2 (line $.)"); - $f2p{$1}= $2; - $p2f{"$2 $4"}= $1; - $p2f{$2}= $1; - $p2ver{$2}= $3; - defined($f2sec{$1}) && - &warn("duplicate files list entry for file $1 (line $.)"); - $f2sec{$1}= $5; - $f2pri{$1}= $6; - push(@fileslistfiles,$1); - } elsif (m/^([-+.0-9a-z]+_[^_]+_([-\w]+)\.[a-z0-9.]+) (\S+) (\S+)$/) { - # A non-deb package - $f2sec{$1}= $3; - $f2pri{$1}= $4; - push(@archvalues,$2) unless !$2 || $archadded{$2}++; - push(@fileslistfiles,$1); - } elsif (m/^([-+.,_0-9a-zA-Z]+) (\S+) (\S+)$/) { - defined($f2sec{$1}) && - &warn("duplicate files list entry for file $1 (line $.)"); - $f2sec{$1}= $2; - $f2pri{$1}= $3; - push(@fileslistfiles,$1); - } else { - &error("badly formed line in files list file, line $."); +if (not $sourceonly) { + $fileslistfile="./$fileslistfile" if $fileslistfile =~ m/^\s/; + open(FL,"< $fileslistfile") || &syserr("cannot read files list file"); + while() { + if (m/^(([-+.0-9a-z]+)_([^_]+)_([-\w]+)\.deb) (\S+) (\S+)$/) { + defined($p2f{"$2 $4"}) && + &warn("duplicate files list entry for package $2 (line $.)"); + $f2p{$1}= $2; + $p2f{"$2 $4"}= $1; + $p2f{$2}= $1; + $p2ver{$2}= $3; + defined($f2sec{$1}) && + &warn("duplicate files list entry for file $1 (line $.)"); + $f2sec{$1}= $5; + $f2pri{$1}= $6; + push(@fileslistfiles,$1); + } elsif (m/^([-+.0-9a-z]+_[^_]+_([-\w]+)\.[a-z0-9.]+) (\S+) (\S+)$/) { + # A non-deb package + $f2sec{$1}= $3; + $f2pri{$1}= $4; + push(@archvalues,$2) unless !$2 || $archadded{$2}++; + push(@fileslistfiles,$1); + } elsif (m/^([-+.,_0-9a-zA-Z]+) (\S+) (\S+)$/) { + defined($f2sec{$1}) && + &warn("duplicate files list entry for file $1 (line $.)"); + $f2sec{$1}= $2; + $f2pri{$1}= $3; + push(@fileslistfiles,$1); + } else { + &error("badly formed line in files list file, line $."); + } } + close(FL); } -close(FL); for $_ (keys %fi) { $v= $fi{$_}; diff --git a/scripts/dpkg-source.1 b/scripts/dpkg-source.1 index af464cb0..004515da 100644 --- a/scripts/dpkg-source.1 +++ b/scripts/dpkg-source.1 @@ -179,15 +179,19 @@ Remove an output control file field. This option is understood by .BR dpkg-source ", " dpkg-gencontrol " and " dpkg-genchanges . .TP -.BR -b | -B +.BR -b | -B | -S For .BR dpkg-genchanges " and " dpkg-buildpackage -this specifies that a binary-only build is taking place. +.BR -b " and " -B +specify that a binary-only build is taking place. .B -b indicates that no source files are to be built and/or distributed, and .B -B that no architecture-independent binary package files are to be -distributed either. The distinction between +distributed either. +.B -S +specifies that only the source should be uploaded and no binary packages +need to be made. The distinction between .BR -b " and " -B is only used by .BR dpkg-buildpackage ;