From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 24 Oct 2024 12:10:13 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lf1-f64.google.com (mail-lf1-f64.google.com [209.85.167.64]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 49OAA4v9017690 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 24 Oct 2024 12:10:04 +0200 Received: by mail-lf1-f64.google.com with SMTP id 2adb3069b0e04-539e3cd6b66sf1007749e87.1 for ; Thu, 24 Oct 2024 03:10:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1729764598; cv=pass; d=google.com; s=arc-20240605; b=Hf9L2L4LFEMQHy0aXbJNS8F9KXrs6/GZ9OG3eeOGWpSiLyLoBOvcGzvuQkyRHsa8jn WXj2Z56W13Re8XaTvTPj87whytGWHBZpGHz3cHK6obfv09OIrZE09cBSb/+1VEm8RRVW e1EsT7DW5R13x4Mdlu3CAqIn59m0j37a7L3V3p33PRfPcb8Qn1AlUFZy1+5lURJxDg10 8SsfbmjgLHjdDQ6kcmYj/pFlfhCYRqK/LGiRxnT8cq/IMyTJdQojvdAbtxhh+u5A1xdJ fSo+Ll9/8K2oZuCIPEYB/Ic6ZV9XCdCJFWd+zSjn9SFU8Hlf8AO43iJe864B7nl52uDA PFWg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=tV+Pp6SyA2642s8MukJxg5jzAZoUSupM8Nw0mV04fIY=; fh=KE0tEPWzwb/chONecjqzTQEKwZxRbN7QIi0VKgmd718=; b=S+z7NJmHnBuUzoHF2CGogdm39f+4NlwurzHcql3t5LdxPTITbuYRrPXM5JLSQsazhE DBg1G/xo9ygwhu5+MAKyJyFk8fLsA5Qx2Gme7n8WFmnqheYZXdt01paL9LAo5nurDFeG 2o+06jjMRmnMscEopJQjFw+nZRdPdMb5ZsSZqep1XKSgtxBqyYOOrcjhdvLaBizxmWQG V1rg5NgWSClIkxtsdRLcfbTpCVQuhVteCApl6+hk5GIkDuI+wPnB/rbusxkVBJXw7KI2 M1dND5y5I3WB80BZoICKR+a2gk/NqPQY91dl9NCIEhDWI7GFRfXR/v167ZnYKxIII5MP WPcg==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1729764598; x=1730369398; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :sender:from:to:cc:subject:date:message-id:reply-to; bh=tV+Pp6SyA2642s8MukJxg5jzAZoUSupM8Nw0mV04fIY=; b=fZamqN0VuYb6zPeDzFEBZY03JQRavnkhHYhJhu4JoHocQ6ySGEq/vyA51O64W5yeUn wYFP23AGu7EXNbf7YXFX9QvZNwjQhPygBFxbSihUWS2Z7tvXJHp9ye9ikAylWN/YYwij ecl8tJ4mdLjnIqXKQrjdR+Kw/mnRiDkiTTmYLHAQt5QVyHuMp2CX2KtgYE17qID6s9s4 Vj1ETNzF4qMp6IssuixZohT5prb5CNcPytn0nowOY+4gO+Jjpkj22rb9GgDSWD8BjNRK QLmwESfrc9EZKAlD3Wsw0+CjTxW2hzMl8ZDg8WPMwV/qkpiOfDXrmqxt7aL+4l3cRfs3 Oo7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729764598; x=1730369398; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=tV+Pp6SyA2642s8MukJxg5jzAZoUSupM8Nw0mV04fIY=; b=J4jTX+iJiHP18iSAe0WNj74XoQI0/cmzBrXZgwWTj57erjJddXaiX9iV8jYS8AvaZZ Z6wIWuvqriUya950BbJQ35Fo8bJpvR2zVK7hx88tEvDG1g+kjrc+CJgrMyEappFzpqZJ sdFTVBmqYQ/5TFI0G4n3VD7JPx2KsyOkQsDt2yi48MBuifjOFa8thZ9MnJNKeD3r3MTv H5sR0oJYBV3f2T+aMji2ib/fZJrjV1Kg7PdGvT+aR5pdg8n/H1Uj5IFtr3Ow1JJ53WTT Xh2FDeEwkOANn7s/pgMTf8663eSbpsL6SHJizBjgs2RYrcmRV6OrOXCjSEmsPOAKj/Ug w+QQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCXNbwOOUMcbDH9DwKUDYiYorWRqX3yRymjv5oQy9bU4FcW1Ebf0nXZ0Rl6Aa6Ll8cP8ZXRX@ilbers.de X-Gm-Message-State: AOJu0Yz78brg56kkA2UN2s8qpIfW/4HMblmVrG/YPwmGDdHYrKvkBlQ6 RMNnUs3vpVBSZQSYJZ+PHY/+3UckxS7oLBGhh0cHixa/GOxo9vj9 X-Google-Smtp-Source: AGHT+IE0acAoNRLe4hTCWhpCNgh/bZ1jeYyP0kSR6d0/5eYSKoDY06zT1PNgRQevLAFSOjo1YX8kJw== X-Received: by 2002:a05:6512:3051:b0:53a:38:7b70 with SMTP id 2adb3069b0e04-53b236da75amr524273e87.8.1729764597123; Thu, 24 Oct 2024 03:09:57 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:2283:0:b0:2fb:3a87:c904 with SMTP id 38308e7fff4ca-2fca577458dls1461831fa.0.-pod-prod-00-eu; Thu, 24 Oct 2024 03:09:55 -0700 (PDT) X-Received: by 2002:a05:6512:687:b0:539:f6e1:f28 with SMTP id 2adb3069b0e04-53b2375d2c9mr552414e87.30.1729764594962; Thu, 24 Oct 2024 03:09:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729764594; cv=none; d=google.com; s=arc-20240605; b=KZFLJyWVepsRHyGYYdTI1OclqccoJPzri+oyw5/1oIcSLfhalOkAY5FGWms3tTF+2/ 9vcAQHX1+6q+P1ZlepjBV23PRr+5VmLLuLE6NmiewBCp8JWjVNvu0AL3aQa/H15TuVpj 9zZauT9XidkgOcJbT34IwfDmEE6nx1hMDjL/YB4n0VgDKWkSat+bF5XkOPz9o7IilMnE BARnUEHUm7P6XilkI3GYRzyla8O3VVmGDB3Z/oJFh6AIj6+YX4y0wKS4BJE/xyy/bUtE RCZD4zBPeJLSjC+xQSTorBLOWyEFDAuLctYUAUDsjzlU0bP8c6N/zwoCzrHCWnSy5Kdx tVBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=KzJWmR7J8Cv2+2VLG1BAe1WKtJ520xRwBcaVTo0HqeA=; fh=/h9QQkzJ8EboVkWg45aWwpaUro6WMavIVd2OhN45RtE=; b=fdKMTS68V8swIP0MWjm6Z2tmmi7DZY845/40BdgTAhwb0+roEXB89VU1fzQuELXcB0 tlh1CA578jisuS2aNRnIj/ilhk+ShD6yrkFmEyEcS1feh6/QE4TjMrqB20oCZVzei6oO leT69xVFi14pJU2H3L5/0LMWiqg+zg++YpiYJB6/Md08z18hD3IkBkiZzwRnJ0lDDqXJ PmUPiOUdB/QHca730fpD2VTj7IxF2+mm2gbCUVV9ggQ3AqjJwpPXLd5ji/X3guPUK9Q5 bw9bNf+12EnWuBrZfTERkPZCBL6YZ8ne9J5y9V/jBuDU2iZps2AD9qr7EdaRmnsLupFS E7lA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 2adb3069b0e04-53a223edd8dsi223149e87.10.2024.10.24.03.09.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Oct 2024 03:09:54 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from user-B660.promwad.corp ([159.148.83.114]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 49OA9rND017677 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 24 Oct 2024 12:09:53 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [PATCH v2] deb-dl-dir: Avoid hanging mounts on failed download Date: Thu, 24 Oct 2024 13:09:46 +0300 Message-Id: <20241024100946.214428-1-amikan@ilbers.de> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: amikan@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-TUID: PrnV+o9MFS7O If apt-get fails during debsrc_download execution, one mount will be left behind. If ISAR_FAIL_ON_CLEANUP is set to 1, an additional error will be observed: | Err:1 http://ftp.de.debian.org/debian bookworm/main rtmpdump 2.4+20151223.gitfa8646d.1-2 (dsc) | Could not connect to ftp.de.debian.org:80 (141.76.2.4), connection timed out | Err:2 http://ftp.de.debian.org/debian bookworm/main rtmpdump 2.4+20151223.gitfa8646d.1-2 (tar) | Unable to connect to ftp.de.debian.org:80: | Err:3 http://ftp.de.debian.org/debian bookworm/main rtmpdump 2.4+20151223.gitfa8646d.1-2 (diff) | Unable to connect to ftp.de.debian.org:80: | E: Failed to fetch http://ftp.de.debian.org/debian/pool/main/r/rtmpdump/rtmpdump_2.4%2b20151223.gitfa8646d.1-2.dsc Could not connect to ftp.de.debian.org:80 (141.76.2.4), connection timed out | E: Failed to fetch http://ftp.de.debian.org/debian/pool/main/r/rtmpdump/rtmpdump_2.4%2b20151223.gitfa8646d.1.orig.tar.gz Unable to connect to ftp.de.debian.org:80: | E: Failed to fetch http://ftp.de.debian.org/debian/pool/main/r/rtmpdump/rtmpdump_2.4%2b20151223.gitfa8646d.1-2.debian.tar.xz Unable to connect to ftp.de.debian.org:80: | E: Failed to fetch some archives. | WARNING: exit code 100 from a shell command. | DEBUG: Executing shell function rootfs_do_umounts | DEBUG: Shell function rootfs_do_umounts finished | DEBUG: Python function do_rootfs_postprocess finished NOTE: recipe isar-image-ci-1.0-r0: task do_rootfs_postprocess: Failed NOTE: Tasks Summary: Attempted 699 tasks of which 391 didn't need to be rerun and 1 failed. ERROR: build/tmp/work/debian-bookworm-armhf/isar-image-ci-qemuarm/1.0-r0/rootfs/deb-src left mounted Protect mounting with a trap for cleanup in case of failure. Signed-off-by: Anton Mikanovich --- meta/classes/deb-dl-dir.bbclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass index 55e56c50..7ebd057e 100644 --- a/meta/classes/deb-dl-dir.bbclass +++ b/meta/classes/deb-dl-dir.bbclass @@ -48,6 +48,9 @@ debsrc_download() { debsrc_do_mounts "${rootfs}" + trap 'exit 1' INT HUP QUIT TERM ALRM USR1 + trap 'debsrc_undo_mounts "${rootfs}"' EXIT + ( flock 9 set -e printenv | grep -q BB_VERBOSE_LOGS && set -x -- 2.34.1 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/20241024100946.214428-1-amikan%40ilbers.de.