Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 205718 - INSTALL_MASK - quote arguments in misc_functions.sh
Summary: INSTALL_MASK - quote arguments in misc_functions.sh
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 200044
  Show dependency tree
 
Reported: 2008-01-13 23:17 UTC by Ed Catmur
Modified: 2008-02-01 05:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
quote-install-mask.patch (quote-install-mask.patch,713 bytes, patch)
2008-01-13 23:19 UTC, Ed Catmur
Details | Diff
quote-install-mask.patch (quote-install-mask.patch,1.02 KB, patch)
2008-01-14 00:49 UTC, Ed Catmur
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Catmur 2008-01-13 23:17:41 UTC
In two locations install_mask is called without quoting its arguments:

install_mask "${D}" ${INSTALL_MASK}

install_mask "${PORTAGE_BUILDDIR}/image" ${PKG_INSTALL_MASK}

The problem is that this will expand globs; since install_mask already expands its arguments it is redundant.
Comment 1 Ed Catmur 2008-01-13 23:19:47 UTC
Created attachment 140903 [details, diff]
quote-install-mask.patch
Comment 2 Ed Catmur 2008-01-13 23:21:36 UTC
Patch is against 2.1.4.
Comment 3 Ed Catmur 2008-01-14 00:49:33 UTC
Created attachment 140909 [details, diff]
quote-install-mask.patch

Do the globs right.
Comment 4 Zac Medico gentoo-dev 2008-01-31 04:36:00 UTC
(In reply to comment #3)
 		# we also need to handle globs (*.a, *.h, etc)
-		find "${root}" -path ${no_inst} -exec rm -fR {} \; >/dev/null
+		find "${root}" -name "${no_inst}" -exec rm -f {} \; >/dev/null

Was it intentional to change the find and rm arguments? I was only expecting a change in quoting.
Comment 5 Ed Catmur 2008-02-01 01:13:50 UTC
(In reply to comment #4)
>                 # we also need to handle globs (*.a, *.h, etc)
> -               find "${root}" -path ${no_inst} -exec rm -fR {} \; >/dev/null
> +               find "${root}" -name "${no_inst}" -exec rm -f {} \; >/dev/null
> 
> Was it intentional to change the find and rm arguments? I was only expecting a
> change in quoting.

Ah - I forgot that the -path predicate allows wildcards to match '/'.
Comment 6 Zac Medico gentoo-dev 2008-02-01 05:35:41 UTC
Thanks, this has been released in 2.1.4.1.