SHA256
1
0
forked from pool/quilt
quilt/hackweek-11-13-setup-let-normalize_path-deal-with-dot.patch
Jean Delvare 6732de62cf - Update upstream references.
- quilt-el-fix-tramp-support.patch: quilt-el: Fix tramp support.
- quilt-el-fix-patch-select-completion.patch: quilt-el: Fix patch
  select completion.
- hackweek-11-13-setup-let-normalize_path-deal-with-dot.patch:
  setup: Let normalize_path deal with ".".
- hackweek-11-14-setup-fix-link-creation.patch: setup: Fix link
  creation.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/quilt?expand=0&rev=94
2015-01-28 10:58:31 +00:00

28 lines
873 B
Diff

From: Jean Delvare <jdelvare@suse.de>
Date: Tue, 20 Jan 2015 20:54:54 +0100
Subject: setup: Let normalize_path deal with "."
Upstream: Committed (3fd706a50b7dbb4f8db6e5db014729db51e6beb0)
Let function normalize_path handle "." path components. Otherwise
invocations like "quilt setup --sourcedir=. foo.spec" may produce
invalid series files, and "quilt setup -d ./dir foo.spec"
generates a broken "patches" link.
diff --git a/quilt/setup.in b/quilt/setup.in
index df76368..7f69f35 100644
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -71,10 +71,11 @@ check_for_existing_files()
return $status
}
-# Resolve ".." in path and clean up double slashes
+# Resolve ".." in path and clean up double slashes and "."
normalize_path()
{
echo "$1" | sed -r -e 's://:/:g' \
+ -e 's:/./:/:g' \
-e ':again' \
-e 's:/[^/]+/\.\.(/|$):\1:g' \
-e 'tagain'