[patch] hook_functions: copy_exec should make directories in DESTDIR

Bug #24855 reported by Karl Hegbloom
8
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

In the process of creating:

  http://wiki.suspend2.net/DistroAndHardwareSetup/Ubuntu_Breezy_Badger

I learned that 'copy_exec' does not make directories in the DESTDIR. I think it
should. See the attached patch.

Revision history for this message
Karl Hegbloom (karl.hegbloom) wrote :

Created an attachment (id=4841)
Cause 'copy_exec' to create directories under DESTDIR

I'm having second thoughts... First I had it making ${DESTDIR}/$(dirname $1),
but now changed it to $(dirname $2). That won't work right if the $2 is not a
full path, right? It will strip the last element and thus will not always
create the right destination:

 copy_exec /usr/local/sbin/whatever usr/local/sbin

... won't do the right thing. Maybe we should not apply this after all.

Adam Conrad (adconrad)
Changed in initramfs-tools:
assignee: adconrad → nobody
Revision history for this message
Colin Watson (cjwatson) wrote :

I don't think it would be right to apply this for the reason you describe. However, in the intervening time copy_exec has gained the ability to leave out the second parameter, in which case it will create directories as needed, since then it is able to unambiguously determine the target directory. Your example would thus become just 'copy_exec /usr/local/sbin/whatever'.

Changed in initramfs-tools:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.