diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2007-08-08 10:20:52 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2007-08-08 10:20:52 +0000 |
commit | eb6b90ee746f4bd5b16fc5fed63ac822b9b64f5c (patch) | |
tree | 125093b8ed058cb12285954190504a0f40e007e9 | |
parent | d34dd0d4b58a252fc679c10d9d541b032dae4d06 (diff) | |
download | quilt-eb6b90ee746f4bd5b16fc5fed63ac822b9b64f5c.tar.gz |
- quilt setup: replace the --path argument with --sourcedir for
specifying the location of the package sources. Pass the source
dir to inspect as well. Fix a test suite bug for quilt setup.
Minor cosmetic changes.
- Fix a quilt mail test suite bug: specify a dummy --sender in
test.quiltrc.
-rw-r--r-- | po/de.po | 37 | ||||
-rw-r--r-- | po/fr.po | 28 | ||||
-rw-r--r-- | po/ja.po | 28 | ||||
-rw-r--r-- | po/quilt.pot | 25 | ||||
-rw-r--r-- | quilt.changes | 10 | ||||
-rw-r--r-- | quilt/scripts/inspect.in | 52 | ||||
-rw-r--r-- | quilt/setup.in | 86 | ||||
-rw-r--r-- | test/setup.test | 12 | ||||
-rw-r--r-- | test/test.quiltrc | 2 |
9 files changed, 152 insertions, 128 deletions
@@ -330,11 +330,11 @@ msgstr "Patch %s ist nicht vor Patch %s angewandt\\n" msgid "File %s is not being modified\\n" msgstr "Datei %s wird nicht verändert.\\n" -#: quilt/diff.in:346 quilt/refresh.in:228 +#: quilt/diff.in:345 quilt/refresh.in:228 msgid "Diff failed, aborting\\n" msgstr "Diff fehlgeschlagen, Abbruch.\\n" -#: quilt/diff.in:353 +#: quilt/diff.in:352 msgid "Warning: more recent patches modify files in patch %s\\n" msgstr "Warnung: später angewandte Patches verändern Dateien von %s\\n" @@ -1422,22 +1422,23 @@ msgstr "Verzeichnis %s existiert\\n" msgid "File %s exists\\n" msgstr "Datei %s existiert\\n" -#: quilt/setup.in:93 +#: quilt/setup.in:75 msgid "" -"Usage: quilt setup [-d path-prefix] [-v] [--path dir1:dir2] {specfile|" +"Usage: quilt setup [-d path-prefix] [-v] [--sourcedir dir] {specfile|" "seriesfile}\\n" msgstr "" -"Verwendung: quilt setup [-d pfad-präfix] [-v] [--path pfad:pfad] {spec-datei|" -"series-datei}\\n" +"Verwendung: quilt setup [-d pfad-präfix] [-v] [--sourcedir verzeichnis] " +"{spec-datei|series-datei}\\n" -#: quilt/setup.in:96 +#: quilt/setup.in:78 msgid "" "\n" "Initializes a source tree from an rpm spec file or a quilt series file.\n" "\n" -"-d\tOptional path prefix.\n" +"-d\tOptional path prefix for the resulting source tree.\n" "\n" -"--path\tDirectories to search when looking for tarballs. Defaults to \\`.'.\n" +"--sourcedir\n" +"\tDirectory that contains the package sources. Defaults to \\`.'.\n" "\n" "-v\tVerbose debug output.\n" msgstr "" @@ -1445,28 +1446,28 @@ msgstr "" "Initialisiere einen Quellbaum aus einer rpm spec-Datei oder einer quilt " "series-Datei.\n" "\n" -"-d\tOptionaler Pfad-Präfix.\n" +"-d\tOptionaler Pfad-Präfix für den erzeugten Quellbaum.\n" "\n" -"--path\tVerzeichnisse, in denen nach tar-Archiven gesucht wird. Wenn nicht\n" -"\tanders angegeben, wird \\`.' durchsucht.\n" +"--sourcedir\n" +"\tVerzeichnis, das die Paketquellen enthält. (Default: \\`.'.)\n" "\n" "-v\tAusführliche Ausgabe.\n" -#: quilt/setup.in:158 +#: quilt/setup.in:143 msgid "The %%prep section of %s failed; results may be incomplete\\n" msgstr "" "Der %%prep-Abschnitt von %s ist fehlgeschlagen; die Ergebnisse sind " "möglicherweise unvollständig\\n" -#: quilt/setup.in:161 +#: quilt/setup.in:146 msgid "The -v option will show rpm's output\\n" msgstr "Die Option -v zeigt die Ausgaben von rpm an\\n" -#: quilt/setup.in:197 -msgid "File %s not found in search path\\n" -msgstr "Datei %s nicht im Suchpfad gefunden\\n" +#: quilt/setup.in:183 +msgid "File %s not found\\n" +msgstr "Datei %s nicht gefunden\\n" -#: quilt/setup.in:200 +#: quilt/setup.in:186 msgid "Unpacking archive %s\\n" msgstr "Entpacke Archiv %s\\n" @@ -332,11 +332,11 @@ msgstr "Le patch %s n'est pas appliqu avant %s\\n." msgid "File %s is not being modified\\n" msgstr "Le fichier %s n'est pas modifi.\\n" -#: quilt/diff.in:346 quilt/refresh.in:228 +#: quilt/diff.in:345 quilt/refresh.in:228 msgid "Diff failed, aborting\\n" msgstr "Le diff a chou. Abandon.\\n" -#: quilt/diff.in:353 +#: quilt/diff.in:352 msgid "Warning: more recent patches modify files in patch %s\\n" msgstr "Attention: un patch plus recent modifie des fichiers communs %s\\n" @@ -1435,22 +1435,25 @@ msgstr "Le rpertoire %s existe\\n" msgid "File %s exists\\n" msgstr "Le fichier %s existe\\n" -#: quilt/setup.in:93 +#: quilt/setup.in:75 +#, fuzzy msgid "" -"Usage: quilt setup [-d path-prefix] [-v] [--path dir1:dir2] {specfile|" +"Usage: quilt setup [-d path-prefix] [-v] [--sourcedir dir] {specfile|" "seriesfile}\\n" msgstr "" "Usage : quilt setup [-d rpertoire_source] [-v] [--path rp1:rp2] " "{fichier_spec|fichier_sries}\\n" -#: quilt/setup.in:96 +#: quilt/setup.in:78 +#, fuzzy msgid "" "\n" "Initializes a source tree from an rpm spec file or a quilt series file.\n" "\n" -"-d\tOptional path prefix.\n" +"-d\tOptional path prefix for the resulting source tree.\n" "\n" -"--path\tDirectories to search when looking for tarballs. Defaults to \\`.'.\n" +"--sourcedir\n" +"\tDirectory that contains the package sources. Defaults to \\`.'.\n" "\n" "-v\tVerbose debug output.\n" msgstr "" @@ -1465,20 +1468,21 @@ msgstr "" "\n" "-v\tAffichage verbeux pour le debug.\n" -#: quilt/setup.in:158 +#: quilt/setup.in:143 msgid "The %%prep section of %s failed; results may be incomplete\\n" msgstr "" "La section %%prep de %s a chou ; les rsultats sont peut-tre incomplets\\n" -#: quilt/setup.in:161 +#: quilt/setup.in:146 msgid "The -v option will show rpm's output\\n" msgstr "L'option -v montre les affichages de rpm\\\\n" -#: quilt/setup.in:197 -msgid "File %s not found in search path\\n" +#: quilt/setup.in:183 +#, fuzzy +msgid "File %s not found\\n" msgstr "Le fichier %s est introuvable dans le chemin de recherche\\n" -#: quilt/setup.in:200 +#: quilt/setup.in:186 msgid "Unpacking archive %s\\n" msgstr "Dsarchivage de %s\\n" @@ -320,11 +320,11 @@ msgstr "パッチ %s は、パッチ %s の前に適用されていません\\n" msgid "File %s is not being modified\\n" msgstr "ファイル %s は変更されていません\\n" -#: quilt/diff.in:346 quilt/refresh.in:228 +#: quilt/diff.in:345 quilt/refresh.in:228 msgid "Diff failed, aborting\\n" msgstr "差分に失敗しました。異常終了します\\n" -#: quilt/diff.in:353 +#: quilt/diff.in:352 msgid "Warning: more recent patches modify files in patch %s\\n" msgstr "警告: 最近のパッチが、パッチ %s 内のファイルを変更しています\\n" @@ -1394,22 +1394,25 @@ msgstr "ディレクトリ %s は、すでに存在します\\n" msgid "File %s exists\\n" msgstr "ファイル %s は、すでに存在します\\n" -#: quilt/setup.in:93 +#: quilt/setup.in:75 +#, fuzzy msgid "" -"Usage: quilt setup [-d path-prefix] [-v] [--path dir1:dir2] {specfile|" +"Usage: quilt setup [-d path-prefix] [-v] [--sourcedir dir] {specfile|" "seriesfile}\\n" msgstr "" "使い方: quilt setup [-d path-prefix] [-v] [--path ディレクトリ1:ディレクトリ" "2] {specファイル|seriesファイル}\\n" -#: quilt/setup.in:96 +#: quilt/setup.in:78 +#, fuzzy msgid "" "\n" "Initializes a source tree from an rpm spec file or a quilt series file.\n" "\n" -"-d\tOptional path prefix.\n" +"-d\tOptional path prefix for the resulting source tree.\n" "\n" -"--path\tDirectories to search when looking for tarballs. Defaults to \\`.'.\n" +"--sourcedir\n" +"\tDirectory that contains the package sources. Defaults to \\`.'.\n" "\n" "-v\tVerbose debug output.\n" msgstr "" @@ -1423,21 +1426,22 @@ msgstr "" "\n" "-v\t詳細なデバッグ表示\n" -#: quilt/setup.in:158 +#: quilt/setup.in:143 msgid "The %%prep section of %s failed; results may be incomplete\\n" msgstr "" "%%prepセクションの解析に失敗しました。完全に作業が完了していない場合がありま" "す\\n" -#: quilt/setup.in:161 +#: quilt/setup.in:146 msgid "The -v option will show rpm's output\\n" msgstr "-vオプションを使って、rpmの出力を表示できます" -#: quilt/setup.in:197 -msgid "File %s not found in search path\\n" +#: quilt/setup.in:183 +#, fuzzy +msgid "File %s not found\\n" msgstr "ファイル %s は、サーチパス内にありません\\n" -#: quilt/setup.in:200 +#: quilt/setup.in:186 msgid "Unpacking archive %s\\n" msgstr "アーカイブ %s を展開しています\\n" diff --git a/po/quilt.pot b/po/quilt.pot index 618984a..1de726e 100644 --- a/po/quilt.pot +++ b/po/quilt.pot @@ -214,11 +214,11 @@ msgstr "" msgid "File %s is not being modified\\n" msgstr "" -#: quilt/diff.in:346 quilt/refresh.in:228 +#: quilt/diff.in:345 quilt/refresh.in:228 msgid "Diff failed, aborting\\n" msgstr "" -#: quilt/diff.in:353 +#: quilt/diff.in:352 msgid "Warning: more recent patches modify files in patch %s\\n" msgstr "" @@ -983,37 +983,38 @@ msgstr "" msgid "File %s exists\\n" msgstr "" -#: quilt/setup.in:93 +#: quilt/setup.in:75 msgid "" -"Usage: quilt setup [-d path-prefix] [-v] [--path dir1:dir2] {specfile|" +"Usage: quilt setup [-d path-prefix] [-v] [--sourcedir dir] {specfile|" "seriesfile}\\n" msgstr "" -#: quilt/setup.in:96 +#: quilt/setup.in:78 msgid "" "\n" "Initializes a source tree from an rpm spec file or a quilt series file.\n" "\n" -"-d\tOptional path prefix.\n" +"-d\tOptional path prefix for the resulting source tree.\n" "\n" -"--path\tDirectories to search when looking for tarballs. Defaults to \\`.'.\n" +"--sourcedir\n" +"\tDirectory that contains the package sources. Defaults to \\`.'.\n" "\n" "-v\tVerbose debug output.\n" msgstr "" -#: quilt/setup.in:158 +#: quilt/setup.in:143 msgid "The %%prep section of %s failed; results may be incomplete\\n" msgstr "" -#: quilt/setup.in:161 +#: quilt/setup.in:146 msgid "The -v option will show rpm's output\\n" msgstr "" -#: quilt/setup.in:197 -msgid "File %s not found in search path\\n" +#: quilt/setup.in:183 +msgid "File %s not found\\n" msgstr "" -#: quilt/setup.in:200 +#: quilt/setup.in:186 msgid "Unpacking archive %s\\n" msgstr "" diff --git a/quilt.changes b/quilt.changes index 3ecd1c2..c584ba4 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,14 @@ ------------------------------------------------------------------- +Wed Aug 8 12:13:16 CEST 2007 - agruen@suse.de + +- quilt setup: replace the --path argument with --sourcedir for + specifying the location of the package sources. Pass the source + dir to inspect as well. Fix a test suite bug for quilt setup. + Minor cosmetic changes. +- Fix a quilt mail test suite bug: specify a dummy --sender in + test.quiltrc. + +------------------------------------------------------------------- Thu Jul 26 13:53:09 CEST 2007 - agruen@suse.de - quilt diff: don't colorize the output when the --diff=... option diff --git a/quilt/scripts/inspect.in b/quilt/scripts/inspect.in index 172b3b1..35b8880 100644 --- a/quilt/scripts/inspect.in +++ b/quilt/scripts/inspect.in @@ -21,23 +21,41 @@ usage() { exit 1 } -if [ "$1" = -v ] -then - verbose=1 - shift -fi +options=$(getopt -o v --long sourcedir: -n "${0##*/}" -- "$@") || exit + +eval set -- "$options" + +sourcedir= + +while true +do + case "$1" in + -v) + verbose=1 + shift ;; + --sourcedir) + sourcedir=${2%/}/ + shift 2 ;; + --) + shift + break ;; + esac +done + +[ "${sourcedir:0:1}" = / ] || sourcedir=$PWD/$sourcedir specfile=$1 if [ $# -ne 1 -o ! -f "$specfile" ] then usage fi - -if [ "${specfile:0:1}" != / ] +if [ "${specfile:0:1}" = / ] then - specfile="$PWD/$specfile" + specdir=$(dirname "$specfile") + specfile=${specfile##*/} +else + specdir=$PWD fi -sourcedir=${specfile%/*} tmpdir="$(gen_tempfile -d ${TMPDIR-/var/tmp}/${0##*/})" mkdir -p $tmpdir || exit 1 @@ -56,10 +74,10 @@ fi # create md5 sums, also for uncompressed files echo -n "### md5sum: " >&4 shopt -s nullglob -for file in * +for file in $sourcedir/* do - file=${file##*/} - case "$file" in + basename=${file##*/} + case "$basename" in ready|bigpack|MD5SUMS|MD5SUMS.meta|*.spec|*.changes) continue ;; @@ -68,19 +86,19 @@ do echo -n "." >&4 echo "md5sum < $file" >&2 set -- $(md5sum < "$file") - echo "$1 $file" + echo "$1 $basename" case "$(file -b "$file")" in compress*|gzip*) echo -n "g" >&4 echo "gzip -cd $file | md5sum" >&2 set -- $(gzip -cd "$file" | md5sum) - echo "$1 $file" + echo "$1 $basename" ;; bzip2*) echo -n "b" >&4 echo "bzip2 -cd $file | md5sum" >&2 set -- $(bzip2 -cd "$file" | md5sum) - echo "$1 $file" + echo "$1 $basename" ;; esac done > $tmpdir/md5sums @@ -225,10 +243,10 @@ echo -n "### rpmbuild: " >&4 export PATH="$tmpdir/bin:$PATH" rpmbuild --eval "%define _sourcedir $sourcedir" \ - --eval "%define _specdir $sourcedir" \ + --eval "%define _specdir $specdir" \ --eval "%define _builddir $tmpdir/build" \ --nodeps \ - -bp "$specfile" < /dev/null >&2 + -bp "$specdir/$specfile" < /dev/null >&2 status=$? echo >&4 exit $status diff --git a/quilt/setup.in b/quilt/setup.in index 911c757..75e7bf9 100644 --- a/quilt/setup.in +++ b/quilt/setup.in @@ -32,52 +32,34 @@ check_for_existing_files() { "$prefix$dir/$QUILT_PATCHES" >&2 status=1 fi - if [ -e "$prefix$dir/${QUILT_SERIES:-series}" ] + if [ -e "$prefix$dir/$QUILT_SERIES" ] then printf $"File %s exists\n" \ - "$prefix$dir/${QUILT_SERIES:-series}" >&2 + "$prefix$dir/$QUILT_SERIES" >&2 status=1 fi done return $status } -find_tarball() { - if [ "${1:0:1}" = / ] - then - echo "$1" - return - fi - - local IFS=: - for dir in $path - do - [ -z "$dir" ] && continue - if [ -e "$dir/$1" ] - then - echo "$dir/$1" - return - fi - done - return 1 -} - create_symlink() { - local from=$1 to=$2 up - if [ "${from:0:1}" = / ] + local target=$1 link=$2 up + if [ "${target:0:1}" = / -o "${link:0:1}" = / ] then - ln -s "$from" "$to" + ln -s "$target" "$link" return fi - set -- "$(echo "$PWD/$from" | sed -r -e 's://:/:g' \ - -e ':again' \ - -e 's:/[^/]+/\.\.(/|$):\1:g' \ - -e 'tagain')" \ - "$(echo "$PWD/$to" | sed -r -e 's://:/:g' \ - -e ':again' \ - -e 's:/[^/]+/\.\.(/|$):\1:g' \ - -e 'tagain')" + set -- "$(echo "$PWD/$target" | \ + sed -r -e 's://:/:g' \ + -e ':again' \ + -e 's:/[^/]+/\.\.(/|$):\1:g' \ + -e 'tagain')" \ + "$(echo "$PWD/$link" | \ + sed -r -e 's://:/:g' \ + -e ':again' \ + -e 's:/[^/]+/\.\.(/|$):\1:g' \ + -e 'tagain')" while [ "${1%%/*}" = "${2%%/*}" ] do set -- "${1#*/}" "${2#*/}" @@ -85,20 +67,21 @@ create_symlink() { up=$(echo "${2%/*}" | sed -re 's:[^/]+:..:g') set -- "${up:+$up/}$1" set -- "${1%/}" - ln -s "${1:-.}" "$to" + ln -s "${1:-.}" "$link" } usage() { - printf $"Usage: quilt setup [-d path-prefix] [-v] [--path dir1:dir2] {specfile|seriesfile}\n" + printf $"Usage: quilt setup [-d path-prefix] [-v] [--sourcedir dir] {specfile|seriesfile}\n" if [ x$1 = x-h ] then printf $" Initializes a source tree from an rpm spec file or a quilt series file. --d Optional path prefix. +-d Optional path prefix for the resulting source tree. ---path Directories to search when looking for tarballs. Defaults to \`.'. +--sourcedir + Directory that contains the package sources. Defaults to \`.'. -v Verbose debug output. " @@ -108,7 +91,7 @@ Initializes a source tree from an rpm spec file or a quilt series file. fi } -options=`getopt -o d:vh --long path: -- "$@"` +options=`getopt -o d:vh --long sourcedir: -- "$@"` if [ $? -ne 0 ] then @@ -118,6 +101,7 @@ fi eval set -- "$options" prefix= +sourcedir= while true do @@ -130,8 +114,8 @@ do -v) verbose=-v shift ;; - --path) - path="$path:$2" + --sourcedir) + sourcedir=${2%/}/ shift 2 ;; --) shift @@ -144,7 +128,7 @@ then usage fi -[ -z "$path" ] && path=. +[ -n "$sourcedir" ] && opt_sourcedir="--sourcedir $sourcedir" tmpfile=$(gen_tempfile) trap "rm -f $tmpfile" EXIT @@ -153,7 +137,8 @@ case "$1" in *.spec) spec_file=$1 - if ! $QUILT_DIR/scripts/inspect $verbose "$spec_file" 2>&1 > $tmpfile + if ! $QUILT_DIR/scripts/inspect $verbose $opt_sourcedir \ + "$spec_file" 2>&1 > $tmpfile then printf $"The %%prep section of %s failed; results may be incomplete\n" "$spec_file" if [ -z "$verbose" ] @@ -192,9 +177,10 @@ while read tag dir arg1 arg2 do case "$tag" in tar) - if ! tarball=$(find_tarball "$arg1") + tarball=$sourcedir$arg1 + if [ ! -e $tarball ] then - printf $"File %s not found in search path\n" "$arg1" >&2 + printf $"File %s not found\n" "$tarball" >&2 exit 1 fi printf $"Unpacking archive %s\n" "$tarball" @@ -215,14 +201,14 @@ do ;; patch) [ -e "$prefix$dir/$QUILT_PATCHES" ] \ - || create_symlink "" "$prefix$dir/$QUILT_PATCHES" + || create_symlink "$sourcedir" "$prefix$dir/$QUILT_PATCHES" if [ -n "$series_file" ] then - [ -e "$prefix$dir/${QUILT_SERIES:-series}" ] \ + [ -e "$prefix$dir/$QUILT_SERIES" ] \ || create_symlink "$series_file" \ - "$prefix$dir/${QUILT_SERIES:-series}" + "$prefix$dir/$QUILT_SERIES" else - if ! [ -e "$prefix$dir/${QUILT_SERIES:-series}" ] + if ! [ -e "$prefix$dir/$QUILT_SERIES" ] then ( echo "# Patch series file for quilt," \ "created by ${0##*/}" @@ -232,9 +218,9 @@ do && echo "# Source: $tar_file" echo "# Patchdir: $dir" echo "#" - ) > "$prefix$dir/${QUILT_SERIES:-series}" + ) > "$prefix$dir/$QUILT_SERIES" fi - echo "$arg1" $arg2 >> "$prefix$dir/series" + echo "$arg1" $arg2 >> "$prefix$dir/$QUILT_SERIES" fi ;; esac diff --git a/test/setup.test b/test/setup.test index eed1de2..e1744c7 100644 --- a/test/setup.test +++ b/test/setup.test @@ -13,7 +13,7 @@ $ cat > series < # < foo.diff -p1 $ quilt setup series -> Unpacking archive ./dir.tar.gz +> Unpacking archive dir.tar.gz $ cd dir $ ls -l patches series | sed -e 's:.* -> ::' > .. @@ -24,7 +24,7 @@ $ quilt push -qa $ cd .. $ rm -rf dir $ quilt setup -d other series -> Unpacking archive ./dir.tar.gz +> Unpacking archive dir.tar.gz $ cd other/dir $ ls -l patches series | sed -e 's:.* -> ::' > ../.. @@ -35,15 +35,15 @@ $ quilt push -qa $ cd ../.. $ rm -rf other $ mkdir dir1 -$ mv foo.diff series dir1 +$ mv series dir1 $ cd dir1 $ quilt setup -d ../other series -> File dir.tar.gz not found in search path -$ quilt setup --path .. -d ../other series +> File dir.tar.gz not found +$ quilt setup --sourcedir .. -d ../other series > Unpacking archive ../dir.tar.gz $ cd ../other/dir $ ls -l patches series | sed -e 's:.* -> ::' -> ../../dir1 +> ../.. > ../../dir1/series $ quilt push -qa > Applying patch patches/foo.diff diff --git a/test/test.quiltrc b/test/test.quiltrc index 4bb4f7b..62e8489 100644 --- a/test/test.quiltrc +++ b/test/test.quiltrc @@ -1,6 +1,6 @@ # Define this to generate diffs without timestamps. QUILT_DIFF_ARGS="--no-timestamps" QUILT_REFRESH_ARGS="--no-timestamps" -QUILT_MAIL_ARGS="--charset=UTF-8" +QUILT_MAIL_ARGS="--charset=UTF-8 --sender a@b.c" QUILT_PATCHES_PREFIX=yes |