* [PATCH v2] dpkg-base: Introduce do_apt_unpack
@ 2021-03-03 18:38 Vijai Kumar K
2021-03-03 18:40 ` vijaikumar....@gmail.com
2021-03-03 18:59 ` Henning Schild
0 siblings, 2 replies; 6+ messages in thread
From: Vijai Kumar K @ 2021-03-03 18:38 UTC (permalink / raw)
To: isar-users, henning.schild; +Cc: Vijai Kumar K
The Debian source package fetch and unpacking happens now inside the
do_apt_fetch task.
With the current do_apt_fetch implementation, it is not possible to use
a custom source directory(${S}).
apt-get source by default extracts the contents of the debian source
into folder with name <pkg>_<version>.
Add provision for specifying a custom source directory.
Add a new task called do_apt_unpack and move unpacking logic there.
Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
---
meta/classes/dpkg-base.bbclass | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 5c7bddc..a6c2e3b 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -58,7 +58,6 @@ do_apt_fetch() {
if [ -z "${@d.getVar("SRC_APT", True).strip()}" ]; then
return 0
fi
- rm -rf ${S}
dpkg_do_mounts
E="${@ isar_export_proxies(d)}"
sudo -E chroot ${BUILDCHROOT_DIR} /usr/bin/apt-get update \
@@ -69,8 +68,6 @@ do_apt_fetch() {
for uri in "${SRC_APT}"; do
sudo -E chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
sh -c 'mkdir -p /downloads/deb-src/"$1"/"$2" && cd /downloads/deb-src/"$1"/"$2" && apt-get -y --download-only --only-source source "$2"' my_script "${DISTRO}" "${uri}"
- sudo -E chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
- sh -c 'cp /downloads/deb-src/"$1"/"$2"/* ${PP} && cd ${PP} && apt-get -y --only-source source "$2"' my_script "${DISTRO}" "${uri}"
done
dpkg_undo_mounts
@@ -79,6 +76,27 @@ do_apt_fetch() {
addtask apt_fetch after do_unpack before do_patch
do_apt_fetch[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
+do_apt_unpack() {
+ rm -rf ${S}
+ dpkg_do_mounts
+ E="${@ isar_export_proxies(d)}"
+
+ for uri in "${SRC_APT}"; do
+ sudo -E chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
+ sh -c ' \
+ set -e
+ dscfile="$(apt-get -y -qq --print-uris source "${2}" | cut -d " " -f2 | grep -E "*.dsc")"
+ cd ${PP}
+ cp /downloads/deb-src/"${1}"/"${2}"/* ${PP}
+ dpkg-source -x "${dscfile}" "${PPS}"' \
+ my_script "${DISTRO}" "${uri}"
+ done
+
+ dpkg_undo_mounts
+}
+
+addtask apt_unpack after do_apt_fetch before do_patch
+
addtask cleanall_apt before do_cleanall
do_cleanall_apt[nostamp] = "1"
do_cleanall_apt() {
--
2.17.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] dpkg-base: Introduce do_apt_unpack
2021-03-03 18:38 [PATCH v2] dpkg-base: Introduce do_apt_unpack Vijai Kumar K
@ 2021-03-03 18:40 ` vijaikumar....@gmail.com
2021-03-03 18:59 ` Henning Schild
1 sibling, 0 replies; 6+ messages in thread
From: vijaikumar....@gmail.com @ 2021-03-03 18:40 UTC (permalink / raw)
To: isar-users
[-- Attachment #1.1: Type: text/plain, Size: 2611 bytes --]
CI build going on here: http://ci.isar-build.org:8080/job/isar_vkk_devel/92/
On Thursday, March 4, 2021 at 12:08:59 AM UTC+5:30
vijaikumar_...@mentor.com wrote:
> The Debian source package fetch and unpacking happens now inside the
> do_apt_fetch task.
>
> With the current do_apt_fetch implementation, it is not possible to use
> a custom source directory(${S}).
> apt-get source by default extracts the contents of the debian source
> into folder with name <pkg>_<version>.
>
> Add provision for specifying a custom source directory.
>
> Add a new task called do_apt_unpack and move unpacking logic there.
>
> Signed-off-by: Vijai Kumar K <Vijaikumar_...@mentor.com>
> ---
> meta/classes/dpkg-base.bbclass | 24 +++++++++++++++++++++---
> 1 file changed, 21 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/dpkg-base.bbclass
> b/meta/classes/dpkg-base.bbclass
> index 5c7bddc..a6c2e3b 100644
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -58,7 +58,6 @@ do_apt_fetch() {
> if [ -z "${@d.getVar("SRC_APT", True).strip()}" ]; then
> return 0
> fi
> - rm -rf ${S}
> dpkg_do_mounts
> E="${@ isar_export_proxies(d)}"
> sudo -E chroot ${BUILDCHROOT_DIR} /usr/bin/apt-get update \
> @@ -69,8 +68,6 @@ do_apt_fetch() {
> for uri in "${SRC_APT}"; do
> sudo -E chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
> sh -c 'mkdir -p /downloads/deb-src/"$1"/"$2" && cd
> /downloads/deb-src/"$1"/"$2" && apt-get -y --download-only --only-source
> source "$2"' my_script "${DISTRO}" "${uri}"
> - sudo -E chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
> - sh -c 'cp /downloads/deb-src/"$1"/"$2"/* ${PP} && cd ${PP} && apt-get -y
> --only-source source "$2"' my_script "${DISTRO}" "${uri}"
> done
>
> dpkg_undo_mounts
> @@ -79,6 +76,27 @@ do_apt_fetch() {
> addtask apt_fetch after do_unpack before do_patch
> do_apt_fetch[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
>
> +do_apt_unpack() {
> + rm -rf ${S}
> + dpkg_do_mounts
> + E="${@ isar_export_proxies(d)}"
> +
> + for uri in "${SRC_APT}"; do
> + sudo -E chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
> + sh -c ' \
> + set -e
> + dscfile="$(apt-get -y -qq --print-uris source "${2}" | cut -d " " -f2 |
> grep -E "*.dsc")"
> + cd ${PP}
> + cp /downloads/deb-src/"${1}"/"${2}"/* ${PP}
> + dpkg-source -x "${dscfile}" "${PPS}"' \
> + my_script "${DISTRO}" "${uri}"
> + done
> +
> + dpkg_undo_mounts
> +}
> +
> +addtask apt_unpack after do_apt_fetch before do_patch
> +
> addtask cleanall_apt before do_cleanall
> do_cleanall_apt[nostamp] = "1"
> do_cleanall_apt() {
> --
> 2.17.1
>
>
[-- Attachment #1.2: Type: text/html, Size: 3543 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] dpkg-base: Introduce do_apt_unpack
2021-03-03 18:38 [PATCH v2] dpkg-base: Introduce do_apt_unpack Vijai Kumar K
2021-03-03 18:40 ` vijaikumar....@gmail.com
@ 2021-03-03 18:59 ` Henning Schild
2021-03-03 19:05 ` Henning Schild
2021-03-03 19:25 ` vijaikumar....@gmail.com
1 sibling, 2 replies; 6+ messages in thread
From: Henning Schild @ 2021-03-03 18:59 UTC (permalink / raw)
To: Vijai Kumar K; +Cc: isar-users
Am Thu, 4 Mar 2021 00:08:23 +0530
schrieb Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>:
> The Debian source package fetch and unpacking happens now inside the
> do_apt_fetch task.
>
> With the current do_apt_fetch implementation, it is not possible to
> use a custom source directory(${S}).
> apt-get source by default extracts the contents of the debian source
> into folder with name <pkg>_<version>.
>
> Add provision for specifying a custom source directory.
>
> Add a new task called do_apt_unpack and move unpacking logic there.
>
> Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> ---
> meta/classes/dpkg-base.bbclass | 24 +++++++++++++++++++++---
> 1 file changed, 21 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/dpkg-base.bbclass
> b/meta/classes/dpkg-base.bbclass index 5c7bddc..a6c2e3b 100644
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -58,7 +58,6 @@ do_apt_fetch() {
> if [ -z "${@d.getVar("SRC_APT", True).strip()}" ]; then
> return 0
> fi
> - rm -rf ${S}
> dpkg_do_mounts
> E="${@ isar_export_proxies(d)}"
> sudo -E chroot ${BUILDCHROOT_DIR} /usr/bin/apt-get update \
> @@ -69,8 +68,6 @@ do_apt_fetch() {
> for uri in "${SRC_APT}"; do
> sudo -E chroot --userspec=$( id -u ):$( id -g )
> ${BUILDCHROOT_DIR} \ sh -c 'mkdir -p /downloads/deb-src/"$1"/"$2" &&
> cd /downloads/deb-src/"$1"/"$2" && apt-get -y --download-only
> --only-source source "$2"' my_script "${DISTRO}" "${uri}"
> - sudo -E chroot --userspec=$( id -u ):$( id -g )
> ${BUILDCHROOT_DIR} \
> - sh -c 'cp /downloads/deb-src/"$1"/"$2"/* ${PP} && cd
> ${PP} && apt-get -y --only-source source "$2"' my_script "${DISTRO}"
> "${uri}" done
> dpkg_undo_mounts
> @@ -79,6 +76,27 @@ do_apt_fetch() {
> addtask apt_fetch after do_unpack before do_patch
before do_apt_unpack
> do_apt_fetch[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
>
> +do_apt_unpack() {
> + rm -rf ${S}
> + dpkg_do_mounts
> + E="${@ isar_export_proxies(d)}"
Not sure about this, i would hope the unpack would be "purely offline"
> + for uri in "${SRC_APT}"; do
> + sudo -E chroot --userspec=$( id -u ):$( id -g )
> ${BUILDCHROOT_DIR} \
> + sh -c ' \
> + set -e
> + dscfile="$(apt-get -y -qq --print-uris source "${2}"
> | cut -d " " -f2 | grep -E "*.dsc")"
but maybe this guy needs network
Thanks, looking good so far!
Henning
> + cd ${PP}
> + cp /downloads/deb-src/"${1}"/"${2}"/* ${PP}
> + dpkg-source -x "${dscfile}" "${PPS}"' \
> + my_script "${DISTRO}" "${uri}"
> + done
> +
> + dpkg_undo_mounts
> +}
> +
> +addtask apt_unpack after do_apt_fetch before do_patch
> +
> addtask cleanall_apt before do_cleanall
> do_cleanall_apt[nostamp] = "1"
> do_cleanall_apt() {
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] dpkg-base: Introduce do_apt_unpack
2021-03-03 18:59 ` Henning Schild
@ 2021-03-03 19:05 ` Henning Schild
2021-03-03 19:25 ` vijaikumar....@gmail.com
2021-03-03 19:25 ` vijaikumar....@gmail.com
1 sibling, 1 reply; 6+ messages in thread
From: Henning Schild @ 2021-03-03 19:05 UTC (permalink / raw)
To: Vijai Kumar K; +Cc: isar-users
This will kind of allow "tracking" of those "apt://" guys, and we have
<orig-version> to cover that changelog.
So i wonder if we can make recipes-app/hello/ just one file and drop
those inc and DEFAULT_PREFERENCE bits. That would also make a real CI
test.
Maybe the docs will need updating as well.
Henning
Am Wed, 3 Mar 2021 19:59:11 +0100
schrieb "[ext] Henning Schild" <henning.schild@siemens.com>:
> Am Thu, 4 Mar 2021 00:08:23 +0530
> schrieb Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>:
>
> > The Debian source package fetch and unpacking happens now inside the
> > do_apt_fetch task.
> >
> > With the current do_apt_fetch implementation, it is not possible to
> > use a custom source directory(${S}).
> > apt-get source by default extracts the contents of the debian source
> > into folder with name <pkg>_<version>.
> >
> > Add provision for specifying a custom source directory.
> >
> > Add a new task called do_apt_unpack and move unpacking logic there.
> >
> > Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> > ---
> > meta/classes/dpkg-base.bbclass | 24 +++++++++++++++++++++---
> > 1 file changed, 21 insertions(+), 3 deletions(-)
> >
> > diff --git a/meta/classes/dpkg-base.bbclass
> > b/meta/classes/dpkg-base.bbclass index 5c7bddc..a6c2e3b 100644
> > --- a/meta/classes/dpkg-base.bbclass
> > +++ b/meta/classes/dpkg-base.bbclass
> > @@ -58,7 +58,6 @@ do_apt_fetch() {
> > if [ -z "${@d.getVar("SRC_APT", True).strip()}" ]; then
> > return 0
> > fi
> > - rm -rf ${S}
> > dpkg_do_mounts
> > E="${@ isar_export_proxies(d)}"
> > sudo -E chroot ${BUILDCHROOT_DIR} /usr/bin/apt-get update \
> > @@ -69,8 +68,6 @@ do_apt_fetch() {
> > for uri in "${SRC_APT}"; do
> > sudo -E chroot --userspec=$( id -u ):$( id -g )
> > ${BUILDCHROOT_DIR} \ sh -c 'mkdir -p /downloads/deb-src/"$1"/"$2" &&
> > cd /downloads/deb-src/"$1"/"$2" && apt-get -y --download-only
> > --only-source source "$2"' my_script "${DISTRO}" "${uri}"
> > - sudo -E chroot --userspec=$( id -u ):$( id -g )
> > ${BUILDCHROOT_DIR} \
> > - sh -c 'cp /downloads/deb-src/"$1"/"$2"/* ${PP} && cd
> > ${PP} && apt-get -y --only-source source "$2"' my_script "${DISTRO}"
> > "${uri}" done
> > dpkg_undo_mounts
> > @@ -79,6 +76,27 @@ do_apt_fetch() {
> > addtask apt_fetch after do_unpack before do_patch
>
> before do_apt_unpack
>
> > do_apt_fetch[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
> >
> > +do_apt_unpack() {
> > + rm -rf ${S}
> > + dpkg_do_mounts
> > + E="${@ isar_export_proxies(d)}"
>
> Not sure about this, i would hope the unpack would be "purely offline"
>
> > + for uri in "${SRC_APT}"; do
> > + sudo -E chroot --userspec=$( id -u ):$( id -g )
> > ${BUILDCHROOT_DIR} \
> > + sh -c ' \
> > + set -e
> > + dscfile="$(apt-get -y -qq --print-uris source
> > "${2}" | cut -d " " -f2 | grep -E "*.dsc")"
>
> but maybe this guy needs network
>
> Thanks, looking good so far!
>
> Henning
>
> > + cd ${PP}
> > + cp /downloads/deb-src/"${1}"/"${2}"/* ${PP}
> > + dpkg-source -x "${dscfile}" "${PPS}"' \
> > + my_script "${DISTRO}" "${uri}"
> > + done
> > +
> > + dpkg_undo_mounts
> > +}
> > +
> > +addtask apt_unpack after do_apt_fetch before do_patch
> > +
> > addtask cleanall_apt before do_cleanall
> > do_cleanall_apt[nostamp] = "1"
> > do_cleanall_apt() {
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] dpkg-base: Introduce do_apt_unpack
2021-03-03 19:05 ` Henning Schild
@ 2021-03-03 19:25 ` vijaikumar....@gmail.com
0 siblings, 0 replies; 6+ messages in thread
From: vijaikumar....@gmail.com @ 2021-03-03 19:25 UTC (permalink / raw)
To: isar-users
[-- Attachment #1.1: Type: text/plain, Size: 3713 bytes --]
On Thursday, March 4, 2021 at 12:40:55 AM UTC+5:30 Henning Schild wrote:
> This will kind of allow "tracking" of those "apt://" guys, and we have
> <orig-version> to cover that changelog.
>
> So i wonder if we can make recipes-app/hello/ just one file and drop
> those inc and DEFAULT_PREFERENCE bits. That would also make a real CI
> test.
Yes. That would be a good test case. I will add another patch and send out
a v3.
>
>
> Maybe the docs will need updating as well.
ok
>
>
> Henning
>
> Am Wed, 3 Mar 2021 19:59:11 +0100
> schrieb "[ext] Henning Schild" <henning...@siemens.com>:
>
> > Am Thu, 4 Mar 2021 00:08:23 +0530
> > schrieb Vijai Kumar K <Vijaikumar_...@mentor.com>:
> >
> > > The Debian source package fetch and unpacking happens now inside the
> > > do_apt_fetch task.
> > >
> > > With the current do_apt_fetch implementation, it is not possible to
> > > use a custom source directory(${S}).
> > > apt-get source by default extracts the contents of the debian source
> > > into folder with name <pkg>_<version>.
> > >
> > > Add provision for specifying a custom source directory.
> > >
> > > Add a new task called do_apt_unpack and move unpacking logic there.
> > >
> > > Signed-off-by: Vijai Kumar K <Vijaikumar_...@mentor.com>
> > > ---
> > > meta/classes/dpkg-base.bbclass | 24 +++++++++++++++++++++---
> > > 1 file changed, 21 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/meta/classes/dpkg-base.bbclass
> > > b/meta/classes/dpkg-base.bbclass index 5c7bddc..a6c2e3b 100644
> > > --- a/meta/classes/dpkg-base.bbclass
> > > +++ b/meta/classes/dpkg-base.bbclass
> > > @@ -58,7 +58,6 @@ do_apt_fetch() {
> > > if [ -z "${@d.getVar("SRC_APT", True).strip()}" ]; then
> > > return 0
> > > fi
> > > - rm -rf ${S}
> > > dpkg_do_mounts
> > > E="${@ isar_export_proxies(d)}"
> > > sudo -E chroot ${BUILDCHROOT_DIR} /usr/bin/apt-get update \
> > > @@ -69,8 +68,6 @@ do_apt_fetch() {
> > > for uri in "${SRC_APT}"; do
> > > sudo -E chroot --userspec=$( id -u ):$( id -g )
> > > ${BUILDCHROOT_DIR} \ sh -c 'mkdir -p /downloads/deb-src/"$1"/"$2" &&
> > > cd /downloads/deb-src/"$1"/"$2" && apt-get -y --download-only
> > > --only-source source "$2"' my_script "${DISTRO}" "${uri}"
> > > - sudo -E chroot --userspec=$( id -u ):$( id -g )
> > > ${BUILDCHROOT_DIR} \
> > > - sh -c 'cp /downloads/deb-src/"$1"/"$2"/* ${PP} && cd
> > > ${PP} && apt-get -y --only-source source "$2"' my_script "${DISTRO}"
> > > "${uri}" done
> > > dpkg_undo_mounts
> > > @@ -79,6 +76,27 @@ do_apt_fetch() {
> > > addtask apt_fetch after do_unpack before do_patch
> >
> > before do_apt_unpack
> >
> > > do_apt_fetch[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
> > >
> > > +do_apt_unpack() {
> > > + rm -rf ${S}
> > > + dpkg_do_mounts
> > > + E="${@ isar_export_proxies(d)}"
> >
> > Not sure about this, i would hope the unpack would be "purely offline"
> >
> > > + for uri in "${SRC_APT}"; do
> > > + sudo -E chroot --userspec=$( id -u ):$( id -g )
> > > ${BUILDCHROOT_DIR} \
> > > + sh -c ' \
> > > + set -e
> > > + dscfile="$(apt-get -y -qq --print-uris source
> > > "${2}" | cut -d " " -f2 | grep -E "*.dsc")"
> >
> > but maybe this guy needs network
> >
> > Thanks, looking good so far!
> >
> > Henning
> >
> > > + cd ${PP}
> > > + cp /downloads/deb-src/"${1}"/"${2}"/* ${PP}
> > > + dpkg-source -x "${dscfile}" "${PPS}"' \
> > > + my_script "${DISTRO}" "${uri}"
> > > + done
> > > +
> > > + dpkg_undo_mounts
> > > +}
> > > +
> > > +addtask apt_unpack after do_apt_fetch before do_patch
> > > +
> > > addtask cleanall_apt before do_cleanall
> > > do_cleanall_apt[nostamp] = "1"
> > > do_cleanall_apt() {
> >
>
>
[-- Attachment #1.2: Type: text/html, Size: 5318 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] dpkg-base: Introduce do_apt_unpack
2021-03-03 18:59 ` Henning Schild
2021-03-03 19:05 ` Henning Schild
@ 2021-03-03 19:25 ` vijaikumar....@gmail.com
1 sibling, 0 replies; 6+ messages in thread
From: vijaikumar....@gmail.com @ 2021-03-03 19:25 UTC (permalink / raw)
To: isar-users
[-- Attachment #1.1: Type: text/plain, Size: 3019 bytes --]
On Thursday, March 4, 2021 at 12:29:14 AM UTC+5:30 Henning Schild wrote:
> Am Thu, 4 Mar 2021 00:08:23 +0530
> schrieb Vijai Kumar K <Vijaikumar_...@mentor.com>:
>
> > The Debian source package fetch and unpacking happens now inside the
> > do_apt_fetch task.
> >
> > With the current do_apt_fetch implementation, it is not possible to
> > use a custom source directory(${S}).
> > apt-get source by default extracts the contents of the debian source
> > into folder with name <pkg>_<version>.
> >
> > Add provision for specifying a custom source directory.
> >
> > Add a new task called do_apt_unpack and move unpacking logic there.
> >
> > Signed-off-by: Vijai Kumar K <Vijaikumar_...@mentor.com>
> > ---
> > meta/classes/dpkg-base.bbclass | 24 +++++++++++++++++++++---
> > 1 file changed, 21 insertions(+), 3 deletions(-)
> >
> > diff --git a/meta/classes/dpkg-base.bbclass
> > b/meta/classes/dpkg-base.bbclass index 5c7bddc..a6c2e3b 100644
> > --- a/meta/classes/dpkg-base.bbclass
> > +++ b/meta/classes/dpkg-base.bbclass
> > @@ -58,7 +58,6 @@ do_apt_fetch() {
> > if [ -z "${@d.getVar("SRC_APT", True).strip()}" ]; then
> > return 0
> > fi
> > - rm -rf ${S}
> > dpkg_do_mounts
> > E="${@ isar_export_proxies(d)}"
> > sudo -E chroot ${BUILDCHROOT_DIR} /usr/bin/apt-get update \
> > @@ -69,8 +68,6 @@ do_apt_fetch() {
> > for uri in "${SRC_APT}"; do
> > sudo -E chroot --userspec=$( id -u ):$( id -g )
> > ${BUILDCHROOT_DIR} \ sh -c 'mkdir -p /downloads/deb-src/"$1"/"$2" &&
> > cd /downloads/deb-src/"$1"/"$2" && apt-get -y --download-only
> > --only-source source "$2"' my_script "${DISTRO}" "${uri}"
> > - sudo -E chroot --userspec=$( id -u ):$( id -g )
> > ${BUILDCHROOT_DIR} \
> > - sh -c 'cp /downloads/deb-src/"$1"/"$2"/* ${PP} && cd
> > ${PP} && apt-get -y --only-source source "$2"' my_script "${DISTRO}"
> > "${uri}" done
> > dpkg_undo_mounts
> > @@ -79,6 +76,27 @@ do_apt_fetch() {
> > addtask apt_fetch after do_unpack before do_patch
>
> before do_apt_unpack
Will fix it in v3
>
>
> > do_apt_fetch[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
> >
> > +do_apt_unpack() {
> > + rm -rf ${S}
> > + dpkg_do_mounts
> > + E="${@ isar_export_proxies(d)}"
>
> Not sure about this, i would hope the unpack would be "purely offline"
>
> > + for uri in "${SRC_APT}"; do
> > + sudo -E chroot --userspec=$( id -u ):$( id -g )
> > ${BUILDCHROOT_DIR} \
> > + sh -c ' \
> > + set -e
> > + dscfile="$(apt-get -y -qq --print-uris source "${2}"
> > | cut -d " " -f2 | grep -E "*.dsc")"
>
> but maybe this guy needs network
>
> Thanks, looking good so far!
>
> Henning
>
> > + cd ${PP}
> > + cp /downloads/deb-src/"${1}"/"${2}"/* ${PP}
> > + dpkg-source -x "${dscfile}" "${PPS}"' \
> > + my_script "${DISTRO}" "${uri}"
> > + done
> > +
> > + dpkg_undo_mounts
> > +}
> > +
> > +addtask apt_unpack after do_apt_fetch before do_patch
> > +
> > addtask cleanall_apt before do_cleanall
> > do_cleanall_apt[nostamp] = "1"
> > do_cleanall_apt() {
>
>
[-- Attachment #1.2: Type: text/html, Size: 4100 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-03 19:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03 18:38 [PATCH v2] dpkg-base: Introduce do_apt_unpack Vijai Kumar K
2021-03-03 18:40 ` vijaikumar....@gmail.com
2021-03-03 18:59 ` Henning Schild
2021-03-03 19:05 ` Henning Schild
2021-03-03 19:25 ` vijaikumar....@gmail.com
2021-03-03 19:25 ` vijaikumar....@gmail.com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox