public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] dpkg-base: Do not fail clean if there are no packages
@ 2019-07-05 18:04 Jan Kiszka
  2019-07-08 12:40 ` Henning Schild
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2019-07-05 18:04 UTC (permalink / raw)
  To: isar-users

From: Jan Kiszka <jan.kiszka@siemens.com>

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/classes/dpkg-base.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 3e6ba8c..2e439d6 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -101,7 +101,7 @@ do_build() {
 CLEANFUNCS += "repo_clean"
 
 repo_clean() {
-    DEBS=$( ls ${S}/../*.deb )
+    DEBS=$( ls ${S}/../*.deb || true )
     if [ -n "${DEBS}" ]; then
         for d in ${DEBS}; do
             p=$( dpkg-deb --show --showformat '${Package}' ${d} )
-- 
2.16.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dpkg-base: Do not fail clean if there are no packages
  2019-07-05 18:04 [PATCH] dpkg-base: Do not fail clean if there are no packages Jan Kiszka
@ 2019-07-08 12:40 ` Henning Schild
  2019-07-09 12:04   ` [PATCH v2] " Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: Henning Schild @ 2019-07-08 12:40 UTC (permalink / raw)
  To: [ext] Jan Kiszka; +Cc: isar-users

Am Fri, 5 Jul 2019 20:04:39 +0200
schrieb "[ext] Jan Kiszka" <jan.kiszka@siemens.com>:

> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  meta/classes/dpkg-base.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/dpkg-base.bbclass
> b/meta/classes/dpkg-base.bbclass index 3e6ba8c..2e439d6 100644
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -101,7 +101,7 @@ do_build() {
>  CLEANFUNCS += "repo_clean"
>  
>  repo_clean() {
> -    DEBS=$( ls ${S}/../*.deb )
> +    DEBS=$( ls ${S}/../*.deb || true )

That is not a good idea because is ignores too many errors. I would
suggest using find instead.

Henning

>      if [ -n "${DEBS}" ]; then
>          for d in ${DEBS}; do
>              p=$( dpkg-deb --show --showformat '${Package}' ${d} )


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] dpkg-base: Do not fail clean if there are no packages
  2019-07-08 12:40 ` Henning Schild
@ 2019-07-09 12:04   ` Jan Kiszka
  2019-07-23  8:45     ` Baurzhan Ismagulov
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2019-07-09 12:04 UTC (permalink / raw)
  To: Henning Schild, isar-users

From: Jan Kiszka <jan.kiszka@siemens.com>

Use find instead of ls so that non-existing deb packages do not make
this fail, just leaving DEBS empty.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Changes in v2:
 - use find instead of ls || true

 meta/classes/dpkg-base.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 3e6ba8c..826b5d8 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -101,7 +101,7 @@ do_build() {
 CLEANFUNCS += "repo_clean"
 
 repo_clean() {
-    DEBS=$( ls ${S}/../*.deb )
+    DEBS=$( find ${S}/.. -maxdepth 1 -name "*.deb" )
     if [ -n "${DEBS}" ]; then
         for d in ${DEBS}; do
             p=$( dpkg-deb --show --showformat '${Package}' ${d} )
-- 
2.16.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] dpkg-base: Do not fail clean if there are no packages
  2019-07-09 12:04   ` [PATCH v2] " Jan Kiszka
@ 2019-07-23  8:45     ` Baurzhan Ismagulov
  0 siblings, 0 replies; 4+ messages in thread
From: Baurzhan Ismagulov @ 2019-07-23  8:45 UTC (permalink / raw)
  To: isar-users

On Tue, Jul 09, 2019 at 02:04:53PM +0200, Jan Kiszka wrote:
> Use find instead of ls so that non-existing deb packages do not make
> this fail, just leaving DEBS empty.

Thanks, applied to next.

With kind regards,
Baurzhan.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-23  8:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-05 18:04 [PATCH] dpkg-base: Do not fail clean if there are no packages Jan Kiszka
2019-07-08 12:40 ` Henning Schild
2019-07-09 12:04   ` [PATCH v2] " Jan Kiszka
2019-07-23  8:45     ` Baurzhan Ismagulov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox