Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 656831 Details for
Bug 823669
jpackage-utils: abs2rel.sh passes arguments to lua script incorrectly
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Reimplement abs2rel.sh using perl File::Spec module
0001-Reimplement-abs2rel.sh-using-perl-File-Spec-module.patch (text/plain), 3.42 KB, created by
Mikolaj Izdebski
on 2012-12-03 16:53:25 UTC
(
hide
)
Description:
Reimplement abs2rel.sh using perl File::Spec module
Filename:
MIME Type:
Creator:
Mikolaj Izdebski
Created:
2012-12-03 16:53:25 UTC
Size:
3.42 KB
patch
obsolete
>From 453006e3be90cec6cee4c601b364c8b3c3e35b5f Mon Sep 17 00:00:00 2001 >From: Mikolaj Izdebski <mizdebsk@redhat.com> >Date: Mon, 3 Dec 2012 17:46:08 +0100 >Subject: [PATCH] Reimplement abs2rel.sh using perl File::Spec module > >--- > abs2rel.lua | 66 ----------------------------------------------------- > abs2rel.sh | 7 +++++- > jpackage-utils.spec | 9 +++++++- > 3 files changed, 14 insertions(+), 68 deletions(-) > delete mode 100644 abs2rel.lua > >diff --git a/abs2rel.lua b/abs2rel.lua >deleted file mode 100644 >index e84d2ed..0000000 >--- a/abs2rel.lua >+++ /dev/null >@@ -1,66 +0,0 @@ >---[[ >-abs2rel for Lua >- >-split and split_path taken from "Split a string with a pattern, Take Two" >- http://lua-users.org/wiki/SplitJoin >---]] >- >-function split(str, pat) >- local t = {} -- NOTE: use {n = 0} in Lua-5.0 >- local fpat = "(.-)" .. pat >- local last_end = 1 >- local s, e, cap = str:find(fpat, 1) >- while s do >- if s ~= 1 or cap ~= "" then >- table.insert(t,cap) >- end >- last_end = e+1 >- s, e, cap = str:find(fpat, last_end) >- end >- if last_end <= #str then >- cap = str:sub(last_end) >- table.insert(t, cap) >- end >- return t >-end >- >-function split_path(str) >- return split(str,'[\\/]+') >-end >- >--- parts = split_path("/usr/local/bin") >---> {'usr','local','bin'} >- >-function join(words, sep) >- local s = "" >- for i,v in ipairs(words) do >- s = s .. sep .. v >- end >- return string.sub (s, string.len(sep)+1) >-end >- >-function abs2rel (path, base) >- if path == base then return "." end >- local pathdirs = split_path (path) >- local basedirs = split_path (base) >- local i = 1 >- local rem_i = math.min(#pathdirs, #basedirs) >- >- -- remove common parts of both paths >- while (rem_i > 0) and (pathdirs[i] == basedirs[i]) do >- rem_i = rem_i - 1 >- table.remove(pathdirs, 1) >- table.remove(basedirs, 1) >- end >- >- -- now for each remaining basedirs, replace them with .. >- if #basedirs > 0 then >- for i, v in ipairs(basedirs) do >- basedirs[i] = ".." >- end >- end >- for i, v in ipairs(pathdirs) do >- basedirs[#basedirs+1] = v >- end >- return join(basedirs, "/") >-end >diff --git a/abs2rel.sh b/abs2rel.sh >index 7a96392..8ce85e8 100755 >--- a/abs2rel.sh >+++ b/abs2rel.sh >@@ -1,3 +1,8 @@ > #!/bin/sh >-(cd `dirname $0` && lua -l abs2rel -e "print(abs2rel(\"$1\", \"$2\"))") > >+if [ $# -ne 2 ]; then >+ echo Usage: "$0 <PATH> <BASE>" >&2 >+ exit 1 >+fi >+ >+exec perl -M5.01 -MFile::Spec -e "say abs2rel File::Spec @ARGV" "$1" "$2" >diff --git a/jpackage-utils.spec b/jpackage-utils.spec >index 979ac40..c0949f3 100644 >--- a/jpackage-utils.spec >+++ b/jpackage-utils.spec >@@ -36,7 +36,7 @@ > > Name: jpackage-utils > Version: 1.7.5 >-Release: 20%{?dist} >+Release: 21%{?dist} > Epoch: 0 > Summary: JPackage utilities > License: BSD >@@ -54,6 +54,8 @@ Group: Utilities > > Requires: coreutils > Requires: javapackages-tools >+Requires: perl >+Requires: perl(File::Spec) > > # for noarch->arch change > Obsoletes: %{name} < 0:1.7.5-9 >@@ -214,6 +216,11 @@ EOF > > > %changelog >+* Mon Dec 3 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7.5-21 >+- Reimplement abs2rel.sh using perl File::Spec module >+- Resolves: rhbz#823669 >+- Resolves: rhbz#882578 >+ > * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7.5-20 > - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild > >-- >1.8.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 823669
:
585883
| 656831