diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2005-05-22 16:19:47 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2005-05-22 16:19:47 +0000 |
commit | 7118177ee7f653e0639096cb4a81bc4cd00f82df (patch) | |
tree | 68e7ff1d6fa7db6e2bfca220661fb0bc17804e64 | |
parent | 918b0cb2cd701df85706d776cbc15b1375ba5f95 (diff) | |
download | quilt-7118177ee7f653e0639096cb4a81bc4cd00f82df.tar.gz |
- setup command: When a patch cannot be identified, scan all the
files in the build directory: the patch may have been created,
unpacked from an archive, etc.
-rw-r--r-- | quilt.changes | 7 | ||||
-rw-r--r-- | scripts/inspect.in | 33 |
2 files changed, 34 insertions, 6 deletions
diff --git a/quilt.changes b/quilt.changes index 78fe8ea..8725846 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Sun May 22 18:15:52 CEST 2005 - agruen@suse.de + +- setup command: When a patch cannot be identified, scan all the + files in the build directory: the patch may have been created, + unpacked from an archive, etc. + +------------------------------------------------------------------- Sun May 22 18:14:35 CEST 2005 - agruen@suse.de - refresh command: Fix temporary file leak (from Jean Delvare). diff --git a/scripts/inspect.in b/scripts/inspect.in index f3fb648..14c4d81 100644 --- a/scripts/inspect.in +++ b/scripts/inspect.in @@ -81,7 +81,7 @@ do echo "$1 $file" ;; esac -done > $tmpdir/md5sum +done > $tmpdir/md5sums echo >&4 shopt -u nullglob @@ -113,17 +113,38 @@ cat <<-'EOF' > $tmpdir/bin/wrapper # find original data file by md5sum original_file() { - local file=$1 + local file=$1 md5sum set -- $(md5sum < $file) - while read md5sum file + md5sum=$1 + while read md5sum_ file_ do - if [ $1 = $md5sum ] + if [ $md5sum = $md5sum_ ] then - echo $file + echo $file_ return 0 fi - done < $tmpdir/md5sum + done < $tmpdir/md5sums + + # Try harder + if ! [ -e $tmpdir/more-md5sums ] + then + ( cd $RPM_BUILD_DIR + find -type f \ + | sed -e 's:^.\/::' \ + | xargs md5sum \ + ) > $tmpdir/more-md5sums + fi + + while read md5sum_ file_ + do + if [ $md5sum = $md5sum_ ] + then + echo $file_ + return 0 + fi + done < $tmpdir/more-md5sums + return 1 } |