From 7957399f7002d71dbe5f68c1f5513118d4ff2183 Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Sat, 1 Dec 2007 22:56:45 +0100 Subject: [PATCH] what-patch: apply patch by Daniel Hahler (LP: #163454). pbuilder-dist: assume action 'build' when .dsc is passed, and update it's manpage. --- debian/changelog | 17 +++++++++++++---- doc/pbuilder-dist.1 | 14 ++++++++------ pbuilder-dist | 21 +++++++++++++-------- requestsync | 4 ++-- what-patch | 19 ++++++++++--------- 5 files changed, 46 insertions(+), 29 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7c3e2ff..0b2ac0c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,14 +12,23 @@ ubuntu-dev-tools (0.23) UNRELEASED; urgency=low [ Siegfried-Angel Gevatter Pujals (RainCT) ] * pbuilder-dist: - - move warning about changing $COMPONENTS's value to + - Move warning about changing $COMPONENTS's value to the right place (it should be displayed if the installed version of pbuilder is too old, not otherwise). + - Asume action is "build" if no recognized action is passed but + the next argument ends with .dsc. * dgetlp: - - add "-h", "--help" and "--debug" (-d was already there) + - Add "-h", "--help" and "--debug" (-d was already there) * 404main: - - rewrite most of it; cleanup and improvements - - change license to GPLv2+ + - Rewrite most of it; cleanup and improvements + - Identify Pete Savage as it's original author + - Change the license to GPLv2+ + * AUTHORS, debian/copyright: + - Add Pete Savage, as he wrote 404main + * what-patch: + - Ignore commented lines; patch by Daniel Hahler (LP: #163454) + * doc/pbuilder-dist.1: + - Update manpage to match recent changes (including those from 0.21). -- Siegfried-Angel Gevatter Pujals (RainCT) Fri, 23 Nov 2007 22:07:58 +0100 diff --git a/doc/pbuilder-dist.1 b/doc/pbuilder-dist.1 index 9575abf..96cdb5f 100644 --- a/doc/pbuilder-dist.1 +++ b/doc/pbuilder-dist.1 @@ -20,9 +20,8 @@ It is common to symlink this script in order to give it many names in the form o systems), like for example \fBpbuilder\-feisty\fP, \fBpbuilder\-sid\fP, \fBpbuilder\-gutsy\-i386\fP, etc. .\" .SH USAGE -There are many arguments listed on the synopsis. -Each of them, if used, has to be used exactly in the same order as it -appears there. +There are many arguments listed on the synopsis; each of them, if used, has to be used exactly in +the same order as it appears there. In case you renamed the script to \fBpbuilder\-\fIdistribution\fP\fR, do not use the \fBdistribution\fP parameter; same with \fBi386\fP / \fBamd64\fP if the name also contains \-\fIarchitecture\fR. @@ -51,7 +50,8 @@ If this file already exists, it will be overwritten. .TP \fBoperation\fP Replace this with the action you want \fBpbuilder\fP to do (create, update, build, clean, login -or execute). +or execute). If you don't specify any action, but the next argument is a .dsc file, it will +assume that it should build. Check its manpage for more details. .TP \fB[...]\fP @@ -61,7 +61,9 @@ For example, if \fBbuild\fP is the option, you will need to also specify a .dsc file. .PP The default value of all optional parameters (except the architecture) can be changed by -editing the first lines of the script. +editing the first lines of the script. You can also change the base directory using the +global variable $PBUILDFOLDER. +.PP .\" .SH EXAMPLES .TP @@ -83,7 +85,7 @@ Updates an existing i386-architecture Debian Etch environment on an amd64 system .SH FILES By default, \fBpbuilder\-dist\fP will store all the files it generates in \fB~/pbuilder/\fP. This can be changed by modifying the BASE_DIR value on the top of the script -to any other directory you want. +to any other directory you want, or by using the $PBUILDFOLDER global variable. If it doesn't exist, it will be created on the run. .\" .SH BUGS diff --git a/pbuilder-dist b/pbuilder-dist index e09c8f7..cf91519 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -146,14 +146,19 @@ case $OPERATION in ;; *) - echo "Unrecognized argument. Please use one of those:" - echo " create" - echo " update" - echo " build" - echo " clean" - echo " login" - echo " execute" - exit 1 + if [ ${1##*.} = 'dsc' ] + then + OPERATION=build + else + echo "Unrecognized argument. Please use one of those:" + echo " create" + echo " update" + echo " build" + echo " clean" + echo " login" + echo " execute" + exit 1 + fi ;; esac diff --git a/requestsync b/requestsync index 7605ef3..d5a4beb 100755 --- a/requestsync +++ b/requestsync @@ -1,11 +1,11 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# (C) 2007 Canonical Ltd, Steve Kowalik +# (C) 2007 Canonical Ltd., Steve Kowalik # Authors: # Martin Pitt # Steve Kowalik -# GPLv2, see /usr/share/common-licenses/GPL +# License: GPLv2, see /usr/share/common-licenses/GPL import os, os.path, sys, urllib, subprocess, smtplib, getopt diff --git a/what-patch b/what-patch index 821aec8..a0ace86 100755 --- a/what-patch +++ b/what-patch @@ -1,25 +1,26 @@ #!/bin/bash # Copyright 2006-2007 (C) Kees Cook # Modified by Siegfried-A. Gevatter +# Modified by Daniel Hahler # License: GPLv2 if [[ -d debian ]]; then - cd . # pass + cd . # pass elif [[ -d ../debian ]]; then - cd .. + cd .. elif [[ -d ../patches ]]; then - cd ../.. + cd ../.. else - echo "Can't find debian/rules."; exit + echo "Can't find debian/rules."; exit fi for filename in $(echo "debian/rules"; grep ^include debian/rules | fgrep -v '$(' | awk '{print $2}') do - fgrep -q patchsys.mk "$filename" && { echo "cdbs"; exit; } - fgrep -q quilt "$filename" && { echo "quilt"; exit; } - fgrep -q dbs-build.mk "$filename" && { echo "dbs"; exit; } - fgrep -q dpatch "$filename" && { echo "dpatch"; exit; } - fgrep -q '*.diff' "$filename" && { echo "diff splash"; exit; } + fgrep patchsys.mk "$filename" | grep -q -v "^#" && { echo "cdbs"; exit; } + fgrep quilt "$filename" | grep -q -v "^#" && { echo "quilt"; exit; } + fgrep dbs-build.mk "$filename" | grep -q -v "^#" && { echo "dbs"; exit; } + fgrep dpatch "$filename" | grep -q -v "^#" && { echo "dpatch"; exit; } + fgrep '*.diff' "$filename" | grep -q -v "^#" && { echo "diff splash"; exit; } done [ -d debian/patches ] || { echo "patchless?"; exit; } echo "unknown patch system"