Message ID | 20220201161638.25531-1-stefan.herbrechtsmeier-oss@weidmueller.com |
---|---|
State | New |
Headers | show |
Series | [1/3] cve-check: create directory before copy | expand |
Can you please describe the issue this is fixing in the commit message? Why is this not seen by others? Alex On Tue, 1 Feb 2022 at 17:17, Stefan Herbrechtsmeier < stefan.herbrechtsmeier-oss@weidmueller.com> wrote: > From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> > > Signed-off-by: Stefan Herbrechtsmeier < > stefan.herbrechtsmeier@weidmueller.com> > --- > > meta/classes/cve-check.bbclass | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/meta/classes/cve-check.bbclass > b/meta/classes/cve-check.bbclass > index 70d1988a70..a4d735c323 100644 > --- a/meta/classes/cve-check.bbclass > +++ b/meta/classes/cve-check.bbclass > @@ -143,6 +143,7 @@ python cve_check_write_rootfs_manifest () { > manifest_name = d.getVar("CVE_CHECK_MANIFEST") > cve_tmp_file = d.getVar("CVE_CHECK_TMP_FILE") > > + bb.utils.mkdirhier(os.path.dirname(manifest_name)) > shutil.copyfile(cve_tmp_file, manifest_name) > > if manifest_name and os.path.exists(manifest_name): > -- > 2.30.2 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#161159): > https://lists.openembedded.org/g/openembedded-core/message/161159 > Mute This Topic: https://lists.openembedded.org/mt/88836328/1686489 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
Am 01.02.2022 um 18:00 schrieb Alexander Kanavin: > Can you please describe the issue this is fixing in the commit message? > Why is this not seen by others? Isn't it best practice to create a directory before copy something into the directory? The patch shows that the arbitrary directory of the CVE_CHECK_MANIFEST variable isn't created. > On Tue, 1 Feb 2022 at 17:17, Stefan Herbrechtsmeier > <stefan.herbrechtsmeier-oss@weidmueller.com > <mailto:stefan.herbrechtsmeier-oss@weidmueller.com>> wrote: > > From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com > <mailto:stefan.herbrechtsmeier@weidmueller.com>> > > Signed-off-by: Stefan Herbrechtsmeier > <stefan.herbrechtsmeier@weidmueller.com > <mailto:stefan.herbrechtsmeier@weidmueller.com>> > --- > > meta/classes/cve-check.bbclass | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/meta/classes/cve-check.bbclass > b/meta/classes/cve-check.bbclass > index 70d1988a70..a4d735c323 100644 > --- a/meta/classes/cve-check.bbclass > +++ b/meta/classes/cve-check.bbclass > @@ -143,6 +143,7 @@ python cve_check_write_rootfs_manifest () { > manifest_name = d.getVar("CVE_CHECK_MANIFEST") > cve_tmp_file = d.getVar("CVE_CHECK_TMP_FILE") > > + bb.utils.mkdirhier(os.path.dirname(manifest_name)) > shutil.copyfile(cve_tmp_file, manifest_name) > > if manifest_name and os.path.exists(manifest_name): > -- > 2.30.2 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#161159): > https://lists.openembedded.org/g/openembedded-core/message/161159 > <https://lists.openembedded.org/g/openembedded-core/message/161159> > Mute This Topic: https://lists.openembedded.org/mt/88836328/1686489 > <https://lists.openembedded.org/mt/88836328/1686489> > Group Owner: openembedded-core+owner@lists.openembedded.org > <mailto:openembedded-core%2Bowner@lists.openembedded.org> > Unsubscribe: > https://lists.openembedded.org/g/openembedded-core/unsub > <https://lists.openembedded.org/g/openembedded-core/unsub> > [alex.kanavin@gmail.com <mailto:alex.kanavin@gmail.com>] > -=-=-=-=-=-=-=-=-=-=-=- >
On Tue, 1 Feb 2022 at 19:58, Stefan Herbrechtsmeier < stefan.herbrechtsmeier-oss@weidmueller.com> wrote: > Am 01.02.2022 um 18:00 schrieb Alexander Kanavin: > > Can you please describe the issue this is fixing in the commit message? > > Why is this not seen by others? > > Isn't it best practice to create a directory before copy something into > the directory? The patch shows that the arbitrary directory of the > CVE_CHECK_MANIFEST variable isn't created. > That's right, but then the commit title should mention CVE_CHECK_MESSAGE; "create directory before copy" is too generic. Alex > > > On Tue, 1 Feb 2022 at 17:17, Stefan Herbrechtsmeier > > <stefan.herbrechtsmeier-oss@weidmueller.com > > <mailto:stefan.herbrechtsmeier-oss@weidmueller.com>> wrote: > > > > From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com > > <mailto:stefan.herbrechtsmeier@weidmueller.com>> > > > > Signed-off-by: Stefan Herbrechtsmeier > > <stefan.herbrechtsmeier@weidmueller.com > > <mailto:stefan.herbrechtsmeier@weidmueller.com>> > > --- > > > > meta/classes/cve-check.bbclass | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/meta/classes/cve-check.bbclass > > b/meta/classes/cve-check.bbclass > > index 70d1988a70..a4d735c323 100644 > > --- a/meta/classes/cve-check.bbclass > > +++ b/meta/classes/cve-check.bbclass > > @@ -143,6 +143,7 @@ python cve_check_write_rootfs_manifest () { > > manifest_name = d.getVar("CVE_CHECK_MANIFEST") > > cve_tmp_file = d.getVar("CVE_CHECK_TMP_FILE") > > > > + bb.utils.mkdirhier(os.path.dirname(manifest_name)) > > shutil.copyfile(cve_tmp_file, manifest_name) > > > > if manifest_name and os.path.exists(manifest_name): > > -- > > 2.30.2 > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#161159): > > https://lists.openembedded.org/g/openembedded-core/message/161159 > > <https://lists.openembedded.org/g/openembedded-core/message/161159> > > Mute This Topic: https://lists.openembedded.org/mt/88836328/1686489 > > <https://lists.openembedded.org/mt/88836328/1686489> > > Group Owner: openembedded-core+owner@lists.openembedded.org > > <mailto:openembedded-core%2Bowner@lists.openembedded.org> > > Unsubscribe: > > https://lists.openembedded.org/g/openembedded-core/unsub > > <https://lists.openembedded.org/g/openembedded-core/unsub> > > [alex.kanavin@gmail.com <mailto:alex.kanavin@gmail.com>] > > -=-=-=-=-=-=-=-=-=-=-=- > > >
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass index 70d1988a70..a4d735c323 100644 --- a/meta/classes/cve-check.bbclass +++ b/meta/classes/cve-check.bbclass @@ -143,6 +143,7 @@ python cve_check_write_rootfs_manifest () { manifest_name = d.getVar("CVE_CHECK_MANIFEST") cve_tmp_file = d.getVar("CVE_CHECK_TMP_FILE") + bb.utils.mkdirhier(os.path.dirname(manifest_name)) shutil.copyfile(cve_tmp_file, manifest_name) if manifest_name and os.path.exists(manifest_name):