[OE-core] [PATCH v2] package_rpm.bbclass: support packaging of symlinks to directories

Patrick Ohly patrick.ohly at intel.com
Wed Feb 25 15:18:02 UTC 2015


On Wed, 2015-02-25 at 06:51 -0800, Patrick Ohly wrote:
> diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
> index 4f9f813..e305e8b 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -199,10 +199,13 @@ python write_specfile () {
>  
>              # Treat all symlinks to directories as normal files.
>              # os.walk() lists them as directories.
> -            for i, entry in enumerate(dirs):
> -                if os.path.islink(os.path.join(rootpath, entry)):
> -                    del dirs[i]
> -                    files.append(entry)
> +            def move_to_files(dir):
> +                if os.path.islink(os.path.join(rootpath, dir)):
> +                    files.append(dir)
> +                    return True
> +                else:
> +                    return False
> +            dirs[:] = [dir for dir in dirs if not move_to_files(dir)]
>  
>              # Directory handling can happen in two ways, either DIRFILES is not set at all
>              # in which case we fall back to the older behaviour of packages owning all their

Please ignore. I meant to squash the original patch and the list fix,
but was interrupted and ended up committing the fix separately with the
updated commit message. v3 is the patch that could be merged into
master.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.






More information about the Openembedded-core mailing list