[1/2] Revert "base-files: Define JAVA_HOME by default"

Submitted by Fang Jia on Feb. 21, 2019, 3:23 a.m. | Patch ID: 158939

Details

Message ID 1550719388-9980-1-git-send-email-fang.jia@windriver.com
State Master Next
Delegated to: Richard Leitner
Headers show

Commit Message

Fang Jia Feb. 21, 2019, 3:23 a.m.
This reverts commit ada652564f09756a81f54495cbc2091125239625.

When enable multilib on a 64-bit system, probably both base-file and
lib32-base-files are installed.
Then both packages want to modify the file "profile", there will be
an error like:
"
Error: Transaction check error:
file /etc/profile conflicts between attempted installs of
lib32-base-files-3.0.14-r148.gpb_virt and
base-files-3.0.14-r148.gpb_virt
"

The task can be added by adding a file to ${sysconfdir}/profile.d/.

Signed-off-by: Fang Jia <fang.jia@windriver.com>
---
 recipes-core/base-files/base-files_3.0.14.bbappend | 13 -------------
 1 file changed, 13 deletions(-)
 delete mode 100644 recipes-core/base-files/base-files_3.0.14.bbappend

Patch hide | download patch | download mbox

diff --git a/recipes-core/base-files/base-files_3.0.14.bbappend b/recipes-core/base-files/base-files_3.0.14.bbappend
deleted file mode 100644
index 4651185..0000000
--- a/recipes-core/base-files/base-files_3.0.14.bbappend
+++ /dev/null
@@ -1,13 +0,0 @@ 
-do_install_append() {
-	cat >> ${D}${sysconfdir}/profile << EOT
-JAVA_HOME=""
-for dir in ${libdir}/jvm/*; do
-	if [ -x "\${dir}/bin/java" ]; then
-		[ -z "\${JAVA_HOME}" ] && JAVA_HOME="\${dir}"
-	fi
-done
-if [ -n "\${JAVA_HOME}" ]; then
-	export JAVA_HOME=\${JAVA_HOME}
-fi
-EOT
-}

Comments

Richard Leitner Feb. 22, 2019, 8:52 a.m.
Hi,
thanks for the patch. Looks good to me now.
I'll add it to my tests and will give feedback.

Nonetheless things to improve for your next contribution:
  a) Please add [meta-java] to the subject
  b) Please version the patchset when it updates an existing one
     on the mailinglist

Therefore the correct subject prefix for this patchset would have been:
  [oe][meta-java][PATCH V2 1/2]

No problem for this one as I found it, but please keep an eye on that 
for the next time. Thanks.

regards;Richard.L

On 21/02/2019 04:23, Fang Jia wrote:
> This reverts commit ada652564f09756a81f54495cbc2091125239625.
> 
> When enable multilib on a 64-bit system, probably both base-file and
> lib32-base-files are installed.
> Then both packages want to modify the file "profile", there will be
> an error like:
> "
> Error: Transaction check error:
> file /etc/profile conflicts between attempted installs of
> lib32-base-files-3.0.14-r148.gpb_virt and
> base-files-3.0.14-r148.gpb_virt
> "
> 
> The task can be added by adding a file to ${sysconfdir}/profile.d/.
> 
> Signed-off-by: Fang Jia <fang.jia@windriver.com>
> ---
>   recipes-core/base-files/base-files_3.0.14.bbappend | 13 -------------
>   1 file changed, 13 deletions(-)
>   delete mode 100644 recipes-core/base-files/base-files_3.0.14.bbappend
> 
> diff --git a/recipes-core/base-files/base-files_3.0.14.bbappend b/recipes-core/base-files/base-files_3.0.14.bbappend
> deleted file mode 100644
> index 4651185..0000000
> --- a/recipes-core/base-files/base-files_3.0.14.bbappend
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -do_install_append() {
> -	cat >> ${D}${sysconfdir}/profile << EOT
> -JAVA_HOME=""
> -for dir in ${libdir}/jvm/*; do
> -	if [ -x "\${dir}/bin/java" ]; then
> -		[ -z "\${JAVA_HOME}" ] && JAVA_HOME="\${dir}"
> -	fi
> -done
> -if [ -n "\${JAVA_HOME}" ]; then
> -	export JAVA_HOME=\${JAVA_HOME}
> -fi
> -EOT
> -}
>
Fang Jia Feb. 25, 2019, 2:05 a.m.
Hi,
Thank you so much.
Next time will do as your instruction definitely. Thanks again.

Regards,
Fang

On 22/02/2019 16:52, Richard Leitner wrote:
> Hi,
> thanks for the patch. Looks good to me now.
> I'll add it to my tests and will give feedback.
> 
> Nonetheless things to improve for your next contribution:
>  a) Please add [meta-java] to the subject
>  b) Please version the patchset when it updates an existing one
>     on the mailinglist
> 
> Therefore the correct subject prefix for this patchset would have been:
>  [oe][meta-java][PATCH V2 1/2]
> 
> No problem for this one as I found it, but please keep an eye on that for the
> next time. Thanks.
> 
> regards;Richard.L
Fang Jia May 30, 2019, 8:33 a.m.
Hi Richard

How about the test for the two patches ? Is it fine to push to master branch ?

Thanks,
Fang

On 22/02/2019 16:52, Richard Leitner wrote:
> Hi,
> thanks for the patch. Looks good to me now.
> I'll add it to my tests and will give feedback.
> 
> Nonetheless things to improve for your next contribution:
>  a) Please add [meta-java] to the subject
>  b) Please version the patchset when it updates an existing one
>     on the mailinglist
> 
> Therefore the correct subject prefix for this patchset would have been:
>  [oe][meta-java][PATCH V2 1/2]
> 
> No problem for this one as I found it, but please keep an eye on that for the
> next time. Thanks.
> 
> regards;Richard.L
> 
> On 21/02/2019 04:23, Fang Jia wrote:
>> This reverts commit ada652564f09756a81f54495cbc2091125239625.
>>
>> When enable multilib on a 64-bit system, probably both base-file and
>> lib32-base-files are installed.
>> Then both packages want to modify the file "profile", there will be
>> an error like:
>> "
>> Error: Transaction check error:
>> file /etc/profile conflicts between attempted installs of
>> lib32-base-files-3.0.14-r148.gpb_virt and
>> base-files-3.0.14-r148.gpb_virt
>> "
>>
>> The task can be added by adding a file to ${sysconfdir}/profile.d/.
>>
>> Signed-off-by: Fang Jia <fang.jia@windriver.com>
>> ---
>>   recipes-core/base-files/base-files_3.0.14.bbappend | 13 -------------
>>   1 file changed, 13 deletions(-)
>>   delete mode 100644 recipes-core/base-files/base-files_3.0.14.bbappend
>>
>> diff --git a/recipes-core/base-files/base-files_3.0.14.bbappend
>> b/recipes-core/base-files/base-files_3.0.14.bbappend
>> deleted file mode 100644
>> index 4651185..0000000
>> --- a/recipes-core/base-files/base-files_3.0.14.bbappend
>> +++ /dev/null
>> @@ -1,13 +0,0 @@
>> -do_install_append() {
>> -    cat >> ${D}${sysconfdir}/profile << EOT
>> -JAVA_HOME=""
>> -for dir in ${libdir}/jvm/*; do
>> -    if [ -x "\${dir}/bin/java" ]; then
>> -        [ -z "\${JAVA_HOME}" ] && JAVA_HOME="\${dir}"
>> -    fi
>> -done
>> -if [ -n "\${JAVA_HOME}" ]; then
>> -    export JAVA_HOME=\${JAVA_HOME}
>> -fi
>> -EOT
>> -}
>>
>
Richard Leitner July 19, 2019, 8:04 a.m.
Hi,
this is a note to let you know that I've just added this patch to the
master-next branch of the meta-java repository at
     git://git.yoctoproject.org/meta-java

As soon as it has gone through some more testing it will likely be
merged to the master branch.

If you have any questions, please let me know.

regards;Richard.L

On 21/02/2019 04:23, Fang Jia wrote:
> This reverts commit ada652564f09756a81f54495cbc2091125239625.
> 
> When enable multilib on a 64-bit system, probably both base-file and
> lib32-base-files are installed.
> Then both packages want to modify the file "profile", there will be
> an error like:
> "
> Error: Transaction check error:
> file /etc/profile conflicts between attempted installs of
> lib32-base-files-3.0.14-r148.gpb_virt and
> base-files-3.0.14-r148.gpb_virt
> "
> 
> The task can be added by adding a file to ${sysconfdir}/profile.d/.
> 
> Signed-off-by: Fang Jia <fang.jia@windriver.com>
> ---
>   recipes-core/base-files/base-files_3.0.14.bbappend | 13 -------------
>   1 file changed, 13 deletions(-)
>   delete mode 100644 recipes-core/base-files/base-files_3.0.14.bbappend
> 
> diff --git a/recipes-core/base-files/base-files_3.0.14.bbappend b/recipes-core/base-files/base-files_3.0.14.bbappend
> deleted file mode 100644
> index 4651185..0000000
> --- a/recipes-core/base-files/base-files_3.0.14.bbappend
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -do_install_append() {
> -	cat >> ${D}${sysconfdir}/profile << EOT
> -JAVA_HOME=""
> -for dir in ${libdir}/jvm/*; do
> -	if [ -x "\${dir}/bin/java" ]; then
> -		[ -z "\${JAVA_HOME}" ] && JAVA_HOME="\${dir}"
> -	fi
> -done
> -if [ -n "\${JAVA_HOME}" ]; then
> -	export JAVA_HOME=\${JAVA_HOME}
> -fi
> -EOT
> -}
>