0s autopkgtest [16:16:23]: starting date and time: 2024-11-26 16:16:23+0000 0s autopkgtest [16:16:23]: git checkout: 6f3be7a8 Fix armhf LXD image generation for plucky 0s autopkgtest [16:16:23]: host juju-7f2275-prod-proposed-migration-environment-15; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.tayqxi53/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:python-pygit2 --apt-upgrade git-ubuntu --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=python-pygit2/1.16.0-2 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-ppc64el --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-15@bos03-ppc64el-5.secgroup --name adt-plucky-ppc64el-git-ubuntu-20241126-153829-juju-7f2275-prod-proposed-migration-environment-15-7558842c-d723-4cda-be82-81cdacc6144e --image adt/ubuntu-plucky-ppc64el-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-15 --net-id=net_prod-proposed-migration-ppc64el -e TERM=linux -e ''"'"'http_proxy=http://squid.internal:3128'"'"'' -e ''"'"'https_proxy=http://squid.internal:3128'"'"'' -e ''"'"'no_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 105s autopkgtest [16:18:08]: testbed dpkg architecture: ppc64el 106s autopkgtest [16:18:09]: testbed apt version: 2.9.8 106s autopkgtest [16:18:09]: @@@@@@@@@@@@@@@@@@@@ test bed setup 106s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [73.9 kB] 107s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/restricted Sources [9708 B] 107s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [56.6 kB] 107s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [831 kB] 107s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [13.6 kB] 107s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main ppc64el Packages [72.8 kB] 107s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/restricted ppc64el Packages [928 B] 107s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/universe ppc64el Packages [637 kB] 107s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse ppc64el Packages [9628 B] 107s Fetched 1706 kB in 1s (1867 kB/s) 107s Reading package lists... 110s Reading package lists... 110s Building dependency tree... 110s Reading state information... 110s Calculating upgrade... 110s The following package was automatically installed and is no longer required: 110s libsgutils2-1.46-2 110s Use 'sudo apt autoremove' to remove it. 110s The following NEW packages will be installed: 110s appstream cloud-init-base gir1.2-packagekitglib-1.0 libappstream5 110s libduktape207 libglib2.0-bin libgstreamer1.0-0 libpackagekit-glib2-18 110s libsgutils2-1.48 libstemmer0d packagekit packagekit-tools polkitd 110s python3-distro-info python3-software-properties sgml-base 110s software-properties-common unattended-upgrades xml-core 110s The following packages will be upgraded: 110s apt apt-utils bash bpftrace cloud-init curl debconf debconf-i18n distro-info 110s dracut-install gir1.2-girepository-2.0 gir1.2-glib-2.0 hostname init 110s init-system-helpers libapt-pkg6.0t64 libaudit-common libaudit1 110s libcurl3t64-gnutls libcurl4t64 libgirepository-1.0-1 libglib2.0-0t64 110s libglib2.0-data liblzma5 libpam-modules libpam-modules-bin libpam-runtime 110s libpam0g libplymouth5 libpolkit-agent-1-0 libpolkit-gobject-1-0 libselinux1 110s libsemanage-common libsemanage2 linux-base lsvpd lto-disabled-list 110s lxd-installer openssh-client openssh-server openssh-sftp-server 110s pinentry-curses plymouth plymouth-theme-ubuntu-text python-apt-common 110s python3-apt python3-blinker python3-dbus python3-debconf python3-gi 110s python3-jsonschema-specifications python3-rpds-py python3-yaml sg3-utils 110s sg3-utils-udev vim-common vim-tiny xxd xz-utils 110s 59 upgraded, 19 newly installed, 0 to remove and 0 not upgraded. 110s Need to get 20.7 MB of archives. 110s After this operation, 16.9 MB of additional disk space will be used. 110s Get:1 http://ftpmaster.internal/ubuntu plucky/main ppc64el bash ppc64el 5.2.32-1ubuntu2 [979 kB] 111s Get:2 http://ftpmaster.internal/ubuntu plucky/main ppc64el hostname ppc64el 3.25 [11.3 kB] 111s Get:3 http://ftpmaster.internal/ubuntu plucky/main ppc64el init-system-helpers all 1.67ubuntu1 [39.1 kB] 111s Get:4 http://ftpmaster.internal/ubuntu plucky/main ppc64el liblzma5 ppc64el 5.6.3-1 [172 kB] 111s Get:5 http://ftpmaster.internal/ubuntu plucky/main ppc64el libapt-pkg6.0t64 ppc64el 2.9.14ubuntu1 [1139 kB] 111s Get:6 http://ftpmaster.internal/ubuntu plucky/main ppc64el apt ppc64el 2.9.14ubuntu1 [1382 kB] 111s Get:7 http://ftpmaster.internal/ubuntu plucky/main ppc64el apt-utils ppc64el 2.9.14ubuntu1 [229 kB] 111s Get:8 http://ftpmaster.internal/ubuntu plucky/main ppc64el libaudit-common all 1:4.0.2-2ubuntu1 [6578 B] 111s Get:9 http://ftpmaster.internal/ubuntu plucky/main ppc64el libaudit1 ppc64el 1:4.0.2-2ubuntu1 [59.6 kB] 111s Get:10 http://ftpmaster.internal/ubuntu plucky/main ppc64el debconf-i18n all 1.5.87ubuntu1 [204 kB] 111s Get:11 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-debconf all 1.5.87ubuntu1 [4156 B] 111s Get:12 http://ftpmaster.internal/ubuntu plucky/main ppc64el debconf all 1.5.87ubuntu1 [124 kB] 111s Get:13 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpam0g ppc64el 1.5.3-7ubuntu4 [76.2 kB] 111s Get:14 http://ftpmaster.internal/ubuntu plucky/main ppc64el libselinux1 ppc64el 3.7-3ubuntu1 [100 kB] 111s Get:15 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpam-modules-bin ppc64el 1.5.3-7ubuntu4 [57.6 kB] 111s Get:16 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpam-modules ppc64el 1.5.3-7ubuntu4 [325 kB] 111s Get:17 http://ftpmaster.internal/ubuntu plucky/main ppc64el init ppc64el 1.67ubuntu1 [6432 B] 111s Get:18 http://ftpmaster.internal/ubuntu plucky/main ppc64el openssh-sftp-server ppc64el 1:9.9p1-3ubuntu2 [43.4 kB] 111s Get:19 http://ftpmaster.internal/ubuntu plucky/main ppc64el openssh-server ppc64el 1:9.9p1-3ubuntu2 [680 kB] 111s Get:20 http://ftpmaster.internal/ubuntu plucky/main ppc64el openssh-client ppc64el 1:9.9p1-3ubuntu2 [1169 kB] 111s Get:21 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpam-runtime all 1.5.3-7ubuntu4 [40.8 kB] 111s Get:22 http://ftpmaster.internal/ubuntu plucky/main ppc64el sgml-base all 1.31 [11.4 kB] 111s Get:23 http://ftpmaster.internal/ubuntu plucky/main ppc64el libsemanage-common all 3.7-2build1 [7186 B] 111s Get:24 http://ftpmaster.internal/ubuntu plucky/main ppc64el libsemanage2 ppc64el 3.7-2build1 [115 kB] 111s Get:25 http://ftpmaster.internal/ubuntu plucky/main ppc64el distro-info ppc64el 1.12 [20.0 kB] 111s Get:26 http://ftpmaster.internal/ubuntu plucky/main ppc64el gir1.2-girepository-2.0 ppc64el 1.82.0-2 [25.3 kB] 111s Get:27 http://ftpmaster.internal/ubuntu plucky/main ppc64el gir1.2-glib-2.0 ppc64el 2.82.2-3 [182 kB] 111s Get:28 http://ftpmaster.internal/ubuntu plucky/main ppc64el libglib2.0-0t64 ppc64el 2.82.2-3 [1787 kB] 111s Get:29 http://ftpmaster.internal/ubuntu plucky/main ppc64el libgirepository-1.0-1 ppc64el 1.82.0-2 [95.5 kB] 111s Get:30 http://ftpmaster.internal/ubuntu plucky/main ppc64el libglib2.0-data all 2.82.2-3 [51.7 kB] 111s Get:31 http://ftpmaster.internal/ubuntu plucky/main ppc64el python-apt-common all 2.9.0ubuntu2 [20.3 kB] 111s Get:32 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-apt ppc64el 2.9.0ubuntu2 [194 kB] 111s Get:33 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-dbus ppc64el 1.3.2-5build4 [117 kB] 111s Get:34 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-gi ppc64el 3.50.0-3build1 [308 kB] 111s Get:35 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-yaml ppc64el 6.0.2-1build1 [180 kB] 111s Get:36 http://ftpmaster.internal/ubuntu plucky/main ppc64el vim-tiny ppc64el 2:9.1.0861-1ubuntu1 [1078 kB] 111s Get:37 http://ftpmaster.internal/ubuntu plucky/main ppc64el vim-common all 2:9.1.0861-1ubuntu1 [395 kB] 111s Get:38 http://ftpmaster.internal/ubuntu plucky/main ppc64el xxd ppc64el 2:9.1.0861-1ubuntu1 [67.9 kB] 111s Get:39 http://ftpmaster.internal/ubuntu plucky/main ppc64el libplymouth5 ppc64el 24.004.60-2ubuntu4 [169 kB] 111s Get:40 http://ftpmaster.internal/ubuntu plucky/main ppc64el libsgutils2-1.48 ppc64el 1.48-0ubuntu1 [133 kB] 111s Get:41 http://ftpmaster.internal/ubuntu plucky/main ppc64el lsvpd ppc64el 1.7.14-1ubuntu3 [162 kB] 111s Get:42 http://ftpmaster.internal/ubuntu plucky/main ppc64el plymouth-theme-ubuntu-text ppc64el 24.004.60-2ubuntu4 [11.1 kB] 111s Get:43 http://ftpmaster.internal/ubuntu plucky/main ppc64el plymouth ppc64el 24.004.60-2ubuntu4 [152 kB] 111s Get:44 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-distro-info all 1.12 [7754 B] 112s Get:45 http://ftpmaster.internal/ubuntu plucky/main ppc64el xz-utils ppc64el 5.6.3-1 [280 kB] 112s Get:46 http://ftpmaster.internal/ubuntu plucky/main ppc64el libcurl3t64-gnutls ppc64el 8.11.0-1ubuntu2 [474 kB] 112s Get:47 http://ftpmaster.internal/ubuntu plucky/main ppc64el libstemmer0d ppc64el 2.2.0-4build1 [171 kB] 112s Get:48 http://ftpmaster.internal/ubuntu plucky/main ppc64el libappstream5 ppc64el 1.0.3-1 [272 kB] 112s Get:49 http://ftpmaster.internal/ubuntu plucky/main ppc64el appstream ppc64el 1.0.3-1 [75.2 kB] 112s Get:50 http://ftpmaster.internal/ubuntu plucky/main ppc64el bpftrace ppc64el 0.21.2-2ubuntu3 [1898 kB] 112s Get:51 http://ftpmaster.internal/ubuntu plucky/main ppc64el cloud-init all 24.4-0ubuntu1 [2088 B] 112s Get:52 http://ftpmaster.internal/ubuntu plucky/main ppc64el cloud-init-base all 24.4-0ubuntu1 [612 kB] 112s Get:53 http://ftpmaster.internal/ubuntu plucky/main ppc64el curl ppc64el 8.11.0-1ubuntu2 [256 kB] 112s Get:54 http://ftpmaster.internal/ubuntu plucky/main ppc64el libcurl4t64 ppc64el 8.11.0-1ubuntu2 [476 kB] 112s Get:55 http://ftpmaster.internal/ubuntu plucky/main ppc64el dracut-install ppc64el 105-2ubuntu2 [38.5 kB] 112s Get:56 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpackagekit-glib2-18 ppc64el 1.3.0-2 [124 kB] 112s Get:57 http://ftpmaster.internal/ubuntu plucky/main ppc64el gir1.2-packagekitglib-1.0 ppc64el 1.3.0-2 [25.5 kB] 112s Get:58 http://ftpmaster.internal/ubuntu plucky/main ppc64el libduktape207 ppc64el 2.7.0+tests-0ubuntu3 [158 kB] 112s Get:59 http://ftpmaster.internal/ubuntu plucky/main ppc64el libglib2.0-bin ppc64el 2.82.2-3 [111 kB] 112s Get:60 http://ftpmaster.internal/ubuntu plucky/main ppc64el libgstreamer1.0-0 ppc64el 1.24.9-1 [1295 kB] 112s Get:61 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpolkit-agent-1-0 ppc64el 125-2ubuntu1 [18.4 kB] 112s Get:62 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpolkit-gobject-1-0 ppc64el 125-2ubuntu1 [53.4 kB] 112s Get:63 http://ftpmaster.internal/ubuntu plucky/main ppc64el linux-base all 4.10.1ubuntu1 [34.8 kB] 112s Get:64 http://ftpmaster.internal/ubuntu plucky/main ppc64el lto-disabled-list all 54 [12.2 kB] 112s Get:65 http://ftpmaster.internal/ubuntu plucky/main ppc64el lxd-installer all 10 [5264 B] 112s Get:66 http://ftpmaster.internal/ubuntu plucky/main ppc64el xml-core all 0.19 [20.3 kB] 112s Get:67 http://ftpmaster.internal/ubuntu plucky/main ppc64el polkitd ppc64el 125-2ubuntu1 [103 kB] 112s Get:68 http://ftpmaster.internal/ubuntu plucky/main ppc64el packagekit ppc64el 1.3.0-2 [482 kB] 112s Get:69 http://ftpmaster.internal/ubuntu plucky/main ppc64el packagekit-tools ppc64el 1.3.0-2 [29.1 kB] 112s Get:70 http://ftpmaster.internal/ubuntu plucky/main ppc64el pinentry-curses ppc64el 1.3.1-0ubuntu2 [43.5 kB] 112s Get:71 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-blinker all 1.9.0-1 [10.7 kB] 112s Get:72 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-rpds-py ppc64el 0.21.0-2ubuntu1 [338 kB] 112s Get:73 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-jsonschema-specifications all 2023.12.1-2 [9116 B] 112s Get:74 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-software-properties all 0.105 [30.3 kB] 112s Get:75 http://ftpmaster.internal/ubuntu plucky/main ppc64el sg3-utils ppc64el 1.48-0ubuntu1 [1070 kB] 112s Get:76 http://ftpmaster.internal/ubuntu plucky/main ppc64el sg3-utils-udev all 1.48-0ubuntu1 [6608 B] 112s Get:77 http://ftpmaster.internal/ubuntu plucky/main ppc64el software-properties-common all 0.105 [16.5 kB] 112s Get:78 http://ftpmaster.internal/ubuntu plucky/main ppc64el unattended-upgrades all 2.9.1+nmu4ubuntu1 [51.2 kB] 112s Preconfiguring packages ... 113s Fetched 20.7 MB in 2s (11.6 MB/s) 113s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73847 files and directories currently installed.) 113s Preparing to unpack .../bash_5.2.32-1ubuntu2_ppc64el.deb ... 113s Unpacking bash (5.2.32-1ubuntu2) over (5.2.32-1ubuntu1) ... 113s Setting up bash (5.2.32-1ubuntu2) ... 113s update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode 113s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73847 files and directories currently installed.) 113s Preparing to unpack .../hostname_3.25_ppc64el.deb ... 113s Unpacking hostname (3.25) over (3.23+nmu2ubuntu2) ... 113s Setting up hostname (3.25) ... 113s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73847 files and directories currently installed.) 113s Preparing to unpack .../init-system-helpers_1.67ubuntu1_all.deb ... 113s Unpacking init-system-helpers (1.67ubuntu1) over (1.66ubuntu1) ... 113s Setting up init-system-helpers (1.67ubuntu1) ... 113s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73847 files and directories currently installed.) 113s Preparing to unpack .../liblzma5_5.6.3-1_ppc64el.deb ... 113s Unpacking liblzma5:ppc64el (5.6.3-1) over (5.6.2-2) ... 113s Setting up liblzma5:ppc64el (5.6.3-1) ... 113s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73847 files and directories currently installed.) 113s Preparing to unpack .../libapt-pkg6.0t64_2.9.14ubuntu1_ppc64el.deb ... 113s Unpacking libapt-pkg6.0t64:ppc64el (2.9.14ubuntu1) over (2.9.8) ... 113s Setting up libapt-pkg6.0t64:ppc64el (2.9.14ubuntu1) ... 113s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73847 files and directories currently installed.) 113s Preparing to unpack .../apt_2.9.14ubuntu1_ppc64el.deb ... 113s Unpacking apt (2.9.14ubuntu1) over (2.9.8) ... 114s Setting up apt (2.9.14ubuntu1) ... 114s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73839 files and directories currently installed.) 114s Preparing to unpack .../apt-utils_2.9.14ubuntu1_ppc64el.deb ... 114s Unpacking apt-utils (2.9.14ubuntu1) over (2.9.8) ... 114s Preparing to unpack .../libaudit-common_1%3a4.0.2-2ubuntu1_all.deb ... 114s Unpacking libaudit-common (1:4.0.2-2ubuntu1) over (1:4.0.1-1ubuntu2) ... 114s Setting up libaudit-common (1:4.0.2-2ubuntu1) ... 114s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73839 files and directories currently installed.) 114s Preparing to unpack .../libaudit1_1%3a4.0.2-2ubuntu1_ppc64el.deb ... 114s Unpacking libaudit1:ppc64el (1:4.0.2-2ubuntu1) over (1:4.0.1-1ubuntu2) ... 114s Setting up libaudit1:ppc64el (1:4.0.2-2ubuntu1) ... 114s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73839 files and directories currently installed.) 114s Preparing to unpack .../debconf-i18n_1.5.87ubuntu1_all.deb ... 114s Unpacking debconf-i18n (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 115s Preparing to unpack .../python3-debconf_1.5.87ubuntu1_all.deb ... 115s Unpacking python3-debconf (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 115s Preparing to unpack .../debconf_1.5.87ubuntu1_all.deb ... 115s Unpacking debconf (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 115s Setting up debconf (1.5.87ubuntu1) ... 115s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73839 files and directories currently installed.) 115s Preparing to unpack .../libpam0g_1.5.3-7ubuntu4_ppc64el.deb ... 115s Unpacking libpam0g:ppc64el (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 115s Setting up libpam0g:ppc64el (1.5.3-7ubuntu4) ... 115s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73839 files and directories currently installed.) 115s Preparing to unpack .../libselinux1_3.7-3ubuntu1_ppc64el.deb ... 115s Unpacking libselinux1:ppc64el (3.7-3ubuntu1) over (3.5-2ubuntu5) ... 115s Setting up libselinux1:ppc64el (3.7-3ubuntu1) ... 115s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73839 files and directories currently installed.) 115s Preparing to unpack .../libpam-modules-bin_1.5.3-7ubuntu4_ppc64el.deb ... 115s Unpacking libpam-modules-bin (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 115s Setting up libpam-modules-bin (1.5.3-7ubuntu4) ... 115s pam_namespace.service is a disabled or a static unit not running, not starting it. 115s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73839 files and directories currently installed.) 115s Preparing to unpack .../libpam-modules_1.5.3-7ubuntu4_ppc64el.deb ... 116s Unpacking libpam-modules:ppc64el (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 116s Setting up libpam-modules:ppc64el (1.5.3-7ubuntu4) ... 116s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73839 files and directories currently installed.) 116s Preparing to unpack .../init_1.67ubuntu1_ppc64el.deb ... 116s Unpacking init (1.67ubuntu1) over (1.66ubuntu1) ... 116s Preparing to unpack .../openssh-sftp-server_1%3a9.9p1-3ubuntu2_ppc64el.deb ... 116s Unpacking openssh-sftp-server (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 116s Preparing to unpack .../openssh-server_1%3a9.9p1-3ubuntu2_ppc64el.deb ... 116s Unpacking openssh-server (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 116s Preparing to unpack .../openssh-client_1%3a9.9p1-3ubuntu2_ppc64el.deb ... 116s Unpacking openssh-client (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 116s Preparing to unpack .../libpam-runtime_1.5.3-7ubuntu4_all.deb ... 116s Unpacking libpam-runtime (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 116s Setting up libpam-runtime (1.5.3-7ubuntu4) ... 116s Selecting previously unselected package sgml-base. 116s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73841 files and directories currently installed.) 116s Preparing to unpack .../sgml-base_1.31_all.deb ... 116s Unpacking sgml-base (1.31) ... 116s Preparing to unpack .../libsemanage-common_3.7-2build1_all.deb ... 116s Unpacking libsemanage-common (3.7-2build1) over (3.5-1build6) ... 116s Setting up libsemanage-common (3.7-2build1) ... 116s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73867 files and directories currently installed.) 116s Preparing to unpack .../libsemanage2_3.7-2build1_ppc64el.deb ... 116s Unpacking libsemanage2:ppc64el (3.7-2build1) over (3.5-1build6) ... 116s Setting up libsemanage2:ppc64el (3.7-2build1) ... 116s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 73867 files and directories currently installed.) 116s Preparing to unpack .../00-distro-info_1.12_ppc64el.deb ... 116s Unpacking distro-info (1.12) over (1.9) ... 116s Preparing to unpack .../01-gir1.2-girepository-2.0_1.82.0-2_ppc64el.deb ... 116s Unpacking gir1.2-girepository-2.0:ppc64el (1.82.0-2) over (1.80.1-4) ... 116s Preparing to unpack .../02-gir1.2-glib-2.0_2.82.2-3_ppc64el.deb ... 116s Unpacking gir1.2-glib-2.0:ppc64el (2.82.2-3) over (2.82.1-0ubuntu1) ... 116s Preparing to unpack .../03-libglib2.0-0t64_2.82.2-3_ppc64el.deb ... 116s Unpacking libglib2.0-0t64:ppc64el (2.82.2-3) over (2.82.1-0ubuntu1) ... 116s Preparing to unpack .../04-libgirepository-1.0-1_1.82.0-2_ppc64el.deb ... 116s Unpacking libgirepository-1.0-1:ppc64el (1.82.0-2) over (1.80.1-4) ... 117s Preparing to unpack .../05-libglib2.0-data_2.82.2-3_all.deb ... 117s Unpacking libglib2.0-data (2.82.2-3) over (2.82.1-0ubuntu1) ... 117s Preparing to unpack .../06-python-apt-common_2.9.0ubuntu2_all.deb ... 117s Unpacking python-apt-common (2.9.0ubuntu2) over (2.9.0ubuntu1) ... 117s Preparing to unpack .../07-python3-apt_2.9.0ubuntu2_ppc64el.deb ... 117s Unpacking python3-apt (2.9.0ubuntu2) over (2.9.0ubuntu1) ... 117s Preparing to unpack .../08-python3-dbus_1.3.2-5build4_ppc64el.deb ... 117s Unpacking python3-dbus (1.3.2-5build4) over (1.3.2-5build3) ... 117s Preparing to unpack .../09-python3-gi_3.50.0-3build1_ppc64el.deb ... 117s Unpacking python3-gi (3.50.0-3build1) over (3.50.0-3) ... 117s Preparing to unpack .../10-python3-yaml_6.0.2-1build1_ppc64el.deb ... 117s Unpacking python3-yaml (6.0.2-1build1) over (6.0.2-1) ... 117s Preparing to unpack .../11-vim-tiny_2%3a9.1.0861-1ubuntu1_ppc64el.deb ... 117s Unpacking vim-tiny (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 117s Preparing to unpack .../12-vim-common_2%3a9.1.0861-1ubuntu1_all.deb ... 117s Unpacking vim-common (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 117s Preparing to unpack .../13-xxd_2%3a9.1.0861-1ubuntu1_ppc64el.deb ... 117s Unpacking xxd (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 117s Preparing to unpack .../14-libplymouth5_24.004.60-2ubuntu4_ppc64el.deb ... 117s Unpacking libplymouth5:ppc64el (24.004.60-2ubuntu4) over (24.004.60-1ubuntu11) ... 117s Selecting previously unselected package libsgutils2-1.48:ppc64el. 117s Preparing to unpack .../15-libsgutils2-1.48_1.48-0ubuntu1_ppc64el.deb ... 117s Unpacking libsgutils2-1.48:ppc64el (1.48-0ubuntu1) ... 117s Preparing to unpack .../16-lsvpd_1.7.14-1ubuntu3_ppc64el.deb ... 117s Unpacking lsvpd (1.7.14-1ubuntu3) over (1.7.14-1ubuntu2) ... 117s Preparing to unpack .../17-plymouth-theme-ubuntu-text_24.004.60-2ubuntu4_ppc64el.deb ... 117s Unpacking plymouth-theme-ubuntu-text (24.004.60-2ubuntu4) over (24.004.60-1ubuntu11) ... 117s Preparing to unpack .../18-plymouth_24.004.60-2ubuntu4_ppc64el.deb ... 117s Unpacking plymouth (24.004.60-2ubuntu4) over (24.004.60-1ubuntu11) ... 117s Selecting previously unselected package python3-distro-info. 117s Preparing to unpack .../19-python3-distro-info_1.12_all.deb ... 117s Unpacking python3-distro-info (1.12) ... 117s Preparing to unpack .../20-xz-utils_5.6.3-1_ppc64el.deb ... 117s Unpacking xz-utils (5.6.3-1) over (5.6.2-2) ... 117s Preparing to unpack .../21-libcurl3t64-gnutls_8.11.0-1ubuntu2_ppc64el.deb ... 117s Unpacking libcurl3t64-gnutls:ppc64el (8.11.0-1ubuntu2) over (8.9.1-2ubuntu2) ... 117s Selecting previously unselected package libstemmer0d:ppc64el. 117s Preparing to unpack .../22-libstemmer0d_2.2.0-4build1_ppc64el.deb ... 117s Unpacking libstemmer0d:ppc64el (2.2.0-4build1) ... 117s Selecting previously unselected package libappstream5:ppc64el. 117s Preparing to unpack .../23-libappstream5_1.0.3-1_ppc64el.deb ... 117s Unpacking libappstream5:ppc64el (1.0.3-1) ... 117s Selecting previously unselected package appstream. 117s Preparing to unpack .../24-appstream_1.0.3-1_ppc64el.deb ... 118s Unpacking appstream (1.0.3-1) ... 118s Preparing to unpack .../25-bpftrace_0.21.2-2ubuntu3_ppc64el.deb ... 118s Unpacking bpftrace (0.21.2-2ubuntu3) over (0.21.2-2ubuntu2) ... 118s Preparing to unpack .../26-cloud-init_24.4-0ubuntu1_all.deb ... 118s Unpacking cloud-init (24.4-0ubuntu1) over (24.4~3+really24.3.1-0ubuntu4) ... 118s dpkg: warning: unable to delete old directory '/etc/cloud/templates': Directory not empty 118s dpkg: warning: unable to delete old directory '/etc/cloud/cloud.cfg.d': Directory not empty 118s dpkg: warning: unable to delete old directory '/etc/cloud': Directory not empty 118s Selecting previously unselected package cloud-init-base. 118s Preparing to unpack .../27-cloud-init-base_24.4-0ubuntu1_all.deb ... 118s Unpacking cloud-init-base (24.4-0ubuntu1) ... 118s Preparing to unpack .../28-curl_8.11.0-1ubuntu2_ppc64el.deb ... 118s Unpacking curl (8.11.0-1ubuntu2) over (8.9.1-2ubuntu2) ... 118s Preparing to unpack .../29-libcurl4t64_8.11.0-1ubuntu2_ppc64el.deb ... 118s Unpacking libcurl4t64:ppc64el (8.11.0-1ubuntu2) over (8.9.1-2ubuntu2) ... 118s Preparing to unpack .../30-dracut-install_105-2ubuntu2_ppc64el.deb ... 118s Unpacking dracut-install (105-2ubuntu2) over (105-1ubuntu1) ... 118s Selecting previously unselected package libpackagekit-glib2-18:ppc64el. 118s Preparing to unpack .../31-libpackagekit-glib2-18_1.3.0-2_ppc64el.deb ... 118s Unpacking libpackagekit-glib2-18:ppc64el (1.3.0-2) ... 118s Selecting previously unselected package gir1.2-packagekitglib-1.0. 118s Preparing to unpack .../32-gir1.2-packagekitglib-1.0_1.3.0-2_ppc64el.deb ... 118s Unpacking gir1.2-packagekitglib-1.0 (1.3.0-2) ... 118s Selecting previously unselected package libduktape207:ppc64el. 118s Preparing to unpack .../33-libduktape207_2.7.0+tests-0ubuntu3_ppc64el.deb ... 118s Unpacking libduktape207:ppc64el (2.7.0+tests-0ubuntu3) ... 118s Selecting previously unselected package libglib2.0-bin. 118s Preparing to unpack .../34-libglib2.0-bin_2.82.2-3_ppc64el.deb ... 118s Unpacking libglib2.0-bin (2.82.2-3) ... 118s Selecting previously unselected package libgstreamer1.0-0:ppc64el. 118s Preparing to unpack .../35-libgstreamer1.0-0_1.24.9-1_ppc64el.deb ... 118s Unpacking libgstreamer1.0-0:ppc64el (1.24.9-1) ... 119s Preparing to unpack .../36-libpolkit-agent-1-0_125-2ubuntu1_ppc64el.deb ... 119s Unpacking libpolkit-agent-1-0:ppc64el (125-2ubuntu1) over (124-2ubuntu1) ... 119s Preparing to unpack .../37-libpolkit-gobject-1-0_125-2ubuntu1_ppc64el.deb ... 119s Unpacking libpolkit-gobject-1-0:ppc64el (125-2ubuntu1) over (124-2ubuntu1) ... 119s Preparing to unpack .../38-linux-base_4.10.1ubuntu1_all.deb ... 119s Unpacking linux-base (4.10.1ubuntu1) over (4.5ubuntu9) ... 119s Preparing to unpack .../39-lto-disabled-list_54_all.deb ... 119s Unpacking lto-disabled-list (54) over (53) ... 119s Preparing to unpack .../40-lxd-installer_10_all.deb ... 119s Unpacking lxd-installer (10) over (9) ... 119s Selecting previously unselected package xml-core. 119s Preparing to unpack .../41-xml-core_0.19_all.deb ... 119s Unpacking xml-core (0.19) ... 119s Selecting previously unselected package polkitd. 119s Preparing to unpack .../42-polkitd_125-2ubuntu1_ppc64el.deb ... 119s Unpacking polkitd (125-2ubuntu1) ... 119s Selecting previously unselected package packagekit. 119s Preparing to unpack .../43-packagekit_1.3.0-2_ppc64el.deb ... 119s Unpacking packagekit (1.3.0-2) ... 119s Selecting previously unselected package packagekit-tools. 119s Preparing to unpack .../44-packagekit-tools_1.3.0-2_ppc64el.deb ... 119s Unpacking packagekit-tools (1.3.0-2) ... 119s Preparing to unpack .../45-pinentry-curses_1.3.1-0ubuntu2_ppc64el.deb ... 119s Unpacking pinentry-curses (1.3.1-0ubuntu2) over (1.2.1-3ubuntu5) ... 119s Preparing to unpack .../46-python3-blinker_1.9.0-1_all.deb ... 119s Unpacking python3-blinker (1.9.0-1) over (1.8.2-1) ... 119s Preparing to unpack .../47-python3-rpds-py_0.21.0-2ubuntu1_ppc64el.deb ... 119s Unpacking python3-rpds-py (0.21.0-2ubuntu1) over (0.20.0-0ubuntu3) ... 119s Preparing to unpack .../48-python3-jsonschema-specifications_2023.12.1-2_all.deb ... 119s Unpacking python3-jsonschema-specifications (2023.12.1-2) over (2023.12.1-1ubuntu1) ... 119s Selecting previously unselected package python3-software-properties. 119s Preparing to unpack .../49-python3-software-properties_0.105_all.deb ... 119s Unpacking python3-software-properties (0.105) ... 119s Preparing to unpack .../50-sg3-utils_1.48-0ubuntu1_ppc64el.deb ... 119s Unpacking sg3-utils (1.48-0ubuntu1) over (1.46-3ubuntu5) ... 119s Preparing to unpack .../51-sg3-utils-udev_1.48-0ubuntu1_all.deb ... 119s Unpacking sg3-utils-udev (1.48-0ubuntu1) over (1.46-3ubuntu5) ... 119s Selecting previously unselected package software-properties-common. 119s Preparing to unpack .../52-software-properties-common_0.105_all.deb ... 119s Unpacking software-properties-common (0.105) ... 119s Selecting previously unselected package unattended-upgrades. 119s Preparing to unpack .../53-unattended-upgrades_2.9.1+nmu4ubuntu1_all.deb ... 119s Unpacking unattended-upgrades (2.9.1+nmu4ubuntu1) ... 119s Setting up pinentry-curses (1.3.1-0ubuntu2) ... 119s Setting up distro-info (1.12) ... 119s Setting up lto-disabled-list (54) ... 119s Setting up apt-utils (2.9.14ubuntu1) ... 119s Setting up linux-base (4.10.1ubuntu1) ... 119s Setting up init (1.67ubuntu1) ... 119s Setting up libcurl4t64:ppc64el (8.11.0-1ubuntu2) ... 119s Setting up bpftrace (0.21.2-2ubuntu3) ... 119s Setting up openssh-client (1:9.9p1-3ubuntu2) ... 119s Setting up python3-debconf (1.5.87ubuntu1) ... 120s Setting up libcurl3t64-gnutls:ppc64el (8.11.0-1ubuntu2) ... 120s Setting up libsgutils2-1.48:ppc64el (1.48-0ubuntu1) ... 120s Setting up python3-yaml (6.0.2-1build1) ... 120s Setting up debconf-i18n (1.5.87ubuntu1) ... 120s Setting up cloud-init-base (24.4-0ubuntu1) ... 121s Setting up xxd (2:9.1.0861-1ubuntu1) ... 121s Setting up libglib2.0-0t64:ppc64el (2.82.2-3) ... 121s No schema files found: doing nothing. 121s Setting up libglib2.0-data (2.82.2-3) ... 121s Setting up vim-common (2:9.1.0861-1ubuntu1) ... 121s Setting up xz-utils (5.6.3-1) ... 121s Setting up gir1.2-glib-2.0:ppc64el (2.82.2-3) ... 121s Setting up lxd-installer (10) ... 122s Setting up python3-rpds-py (0.21.0-2ubuntu1) ... 122s Setting up python-apt-common (2.9.0ubuntu2) ... 122s Setting up dracut-install (105-2ubuntu2) ... 122s Setting up libduktape207:ppc64el (2.7.0+tests-0ubuntu3) ... 122s Setting up libplymouth5:ppc64el (24.004.60-2ubuntu4) ... 122s Setting up libgirepository-1.0-1:ppc64el (1.82.0-2) ... 122s Setting up sgml-base (1.31) ... 122s Setting up curl (8.11.0-1ubuntu2) ... 122s Setting up libstemmer0d:ppc64el (2.2.0-4build1) ... 122s Setting up python3-jsonschema-specifications (2023.12.1-2) ... 122s Setting up python3-distro-info (1.12) ... 122s Setting up libpolkit-gobject-1-0:ppc64el (125-2ubuntu1) ... 122s Setting up libgstreamer1.0-0:ppc64el (1.24.9-1) ... 122s Setcap worked! gst-ptp-helper is not suid! 122s Setting up sg3-utils (1.48-0ubuntu1) ... 122s Setting up python3-blinker (1.9.0-1) ... 122s Setting up openssh-sftp-server (1:9.9p1-3ubuntu2) ... 122s Setting up python3-dbus (1.3.2-5build4) ... 123s Setting up cloud-init (24.4-0ubuntu1) ... 123s Setting up openssh-server (1:9.9p1-3ubuntu2) ... 123s Installing new version of config file /etc/ssh/moduli ... 123s Replacing config file /etc/ssh/sshd_config with new version 124s Setting up plymouth (24.004.60-2ubuntu4) ... 124s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 124s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 124s Setting up python3-apt (2.9.0ubuntu2) ... 125s Setting up lsvpd (1.7.14-1ubuntu3) ... 125s Setting up libglib2.0-bin (2.82.2-3) ... 125s Setting up libpackagekit-glib2-18:ppc64el (1.3.0-2) ... 125s Setting up libappstream5:ppc64el (1.0.3-1) ... 125s Setting up vim-tiny (2:9.1.0861-1ubuntu1) ... 125s Setting up sg3-utils-udev (1.48-0ubuntu1) ... 125s update-initramfs: deferring update (trigger activated) 125s Setting up gir1.2-packagekitglib-1.0 (1.3.0-2) ... 125s Setting up unattended-upgrades (2.9.1+nmu4ubuntu1) ... 125s 125s Creating config file /etc/apt/apt.conf.d/20auto-upgrades with new version 125s 125s Creating config file /etc/apt/apt.conf.d/50unattended-upgrades with new version 125s Created symlink '/etc/systemd/system/multi-user.target.wants/unattended-upgrades.service' → '/usr/lib/systemd/system/unattended-upgrades.service'. 125s Synchronizing state of unattended-upgrades.service with SysV service script with /usr/lib/systemd/systemd-sysv-install. 125s Executing: /usr/lib/systemd/systemd-sysv-install enable unattended-upgrades 126s Setting up appstream (1.0.3-1) ... 126s ✔ Metadata cache was updated successfully. 126s Setting up gir1.2-girepository-2.0:ppc64el (1.82.0-2) ... 126s Setting up python3-gi (3.50.0-3build1) ... 127s Setting up xml-core (0.19) ... 127s Setting up libpolkit-agent-1-0:ppc64el (125-2ubuntu1) ... 127s Setting up python3-software-properties (0.105) ... 127s Processing triggers for debianutils (5.21) ... 127s Processing triggers for install-info (7.1.1-1) ... 127s Processing triggers for initramfs-tools (0.142ubuntu35) ... 127s update-initramfs: Generating /boot/initrd.img-6.11.0-8-generic 127s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 135s Processing triggers for libc-bin (2.40-1ubuntu3) ... 135s Processing triggers for rsyslog (8.2406.0-1ubuntu2) ... 135s Processing triggers for ufw (0.36.2-8) ... 135s Processing triggers for man-db (2.13.0-1) ... 138s Setting up plymouth-theme-ubuntu-text (24.004.60-2ubuntu4) ... 138s Processing triggers for dbus (1.14.10-4ubuntu5) ... 138s Processing triggers for sgml-base (1.31) ... 138s Setting up polkitd (125-2ubuntu1) ... 138s Setting up packagekit (1.3.0-2) ... 138s Created symlink '/etc/systemd/user/sockets.target.wants/pk-debconf-helper.socket' → '/usr/lib/systemd/user/pk-debconf-helper.socket'. 138s Setting up packagekit-tools (1.3.0-2) ... 138s Setting up software-properties-common (0.105) ... 138s Processing triggers for initramfs-tools (0.142ubuntu35) ... 138s update-initramfs: Generating /boot/initrd.img-6.11.0-8-generic 138s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 145s Processing triggers for dbus (1.14.10-4ubuntu5) ... 146s Reading package lists... 147s Building dependency tree... 147s Reading state information... 147s The following packages will be REMOVED: 147s libsgutils2-1.46-2* 147s 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 147s After this operation, 380 kB disk space will be freed. 147s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74216 files and directories currently installed.) 147s Removing libsgutils2-1.46-2:ppc64el (1.46-3ubuntu5) ... 147s Processing triggers for libc-bin (2.40-1ubuntu3) ... 147s Reading package lists... 148s Building dependency tree... 148s Reading state information... 148s The following packages will be REMOVED: 148s python3-distro-info* unattended-upgrades* 148s 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. 148s After this operation, 465 kB disk space will be freed. 148s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74211 files and directories currently installed.) 148s Removing unattended-upgrades (2.9.1+nmu4ubuntu1) ... 148s Removing python3-distro-info (1.12) ... 148s Processing triggers for man-db (2.13.0-1) ... 149s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74174 files and directories currently installed.) 149s Purging configuration files for unattended-upgrades (2.9.1+nmu4ubuntu1) ... 150s dpkg: warning: while removing unattended-upgrades, directory '/var/log/unattended-upgrades' not empty so not removed 150s dpkg: warning: while removing unattended-upgrades, directory '/lib/systemd/system-sleep' not empty so not removed 150s Hit:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease 150s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 151s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 151s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 152s Reading package lists... 152s Reading package lists... 152s Building dependency tree... 152s Reading state information... 152s Calculating upgrade... 152s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 152s Reading package lists... 153s Building dependency tree... 153s Reading state information... 153s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 153s autopkgtest [16:18:56]: rebooting testbed after setup commands that affected boot 157s autopkgtest-virt-ssh: WARNING: ssh connection failed. Retrying in 3 seconds... 185s autopkgtest [16:19:28]: testbed running kernel: Linux 6.11.0-8-generic #8-Ubuntu SMP Mon Sep 16 13:49:23 UTC 2024 188s autopkgtest [16:19:31]: @@@@@@@@@@@@@@@@@@@@ apt-source git-ubuntu 190s Get:1 http://ftpmaster.internal/ubuntu plucky/universe git-ubuntu 1.1-1 (dsc) [2280 B] 190s Get:2 http://ftpmaster.internal/ubuntu plucky/universe git-ubuntu 1.1-1 (tar) [179 kB] 190s Get:3 http://ftpmaster.internal/ubuntu plucky/universe git-ubuntu 1.1-1 (diff) [5776 B] 190s gpgv: Signature made Wed Jul 3 16:18:24 2024 UTC 190s gpgv: using RSA key A62D2CFBD50B9B5BF360D54B159EB5C4EFC8774C 190s gpgv: Can't check signature: No public key 190s dpkg-source: warning: cannot verify inline signature for ./git-ubuntu_1.1-1.dsc: no acceptable signature found 190s autopkgtest [16:19:33]: testing package git-ubuntu version 1.1-1 191s autopkgtest [16:19:34]: build not needed 191s autopkgtest [16:19:34]: test self-test: preparing testbed 195s Reading package lists... 195s Building dependency tree... 195s Reading state information... 195s Starting pkgProblemResolver with broken count: 0 195s Starting 2 pkgProblemResolver with broken count: 0 195s Done 196s The following additional packages will be installed: 196s dctrl-tools debian-archive-keyring devscripts diffstat dput gettext git 196s git-buildpackage git-man git-ubuntu libb-hooks-op-check-perl 196s libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-perl 196s libdevel-callchecker-perl libdynaloader-functions-perl libencode-locale-perl 196s liberror-perl libfile-dirlist-perl libfile-homedir-perl libfile-listing-perl 196s libfile-touch-perl libfile-which-perl libgit2-1.8 libgomp1 196s libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl 196s libhttp-cookies-perl libhttp-date-perl libhttp-message-perl 196s libhttp-negotiate-perl libhttp-parser2.9 libimport-into-perl libio-html-perl 196s libio-pty-perl libio-socket-ssl-perl libipc-run-perl libjs-jquery 196s libjs-jquery-hotkeys libjs-jquery-isonscreen libjs-jquery-metadata 196s libjs-jquery-tablesorter libjs-jquery-throttle-debounce libjs-sphinxdoc 196s libjs-underscore liblwp-mediatypes-perl liblwp-protocol-https-perl 196s libmodule-runtime-perl libmoo-perl libnet-http-perl libnet-ssleay-perl 196s libnorm1t64 libparams-classify-perl libpgm-5.3-0t64 libpython3.13-minimal 196s libpython3.13-stdlib librole-tiny-perl libsodium23 libsub-quote-perl 196s libsys-cpuaffinity-perl libtimedate-perl libtry-tiny-perl liburi-perl 196s libwww-perl libwww-robotrules-perl libxdelta2t64 libzmq5 patchutils pbzip2 196s perl-openssl-defaults pixz pristine-tar pylint python3-argcomplete 196s python3-astroid python3-cachetools python3-coverage python3-dateutil 196s python3-debian python3-debianbts python3-dill python3-distro-info 196s python3-gpg python3-importlib-metadata python3-iniconfig python3-isort 196s python3-jaraco.classes python3-jeepney python3-keyring python3-keyrings.alt 196s python3-launchpadlib-desktop python3-logilab-common python3-mccabe 196s python3-mypy-extensions python3-packaging python3-platformdirs 196s python3-pluggy python3-py python3-pycryptodome python3-pygit2 python3-pytest 196s python3-pytest-cov python3-secretstorage python3-tenacity python3-tomlkit 196s python3-ubuntutools python3-xdg python3-zmq python3.13 python3.13-minimal 196s quilt ubuntu-dev-tools wdiff xdelta xdelta3 196s Suggested packages: 196s debtags adequate at autopkgtest bls-standalone bsd-mailx | mailx 196s build-essential check-all-the-things cvs-buildpackage debhelper diffoscope 196s disorderfs docker.io dose-extra duck elpa-devscripts faketime gnuplot 196s how-can-i-help libauthen-sasl-perl libdbd-pg-perl libfile-desktopentry-perl 196s libterm-size-perl libyaml-syck-perl mmdebstrap mutt piuparts 196s postgresql-client pristine-lfs python3-pycurl ratt reprotest 196s svn-buildpackage w3m debian-keyring equivs libgitlab-api-v4-perl 196s libsoap-lite-perl lintian mini-dinstall autopoint gettext-doc 196s libasprintf-dev libgettextpo-dev git-daemon-run | git-daemon-sysvinit 196s git-doc git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn 196s python3-notify2 unzip libdata-dump-perl libio-compress-brotli-perl 196s libcrypt-ssleay-perl libscalar-number-perl libxstring-perl libsub-name-perl 196s libbusiness-isbn-perl libmime-base32-perl libregexp-ipv6-perl 196s libauthen-ntlm-perl python-coverage-doc python3-objgraph gir1.2-secret-1 196s gnome-keyring libkf5wallet-bin python3-shtab subversion python-pygit2-doc 196s gnome-keyring | libkf5wallet-bin | keepassxc python-secretstorage-doc 196s python-tenacity-doc python-pyxdg-doc python3.13-venv python3.13-doc 196s binfmt-support default-mta | mail-transport-agent graphviz procmail bzr 196s | brz bzr-builddeb | brz-debian qemu-user-static wdiff-doc 196s Recommended packages: 196s libdistro-info-perl libgit-wrapper-perl libjson-perl liblist-compare-perl 196s libstring-shellquote-perl licensecheck lintian python3-magic python3-unidiff 196s unzip python3-paramiko cowbuilder | pbuilder | sbuild libhtml-format-perl 196s javascript-common libnamespace-clean-perl libdata-dump-perl 196s libhtml-form-perl libhttp-daemon-perl libmailtools-perl python3-tk arch-test 196s debian-keyring debootstrap genisoimage sbuild | pbuilder | cowbuilder 196s python3-dns reportbug 196s The following NEW packages will be installed: 196s autopkgtest-satdep dctrl-tools debian-archive-keyring devscripts diffstat 196s dput gettext git git-buildpackage git-man git-ubuntu 196s libb-hooks-op-check-perl libclass-method-modifiers-perl 196s libclass-xsaccessor-perl libclone-perl libdevel-callchecker-perl 196s libdynaloader-functions-perl libencode-locale-perl liberror-perl 196s libfile-dirlist-perl libfile-homedir-perl libfile-listing-perl 196s libfile-touch-perl libfile-which-perl libgit2-1.8 libgomp1 196s libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl 196s libhttp-cookies-perl libhttp-date-perl libhttp-message-perl 196s libhttp-negotiate-perl libhttp-parser2.9 libimport-into-perl libio-html-perl 196s libio-pty-perl libio-socket-ssl-perl libipc-run-perl libjs-jquery 196s libjs-jquery-hotkeys libjs-jquery-isonscreen libjs-jquery-metadata 196s libjs-jquery-tablesorter libjs-jquery-throttle-debounce libjs-sphinxdoc 196s libjs-underscore liblwp-mediatypes-perl liblwp-protocol-https-perl 196s libmodule-runtime-perl libmoo-perl libnet-http-perl libnet-ssleay-perl 196s libnorm1t64 libparams-classify-perl libpgm-5.3-0t64 libpython3.13-minimal 196s libpython3.13-stdlib librole-tiny-perl libsodium23 libsub-quote-perl 196s libsys-cpuaffinity-perl libtimedate-perl libtry-tiny-perl liburi-perl 196s libwww-perl libwww-robotrules-perl libxdelta2t64 libzmq5 patchutils pbzip2 196s perl-openssl-defaults pixz pristine-tar pylint python3-argcomplete 196s python3-astroid python3-cachetools python3-coverage python3-dateutil 196s python3-debian python3-debianbts python3-dill python3-distro-info 196s python3-gpg python3-importlib-metadata python3-iniconfig python3-isort 196s python3-jaraco.classes python3-jeepney python3-keyring python3-keyrings.alt 196s python3-launchpadlib-desktop python3-logilab-common python3-mccabe 196s python3-mypy-extensions python3-packaging python3-platformdirs 196s python3-pluggy python3-py python3-pycryptodome python3-pygit2 python3-pytest 196s python3-pytest-cov python3-secretstorage python3-tenacity python3-tomlkit 196s python3-ubuntutools python3-xdg python3-zmq python3.13 python3.13-minimal 196s quilt ubuntu-dev-tools wdiff xdelta xdelta3 196s 0 upgraded, 117 newly installed, 0 to remove and 0 not upgraded. 196s Need to get 27.3 MB/27.3 MB of archives. 196s After this operation, 117 MB of additional disk space will be used. 196s Get:1 /tmp/autopkgtest.qOEoya/1-autopkgtest-satdep.deb autopkgtest-satdep ppc64el 0 [712 B] 196s Get:2 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpython3.13-minimal ppc64el 3.13.0-2 [881 kB] 196s Get:3 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3.13-minimal ppc64el 3.13.0-2 [2302 kB] 197s Get:4 http://ftpmaster.internal/ubuntu plucky/main ppc64el libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 197s Get:5 http://ftpmaster.internal/ubuntu plucky/universe ppc64el libjs-jquery-hotkeys all 0~20130707+git2d51e3a9+dfsg-2.1 [11.5 kB] 197s Get:6 http://ftpmaster.internal/ubuntu plucky/main ppc64el dctrl-tools ppc64el 2.24-3build3 [109 kB] 197s Get:7 http://ftpmaster.internal/ubuntu plucky/universe ppc64el debian-archive-keyring all 2023.4ubuntu1 [168 kB] 197s Get:8 http://ftpmaster.internal/ubuntu plucky/main ppc64el libfile-dirlist-perl all 0.05-3 [7286 B] 197s Get:9 http://ftpmaster.internal/ubuntu plucky/main ppc64el libfile-which-perl all 1.27-2 [12.5 kB] 197s Get:10 http://ftpmaster.internal/ubuntu plucky/main ppc64el libfile-homedir-perl all 1.006-2 [37.0 kB] 197s Get:11 http://ftpmaster.internal/ubuntu plucky/main ppc64el libfile-touch-perl all 0.12-2 [7498 B] 197s Get:12 http://ftpmaster.internal/ubuntu plucky/main ppc64el libio-pty-perl ppc64el 1:1.20-1build3 [32.0 kB] 197s Get:13 http://ftpmaster.internal/ubuntu plucky/main ppc64el libipc-run-perl all 20231003.0-2 [91.5 kB] 197s Get:14 http://ftpmaster.internal/ubuntu plucky/main ppc64el libclass-method-modifiers-perl all 2.15-1 [16.1 kB] 197s Get:15 http://ftpmaster.internal/ubuntu plucky/main ppc64el libclass-xsaccessor-perl ppc64el 1.19-4build5 [35.1 kB] 197s Get:16 http://ftpmaster.internal/ubuntu plucky/main ppc64el libb-hooks-op-check-perl ppc64el 0.22-3build2 [9884 B] 197s Get:17 http://ftpmaster.internal/ubuntu plucky/main ppc64el libdynaloader-functions-perl all 0.004-1 [11.4 kB] 197s Get:18 http://ftpmaster.internal/ubuntu plucky/main ppc64el libdevel-callchecker-perl ppc64el 0.009-1build1 [14.1 kB] 197s Get:19 http://ftpmaster.internal/ubuntu plucky/main ppc64el libparams-classify-perl ppc64el 0.015-2build6 [22.2 kB] 197s Get:20 http://ftpmaster.internal/ubuntu plucky/main ppc64el libmodule-runtime-perl all 0.016-2 [16.4 kB] 197s Get:21 http://ftpmaster.internal/ubuntu plucky/main ppc64el libimport-into-perl all 1.002005-2 [10.7 kB] 197s Get:22 http://ftpmaster.internal/ubuntu plucky/main ppc64el librole-tiny-perl all 2.002004-1 [16.3 kB] 197s Get:23 http://ftpmaster.internal/ubuntu plucky/main ppc64el libsub-quote-perl all 2.006008-1ubuntu1 [20.7 kB] 197s Get:24 http://ftpmaster.internal/ubuntu plucky/main ppc64el libmoo-perl all 2.005005-1 [47.4 kB] 197s Get:25 http://ftpmaster.internal/ubuntu plucky/main ppc64el libencode-locale-perl all 1.05-3 [11.6 kB] 197s Get:26 http://ftpmaster.internal/ubuntu plucky/main ppc64el libtimedate-perl all 2.3300-2 [34.0 kB] 197s Get:27 http://ftpmaster.internal/ubuntu plucky/main ppc64el libhttp-date-perl all 6.06-1 [10.2 kB] 197s Get:28 http://ftpmaster.internal/ubuntu plucky/main ppc64el libfile-listing-perl all 6.16-1 [11.3 kB] 197s Get:29 http://ftpmaster.internal/ubuntu plucky/main ppc64el libhtml-tagset-perl all 3.24-1 [14.1 kB] 197s Get:30 http://ftpmaster.internal/ubuntu plucky/main ppc64el liburi-perl all 5.30-1 [94.4 kB] 197s Get:31 http://ftpmaster.internal/ubuntu plucky/main ppc64el libhtml-parser-perl ppc64el 3.83-1build1 [91.8 kB] 197s Get:32 http://ftpmaster.internal/ubuntu plucky/main ppc64el libhtml-tree-perl all 5.07-3 [200 kB] 197s Get:33 http://ftpmaster.internal/ubuntu plucky/main ppc64el libclone-perl ppc64el 0.47-1 [11.1 kB] 197s Get:34 http://ftpmaster.internal/ubuntu plucky/main ppc64el libio-html-perl all 1.004-3 [15.9 kB] 197s Get:35 http://ftpmaster.internal/ubuntu plucky/main ppc64el liblwp-mediatypes-perl all 6.04-2 [20.1 kB] 197s Get:36 http://ftpmaster.internal/ubuntu plucky/main ppc64el libhttp-message-perl all 7.00-2ubuntu1 [75.9 kB] 197s Get:37 http://ftpmaster.internal/ubuntu plucky/main ppc64el libhttp-cookies-perl all 6.11-1 [18.2 kB] 197s Get:38 http://ftpmaster.internal/ubuntu plucky/main ppc64el libhttp-negotiate-perl all 6.01-2 [12.4 kB] 197s Get:39 http://ftpmaster.internal/ubuntu plucky/main ppc64el perl-openssl-defaults ppc64el 7build3 [6628 B] 197s Get:40 http://ftpmaster.internal/ubuntu plucky/main ppc64el libnet-ssleay-perl ppc64el 1.94-2 [323 kB] 197s Get:41 http://ftpmaster.internal/ubuntu plucky/main ppc64el libio-socket-ssl-perl all 2.089-1 [200 kB] 197s Get:42 http://ftpmaster.internal/ubuntu plucky/main ppc64el libnet-http-perl all 6.23-1 [22.3 kB] 197s Get:43 http://ftpmaster.internal/ubuntu plucky/main ppc64el liblwp-protocol-https-perl all 6.14-1 [9040 B] 197s Get:44 http://ftpmaster.internal/ubuntu plucky/main ppc64el libtry-tiny-perl all 0.32-1 [21.2 kB] 197s Get:45 http://ftpmaster.internal/ubuntu plucky/main ppc64el libwww-robotrules-perl all 6.02-1 [12.6 kB] 197s Get:46 http://ftpmaster.internal/ubuntu plucky/main ppc64el libwww-perl all 6.77-1 [138 kB] 197s Get:47 http://ftpmaster.internal/ubuntu plucky/main ppc64el patchutils ppc64el 0.4.2-1build3 [86.6 kB] 197s Get:48 http://ftpmaster.internal/ubuntu plucky/main ppc64el wdiff ppc64el 1.2.2-6build1 [29.0 kB] 197s Get:49 http://ftpmaster.internal/ubuntu plucky/main ppc64el devscripts all 2.24.3 [1080 kB] 197s Get:50 http://ftpmaster.internal/ubuntu plucky/main ppc64el diffstat ppc64el 1.67-1 [34.2 kB] 197s Get:51 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-debian all 0.1.49ubuntu3 [116 kB] 197s Get:52 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-gpg ppc64el 1.24.0-2ubuntu1 [277 kB] 197s Get:53 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-xdg all 0.28-2 [38.3 kB] 197s Get:54 http://ftpmaster.internal/ubuntu plucky/main ppc64el dput all 1.2.4ubuntu1 [49.1 kB] 197s Get:55 http://ftpmaster.internal/ubuntu plucky/main ppc64el libgomp1 ppc64el 14.2.0-8ubuntu1 [161 kB] 197s Get:56 http://ftpmaster.internal/ubuntu plucky/main ppc64el gettext ppc64el 0.22.5-2 [1082 kB] 197s Get:57 http://ftpmaster.internal/ubuntu plucky/main ppc64el liberror-perl all 0.17029-2 [25.6 kB] 197s Get:58 http://ftpmaster.internal/ubuntu plucky/main ppc64el git-man all 1:2.45.2-1.2ubuntu1 [1122 kB] 197s Get:59 http://ftpmaster.internal/ubuntu plucky/main ppc64el git ppc64el 1:2.45.2-1.2ubuntu1 [7187 kB] 198s Get:60 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-dateutil all 2.9.0-3 [80.2 kB] 198s Get:61 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-importlib-metadata all 8.5.0-1 [20.7 kB] 198s Get:62 http://ftpmaster.internal/ubuntu plucky/universe ppc64el git-buildpackage all 0.9.35 [677 kB] 198s Get:63 http://ftpmaster.internal/ubuntu plucky/universe ppc64el libsys-cpuaffinity-perl ppc64el 1.13~03-2build4 [32.6 kB] 198s Get:64 http://ftpmaster.internal/ubuntu plucky/universe ppc64el pbzip2 ppc64el 1.1.13-1build1 [42.5 kB] 198s Get:65 http://ftpmaster.internal/ubuntu plucky/universe ppc64el pixz ppc64el 1.0.7-3 [23.8 kB] 198s Get:66 http://ftpmaster.internal/ubuntu plucky/universe ppc64el libxdelta2t64 ppc64el 1.1.3-10.7 [60.3 kB] 198s Get:67 http://ftpmaster.internal/ubuntu plucky/universe ppc64el xdelta ppc64el 1.1.3-10.7 [27.7 kB] 198s Get:68 http://ftpmaster.internal/ubuntu plucky/universe ppc64el xdelta3 ppc64el 3.0.11-dfsg-1.2 [101 kB] 198s Get:69 http://ftpmaster.internal/ubuntu plucky/universe ppc64el pristine-tar ppc64el 1.50+nmu2build1 [146 kB] 198s Get:70 http://ftpmaster.internal/ubuntu plucky/universe ppc64el quilt all 0.68-1 [439 kB] 198s Get:71 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-debianbts all 4.1.1 [12.8 kB] 198s Get:72 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-jeepney all 0.8.0-4 [33.1 kB] 198s Get:73 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-secretstorage all 3.3.3-3 [13.7 kB] 198s Get:74 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-jaraco.classes all 3.4.0-1 [7664 B] 198s Get:75 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-keyring all 25.4.1-1 [40.5 kB] 198s Get:76 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-launchpadlib-desktop all 2.0.0-1 [1778 B] 198s Get:77 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-ubuntutools all 0.203 [67.4 kB] 198s Get:78 http://ftpmaster.internal/ubuntu plucky/universe ppc64el ubuntu-dev-tools all 0.203 [93.2 kB] 198s Get:79 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-astroid all 3.3.5-1 [174 kB] 198s Get:80 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-isort all 5.13.2-2 [59.3 kB] 198s Get:81 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-mypy-extensions all 1.0.0-1 [6148 B] 198s Get:82 http://ftpmaster.internal/ubuntu plucky/main ppc64el libjs-underscore all 1.13.4~dfsg+~1.11.4-3 [118 kB] 198s Get:83 http://ftpmaster.internal/ubuntu plucky/main ppc64el libjs-sphinxdoc all 7.4.7-4 [158 kB] 198s Get:84 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-logilab-common all 2.0.0-1 [281 kB] 198s Get:85 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-dill all 0.3.9-1 [84.5 kB] 198s Get:86 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-mccabe all 0.7.0-1 [8678 B] 198s Get:87 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-platformdirs all 4.3.6-1 [16.8 kB] 198s Get:88 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-tomlkit all 0.13.2-1 [37.6 kB] 198s Get:89 http://ftpmaster.internal/ubuntu plucky/universe ppc64el pylint all 3.3.1-2 [345 kB] 198s Get:90 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-argcomplete all 3.5.1-1ubuntu1 [35.6 kB] 198s Get:91 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-cachetools all 5.3.3-1 [10.3 kB] 198s Get:92 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pycryptodome ppc64el 3.20.0+dfsg-3build1 [1142 kB] 198s Get:93 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-keyrings.alt all 5.0.2-1 [16.6 kB] 198s Get:94 http://ftpmaster.internal/ubuntu plucky/main ppc64el libhttp-parser2.9 ppc64el 2.9.4-6build1 [24.4 kB] 198s Get:95 http://ftpmaster.internal/ubuntu plucky-proposed/main ppc64el libgit2-1.8 ppc64el 1.8.4+ds-1ubuntu1 [737 kB] 198s Get:96 http://ftpmaster.internal/ubuntu plucky-proposed/universe ppc64el python3-pygit2 ppc64el 1.16.0-2 [192 kB] 198s Get:97 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-iniconfig all 1.1.1-2 [6024 B] 198s Get:98 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-packaging all 24.2-1 [51.5 kB] 198s Get:99 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pluggy all 1.5.0-1 [21.0 kB] 198s Get:100 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pytest all 8.3.3-1 [251 kB] 198s Get:101 http://ftpmaster.internal/ubuntu plucky/main ppc64el libpython3.13-stdlib ppc64el 3.13.0-2 [2148 kB] 198s Get:102 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3.13 ppc64el 3.13.0-2 [719 kB] 199s Get:103 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-coverage ppc64el 7.4.4+dfsg1-0ubuntu3 [151 kB] 199s Get:104 http://ftpmaster.internal/ubuntu plucky/universe ppc64el libjs-jquery-isonscreen all 1.2.0-1.1 [3244 B] 199s Get:105 http://ftpmaster.internal/ubuntu plucky/universe ppc64el libjs-jquery-metadata all 12-4 [6582 B] 199s Get:106 http://ftpmaster.internal/ubuntu plucky/universe ppc64el libjs-jquery-tablesorter all 1:2.31.3+dfsg1-4 [192 kB] 199s Get:107 http://ftpmaster.internal/ubuntu plucky/universe ppc64el libjs-jquery-throttle-debounce all 1.1+dfsg.1-2 [12.5 kB] 199s Get:108 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-pytest-cov all 5.0.0-1 [21.3 kB] 199s Get:109 http://ftpmaster.internal/ubuntu plucky/main ppc64el python3-tenacity all 8.5.0-0ubuntu1 [17.0 kB] 199s Get:110 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-py all 1.11.0-2 [72.7 kB] 199s Get:111 http://ftpmaster.internal/ubuntu plucky/universe ppc64el libnorm1t64 ppc64el 1.5.9+dfsg-3.1build1 [194 kB] 199s Get:112 http://ftpmaster.internal/ubuntu plucky/universe ppc64el libpgm-5.3-0t64 ppc64el 5.3.128~dfsg-2.1build1 [185 kB] 199s Get:113 http://ftpmaster.internal/ubuntu plucky/main ppc64el libsodium23 ppc64el 1.0.18-1build3 [150 kB] 199s Get:114 http://ftpmaster.internal/ubuntu plucky/universe ppc64el libzmq5 ppc64el 4.3.5-1build2 [297 kB] 199s Get:115 http://ftpmaster.internal/ubuntu plucky/universe ppc64el python3-zmq ppc64el 24.0.1-5build2 [400 kB] 199s Get:116 http://ftpmaster.internal/ubuntu plucky/universe ppc64el git-ubuntu all 1.1-1 [152 kB] 200s Fetched 27.3 MB in 3s (7987 kB/s) 200s Selecting previously unselected package libpython3.13-minimal:ppc64el. 200s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 74167 files and directories currently installed.) 200s Preparing to unpack .../000-libpython3.13-minimal_3.13.0-2_ppc64el.deb ... 200s Unpacking libpython3.13-minimal:ppc64el (3.13.0-2) ... 200s Selecting previously unselected package python3.13-minimal. 200s Preparing to unpack .../001-python3.13-minimal_3.13.0-2_ppc64el.deb ... 200s Unpacking python3.13-minimal (3.13.0-2) ... 200s Selecting previously unselected package libjs-jquery. 200s Preparing to unpack .../002-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 200s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 200s Selecting previously unselected package libjs-jquery-hotkeys. 200s Preparing to unpack .../003-libjs-jquery-hotkeys_0~20130707+git2d51e3a9+dfsg-2.1_all.deb ... 200s Unpacking libjs-jquery-hotkeys (0~20130707+git2d51e3a9+dfsg-2.1) ... 200s Selecting previously unselected package python3-distro-info. 200s Preparing to unpack .../004-python3-distro-info_1.12_all.deb ... 200s Unpacking python3-distro-info (1.12) ... 200s Selecting previously unselected package dctrl-tools. 200s Preparing to unpack .../005-dctrl-tools_2.24-3build3_ppc64el.deb ... 200s Unpacking dctrl-tools (2.24-3build3) ... 200s Selecting previously unselected package debian-archive-keyring. 200s Preparing to unpack .../006-debian-archive-keyring_2023.4ubuntu1_all.deb ... 200s Unpacking debian-archive-keyring (2023.4ubuntu1) ... 201s Selecting previously unselected package libfile-dirlist-perl. 201s Preparing to unpack .../007-libfile-dirlist-perl_0.05-3_all.deb ... 201s Unpacking libfile-dirlist-perl (0.05-3) ... 201s Selecting previously unselected package libfile-which-perl. 201s Preparing to unpack .../008-libfile-which-perl_1.27-2_all.deb ... 201s Unpacking libfile-which-perl (1.27-2) ... 201s Selecting previously unselected package libfile-homedir-perl. 201s Preparing to unpack .../009-libfile-homedir-perl_1.006-2_all.deb ... 201s Unpacking libfile-homedir-perl (1.006-2) ... 201s Selecting previously unselected package libfile-touch-perl. 201s Preparing to unpack .../010-libfile-touch-perl_0.12-2_all.deb ... 201s Unpacking libfile-touch-perl (0.12-2) ... 201s Selecting previously unselected package libio-pty-perl. 201s Preparing to unpack .../011-libio-pty-perl_1%3a1.20-1build3_ppc64el.deb ... 201s Unpacking libio-pty-perl (1:1.20-1build3) ... 201s Selecting previously unselected package libipc-run-perl. 201s Preparing to unpack .../012-libipc-run-perl_20231003.0-2_all.deb ... 201s Unpacking libipc-run-perl (20231003.0-2) ... 201s Selecting previously unselected package libclass-method-modifiers-perl. 201s Preparing to unpack .../013-libclass-method-modifiers-perl_2.15-1_all.deb ... 201s Unpacking libclass-method-modifiers-perl (2.15-1) ... 201s Selecting previously unselected package libclass-xsaccessor-perl. 201s Preparing to unpack .../014-libclass-xsaccessor-perl_1.19-4build5_ppc64el.deb ... 201s Unpacking libclass-xsaccessor-perl (1.19-4build5) ... 201s Selecting previously unselected package libb-hooks-op-check-perl:ppc64el. 201s Preparing to unpack .../015-libb-hooks-op-check-perl_0.22-3build2_ppc64el.deb ... 201s Unpacking libb-hooks-op-check-perl:ppc64el (0.22-3build2) ... 201s Selecting previously unselected package libdynaloader-functions-perl. 201s Preparing to unpack .../016-libdynaloader-functions-perl_0.004-1_all.deb ... 201s Unpacking libdynaloader-functions-perl (0.004-1) ... 201s Selecting previously unselected package libdevel-callchecker-perl:ppc64el. 201s Preparing to unpack .../017-libdevel-callchecker-perl_0.009-1build1_ppc64el.deb ... 201s Unpacking libdevel-callchecker-perl:ppc64el (0.009-1build1) ... 201s Selecting previously unselected package libparams-classify-perl:ppc64el. 201s Preparing to unpack .../018-libparams-classify-perl_0.015-2build6_ppc64el.deb ... 201s Unpacking libparams-classify-perl:ppc64el (0.015-2build6) ... 201s Selecting previously unselected package libmodule-runtime-perl. 201s Preparing to unpack .../019-libmodule-runtime-perl_0.016-2_all.deb ... 201s Unpacking libmodule-runtime-perl (0.016-2) ... 201s Selecting previously unselected package libimport-into-perl. 201s Preparing to unpack .../020-libimport-into-perl_1.002005-2_all.deb ... 201s Unpacking libimport-into-perl (1.002005-2) ... 201s Selecting previously unselected package librole-tiny-perl. 201s Preparing to unpack .../021-librole-tiny-perl_2.002004-1_all.deb ... 201s Unpacking librole-tiny-perl (2.002004-1) ... 201s Selecting previously unselected package libsub-quote-perl. 201s Preparing to unpack .../022-libsub-quote-perl_2.006008-1ubuntu1_all.deb ... 201s Unpacking libsub-quote-perl (2.006008-1ubuntu1) ... 201s Selecting previously unselected package libmoo-perl. 201s Preparing to unpack .../023-libmoo-perl_2.005005-1_all.deb ... 201s Unpacking libmoo-perl (2.005005-1) ... 201s Selecting previously unselected package libencode-locale-perl. 201s Preparing to unpack .../024-libencode-locale-perl_1.05-3_all.deb ... 201s Unpacking libencode-locale-perl (1.05-3) ... 201s Selecting previously unselected package libtimedate-perl. 201s Preparing to unpack .../025-libtimedate-perl_2.3300-2_all.deb ... 201s Unpacking libtimedate-perl (2.3300-2) ... 201s Selecting previously unselected package libhttp-date-perl. 201s Preparing to unpack .../026-libhttp-date-perl_6.06-1_all.deb ... 201s Unpacking libhttp-date-perl (6.06-1) ... 201s Selecting previously unselected package libfile-listing-perl. 201s Preparing to unpack .../027-libfile-listing-perl_6.16-1_all.deb ... 201s Unpacking libfile-listing-perl (6.16-1) ... 201s Selecting previously unselected package libhtml-tagset-perl. 201s Preparing to unpack .../028-libhtml-tagset-perl_3.24-1_all.deb ... 201s Unpacking libhtml-tagset-perl (3.24-1) ... 201s Selecting previously unselected package liburi-perl. 201s Preparing to unpack .../029-liburi-perl_5.30-1_all.deb ... 201s Unpacking liburi-perl (5.30-1) ... 201s Selecting previously unselected package libhtml-parser-perl:ppc64el. 201s Preparing to unpack .../030-libhtml-parser-perl_3.83-1build1_ppc64el.deb ... 201s Unpacking libhtml-parser-perl:ppc64el (3.83-1build1) ... 201s Selecting previously unselected package libhtml-tree-perl. 201s Preparing to unpack .../031-libhtml-tree-perl_5.07-3_all.deb ... 201s Unpacking libhtml-tree-perl (5.07-3) ... 201s Selecting previously unselected package libclone-perl:ppc64el. 201s Preparing to unpack .../032-libclone-perl_0.47-1_ppc64el.deb ... 201s Unpacking libclone-perl:ppc64el (0.47-1) ... 201s Selecting previously unselected package libio-html-perl. 201s Preparing to unpack .../033-libio-html-perl_1.004-3_all.deb ... 201s Unpacking libio-html-perl (1.004-3) ... 201s Selecting previously unselected package liblwp-mediatypes-perl. 201s Preparing to unpack .../034-liblwp-mediatypes-perl_6.04-2_all.deb ... 201s Unpacking liblwp-mediatypes-perl (6.04-2) ... 201s Selecting previously unselected package libhttp-message-perl. 201s Preparing to unpack .../035-libhttp-message-perl_7.00-2ubuntu1_all.deb ... 201s Unpacking libhttp-message-perl (7.00-2ubuntu1) ... 201s Selecting previously unselected package libhttp-cookies-perl. 201s Preparing to unpack .../036-libhttp-cookies-perl_6.11-1_all.deb ... 201s Unpacking libhttp-cookies-perl (6.11-1) ... 201s Selecting previously unselected package libhttp-negotiate-perl. 201s Preparing to unpack .../037-libhttp-negotiate-perl_6.01-2_all.deb ... 201s Unpacking libhttp-negotiate-perl (6.01-2) ... 201s Selecting previously unselected package perl-openssl-defaults:ppc64el. 201s Preparing to unpack .../038-perl-openssl-defaults_7build3_ppc64el.deb ... 201s Unpacking perl-openssl-defaults:ppc64el (7build3) ... 201s Selecting previously unselected package libnet-ssleay-perl:ppc64el. 201s Preparing to unpack .../039-libnet-ssleay-perl_1.94-2_ppc64el.deb ... 201s Unpacking libnet-ssleay-perl:ppc64el (1.94-2) ... 201s Selecting previously unselected package libio-socket-ssl-perl. 201s Preparing to unpack .../040-libio-socket-ssl-perl_2.089-1_all.deb ... 201s Unpacking libio-socket-ssl-perl (2.089-1) ... 201s Selecting previously unselected package libnet-http-perl. 201s Preparing to unpack .../041-libnet-http-perl_6.23-1_all.deb ... 201s Unpacking libnet-http-perl (6.23-1) ... 201s Selecting previously unselected package liblwp-protocol-https-perl. 201s Preparing to unpack .../042-liblwp-protocol-https-perl_6.14-1_all.deb ... 201s Unpacking liblwp-protocol-https-perl (6.14-1) ... 201s Selecting previously unselected package libtry-tiny-perl. 201s Preparing to unpack .../043-libtry-tiny-perl_0.32-1_all.deb ... 201s Unpacking libtry-tiny-perl (0.32-1) ... 201s Selecting previously unselected package libwww-robotrules-perl. 201s Preparing to unpack .../044-libwww-robotrules-perl_6.02-1_all.deb ... 201s Unpacking libwww-robotrules-perl (6.02-1) ... 201s Selecting previously unselected package libwww-perl. 201s Preparing to unpack .../045-libwww-perl_6.77-1_all.deb ... 201s Unpacking libwww-perl (6.77-1) ... 201s Selecting previously unselected package patchutils. 201s Preparing to unpack .../046-patchutils_0.4.2-1build3_ppc64el.deb ... 201s Unpacking patchutils (0.4.2-1build3) ... 201s Selecting previously unselected package wdiff. 201s Preparing to unpack .../047-wdiff_1.2.2-6build1_ppc64el.deb ... 201s Unpacking wdiff (1.2.2-6build1) ... 201s Selecting previously unselected package devscripts. 201s Preparing to unpack .../048-devscripts_2.24.3_all.deb ... 201s Unpacking devscripts (2.24.3) ... 202s Selecting previously unselected package diffstat. 202s Preparing to unpack .../049-diffstat_1.67-1_ppc64el.deb ... 202s Unpacking diffstat (1.67-1) ... 202s Selecting previously unselected package python3-debian. 202s Preparing to unpack .../050-python3-debian_0.1.49ubuntu3_all.deb ... 202s Unpacking python3-debian (0.1.49ubuntu3) ... 202s Selecting previously unselected package python3-gpg. 202s Preparing to unpack .../051-python3-gpg_1.24.0-2ubuntu1_ppc64el.deb ... 202s Unpacking python3-gpg (1.24.0-2ubuntu1) ... 202s Selecting previously unselected package python3-xdg. 202s Preparing to unpack .../052-python3-xdg_0.28-2_all.deb ... 202s Unpacking python3-xdg (0.28-2) ... 202s Selecting previously unselected package dput. 202s Preparing to unpack .../053-dput_1.2.4ubuntu1_all.deb ... 202s Unpacking dput (1.2.4ubuntu1) ... 202s Selecting previously unselected package libgomp1:ppc64el. 202s Preparing to unpack .../054-libgomp1_14.2.0-8ubuntu1_ppc64el.deb ... 202s Unpacking libgomp1:ppc64el (14.2.0-8ubuntu1) ... 202s Selecting previously unselected package gettext. 202s Preparing to unpack .../055-gettext_0.22.5-2_ppc64el.deb ... 202s Unpacking gettext (0.22.5-2) ... 202s Selecting previously unselected package liberror-perl. 202s Preparing to unpack .../056-liberror-perl_0.17029-2_all.deb ... 202s Unpacking liberror-perl (0.17029-2) ... 202s Selecting previously unselected package git-man. 202s Preparing to unpack .../057-git-man_1%3a2.45.2-1.2ubuntu1_all.deb ... 202s Unpacking git-man (1:2.45.2-1.2ubuntu1) ... 202s Selecting previously unselected package git. 202s Preparing to unpack .../058-git_1%3a2.45.2-1.2ubuntu1_ppc64el.deb ... 202s Unpacking git (1:2.45.2-1.2ubuntu1) ... 203s Selecting previously unselected package python3-dateutil. 203s Preparing to unpack .../059-python3-dateutil_2.9.0-3_all.deb ... 203s Unpacking python3-dateutil (2.9.0-3) ... 203s Selecting previously unselected package python3-importlib-metadata. 203s Preparing to unpack .../060-python3-importlib-metadata_8.5.0-1_all.deb ... 203s Unpacking python3-importlib-metadata (8.5.0-1) ... 203s Selecting previously unselected package git-buildpackage. 203s Preparing to unpack .../061-git-buildpackage_0.9.35_all.deb ... 203s Unpacking git-buildpackage (0.9.35) ... 203s Selecting previously unselected package libsys-cpuaffinity-perl. 203s Preparing to unpack .../062-libsys-cpuaffinity-perl_1.13~03-2build4_ppc64el.deb ... 203s Unpacking libsys-cpuaffinity-perl (1.13~03-2build4) ... 203s Selecting previously unselected package pbzip2. 203s Preparing to unpack .../063-pbzip2_1.1.13-1build1_ppc64el.deb ... 203s Unpacking pbzip2 (1.1.13-1build1) ... 203s Selecting previously unselected package pixz. 203s Preparing to unpack .../064-pixz_1.0.7-3_ppc64el.deb ... 203s Unpacking pixz (1.0.7-3) ... 203s Selecting previously unselected package libxdelta2t64:ppc64el. 203s Preparing to unpack .../065-libxdelta2t64_1.1.3-10.7_ppc64el.deb ... 203s Unpacking libxdelta2t64:ppc64el (1.1.3-10.7) ... 203s Selecting previously unselected package xdelta. 203s Preparing to unpack .../066-xdelta_1.1.3-10.7_ppc64el.deb ... 203s Unpacking xdelta (1.1.3-10.7) ... 203s Selecting previously unselected package xdelta3. 203s Preparing to unpack .../067-xdelta3_3.0.11-dfsg-1.2_ppc64el.deb ... 203s Unpacking xdelta3 (3.0.11-dfsg-1.2) ... 203s Selecting previously unselected package pristine-tar. 203s Preparing to unpack .../068-pristine-tar_1.50+nmu2build1_ppc64el.deb ... 203s Unpacking pristine-tar (1.50+nmu2build1) ... 203s Selecting previously unselected package quilt. 203s Preparing to unpack .../069-quilt_0.68-1_all.deb ... 203s Unpacking quilt (0.68-1) ... 203s Selecting previously unselected package python3-debianbts. 203s Preparing to unpack .../070-python3-debianbts_4.1.1_all.deb ... 203s Unpacking python3-debianbts (4.1.1) ... 203s Selecting previously unselected package python3-jeepney. 203s Preparing to unpack .../071-python3-jeepney_0.8.0-4_all.deb ... 203s Unpacking python3-jeepney (0.8.0-4) ... 203s Selecting previously unselected package python3-secretstorage. 203s Preparing to unpack .../072-python3-secretstorage_3.3.3-3_all.deb ... 203s Unpacking python3-secretstorage (3.3.3-3) ... 203s Selecting previously unselected package python3-jaraco.classes. 203s Preparing to unpack .../073-python3-jaraco.classes_3.4.0-1_all.deb ... 203s Unpacking python3-jaraco.classes (3.4.0-1) ... 203s Selecting previously unselected package python3-keyring. 203s Preparing to unpack .../074-python3-keyring_25.4.1-1_all.deb ... 203s Unpacking python3-keyring (25.4.1-1) ... 203s Selecting previously unselected package python3-launchpadlib-desktop. 203s Preparing to unpack .../075-python3-launchpadlib-desktop_2.0.0-1_all.deb ... 203s Unpacking python3-launchpadlib-desktop (2.0.0-1) ... 203s Selecting previously unselected package python3-ubuntutools. 203s Preparing to unpack .../076-python3-ubuntutools_0.203_all.deb ... 203s Unpacking python3-ubuntutools (0.203) ... 203s Selecting previously unselected package ubuntu-dev-tools. 203s Preparing to unpack .../077-ubuntu-dev-tools_0.203_all.deb ... 203s Unpacking ubuntu-dev-tools (0.203) ... 203s Selecting previously unselected package python3-astroid. 203s Preparing to unpack .../078-python3-astroid_3.3.5-1_all.deb ... 203s Unpacking python3-astroid (3.3.5-1) ... 203s Selecting previously unselected package python3-isort. 203s Preparing to unpack .../079-python3-isort_5.13.2-2_all.deb ... 203s Unpacking python3-isort (5.13.2-2) ... 203s Selecting previously unselected package python3-mypy-extensions. 203s Preparing to unpack .../080-python3-mypy-extensions_1.0.0-1_all.deb ... 203s Unpacking python3-mypy-extensions (1.0.0-1) ... 203s Selecting previously unselected package libjs-underscore. 203s Preparing to unpack .../081-libjs-underscore_1.13.4~dfsg+~1.11.4-3_all.deb ... 203s Unpacking libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 203s Selecting previously unselected package libjs-sphinxdoc. 203s Preparing to unpack .../082-libjs-sphinxdoc_7.4.7-4_all.deb ... 203s Unpacking libjs-sphinxdoc (7.4.7-4) ... 203s Selecting previously unselected package python3-logilab-common. 203s Preparing to unpack .../083-python3-logilab-common_2.0.0-1_all.deb ... 203s Unpacking python3-logilab-common (2.0.0-1) ... 203s Selecting previously unselected package python3-dill. 203s Preparing to unpack .../084-python3-dill_0.3.9-1_all.deb ... 203s Unpacking python3-dill (0.3.9-1) ... 203s Selecting previously unselected package python3-mccabe. 203s Preparing to unpack .../085-python3-mccabe_0.7.0-1_all.deb ... 203s Unpacking python3-mccabe (0.7.0-1) ... 203s Selecting previously unselected package python3-platformdirs. 203s Preparing to unpack .../086-python3-platformdirs_4.3.6-1_all.deb ... 203s Unpacking python3-platformdirs (4.3.6-1) ... 203s Selecting previously unselected package python3-tomlkit. 203s Preparing to unpack .../087-python3-tomlkit_0.13.2-1_all.deb ... 203s Unpacking python3-tomlkit (0.13.2-1) ... 203s Selecting previously unselected package pylint. 203s Preparing to unpack .../088-pylint_3.3.1-2_all.deb ... 203s Unpacking pylint (3.3.1-2) ... 203s Selecting previously unselected package python3-argcomplete. 203s Preparing to unpack .../089-python3-argcomplete_3.5.1-1ubuntu1_all.deb ... 203s Unpacking python3-argcomplete (3.5.1-1ubuntu1) ... 203s Selecting previously unselected package python3-cachetools. 203s Preparing to unpack .../090-python3-cachetools_5.3.3-1_all.deb ... 203s Unpacking python3-cachetools (5.3.3-1) ... 203s Selecting previously unselected package python3-pycryptodome. 203s Preparing to unpack .../091-python3-pycryptodome_3.20.0+dfsg-3build1_ppc64el.deb ... 203s Unpacking python3-pycryptodome (3.20.0+dfsg-3build1) ... 203s Selecting previously unselected package python3-keyrings.alt. 203s Preparing to unpack .../092-python3-keyrings.alt_5.0.2-1_all.deb ... 203s Unpacking python3-keyrings.alt (5.0.2-1) ... 203s Selecting previously unselected package libhttp-parser2.9:ppc64el. 203s Preparing to unpack .../093-libhttp-parser2.9_2.9.4-6build1_ppc64el.deb ... 203s Unpacking libhttp-parser2.9:ppc64el (2.9.4-6build1) ... 203s Selecting previously unselected package libgit2-1.8:ppc64el. 203s Preparing to unpack .../094-libgit2-1.8_1.8.4+ds-1ubuntu1_ppc64el.deb ... 203s Unpacking libgit2-1.8:ppc64el (1.8.4+ds-1ubuntu1) ... 203s Selecting previously unselected package python3-pygit2. 203s Preparing to unpack .../095-python3-pygit2_1.16.0-2_ppc64el.deb ... 203s Unpacking python3-pygit2 (1.16.0-2) ... 203s Selecting previously unselected package python3-iniconfig. 203s Preparing to unpack .../096-python3-iniconfig_1.1.1-2_all.deb ... 203s Unpacking python3-iniconfig (1.1.1-2) ... 203s Selecting previously unselected package python3-packaging. 203s Preparing to unpack .../097-python3-packaging_24.2-1_all.deb ... 203s Unpacking python3-packaging (24.2-1) ... 203s Selecting previously unselected package python3-pluggy. 203s Preparing to unpack .../098-python3-pluggy_1.5.0-1_all.deb ... 203s Unpacking python3-pluggy (1.5.0-1) ... 203s Selecting previously unselected package python3-pytest. 203s Preparing to unpack .../099-python3-pytest_8.3.3-1_all.deb ... 203s Unpacking python3-pytest (8.3.3-1) ... 203s Selecting previously unselected package libpython3.13-stdlib:ppc64el. 203s Preparing to unpack .../100-libpython3.13-stdlib_3.13.0-2_ppc64el.deb ... 203s Unpacking libpython3.13-stdlib:ppc64el (3.13.0-2) ... 203s Selecting previously unselected package python3.13. 203s Preparing to unpack .../101-python3.13_3.13.0-2_ppc64el.deb ... 203s Unpacking python3.13 (3.13.0-2) ... 203s Selecting previously unselected package python3-coverage. 203s Preparing to unpack .../102-python3-coverage_7.4.4+dfsg1-0ubuntu3_ppc64el.deb ... 203s Unpacking python3-coverage (7.4.4+dfsg1-0ubuntu3) ... 203s Selecting previously unselected package libjs-jquery-isonscreen. 203s Preparing to unpack .../103-libjs-jquery-isonscreen_1.2.0-1.1_all.deb ... 203s Unpacking libjs-jquery-isonscreen (1.2.0-1.1) ... 203s Selecting previously unselected package libjs-jquery-metadata. 203s Preparing to unpack .../104-libjs-jquery-metadata_12-4_all.deb ... 203s Unpacking libjs-jquery-metadata (12-4) ... 203s Selecting previously unselected package libjs-jquery-tablesorter. 203s Preparing to unpack .../105-libjs-jquery-tablesorter_1%3a2.31.3+dfsg1-4_all.deb ... 203s Unpacking libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 203s Selecting previously unselected package libjs-jquery-throttle-debounce. 203s Preparing to unpack .../106-libjs-jquery-throttle-debounce_1.1+dfsg.1-2_all.deb ... 203s Unpacking libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 203s Selecting previously unselected package python3-pytest-cov. 203s Preparing to unpack .../107-python3-pytest-cov_5.0.0-1_all.deb ... 203s Unpacking python3-pytest-cov (5.0.0-1) ... 203s Selecting previously unselected package python3-tenacity. 203s Preparing to unpack .../108-python3-tenacity_8.5.0-0ubuntu1_all.deb ... 203s Unpacking python3-tenacity (8.5.0-0ubuntu1) ... 203s Selecting previously unselected package python3-py. 203s Preparing to unpack .../109-python3-py_1.11.0-2_all.deb ... 203s Unpacking python3-py (1.11.0-2) ... 204s Selecting previously unselected package libnorm1t64:ppc64el. 204s Preparing to unpack .../110-libnorm1t64_1.5.9+dfsg-3.1build1_ppc64el.deb ... 204s Unpacking libnorm1t64:ppc64el (1.5.9+dfsg-3.1build1) ... 204s Selecting previously unselected package libpgm-5.3-0t64:ppc64el. 204s Preparing to unpack .../111-libpgm-5.3-0t64_5.3.128~dfsg-2.1build1_ppc64el.deb ... 204s Unpacking libpgm-5.3-0t64:ppc64el (5.3.128~dfsg-2.1build1) ... 204s Selecting previously unselected package libsodium23:ppc64el. 204s Preparing to unpack .../112-libsodium23_1.0.18-1build3_ppc64el.deb ... 204s Unpacking libsodium23:ppc64el (1.0.18-1build3) ... 204s Selecting previously unselected package libzmq5:ppc64el. 204s Preparing to unpack .../113-libzmq5_4.3.5-1build2_ppc64el.deb ... 204s Unpacking libzmq5:ppc64el (4.3.5-1build2) ... 204s Selecting previously unselected package python3-zmq. 204s Preparing to unpack .../114-python3-zmq_24.0.1-5build2_ppc64el.deb ... 204s Unpacking python3-zmq (24.0.1-5build2) ... 204s Selecting previously unselected package git-ubuntu. 204s Preparing to unpack .../115-git-ubuntu_1.1-1_all.deb ... 204s Unpacking git-ubuntu (1.1-1) ... 204s Selecting previously unselected package autopkgtest-satdep. 204s Preparing to unpack .../116-1-autopkgtest-satdep.deb ... 204s Unpacking autopkgtest-satdep (0) ... 204s Setting up python3-iniconfig (1.1.1-2) ... 204s Setting up libnorm1t64:ppc64el (1.5.9+dfsg-3.1build1) ... 204s Setting up wdiff (1.2.2-6build1) ... 204s Setting up libfile-which-perl (1.27-2) ... 204s Setting up libsodium23:ppc64el (1.0.18-1build3) ... 204s Setting up python3-jaraco.classes (3.4.0-1) ... 204s Setting up libxdelta2t64:ppc64el (1.1.3-10.7) ... 204s Setting up python3-importlib-metadata (8.5.0-1) ... 204s Setting up xdelta (1.1.3-10.7) ... 204s Setting up libsys-cpuaffinity-perl (1.13~03-2build4) ... 204s Setting up python3-py (1.11.0-2) ... 204s Setting up libdynaloader-functions-perl (0.004-1) ... 204s Setting up libclass-method-modifiers-perl (2.15-1) ... 204s Setting up libio-pty-perl (1:1.20-1build3) ... 204s Setting up python3-cachetools (5.3.3-1) ... 204s Setting up python3-debianbts (4.1.1) ... 205s Setting up libclone-perl:ppc64el (0.47-1) ... 205s Setting up libhtml-tagset-perl (3.24-1) ... 205s Setting up python3-mypy-extensions (1.0.0-1) ... 205s Setting up python3-pycryptodome (3.20.0+dfsg-3build1) ... 205s Setting up python3-tenacity (8.5.0-0ubuntu1) ... 205s Setting up liblwp-mediatypes-perl (6.04-2) ... 205s Setting up debian-archive-keyring (2023.4ubuntu1) ... 205s Setting up libtry-tiny-perl (0.32-1) ... 205s Setting up perl-openssl-defaults:ppc64el (7build3) ... 205s Setting up libencode-locale-perl (1.05-3) ... 205s Setting up libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 205s Setting up libgomp1:ppc64el (14.2.0-8ubuntu1) ... 205s Setting up python3-xdg (0.28-2) ... 206s Setting up pbzip2 (1.1.13-1build1) ... 206s Setting up python3-platformdirs (4.3.6-1) ... 206s Setting up liberror-perl (0.17029-2) ... 206s Setting up libpython3.13-minimal:ppc64el (3.13.0-2) ... 206s Setting up patchutils (0.4.2-1build3) ... 206s Setting up libpgm-5.3-0t64:ppc64el (5.3.128~dfsg-2.1build1) ... 206s Setting up python3-packaging (24.2-1) ... 206s Setting up python3-gpg (1.24.0-2ubuntu1) ... 206s Setting up python3-dill (0.3.9-1) ... 206s Setting up python3-debian (0.1.49ubuntu3) ... 207s Setting up diffstat (1.67-1) ... 207s Setting up libio-html-perl (1.004-3) ... 207s Setting up libb-hooks-op-check-perl:ppc64el (0.22-3build2) ... 207s Setting up libipc-run-perl (20231003.0-2) ... 207s Setting up python3-jeepney (0.8.0-4) ... 207s Setting up python3-isort (5.13.2-2) ... 207s Setting up python3-pluggy (1.5.0-1) ... 207s Setting up libtimedate-perl (2.3300-2) ... 207s Setting up python3-astroid (3.3.5-1) ... 207s Setting up xdelta3 (3.0.11-dfsg-1.2) ... 207s Setting up pixz (1.0.7-3) ... 207s Setting up librole-tiny-perl (2.002004-1) ... 207s Setting up python3.13-minimal (3.13.0-2) ... 209s Setting up git-man (1:2.45.2-1.2ubuntu1) ... 209s Setting up python3-dateutil (2.9.0-3) ... 209s Setting up python3-mccabe (0.7.0-1) ... 209s Setting up libsub-quote-perl (2.006008-1ubuntu1) ... 209s Setting up libclass-xsaccessor-perl (1.19-4build5) ... 209s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 209s Setting up libfile-dirlist-perl (0.05-3) ... 209s Setting up libjs-jquery-hotkeys (0~20130707+git2d51e3a9+dfsg-2.1) ... 209s Setting up python3-argcomplete (3.5.1-1ubuntu1) ... 209s Setting up libfile-homedir-perl (1.006-2) ... 209s Setting up python3-tomlkit (0.13.2-1) ... 209s Setting up python3-distro-info (1.12) ... 209s Setting up libpython3.13-stdlib:ppc64el (3.13.0-2) ... 209s Setting up liburi-perl (5.30-1) ... 209s Setting up pristine-tar (1.50+nmu2build1) ... 209s Setting up libfile-touch-perl (0.12-2) ... 209s Setting up dctrl-tools (2.24-3build3) ... 209s Setting up libhttp-parser2.9:ppc64el (2.9.4-6build1) ... 209s Setting up libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 209s Setting up libnet-ssleay-perl:ppc64el (1.94-2) ... 209s Setting up libhttp-date-perl (6.06-1) ... 209s Setting up gettext (0.22.5-2) ... 209s Setting up libfile-listing-perl (6.16-1) ... 209s Setting up libzmq5:ppc64el (4.3.5-1build2) ... 209s Setting up python3.13 (3.13.0-2) ... 210s Setting up python3-pytest (8.3.3-1) ... 211s Setting up libnet-http-perl (6.23-1) ... 211s Setting up python3-coverage (7.4.4+dfsg1-0ubuntu3) ... 211s Setting up quilt (0.68-1) ... 211s Setting up libdevel-callchecker-perl:ppc64el (0.009-1build1) ... 211s Setting up dput (1.2.4ubuntu1) ... 211s Setting up python3-secretstorage (3.3.3-3) ... 211s Setting up python3-zmq (24.0.1-5build2) ... 212s Setting up libjs-jquery-metadata (12-4) ... 212s Setting up libgit2-1.8:ppc64el (1.8.4+ds-1ubuntu1) ... 212s Setting up libjs-jquery-isonscreen (1.2.0-1.1) ... 212s Setting up git (1:2.45.2-1.2ubuntu1) ... 212s Setting up libjs-sphinxdoc (7.4.7-4) ... 212s Setting up libwww-robotrules-perl (6.02-1) ... 212s Setting up libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 212s Setting up libhtml-parser-perl:ppc64el (3.83-1build1) ... 212s Setting up python3-keyring (25.4.1-1) ... 212s Setting up libio-socket-ssl-perl (2.089-1) ... 212s Setting up libhttp-message-perl (7.00-2ubuntu1) ... 212s Setting up libhttp-negotiate-perl (6.01-2) ... 212s Setting up libhttp-cookies-perl (6.11-1) ... 212s Setting up python3-logilab-common (2.0.0-1) ... 212s Setting up python3-pygit2 (1.16.0-2) ... 212s Setting up libhtml-tree-perl (5.07-3) ... 212s Setting up libparams-classify-perl:ppc64el (0.015-2build6) ... 212s Setting up python3-pytest-cov (5.0.0-1) ... 212s Setting up libmodule-runtime-perl (0.016-2) ... 212s Setting up python3-launchpadlib-desktop (2.0.0-1) ... 212s Setting up python3-keyrings.alt (5.0.2-1) ... 212s Setting up pylint (3.3.1-2) ... 213s Setting up libimport-into-perl (1.002005-2) ... 213s Setting up libmoo-perl (2.005005-1) ... 213s Setting up python3-ubuntutools (0.203) ... 213s Setting up liblwp-protocol-https-perl (6.14-1) ... 213s Setting up libwww-perl (6.77-1) ... 213s Setting up devscripts (2.24.3) ... 213s Setting up git-buildpackage (0.9.35) ... 213s Setting up ubuntu-dev-tools (0.203) ... 213s Setting up git-ubuntu (1.1-1) ... 214s Setting up autopkgtest-satdep (0) ... 214s Processing triggers for libc-bin (2.40-1ubuntu3) ... 214s Processing triggers for systemd (256.5-2ubuntu4) ... 214s Processing triggers for man-db (2.13.0-1) ... 216s Processing triggers for install-info (7.1.1-1) ... 221s (Reading database ... 80395 files and directories currently installed.) 221s Removing autopkgtest-satdep (0) ... 222s autopkgtest [16:20:05]: test self-test: TEST_SYSTEM_TREE=1 /usr/share/git-ubuntu/self-test 222s autopkgtest [16:20:05]: test self-test: [----------------------- 222s Testing git-ubuntu system installation. 222s Testing tree in /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu 222s Working dir /tmp/autopkgtest.qOEoya/build.EOv/src 236s pylint passed! 246s ============================= test session starts ============================== 246s platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0 246s rootdir: /tmp/autopkgtest.qOEoya/build.EOv/src 246s configfile: pytest.ini 246s plugins: cov-5.0.0, typeguard-4.4.1 246s collected 459 items 246s 246s gitubuntu/build.py ..... [ 1%] 248s gitubuntu/git_repository_test.py ....................................... [ 9%] 263s ...FFFFF.FFF...........................F.FFFFFFF.FFF.......FFFFFFFFFF [ 24%] 264s gitubuntu/importer_service_test.py ..................................... [ 32%] 264s ..... [ 33%] 264s gitubuntu/importer_service_worker_test.py ... [ 34%] 278s gitubuntu/importer_tag_test.py FFFFFFFFFxF [ 36%] 298s gitubuntu/importer_test.py .......FF.FFFFFFFFFFF.FFF.FFF..FFFFFFFFFFFFFF [ 46%] 314s FFFFxx..FF.................................................F....FFFF. [ 61%] 316s gitubuntu/integration_test.py ...............Fsss [ 65%] 316s gitubuntu/prepare_upload_test.py .............. [ 68%] 317s gitubuntu/repo_builder_test.py .........FF.F................ [ 75%] 318s gitubuntu/rich_history_test.py FFF.FFFF [ 76%] 324s gitubuntu/source_builder_test.py .FF.......FFFFFFFFF.. [ 81%] 325s gitubuntu/source_information_test.py ................................... [ 89%] 325s ... [ 89%] 325s gitubuntu/versioning.py ............................................... [100%] 325s 325s =================================== FAILURES =================================== 325s ___________________ test_follow_symlinks_to_blob[0] ____________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmphfiaw5nj/.git/') 325s tree_func = at 0x7598385911c0> 325s 325s @pytest.mark.parametrize('tree_func', [ 325s # The tree_func parameter is a function that accepts a mock Blob that is to 325s # represent the changelog blob itself and returns a mock Tree with the mock 325s # Blob embedded somewhere within it. The test function can then ensure that 325s # follow_symlinks_to_blob can correctly find the changelog Blob given the 325s # Tree. 325s 325s # Of course this is only expected to work if, after checking out the Tree, 325s # "cat debian/changelog" would work. But this allows us to test the various 325s # permutations of symlink following in Trees that _are_ valid. 325s 325s # Simple case 325s lambda b: Tree({ 325s 'debian': Tree({'changelog': b}), 325s }), 325s 325s # Symlink in debian/ 325s lambda b: Tree({ 325s 'debian': Tree({ 325s 'changelog.real': b, 325s 'changelog': Symlink('changelog.real'), 325s }), 325s }), 325s 325s # Symlink to parent directory 325s lambda b: Tree({ 325s 'changelog': b, 325s 'debian': Tree({ 325s 'changelog': Symlink('../changelog'), 325s }) 325s }), 325s 325s # Symlink to subdirectory 325s lambda b: Tree({ 325s 'debian': Tree({ 325s 'changelog': Symlink('subdirectory/changelog'), 325s 'subdirectory': Tree({'changelog': b}), 325s }) 325s }), 325s 325s # debian/ itself is a symlink to a different directory 325s lambda b: Tree({ 325s 'pkg': Tree({'changelog': b}), 325s 'debian': Symlink('pkg'), 325s }) 325s ]) 325s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 325s blob = Blob(b'') 325s blob_id = blob.write(pygit2_repo) 325s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 325s > result_blob = target.follow_symlinks_to_blob( 325s pygit2_repo, 325s tree, 325s 'debian/changelog', 325s ) 325s 325s gitubuntu/git_repository_test.py:342: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmphfiaw5nj/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s gitubuntu/git_repository.py:68: AttributeError 325s ___________________ test_follow_symlinks_to_blob[1] ____________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmpkeo2kaf5/.git/') 325s tree_func = at 0x759838591260> 325s 325s @pytest.mark.parametrize('tree_func', [ 325s # The tree_func parameter is a function that accepts a mock Blob that is to 325s # represent the changelog blob itself and returns a mock Tree with the mock 325s # Blob embedded somewhere within it. The test function can then ensure that 325s # follow_symlinks_to_blob can correctly find the changelog Blob given the 325s # Tree. 325s 325s # Of course this is only expected to work if, after checking out the Tree, 325s # "cat debian/changelog" would work. But this allows us to test the various 325s # permutations of symlink following in Trees that _are_ valid. 325s 325s # Simple case 325s lambda b: Tree({ 325s 'debian': Tree({'changelog': b}), 325s }), 325s 325s # Symlink in debian/ 325s lambda b: Tree({ 325s 'debian': Tree({ 325s 'changelog.real': b, 325s 'changelog': Symlink('changelog.real'), 325s }), 325s }), 325s 325s # Symlink to parent directory 325s lambda b: Tree({ 325s 'changelog': b, 325s 'debian': Tree({ 325s 'changelog': Symlink('../changelog'), 325s }) 325s }), 325s 325s # Symlink to subdirectory 325s lambda b: Tree({ 325s 'debian': Tree({ 325s 'changelog': Symlink('subdirectory/changelog'), 325s 'subdirectory': Tree({'changelog': b}), 325s }) 325s }), 325s 325s # debian/ itself is a symlink to a different directory 325s lambda b: Tree({ 325s 'pkg': Tree({'changelog': b}), 325s 'debian': Symlink('pkg'), 325s }) 325s ]) 325s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 325s blob = Blob(b'') 325s blob_id = blob.write(pygit2_repo) 325s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 325s > result_blob = target.follow_symlinks_to_blob( 325s pygit2_repo, 325s tree, 325s 'debian/changelog', 325s ) 325s 325s gitubuntu/git_repository_test.py:342: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpkeo2kaf5/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s gitubuntu/git_repository.py:68: AttributeError 325s ___________________ test_follow_symlinks_to_blob[2] ____________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmp9bfbuitx/.git/') 325s tree_func = at 0x759838591300> 325s 325s @pytest.mark.parametrize('tree_func', [ 325s # The tree_func parameter is a function that accepts a mock Blob that is to 325s # represent the changelog blob itself and returns a mock Tree with the mock 325s # Blob embedded somewhere within it. The test function can then ensure that 325s # follow_symlinks_to_blob can correctly find the changelog Blob given the 325s # Tree. 325s 325s # Of course this is only expected to work if, after checking out the Tree, 325s # "cat debian/changelog" would work. But this allows us to test the various 325s # permutations of symlink following in Trees that _are_ valid. 325s 325s # Simple case 325s lambda b: Tree({ 325s 'debian': Tree({'changelog': b}), 325s }), 325s 325s # Symlink in debian/ 325s lambda b: Tree({ 325s 'debian': Tree({ 325s 'changelog.real': b, 325s 'changelog': Symlink('changelog.real'), 325s }), 325s }), 325s 325s # Symlink to parent directory 325s lambda b: Tree({ 325s 'changelog': b, 325s 'debian': Tree({ 325s 'changelog': Symlink('../changelog'), 325s }) 325s }), 325s 325s # Symlink to subdirectory 325s lambda b: Tree({ 325s 'debian': Tree({ 325s 'changelog': Symlink('subdirectory/changelog'), 325s 'subdirectory': Tree({'changelog': b}), 325s }) 325s }), 325s 325s # debian/ itself is a symlink to a different directory 325s lambda b: Tree({ 325s 'pkg': Tree({'changelog': b}), 325s 'debian': Symlink('pkg'), 325s }) 325s ]) 325s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 325s blob = Blob(b'') 325s blob_id = blob.write(pygit2_repo) 325s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 325s > result_blob = target.follow_symlinks_to_blob( 325s pygit2_repo, 325s tree, 325s 'debian/changelog', 325s ) 325s 325s gitubuntu/git_repository_test.py:342: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmp9bfbuitx/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s gitubuntu/git_repository.py:68: AttributeError 325s ___________________ test_follow_symlinks_to_blob[3] ____________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmp98pyz0eg/.git/') 325s tree_func = at 0x7598385913a0> 325s 325s @pytest.mark.parametrize('tree_func', [ 325s # The tree_func parameter is a function that accepts a mock Blob that is to 325s # represent the changelog blob itself and returns a mock Tree with the mock 325s # Blob embedded somewhere within it. The test function can then ensure that 325s # follow_symlinks_to_blob can correctly find the changelog Blob given the 325s # Tree. 325s 325s # Of course this is only expected to work if, after checking out the Tree, 325s # "cat debian/changelog" would work. But this allows us to test the various 325s # permutations of symlink following in Trees that _are_ valid. 325s 325s # Simple case 325s lambda b: Tree({ 325s 'debian': Tree({'changelog': b}), 325s }), 325s 325s # Symlink in debian/ 325s lambda b: Tree({ 325s 'debian': Tree({ 325s 'changelog.real': b, 325s 'changelog': Symlink('changelog.real'), 325s }), 325s }), 325s 325s # Symlink to parent directory 325s lambda b: Tree({ 325s 'changelog': b, 325s 'debian': Tree({ 325s 'changelog': Symlink('../changelog'), 325s }) 325s }), 325s 325s # Symlink to subdirectory 325s lambda b: Tree({ 325s 'debian': Tree({ 325s 'changelog': Symlink('subdirectory/changelog'), 325s 'subdirectory': Tree({'changelog': b}), 325s }) 325s }), 325s 325s # debian/ itself is a symlink to a different directory 325s lambda b: Tree({ 325s 'pkg': Tree({'changelog': b}), 325s 'debian': Symlink('pkg'), 325s }) 325s ]) 325s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 325s blob = Blob(b'') 325s blob_id = blob.write(pygit2_repo) 325s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 325s > result_blob = target.follow_symlinks_to_blob( 325s pygit2_repo, 325s tree, 325s 'debian/changelog', 325s ) 325s 325s gitubuntu/git_repository_test.py:342: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmp98pyz0eg/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s gitubuntu/git_repository.py:68: AttributeError 325s ___________________ test_follow_symlinks_to_blob[4] ____________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmpr54aqtum/.git/') 325s tree_func = at 0x759838591440> 325s 325s @pytest.mark.parametrize('tree_func', [ 325s # The tree_func parameter is a function that accepts a mock Blob that is to 325s # represent the changelog blob itself and returns a mock Tree with the mock 325s # Blob embedded somewhere within it. The test function can then ensure that 325s # follow_symlinks_to_blob can correctly find the changelog Blob given the 325s # Tree. 325s 325s # Of course this is only expected to work if, after checking out the Tree, 325s # "cat debian/changelog" would work. But this allows us to test the various 325s # permutations of symlink following in Trees that _are_ valid. 325s 325s # Simple case 325s lambda b: Tree({ 325s 'debian': Tree({'changelog': b}), 325s }), 325s 325s # Symlink in debian/ 325s lambda b: Tree({ 325s 'debian': Tree({ 325s 'changelog.real': b, 325s 'changelog': Symlink('changelog.real'), 325s }), 325s }), 325s 325s # Symlink to parent directory 325s lambda b: Tree({ 325s 'changelog': b, 325s 'debian': Tree({ 325s 'changelog': Symlink('../changelog'), 325s }) 325s }), 325s 325s # Symlink to subdirectory 325s lambda b: Tree({ 325s 'debian': Tree({ 325s 'changelog': Symlink('subdirectory/changelog'), 325s 'subdirectory': Tree({'changelog': b}), 325s }) 325s }), 325s 325s # debian/ itself is a symlink to a different directory 325s lambda b: Tree({ 325s 'pkg': Tree({'changelog': b}), 325s 'debian': Symlink('pkg'), 325s }) 325s ]) 325s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 325s blob = Blob(b'') 325s blob_id = blob.write(pygit2_repo) 325s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 325s > result_blob = target.follow_symlinks_to_blob( 325s pygit2_repo, 325s tree, 325s 'debian/changelog', 325s ) 325s 325s gitubuntu/git_repository_test.py:342: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpr54aqtum/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s gitubuntu/git_repository.py:68: AttributeError 325s ________________ test_follow_symlinks_to_blob_not_found[tree1] _________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmp1r25auiq/.git/') 325s tree = 325s 325s @pytest.mark.parametrize('tree', [ 325s Tree({}), 325s Tree({'debian': Tree({})}), 325s Tree({'debian': Tree({'changelog': Symlink('other')})}), 325s Tree({'debian': Tree({'changelog': Symlink('../other')})}), 325s ]) 325s def test_follow_symlinks_to_blob_not_found(pygit2_repo, tree): 325s pygit2_tree = pygit2_repo.get(tree.write(pygit2_repo)) 325s with pytest.raises(KeyError): 325s > target.follow_symlinks_to_blob( 325s pygit2_repo, 325s pygit2_tree, 325s 'debian/changelog', 325s ) 325s 325s gitubuntu/git_repository_test.py:359: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmp1r25auiq/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s gitubuntu/git_repository.py:68: AttributeError 325s ________________ test_follow_symlinks_to_blob_not_found[tree2] _________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmpvdl62u67/.git/') 325s tree = 325s 325s @pytest.mark.parametrize('tree', [ 325s Tree({}), 325s Tree({'debian': Tree({})}), 325s Tree({'debian': Tree({'changelog': Symlink('other')})}), 325s Tree({'debian': Tree({'changelog': Symlink('../other')})}), 325s ]) 325s def test_follow_symlinks_to_blob_not_found(pygit2_repo, tree): 325s pygit2_tree = pygit2_repo.get(tree.write(pygit2_repo)) 325s with pytest.raises(KeyError): 325s > target.follow_symlinks_to_blob( 325s pygit2_repo, 325s pygit2_tree, 325s 'debian/changelog', 325s ) 325s 325s gitubuntu/git_repository_test.py:359: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpvdl62u67/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s gitubuntu/git_repository.py:68: AttributeError 325s ________________ test_follow_symlinks_to_blob_not_found[tree3] _________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmpkrzk_a3c/.git/') 325s tree = 325s 325s @pytest.mark.parametrize('tree', [ 325s Tree({}), 325s Tree({'debian': Tree({})}), 325s Tree({'debian': Tree({'changelog': Symlink('other')})}), 325s Tree({'debian': Tree({'changelog': Symlink('../other')})}), 325s ]) 325s def test_follow_symlinks_to_blob_not_found(pygit2_repo, tree): 325s pygit2_tree = pygit2_repo.get(tree.write(pygit2_repo)) 325s with pytest.raises(KeyError): 325s > target.follow_symlinks_to_blob( 325s pygit2_repo, 325s pygit2_tree, 325s 'debian/changelog', 325s ) 325s 325s gitubuntu/git_repository_test.py:359: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpkrzk_a3c/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s gitubuntu/git_repository.py:68: AttributeError 325s _________________________ test_git_escape_dir_to_tree __________________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmpj_ji22oi/.git/') 325s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_git_escape_dir_to_tree0') 325s 325s def test_git_escape_dir_to_tree(pygit2_repo, tmpdir): 325s tmpdir.mkdir('.git') 325s > tree_hash = target.GitUbuntuRepository.dir_to_tree( 325s pygit2_repo, 325s str(tmpdir), 325s escape=True, 325s ) 325s 325s gitubuntu/git_repository_test.py:668: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s gitubuntu/git_repository.py:2463: in dir_to_tree 325s replacement_oid = cls._add_missing_tree_dirs( 325s gitubuntu/git_repository.py:2397: in _add_missing_tree_dirs 325s tree_builder = cls._create_replacement_tree_builder( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s cls = 325s repo = pygit2.Repository('/tmp/tmpj_ji22oi/.git/') 325s treeish = 325s sub_path = '' 325s 325s @classmethod 325s def _create_replacement_tree_builder(cls, repo, treeish, sub_path): 325s '''Create a replacement TreeBuilder 325s 325s Create a TreeBuilder based on an existing repository, top-level 325s tree-ish and path inside that tree. 325s 325s A sub_path of '' is taken to mean a request for a replacement 325s TreeBuilder for the top level tree. 325s 325s Returns a TreeBuilder object pre-populated with the previous contents. 325s If the path did not previously exist in the tree-ish, then return an 325s empty TreeBuilder instead. 325s ''' 325s 325s > tree = treeish.peel(pygit2.GIT_OBJ_TREE) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s gitubuntu/git_repository.py:2331: AttributeError 325s ______ test_determine_quilt_series_path[tree_data1-debian/patches/series] ______ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmpr6nh811x/.git/') 325s tree_data = 325s expected_path = 'debian/patches/series' 325s 325s @pytest.mark.parametrize('tree_data,expected_path', [ 325s # Empty tree -> default 325s (Tree({}), 'debian/patches/series'), 325s 325s # Empty debian/patches directory -> default 325s (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), 325s 325s # Only debian/patches/series -> that one 325s ( 325s Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 325s 'debian/patches/series', 325s ), 325s 325s # Only debian/patches/debian.series -> that one 325s ( 325s Tree({'debian': Tree({'patches': Tree({ 325s 'debian.series': Blob(b'') 325s })})}), 325s 'debian/patches/debian.series', 325s ), 325s 325s # Both -> debian.series 325s ( 325s Tree({'debian': Tree({'patches': Tree({ 325s 'debian.series': Blob(b''), 325s 'series': Blob(b''), 325s })})}), 325s 'debian/patches/debian.series', 325s ), 325s ]) 325s def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): 325s tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) 325s > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) 325s 325s gitubuntu/git_repository_test.py:708: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s gitubuntu/git_repository.py:991: in determine_quilt_series_path 325s blob = follow_symlinks_to_blob( 325s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpr6nh811x/.git/') 325s top_tree_object = 325s search_path = 'debian/patches/debian.series' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s gitubuntu/git_repository.py:68: AttributeError 325s ______ test_determine_quilt_series_path[tree_data2-debian/patches/series] ______ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmpl86bafod/.git/') 325s tree_data = 325s expected_path = 'debian/patches/series' 325s 325s @pytest.mark.parametrize('tree_data,expected_path', [ 325s # Empty tree -> default 325s (Tree({}), 'debian/patches/series'), 325s 325s # Empty debian/patches directory -> default 325s (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), 325s 325s # Only debian/patches/series -> that one 325s ( 325s Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 325s 'debian/patches/series', 325s ), 325s 325s # Only debian/patches/debian.series -> that one 325s ( 325s Tree({'debian': Tree({'patches': Tree({ 325s 'debian.series': Blob(b'') 325s })})}), 325s 'debian/patches/debian.series', 325s ), 325s 325s # Both -> debian.series 325s ( 325s Tree({'debian': Tree({'patches': Tree({ 325s 'debian.series': Blob(b''), 325s 'series': Blob(b''), 325s })})}), 325s 'debian/patches/debian.series', 325s ), 325s ]) 325s def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): 325s tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) 325s > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) 325s 325s gitubuntu/git_repository_test.py:708: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s gitubuntu/git_repository.py:991: in determine_quilt_series_path 325s blob = follow_symlinks_to_blob( 325s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpl86bafod/.git/') 325s top_tree_object = 325s search_path = 'debian/patches/debian.series' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s gitubuntu/git_repository.py:68: AttributeError 325s __ test_determine_quilt_series_path[tree_data3-debian/patches/debian.series] ___ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmp86g_t0g1/.git/') 325s tree_data = 325s expected_path = 'debian/patches/debian.series' 325s 325s @pytest.mark.parametrize('tree_data,expected_path', [ 325s # Empty tree -> default 325s (Tree({}), 'debian/patches/series'), 325s 325s # Empty debian/patches directory -> default 325s (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), 325s 325s # Only debian/patches/series -> that one 325s ( 325s Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 325s 'debian/patches/series', 325s ), 325s 325s # Only debian/patches/debian.series -> that one 325s ( 325s Tree({'debian': Tree({'patches': Tree({ 325s 'debian.series': Blob(b'') 325s })})}), 325s 'debian/patches/debian.series', 325s ), 325s 325s # Both -> debian.series 325s ( 325s Tree({'debian': Tree({'patches': Tree({ 325s 'debian.series': Blob(b''), 325s 'series': Blob(b''), 325s })})}), 325s 'debian/patches/debian.series', 325s ), 325s ]) 325s def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): 325s tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) 325s > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) 325s 325s gitubuntu/git_repository_test.py:708: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s gitubuntu/git_repository.py:991: in determine_quilt_series_path 325s blob = follow_symlinks_to_blob( 325s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmp86g_t0g1/.git/') 325s top_tree_object = 325s search_path = 'debian/patches/debian.series' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s gitubuntu/git_repository.py:68: AttributeError 325s __ test_determine_quilt_series_path[tree_data4-debian/patches/debian.series] ___ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmpu92w3pb0/.git/') 325s tree_data = 325s expected_path = 'debian/patches/debian.series' 325s 325s @pytest.mark.parametrize('tree_data,expected_path', [ 325s # Empty tree -> default 325s (Tree({}), 'debian/patches/series'), 325s 325s # Empty debian/patches directory -> default 325s (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), 325s 325s # Only debian/patches/series -> that one 325s ( 325s Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 325s 'debian/patches/series', 325s ), 325s 325s # Only debian/patches/debian.series -> that one 325s ( 325s Tree({'debian': Tree({'patches': Tree({ 325s 'debian.series': Blob(b'') 325s })})}), 325s 'debian/patches/debian.series', 325s ), 325s 325s # Both -> debian.series 325s ( 325s Tree({'debian': Tree({'patches': Tree({ 325s 'debian.series': Blob(b''), 325s 'series': Blob(b''), 325s })})}), 325s 'debian/patches/debian.series', 325s ), 325s ]) 325s def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): 325s tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) 325s > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) 325s 325s gitubuntu/git_repository_test.py:708: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s gitubuntu/git_repository.py:991: in determine_quilt_series_path 325s blob = follow_symlinks_to_blob( 325s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpu92w3pb0/.git/') 325s top_tree_object = 325s search_path = 'debian/patches/debian.series' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s gitubuntu/git_repository.py:68: AttributeError 325s ________________________________ test_quilt_env ________________________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmps8p5rova/.git/') 325s 325s def test_quilt_env(pygit2_repo): 325s tree_builder = Tree({'debian': 325s Tree({'patches': Tree({'debian.series': Blob(b'')})}) 325s }) 325s tree_obj = pygit2_repo.get(tree_builder.write(pygit2_repo)) 325s > env = target.quilt_env(pygit2_repo, tree_obj) 325s 325s gitubuntu/git_repository_test.py:717: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s gitubuntu/git_repository.py:1022: in quilt_env 325s 'QUILT_SERIES': determine_quilt_series_path(pygit2_repo, treeish), 325s gitubuntu/git_repository.py:991: in determine_quilt_series_path 325s blob = follow_symlinks_to_blob( 325s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmps8p5rova/.git/') 325s top_tree_object = 325s search_path = 'debian/patches/debian.series' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s gitubuntu/git_repository.py:68: AttributeError 325s _____________________________ test_repo_quilt_env ______________________________ 325s 325s repo = 325s 325s def test_repo_quilt_env(repo): 325s tree_builder = Tree({'debian': 325s Tree({'patches': Tree({'debian.series': Blob(b'')})}) 325s }) 325s tree_obj = repo.raw_repo.get(tree_builder.write(repo.raw_repo)) 325s > env = repo.quilt_env(tree_obj) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository_test.py:732: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:2575: in quilt_env 325s env.update(quilt_env(self.raw_repo, treeish)) 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1022: in quilt_env 325s 'QUILT_SERIES': determine_quilt_series_path(pygit2_repo, treeish), 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:991: in determine_quilt_series_path 325s blob = follow_symlinks_to_blob( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpda_ycrsj/.git/') 325s top_tree_object = 325s search_path = 'debian/patches/debian.series' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s _____________________ test_repo_quilt_env_from_treeish_str _____________________ 325s 325s repo = 325s 325s def test_repo_quilt_env_from_treeish_str(repo): 325s tree_builder = Tree({'debian': 325s Tree({'patches': Tree({'debian.series': Blob(b'')})}) 325s }) 325s tree_obj = repo.raw_repo.get(tree_builder.write(repo.raw_repo)) 325s > env = repo.quilt_env_from_treeish_str(str(tree_obj.id)) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository_test.py:757: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:2589: in quilt_env_from_treeish_str 325s return self.quilt_env(self.raw_repo.get(treeish_str)) 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:2575: in quilt_env 325s env.update(quilt_env(self.raw_repo, treeish)) 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1022: in quilt_env 325s 'QUILT_SERIES': determine_quilt_series_path(pygit2_repo, treeish), 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:991: in determine_quilt_series_path 325s blob = follow_symlinks_to_blob( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmp1a00qhdm/.git/') 325s top_tree_object = 325s search_path = 'debian/patches/debian.series' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s _ test_repo_find_ubuntu_merge[Common case-input_data0-pkg/import/1-1ubuntu1-pkg/import/2-1-pkg/import/1-1] _ 325s 325s description = 'Common case' 325s repo = 325s input_data = 325s old_ubuntu = 'pkg/import/1-1ubuntu1', new_debian = 'pkg/import/2-1' 325s expected = 'pkg/import/1-1' 325s 325s @pytest.mark.parametrize( 325s 'description, input_data, old_ubuntu, new_debian, expected', 325s [ 325s ( 325s 'Common case', 325s Repo( 325s commits=[ 325s Commit.from_spec( 325s name='old/debian' 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('old/debian')], 325s name='old/ubuntu', 325s changelog_versions=['1-1ubuntu1', '1-1'], 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('old/debian')], 325s name='new/debian', 325s changelog_versions=['2-1', '1-1'], 325s ), 325s ], 325s tags={ 325s 'pkg/import/1-1': Placeholder('old/debian'), 325s 'pkg/import/1-1ubuntu1': Placeholder('old/ubuntu'), 325s 'pkg/import/2-1': Placeholder('new/debian'), 325s }, 325s ), 325s 'pkg/import/1-1ubuntu1', 325s 'pkg/import/2-1', 325s 'pkg/import/1-1', 325s ), 325s ( 325s 'Ubuntu delta based on a NMU', 325s Repo( 325s commits=[ 325s Commit.from_spec( 325s name='fork_point' 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('fork_point')], 325s name='old/debian', 325s changelog_versions=['1-1.1', '1-1'], 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('old/debian')], 325s name='old/ubuntu', 325s changelog_versions=['1-1.1ubuntu1', '1-1.1', '1-1'], 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('fork_point')], 325s name='new/debian', 325s changelog_versions=['2-1', '1-1'], 325s ), 325s ], 325s tags={ 325s 'pkg/import/1-1': Placeholder('fork_point'), 325s 'pkg/import/1-1.1': Placeholder('old/debian'), 325s 'pkg/import/1-1.1ubuntu1': Placeholder('old/ubuntu'), 325s 'pkg/import/2-1': Placeholder('new/debian'), 325s }, 325s ), 325s 'pkg/import/1-1.1ubuntu1', 325s 'pkg/import/2-1', 325s 'pkg/import/1-1.1', 325s ), 325s ( 325s 'Ubuntu upstream version head of Debian', 325s Repo( 325s commits=[ 325s Commit.from_spec( 325s name='old/debian' 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('old/debian')], 325s name='mid_ubuntu', 325s changelog_versions=['1-1ubuntu1', '1-1'], 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('mid_ubuntu')], 325s name='old/ubuntu', 325s changelog_versions=['2-0ubuntu1', '1-1ubuntu1', '1-1'], 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('old/debian')], 325s name='new/debian', 325s changelog_versions=['3-1', '1-1'], 325s ), 325s ], 325s tags={ 325s 'pkg/import/1-1': Placeholder('old/debian'), 325s 'pkg/import/1-1ubuntu1': Placeholder('mid_ubuntu'), 325s 'pkg/import/2-0ubuntu1': Placeholder('old/ubuntu'), 325s 'pkg/import/3-1': Placeholder('new/debian'), 325s }, 325s ), 325s 'pkg/import/2-0ubuntu1', 325s 'pkg/import/3-1', 325s 'pkg/import/1-1', 325s ), 325s ], 325s ) 325s def test_repo_find_ubuntu_merge( 325s description, 325s repo, 325s input_data, 325s old_ubuntu, 325s new_debian, 325s expected, 325s ): 325s > input_data.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository_test.py:889: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp4h0193i7/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_2.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_2-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_2-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_repo_find_ubuntu_merge[Ubuntu delta based on a NMU-input_data1-pkg/import/1-1.1ubuntu1-pkg/import/2-1-pkg/import/1-1.1] _ 325s 325s description = 'Ubuntu delta based on a NMU' 325s repo = 325s input_data = 325s old_ubuntu = 'pkg/import/1-1.1ubuntu1', new_debian = 'pkg/import/2-1' 325s expected = 'pkg/import/1-1.1' 325s 325s @pytest.mark.parametrize( 325s 'description, input_data, old_ubuntu, new_debian, expected', 325s [ 325s ( 325s 'Common case', 325s Repo( 325s commits=[ 325s Commit.from_spec( 325s name='old/debian' 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('old/debian')], 325s name='old/ubuntu', 325s changelog_versions=['1-1ubuntu1', '1-1'], 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('old/debian')], 325s name='new/debian', 325s changelog_versions=['2-1', '1-1'], 325s ), 325s ], 325s tags={ 325s 'pkg/import/1-1': Placeholder('old/debian'), 325s 'pkg/import/1-1ubuntu1': Placeholder('old/ubuntu'), 325s 'pkg/import/2-1': Placeholder('new/debian'), 325s }, 325s ), 325s 'pkg/import/1-1ubuntu1', 325s 'pkg/import/2-1', 325s 'pkg/import/1-1', 325s ), 325s ( 325s 'Ubuntu delta based on a NMU', 325s Repo( 325s commits=[ 325s Commit.from_spec( 325s name='fork_point' 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('fork_point')], 325s name='old/debian', 325s changelog_versions=['1-1.1', '1-1'], 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('old/debian')], 325s name='old/ubuntu', 325s changelog_versions=['1-1.1ubuntu1', '1-1.1', '1-1'], 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('fork_point')], 325s name='new/debian', 325s changelog_versions=['2-1', '1-1'], 325s ), 325s ], 325s tags={ 325s 'pkg/import/1-1': Placeholder('fork_point'), 325s 'pkg/import/1-1.1': Placeholder('old/debian'), 325s 'pkg/import/1-1.1ubuntu1': Placeholder('old/ubuntu'), 325s 'pkg/import/2-1': Placeholder('new/debian'), 325s }, 325s ), 325s 'pkg/import/1-1.1ubuntu1', 325s 'pkg/import/2-1', 325s 'pkg/import/1-1.1', 325s ), 325s ( 325s 'Ubuntu upstream version head of Debian', 325s Repo( 325s commits=[ 325s Commit.from_spec( 325s name='old/debian' 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('old/debian')], 325s name='mid_ubuntu', 325s changelog_versions=['1-1ubuntu1', '1-1'], 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('mid_ubuntu')], 325s name='old/ubuntu', 325s changelog_versions=['2-0ubuntu1', '1-1ubuntu1', '1-1'], 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('old/debian')], 325s name='new/debian', 325s changelog_versions=['3-1', '1-1'], 325s ), 325s ], 325s tags={ 325s 'pkg/import/1-1': Placeholder('old/debian'), 325s 'pkg/import/1-1ubuntu1': Placeholder('mid_ubuntu'), 325s 'pkg/import/2-0ubuntu1': Placeholder('old/ubuntu'), 325s 'pkg/import/3-1': Placeholder('new/debian'), 325s }, 325s ), 325s 'pkg/import/2-0ubuntu1', 325s 'pkg/import/3-1', 325s 'pkg/import/1-1', 325s ), 325s ], 325s ) 325s def test_repo_find_ubuntu_merge( 325s description, 325s repo, 325s input_data, 325s old_ubuntu, 325s new_debian, 325s expected, 325s ): 325s > input_data.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository_test.py:889: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmphggd0i8s/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1ubuntu1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1ubuntu1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_2.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_2-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_2-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_repo_find_ubuntu_merge[Ubuntu upstream version head of Debian-input_data2-pkg/import/2-0ubuntu1-pkg/import/3-1-pkg/import/1-1] _ 325s 325s description = 'Ubuntu upstream version head of Debian' 325s repo = 325s input_data = 325s old_ubuntu = 'pkg/import/2-0ubuntu1', new_debian = 'pkg/import/3-1' 325s expected = 'pkg/import/1-1' 325s 325s @pytest.mark.parametrize( 325s 'description, input_data, old_ubuntu, new_debian, expected', 325s [ 325s ( 325s 'Common case', 325s Repo( 325s commits=[ 325s Commit.from_spec( 325s name='old/debian' 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('old/debian')], 325s name='old/ubuntu', 325s changelog_versions=['1-1ubuntu1', '1-1'], 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('old/debian')], 325s name='new/debian', 325s changelog_versions=['2-1', '1-1'], 325s ), 325s ], 325s tags={ 325s 'pkg/import/1-1': Placeholder('old/debian'), 325s 'pkg/import/1-1ubuntu1': Placeholder('old/ubuntu'), 325s 'pkg/import/2-1': Placeholder('new/debian'), 325s }, 325s ), 325s 'pkg/import/1-1ubuntu1', 325s 'pkg/import/2-1', 325s 'pkg/import/1-1', 325s ), 325s ( 325s 'Ubuntu delta based on a NMU', 325s Repo( 325s commits=[ 325s Commit.from_spec( 325s name='fork_point' 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('fork_point')], 325s name='old/debian', 325s changelog_versions=['1-1.1', '1-1'], 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('old/debian')], 325s name='old/ubuntu', 325s changelog_versions=['1-1.1ubuntu1', '1-1.1', '1-1'], 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('fork_point')], 325s name='new/debian', 325s changelog_versions=['2-1', '1-1'], 325s ), 325s ], 325s tags={ 325s 'pkg/import/1-1': Placeholder('fork_point'), 325s 'pkg/import/1-1.1': Placeholder('old/debian'), 325s 'pkg/import/1-1.1ubuntu1': Placeholder('old/ubuntu'), 325s 'pkg/import/2-1': Placeholder('new/debian'), 325s }, 325s ), 325s 'pkg/import/1-1.1ubuntu1', 325s 'pkg/import/2-1', 325s 'pkg/import/1-1.1', 325s ), 325s ( 325s 'Ubuntu upstream version head of Debian', 325s Repo( 325s commits=[ 325s Commit.from_spec( 325s name='old/debian' 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('old/debian')], 325s name='mid_ubuntu', 325s changelog_versions=['1-1ubuntu1', '1-1'], 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('mid_ubuntu')], 325s name='old/ubuntu', 325s changelog_versions=['2-0ubuntu1', '1-1ubuntu1', '1-1'], 325s ), 325s Commit.from_spec( 325s parents=[Placeholder('old/debian')], 325s name='new/debian', 325s changelog_versions=['3-1', '1-1'], 325s ), 325s ], 325s tags={ 325s 'pkg/import/1-1': Placeholder('old/debian'), 325s 'pkg/import/1-1ubuntu1': Placeholder('mid_ubuntu'), 325s 'pkg/import/2-0ubuntu1': Placeholder('old/ubuntu'), 325s 'pkg/import/3-1': Placeholder('new/debian'), 325s }, 325s ), 325s 'pkg/import/2-0ubuntu1', 325s 'pkg/import/3-1', 325s 'pkg/import/1-1', 325s ), 325s ], 325s ) 325s def test_repo_find_ubuntu_merge( 325s description, 325s repo, 325s input_data, 325s old_ubuntu, 325s new_debian, 325s expected, 325s ): 325s > input_data.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository_test.py:889: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpif3eon53/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_2.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_2-0ubuntu1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_2-0ubuntu1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_3.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_3-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_3-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _______________________________ test_commit_tree _______________________________ 325s 325s repo = 325s 325s def test_commit_tree(repo): 325s # Construct a repository with an initial commit on the master branch so 325s # that we can verify later parentage and lack of branch movement 325s parent_commit_oid = Repo( 325s commits=[Commit(name='master')], 325s branches={'master': Placeholder('master')} 325s ).write(repo.raw_repo) 325s repo.raw_repo.lookup_reference('HEAD').set_target('refs/heads/master') 325s 325s # Construct a tree inside the repository with a debian/changelog in it to 325s # feed to the method under test 325s test_changelog_path = os.path.join( 325s pkg_resources.resource_filename('gitubuntu', 'changelog_tests'), 325s 'test_date_1', 325s ) 325s with open(test_changelog_path, 'rb') as f: 325s test_changelog_bytes = f.read() 325s test_changelog_blob = Blob(test_changelog_bytes) 325s source_tree = Tree({'debian': Tree({'changelog': test_changelog_blob})}) 325s source_tree_oid = source_tree.write(repo.raw_repo) 325s 325s # Call the method under test 325s > commit_oid = repo.commit_source_tree( 325s tree=source_tree_oid, 325s parents=[parent_commit_oid], 325s log_message='test_commit_msg', 325s commit_date=datetime.datetime( 325s 1971, # year 325s 2, # month 325s 3, # day 325s 4, # hours 325s 5, # minutes 325s 6, # seconds 325s 7, # milliseconds (this should get truncated down to 0) 325s datetime.timezone(datetime.timedelta(hours=-8)) 325s ), 325s ) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository_test.py:993: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:2299: in commit_source_tree 325s changelog = self.get_changelog_from_treeish(str(tree)) 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 325s return Changelog.from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:569: in from_treeish 325s blob = follow_symlinks_to_blob( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpc425fe6r/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s _____________________ test_descendant_of[root-root-False] ______________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmp3xndsjzn/.git/'), a = 'root' 325s b = 'root', expected = False 325s 325s @pytest.mark.parametrize(['a', 'b', 'expected'], 325s [ 325s ('root', 'root', False), 325s ('child1', 'root', True), 325s ('root', 'child1', False), 325s ('grandchild1', 'root', True), 325s ('child1', 'child2', False), 325s ('root', 'disjoint', False), 325s ] 325s ) 325s def test_descendant_of(pygit2_repo, a, b, expected): 325s """ 325s General test for pygit2.Repository.descendant_of(). 325s 325s This test was formerly for a temporary alternative implementation of 325s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 325s use until we updated our pinning to use a newer version of pygit2 that 325s included the pygit2.Repository.descendant_of() method. After the pinning 325s was removed and this implementation replacement took place, we kept the 325s test to ensure that actual behaviour did not change. 325s 325s This unit tests validate_upload_tag() for various parameterized cases. The 325s paramater sets assume the repository structure encoded in the Repo() call 325s below. 325s 325s :param pygit2.Repository pygit2_repo: fixture providing a temporary 325s pygit2.Repository instance to use 325s :param str a: tag name of the first commit to pass to descendant_of() 325s :param str b: tag name of the second commit to pass to descendant_of() 325s :param bool expected: the expected result of descendant_of() 325s """ 325s Repo( 325s # Unique message parameters are used in each entry here in order to 325s # ensure that otherwise-identical commits do not end up being the same 325s # commit (with the same hash, etc). 325s commits=[ 325s Commit(name='root', message='1'), 325s Commit(name='child1', parents=[Placeholder('root')], message='2'), 325s Commit(name='child2', parents=[Placeholder('root')], message='3'), 325s Commit( 325s name='grandchild1', 325s parents=[Placeholder('child1')], 325s message='4' 325s ), 325s Commit(name='disjoint', message='5'), 325s ], 325s tags={ 325s 'root': Placeholder('root'), 325s 'child1': Placeholder('child1'), 325s 'child2': Placeholder('child2'), 325s 'grandchild1': Placeholder('grandchild1'), 325s 'disjoint': Placeholder('disjoint'), 325s } 325s > ).write(pygit2_repo) 325s 325s gitubuntu/git_repository_test.py:1099: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp3xndsjzn/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s gitubuntu/repo_builder.py:389: AttributeError 325s _____________________ test_descendant_of[child1-root-True] _____________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmp5aqh4icw/.git/'), a = 'child1' 325s b = 'root', expected = True 325s 325s @pytest.mark.parametrize(['a', 'b', 'expected'], 325s [ 325s ('root', 'root', False), 325s ('child1', 'root', True), 325s ('root', 'child1', False), 325s ('grandchild1', 'root', True), 325s ('child1', 'child2', False), 325s ('root', 'disjoint', False), 325s ] 325s ) 325s def test_descendant_of(pygit2_repo, a, b, expected): 325s """ 325s General test for pygit2.Repository.descendant_of(). 325s 325s This test was formerly for a temporary alternative implementation of 325s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 325s use until we updated our pinning to use a newer version of pygit2 that 325s included the pygit2.Repository.descendant_of() method. After the pinning 325s was removed and this implementation replacement took place, we kept the 325s test to ensure that actual behaviour did not change. 325s 325s This unit tests validate_upload_tag() for various parameterized cases. The 325s paramater sets assume the repository structure encoded in the Repo() call 325s below. 325s 325s :param pygit2.Repository pygit2_repo: fixture providing a temporary 325s pygit2.Repository instance to use 325s :param str a: tag name of the first commit to pass to descendant_of() 325s :param str b: tag name of the second commit to pass to descendant_of() 325s :param bool expected: the expected result of descendant_of() 325s """ 325s Repo( 325s # Unique message parameters are used in each entry here in order to 325s # ensure that otherwise-identical commits do not end up being the same 325s # commit (with the same hash, etc). 325s commits=[ 325s Commit(name='root', message='1'), 325s Commit(name='child1', parents=[Placeholder('root')], message='2'), 325s Commit(name='child2', parents=[Placeholder('root')], message='3'), 325s Commit( 325s name='grandchild1', 325s parents=[Placeholder('child1')], 325s message='4' 325s ), 325s Commit(name='disjoint', message='5'), 325s ], 325s tags={ 325s 'root': Placeholder('root'), 325s 'child1': Placeholder('child1'), 325s 'child2': Placeholder('child2'), 325s 'grandchild1': Placeholder('grandchild1'), 325s 'disjoint': Placeholder('disjoint'), 325s } 325s > ).write(pygit2_repo) 325s 325s gitubuntu/git_repository_test.py:1099: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp5aqh4icw/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s gitubuntu/repo_builder.py:389: AttributeError 325s ____________________ test_descendant_of[root-child1-False] _____________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmp5wbw43p4/.git/'), a = 'root' 325s b = 'child1', expected = False 325s 325s @pytest.mark.parametrize(['a', 'b', 'expected'], 325s [ 325s ('root', 'root', False), 325s ('child1', 'root', True), 325s ('root', 'child1', False), 325s ('grandchild1', 'root', True), 325s ('child1', 'child2', False), 325s ('root', 'disjoint', False), 325s ] 325s ) 325s def test_descendant_of(pygit2_repo, a, b, expected): 325s """ 325s General test for pygit2.Repository.descendant_of(). 325s 325s This test was formerly for a temporary alternative implementation of 325s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 325s use until we updated our pinning to use a newer version of pygit2 that 325s included the pygit2.Repository.descendant_of() method. After the pinning 325s was removed and this implementation replacement took place, we kept the 325s test to ensure that actual behaviour did not change. 325s 325s This unit tests validate_upload_tag() for various parameterized cases. The 325s paramater sets assume the repository structure encoded in the Repo() call 325s below. 325s 325s :param pygit2.Repository pygit2_repo: fixture providing a temporary 325s pygit2.Repository instance to use 325s :param str a: tag name of the first commit to pass to descendant_of() 325s :param str b: tag name of the second commit to pass to descendant_of() 325s :param bool expected: the expected result of descendant_of() 325s """ 325s Repo( 325s # Unique message parameters are used in each entry here in order to 325s # ensure that otherwise-identical commits do not end up being the same 325s # commit (with the same hash, etc). 325s commits=[ 325s Commit(name='root', message='1'), 325s Commit(name='child1', parents=[Placeholder('root')], message='2'), 325s Commit(name='child2', parents=[Placeholder('root')], message='3'), 325s Commit( 325s name='grandchild1', 325s parents=[Placeholder('child1')], 325s message='4' 325s ), 325s Commit(name='disjoint', message='5'), 325s ], 325s tags={ 325s 'root': Placeholder('root'), 325s 'child1': Placeholder('child1'), 325s 'child2': Placeholder('child2'), 325s 'grandchild1': Placeholder('grandchild1'), 325s 'disjoint': Placeholder('disjoint'), 325s } 325s > ).write(pygit2_repo) 325s 325s gitubuntu/git_repository_test.py:1099: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp5wbw43p4/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s gitubuntu/repo_builder.py:389: AttributeError 325s __________________ test_descendant_of[grandchild1-root-True] ___________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmpltt_9t4q/.git/'), a = 'grandchild1' 325s b = 'root', expected = True 325s 325s @pytest.mark.parametrize(['a', 'b', 'expected'], 325s [ 325s ('root', 'root', False), 325s ('child1', 'root', True), 325s ('root', 'child1', False), 325s ('grandchild1', 'root', True), 325s ('child1', 'child2', False), 325s ('root', 'disjoint', False), 325s ] 325s ) 325s def test_descendant_of(pygit2_repo, a, b, expected): 325s """ 325s General test for pygit2.Repository.descendant_of(). 325s 325s This test was formerly for a temporary alternative implementation of 325s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 325s use until we updated our pinning to use a newer version of pygit2 that 325s included the pygit2.Repository.descendant_of() method. After the pinning 325s was removed and this implementation replacement took place, we kept the 325s test to ensure that actual behaviour did not change. 325s 325s This unit tests validate_upload_tag() for various parameterized cases. The 325s paramater sets assume the repository structure encoded in the Repo() call 325s below. 325s 325s :param pygit2.Repository pygit2_repo: fixture providing a temporary 325s pygit2.Repository instance to use 325s :param str a: tag name of the first commit to pass to descendant_of() 325s :param str b: tag name of the second commit to pass to descendant_of() 325s :param bool expected: the expected result of descendant_of() 325s """ 325s Repo( 325s # Unique message parameters are used in each entry here in order to 325s # ensure that otherwise-identical commits do not end up being the same 325s # commit (with the same hash, etc). 325s commits=[ 325s Commit(name='root', message='1'), 325s Commit(name='child1', parents=[Placeholder('root')], message='2'), 325s Commit(name='child2', parents=[Placeholder('root')], message='3'), 325s Commit( 325s name='grandchild1', 325s parents=[Placeholder('child1')], 325s message='4' 325s ), 325s Commit(name='disjoint', message='5'), 325s ], 325s tags={ 325s 'root': Placeholder('root'), 325s 'child1': Placeholder('child1'), 325s 'child2': Placeholder('child2'), 325s 'grandchild1': Placeholder('grandchild1'), 325s 'disjoint': Placeholder('disjoint'), 325s } 325s > ).write(pygit2_repo) 325s 325s gitubuntu/git_repository_test.py:1099: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpltt_9t4q/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s gitubuntu/repo_builder.py:389: AttributeError 325s ___________________ test_descendant_of[child1-child2-False] ____________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmpbk_20vyx/.git/'), a = 'child1' 325s b = 'child2', expected = False 325s 325s @pytest.mark.parametrize(['a', 'b', 'expected'], 325s [ 325s ('root', 'root', False), 325s ('child1', 'root', True), 325s ('root', 'child1', False), 325s ('grandchild1', 'root', True), 325s ('child1', 'child2', False), 325s ('root', 'disjoint', False), 325s ] 325s ) 325s def test_descendant_of(pygit2_repo, a, b, expected): 325s """ 325s General test for pygit2.Repository.descendant_of(). 325s 325s This test was formerly for a temporary alternative implementation of 325s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 325s use until we updated our pinning to use a newer version of pygit2 that 325s included the pygit2.Repository.descendant_of() method. After the pinning 325s was removed and this implementation replacement took place, we kept the 325s test to ensure that actual behaviour did not change. 325s 325s This unit tests validate_upload_tag() for various parameterized cases. The 325s paramater sets assume the repository structure encoded in the Repo() call 325s below. 325s 325s :param pygit2.Repository pygit2_repo: fixture providing a temporary 325s pygit2.Repository instance to use 325s :param str a: tag name of the first commit to pass to descendant_of() 325s :param str b: tag name of the second commit to pass to descendant_of() 325s :param bool expected: the expected result of descendant_of() 325s """ 325s Repo( 325s # Unique message parameters are used in each entry here in order to 325s # ensure that otherwise-identical commits do not end up being the same 325s # commit (with the same hash, etc). 325s commits=[ 325s Commit(name='root', message='1'), 325s Commit(name='child1', parents=[Placeholder('root')], message='2'), 325s Commit(name='child2', parents=[Placeholder('root')], message='3'), 325s Commit( 325s name='grandchild1', 325s parents=[Placeholder('child1')], 325s message='4' 325s ), 325s Commit(name='disjoint', message='5'), 325s ], 325s tags={ 325s 'root': Placeholder('root'), 325s 'child1': Placeholder('child1'), 325s 'child2': Placeholder('child2'), 325s 'grandchild1': Placeholder('grandchild1'), 325s 'disjoint': Placeholder('disjoint'), 325s } 325s > ).write(pygit2_repo) 325s 325s gitubuntu/git_repository_test.py:1099: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpbk_20vyx/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s gitubuntu/repo_builder.py:389: AttributeError 325s ___________________ test_descendant_of[root-disjoint-False] ____________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmpudkr2853/.git/'), a = 'root' 325s b = 'disjoint', expected = False 325s 325s @pytest.mark.parametrize(['a', 'b', 'expected'], 325s [ 325s ('root', 'root', False), 325s ('child1', 'root', True), 325s ('root', 'child1', False), 325s ('grandchild1', 'root', True), 325s ('child1', 'child2', False), 325s ('root', 'disjoint', False), 325s ] 325s ) 325s def test_descendant_of(pygit2_repo, a, b, expected): 325s """ 325s General test for pygit2.Repository.descendant_of(). 325s 325s This test was formerly for a temporary alternative implementation of 325s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 325s use until we updated our pinning to use a newer version of pygit2 that 325s included the pygit2.Repository.descendant_of() method. After the pinning 325s was removed and this implementation replacement took place, we kept the 325s test to ensure that actual behaviour did not change. 325s 325s This unit tests validate_upload_tag() for various parameterized cases. The 325s paramater sets assume the repository structure encoded in the Repo() call 325s below. 325s 325s :param pygit2.Repository pygit2_repo: fixture providing a temporary 325s pygit2.Repository instance to use 325s :param str a: tag name of the first commit to pass to descendant_of() 325s :param str b: tag name of the second commit to pass to descendant_of() 325s :param bool expected: the expected result of descendant_of() 325s """ 325s Repo( 325s # Unique message parameters are used in each entry here in order to 325s # ensure that otherwise-identical commits do not end up being the same 325s # commit (with the same hash, etc). 325s commits=[ 325s Commit(name='root', message='1'), 325s Commit(name='child1', parents=[Placeholder('root')], message='2'), 325s Commit(name='child2', parents=[Placeholder('root')], message='3'), 325s Commit( 325s name='grandchild1', 325s parents=[Placeholder('child1')], 325s message='4' 325s ), 325s Commit(name='disjoint', message='5'), 325s ], 325s tags={ 325s 'root': Placeholder('root'), 325s 'child1': Placeholder('child1'), 325s 'child2': Placeholder('child2'), 325s 'grandchild1': Placeholder('grandchild1'), 325s 'disjoint': Placeholder('disjoint'), 325s } 325s > ).write(pygit2_repo) 325s 325s gitubuntu/git_repository_test.py:1099: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpudkr2853/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s gitubuntu/repo_builder.py:389: AttributeError 325s _______________________________ test_create_tag ________________________________ 325s 325s repo = 325s 325s def test_create_tag(repo): 325s """create_tag() should create a tag 325s 325s :param GitUbuntuRepository repo: fixture providing a temporary 325s GitUbuntuRepository instance to use 325s """ 325s Repo( 325s commits=[Commit(name='root')], 325s tags={'root': Placeholder('root')}, 325s > ).write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository_test.py:1127: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmptslmsg_u/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s __________________________ test_get_all_reimport_tags __________________________ 325s 325s repo = 325s 325s def test_get_all_reimport_tags(repo): 325s """get_all_reimport_tags() should return only matching reimport tags 325s 325s :param GitUbuntuRepository repo: fixture providing a temporary 325s GitUbuntuRepository instance to use 325s """ 325s Repo( 325s commits=[Commit(name='root')], 325s tags={ 325s 'importer/reimport/import/1/0': Placeholder('root'), 325s 'importer/reimport/import/1/1': Placeholder('root'), 325s 325s # This entry must not be identified as one of version 1's reimport 325s # tags, even though it shares the same base prefix. 325s 'importer/reimport/import/11/0': Placeholder('root'), 325s }, 325s > ).write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository_test.py:1165: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp_qc1f8zv/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ______________________________ test_get_head_info ______________________________ 325s 325s repo = 325s 325s def test_get_head_info(repo): 325s """get_head_info() extracts expected commit and version info from the head 325s commit 325s """ 325s Repo( 325s commits=[ 325s Commit(name='foo', tree=SourceTree(source=Source())), 325s ], 325s branches={ 325s 'importer/ubuntu/foo': Placeholder('foo'), 325s 'importer/debian/bar': Placeholder('foo'), 325s 'other/ubuntu/baz': Placeholder('foo'), 325s }, 325s ).write(repo.raw_repo) 325s foo_commit_id = ( 325s repo.raw_repo 325s .lookup_reference('refs/heads/importer/ubuntu/foo') 325s .peel(pygit2.Commit).id 325s ) 325s > assert repo.get_head_info('ubuntu', 'importer') == { 325s 'importer/ubuntu/foo': HeadInfoItem( 325s version='1-1', 325s commit_time=0, 325s commit_id=foo_commit_id, 325s ), 325s } 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository_test.py:1193: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1952: in get_head_info 325s self.get_changelog_versions_from_treeish(str(head.peel().id)) 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1888: in get_changelog_versions_from_treeish 325s changelog = self.get_changelog_from_treeish(treeish_string) 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 325s return Changelog.from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:569: in from_treeish 325s blob = follow_symlinks_to_blob( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmp7zn1f3q0/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_import_unapplied_spi_tags[input_repo0-expected_output_refs0-validation_repo_delta0-validation_repo_expected_identical_refs0-True] _ 325s 325s get_import_commit_msg_mock = 325s get_import_tag_msg_mock = 325s repo = 325s input_repo = 325s expected_output_refs = ['refs/heads/do-not-push', 'refs/tags/importer/upstream/ubuntu/1.gz', 'refs/heads/importer/importer/ubuntu/dsc', 'refs/heads/importer/importer/ubuntu/pristine-tar'] 325s validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }} 325s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty-proposed', 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1'] 325s reuse = True 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'expected_output_refs', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s 'reuse', 325s ], 325s [ 325s # 1) An existing import tag (or reimport tag) with the same Git tree 325s # - Reuse import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='import')], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('import'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='import tag contents', 325s ), 325s Commit.from_spec(name='reimport'), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 2) An existing import tag with a different Git tree and an existing 325s # upload tag with the same Git tree 325s # - Reuse upload tag, create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s Commit.from_spec(name='upload'), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-1': Placeholder('upload'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('upload'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('upload'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 3) An existing import tag with a different Git tree and an existing 325s # upload tag with a different Git tree 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s Commit.from_spec( 325s name='upload', 325s mutate='The upload tag contents', 325s ), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-1': Placeholder('upload'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [Commit.from_spec( 325s name='reimport', 325s message='Test commit (new)', 325s )], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 4) An existing import tag with a different Git tree and no upload tag 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [Commit.from_spec( 325s name='reimport', 325s message='Test commit (new)', 325s )], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 5) No import tag and an existing upload tag with the same Git tree 325s # - Reuse upload tag, create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='upload')], 325s tags={'importer/upload/1-1': Placeholder('upload')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('upload'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('upload'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 6) No import tag and an existing upload tag with a different Git tree 325s # - Create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='upload', 325s mutate='The upload tag contents', 325s ), 325s ], 325s tags={'importer/upload/1-1': Placeholder('upload')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='publish', 325s message='Test commit (new)', 325s ), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('publish'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('publish'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 7) No import tags or upload tags 325s # - Create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo(), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='publish', 325s message='Test commit (new)', 325s ), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('publish'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('publish'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1' 325s ], 325s # reuse: 325s False, 325s ), 325s ] 325s ) 325s @patch('gitubuntu.importer.get_import_tag_msg') 325s @patch('gitubuntu.importer.get_import_commit_msg') 325s def test_import_unapplied_spi_tags( 325s get_import_commit_msg_mock, 325s get_import_tag_msg_mock, 325s repo, 325s input_repo, 325s expected_output_refs, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s reuse, 325s ): 325s """Test that unapplied tags are correctly created, adjusted and/or reused 325s 325s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 325s that determines the commit message to use for a given import 325s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 325s that determines the tag message to use for a given import 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param list(str) expected_output_refs: refs that must exist in the output 325s repository 325s :param dict validation_repo_delta: how to transform the input 325s repository into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 325s one supplied by the input repository (assumed to have a commit message 325s of "Test commit") and not one created by the importer in this run 325s (arranged by this test to have a different commit message) 325s 325s The input repository data is written into the output repository and then a 325s fake non-native source package publication of version 1-1 in the Trusty 325s release pocket is imported into it by calling import_unapplied_spi() 325s directly. expected_output_refs, validation_repo_expected_identical_refs and 325s reuse are then asserted. It is further asserted that no other refs exist in 325s the output repository except for those listed in expected_output_refs and 325s validation_repo_expected_identical_refs. 325s """ 325s # Match the repo_builder objects 325s get_import_tag_msg_mock.return_value = 'Test tag' 325s # Importantly, the following commit message must not be the same as the 325s # commit messages used by the test input repository commits, so that we can 325s # later detect the difference between commits that were already there and 325s # new commits created by the importer for the purposes of asserting the 325s # reuse parameter correctly. 325s get_import_commit_msg_mock.return_value = b'Test commit (new)' 325s 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_tag_test.py:463: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp5f1j59tt/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_import_unapplied_spi_tags[input_repo1-expected_output_refs1-validation_repo_delta1-validation_repo_expected_identical_refs1-True] _ 325s 325s get_import_commit_msg_mock = 325s get_import_tag_msg_mock = 325s repo = 325s input_repo = 325s expected_output_refs = ['refs/heads/do-not-push', 'refs/tags/importer/upstream/ubuntu/1.gz', 'refs/heads/importer/importer/ubuntu/dsc', 'refs/heads/importer/importer/ubuntu/pristine-tar'] 325s validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }} 325s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty-proposed', 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1'] 325s reuse = True 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'expected_output_refs', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s 'reuse', 325s ], 325s [ 325s # 1) An existing import tag (or reimport tag) with the same Git tree 325s # - Reuse import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='import')], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('import'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='import tag contents', 325s ), 325s Commit.from_spec(name='reimport'), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 2) An existing import tag with a different Git tree and an existing 325s # upload tag with the same Git tree 325s # - Reuse upload tag, create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s Commit.from_spec(name='upload'), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-1': Placeholder('upload'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('upload'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('upload'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 3) An existing import tag with a different Git tree and an existing 325s # upload tag with a different Git tree 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s Commit.from_spec( 325s name='upload', 325s mutate='The upload tag contents', 325s ), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-1': Placeholder('upload'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [Commit.from_spec( 325s name='reimport', 325s message='Test commit (new)', 325s )], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 4) An existing import tag with a different Git tree and no upload tag 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [Commit.from_spec( 325s name='reimport', 325s message='Test commit (new)', 325s )], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 5) No import tag and an existing upload tag with the same Git tree 325s # - Reuse upload tag, create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='upload')], 325s tags={'importer/upload/1-1': Placeholder('upload')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('upload'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('upload'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 6) No import tag and an existing upload tag with a different Git tree 325s # - Create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='upload', 325s mutate='The upload tag contents', 325s ), 325s ], 325s tags={'importer/upload/1-1': Placeholder('upload')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='publish', 325s message='Test commit (new)', 325s ), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('publish'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('publish'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 7) No import tags or upload tags 325s # - Create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo(), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='publish', 325s message='Test commit (new)', 325s ), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('publish'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('publish'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1' 325s ], 325s # reuse: 325s False, 325s ), 325s ] 325s ) 325s @patch('gitubuntu.importer.get_import_tag_msg') 325s @patch('gitubuntu.importer.get_import_commit_msg') 325s def test_import_unapplied_spi_tags( 325s get_import_commit_msg_mock, 325s get_import_tag_msg_mock, 325s repo, 325s input_repo, 325s expected_output_refs, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s reuse, 325s ): 325s """Test that unapplied tags are correctly created, adjusted and/or reused 325s 325s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 325s that determines the commit message to use for a given import 325s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 325s that determines the tag message to use for a given import 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param list(str) expected_output_refs: refs that must exist in the output 325s repository 325s :param dict validation_repo_delta: how to transform the input 325s repository into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 325s one supplied by the input repository (assumed to have a commit message 325s of "Test commit") and not one created by the importer in this run 325s (arranged by this test to have a different commit message) 325s 325s The input repository data is written into the output repository and then a 325s fake non-native source package publication of version 1-1 in the Trusty 325s release pocket is imported into it by calling import_unapplied_spi() 325s directly. expected_output_refs, validation_repo_expected_identical_refs and 325s reuse are then asserted. It is further asserted that no other refs exist in 325s the output repository except for those listed in expected_output_refs and 325s validation_repo_expected_identical_refs. 325s """ 325s # Match the repo_builder objects 325s get_import_tag_msg_mock.return_value = 'Test tag' 325s # Importantly, the following commit message must not be the same as the 325s # commit messages used by the test input repository commits, so that we can 325s # later detect the difference between commits that were already there and 325s # new commits created by the importer for the purposes of asserting the 325s # reuse parameter correctly. 325s get_import_commit_msg_mock.return_value = b'Test commit (new)' 325s 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_tag_test.py:463: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmprxkjhakt/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_import_unapplied_spi_tags[input_repo2-expected_output_refs2-validation_repo_delta2-validation_repo_expected_identical_refs2-True] _ 325s 325s get_import_commit_msg_mock = 325s get_import_tag_msg_mock = 325s repo = 325s input_repo = 325s expected_output_refs = ['refs/heads/do-not-push', 'refs/tags/importer/upstream/ubuntu/1.gz', 'refs/heads/importer/importer/ubuntu/dsc', 'refs/heads/importer/importer/ubuntu/pristine-tar', 'refs/notes/importer/importer'] 325s validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }, 'update...t at 0x7598383eb620>, 'importer/reimport/import/1-1/1': }} 325s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty-proposed', 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1'] 325s reuse = True 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'expected_output_refs', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s 'reuse', 325s ], 325s [ 325s # 1) An existing import tag (or reimport tag) with the same Git tree 325s # - Reuse import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='import')], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('import'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='import tag contents', 325s ), 325s Commit.from_spec(name='reimport'), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 2) An existing import tag with a different Git tree and an existing 325s # upload tag with the same Git tree 325s # - Reuse upload tag, create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s Commit.from_spec(name='upload'), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-1': Placeholder('upload'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('upload'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('upload'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 3) An existing import tag with a different Git tree and an existing 325s # upload tag with a different Git tree 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s Commit.from_spec( 325s name='upload', 325s mutate='The upload tag contents', 325s ), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-1': Placeholder('upload'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [Commit.from_spec( 325s name='reimport', 325s message='Test commit (new)', 325s )], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 4) An existing import tag with a different Git tree and no upload tag 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [Commit.from_spec( 325s name='reimport', 325s message='Test commit (new)', 325s )], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 5) No import tag and an existing upload tag with the same Git tree 325s # - Reuse upload tag, create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='upload')], 325s tags={'importer/upload/1-1': Placeholder('upload')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('upload'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('upload'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 6) No import tag and an existing upload tag with a different Git tree 325s # - Create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='upload', 325s mutate='The upload tag contents', 325s ), 325s ], 325s tags={'importer/upload/1-1': Placeholder('upload')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='publish', 325s message='Test commit (new)', 325s ), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('publish'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('publish'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 7) No import tags or upload tags 325s # - Create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo(), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='publish', 325s message='Test commit (new)', 325s ), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('publish'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('publish'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1' 325s ], 325s # reuse: 325s False, 325s ), 325s ] 325s ) 325s @patch('gitubuntu.importer.get_import_tag_msg') 325s @patch('gitubuntu.importer.get_import_commit_msg') 325s def test_import_unapplied_spi_tags( 325s get_import_commit_msg_mock, 325s get_import_tag_msg_mock, 325s repo, 325s input_repo, 325s expected_output_refs, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s reuse, 325s ): 325s """Test that unapplied tags are correctly created, adjusted and/or reused 325s 325s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 325s that determines the commit message to use for a given import 325s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 325s that determines the tag message to use for a given import 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param list(str) expected_output_refs: refs that must exist in the output 325s repository 325s :param dict validation_repo_delta: how to transform the input 325s repository into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 325s one supplied by the input repository (assumed to have a commit message 325s of "Test commit") and not one created by the importer in this run 325s (arranged by this test to have a different commit message) 325s 325s The input repository data is written into the output repository and then a 325s fake non-native source package publication of version 1-1 in the Trusty 325s release pocket is imported into it by calling import_unapplied_spi() 325s directly. expected_output_refs, validation_repo_expected_identical_refs and 325s reuse are then asserted. It is further asserted that no other refs exist in 325s the output repository except for those listed in expected_output_refs and 325s validation_repo_expected_identical_refs. 325s """ 325s # Match the repo_builder objects 325s get_import_tag_msg_mock.return_value = 'Test tag' 325s # Importantly, the following commit message must not be the same as the 325s # commit messages used by the test input repository commits, so that we can 325s # later detect the difference between commits that were already there and 325s # new commits created by the importer for the purposes of asserting the 325s # reuse parameter correctly. 325s get_import_commit_msg_mock.return_value = b'Test commit (new)' 325s 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_tag_test.py:463: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpv3tbuqsr/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_import_unapplied_spi_tags[input_repo3-expected_output_refs3-validation_repo_delta3-validation_repo_expected_identical_refs3-False] _ 325s 325s get_import_commit_msg_mock = 325s get_import_tag_msg_mock = 325s repo = 325s input_repo = 325s expected_output_refs = ['refs/heads/do-not-push', 'refs/tags/importer/upstream/ubuntu/1.gz', 'refs/heads/importer/importer/ubuntu/dsc', 'refs/heads/importer/importer/ubuntu/pristine-tar', 'refs/notes/importer/changelog', 'refs/notes/importer/importer'] 325s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trust...t at 0x7598383ebc80>, 'importer/reimport/import/1-1/1': }} 325s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty-proposed', 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1'] 325s reuse = False 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'expected_output_refs', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s 'reuse', 325s ], 325s [ 325s # 1) An existing import tag (or reimport tag) with the same Git tree 325s # - Reuse import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='import')], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('import'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='import tag contents', 325s ), 325s Commit.from_spec(name='reimport'), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 2) An existing import tag with a different Git tree and an existing 325s # upload tag with the same Git tree 325s # - Reuse upload tag, create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s Commit.from_spec(name='upload'), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-1': Placeholder('upload'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('upload'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('upload'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 3) An existing import tag with a different Git tree and an existing 325s # upload tag with a different Git tree 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s Commit.from_spec( 325s name='upload', 325s mutate='The upload tag contents', 325s ), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-1': Placeholder('upload'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [Commit.from_spec( 325s name='reimport', 325s message='Test commit (new)', 325s )], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 4) An existing import tag with a different Git tree and no upload tag 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [Commit.from_spec( 325s name='reimport', 325s message='Test commit (new)', 325s )], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 5) No import tag and an existing upload tag with the same Git tree 325s # - Reuse upload tag, create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='upload')], 325s tags={'importer/upload/1-1': Placeholder('upload')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('upload'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('upload'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 6) No import tag and an existing upload tag with a different Git tree 325s # - Create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='upload', 325s mutate='The upload tag contents', 325s ), 325s ], 325s tags={'importer/upload/1-1': Placeholder('upload')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='publish', 325s message='Test commit (new)', 325s ), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('publish'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('publish'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 7) No import tags or upload tags 325s # - Create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo(), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='publish', 325s message='Test commit (new)', 325s ), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('publish'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('publish'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1' 325s ], 325s # reuse: 325s False, 325s ), 325s ] 325s ) 325s @patch('gitubuntu.importer.get_import_tag_msg') 325s @patch('gitubuntu.importer.get_import_commit_msg') 325s def test_import_unapplied_spi_tags( 325s get_import_commit_msg_mock, 325s get_import_tag_msg_mock, 325s repo, 325s input_repo, 325s expected_output_refs, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s reuse, 325s ): 325s """Test that unapplied tags are correctly created, adjusted and/or reused 325s 325s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 325s that determines the commit message to use for a given import 325s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 325s that determines the tag message to use for a given import 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param list(str) expected_output_refs: refs that must exist in the output 325s repository 325s :param dict validation_repo_delta: how to transform the input 325s repository into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 325s one supplied by the input repository (assumed to have a commit message 325s of "Test commit") and not one created by the importer in this run 325s (arranged by this test to have a different commit message) 325s 325s The input repository data is written into the output repository and then a 325s fake non-native source package publication of version 1-1 in the Trusty 325s release pocket is imported into it by calling import_unapplied_spi() 325s directly. expected_output_refs, validation_repo_expected_identical_refs and 325s reuse are then asserted. It is further asserted that no other refs exist in 325s the output repository except for those listed in expected_output_refs and 325s validation_repo_expected_identical_refs. 325s """ 325s # Match the repo_builder objects 325s get_import_tag_msg_mock.return_value = 'Test tag' 325s # Importantly, the following commit message must not be the same as the 325s # commit messages used by the test input repository commits, so that we can 325s # later detect the difference between commits that were already there and 325s # new commits created by the importer for the purposes of asserting the 325s # reuse parameter correctly. 325s get_import_commit_msg_mock.return_value = b'Test commit (new)' 325s 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_tag_test.py:463: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp3n0pzrby/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_import_unapplied_spi_tags[input_repo4-expected_output_refs4-validation_repo_delta4-validation_repo_expected_identical_refs4-False] _ 325s 325s get_import_commit_msg_mock = 325s get_import_tag_msg_mock = 325s repo = 325s input_repo = 325s expected_output_refs = ['refs/heads/do-not-push', 'refs/tags/importer/upstream/ubuntu/1.gz', 'refs/heads/importer/importer/ubuntu/dsc', 'refs/heads/importer/importer/ubuntu/pristine-tar', 'refs/notes/importer/changelog', 'refs/notes/importer/importer'] 325s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trust...t at 0x759838424e90>, 'importer/reimport/import/1-1/1': }} 325s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty-proposed', 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1'] 325s reuse = False 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'expected_output_refs', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s 'reuse', 325s ], 325s [ 325s # 1) An existing import tag (or reimport tag) with the same Git tree 325s # - Reuse import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='import')], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('import'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='import tag contents', 325s ), 325s Commit.from_spec(name='reimport'), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 2) An existing import tag with a different Git tree and an existing 325s # upload tag with the same Git tree 325s # - Reuse upload tag, create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s Commit.from_spec(name='upload'), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-1': Placeholder('upload'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('upload'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('upload'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 3) An existing import tag with a different Git tree and an existing 325s # upload tag with a different Git tree 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s Commit.from_spec( 325s name='upload', 325s mutate='The upload tag contents', 325s ), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-1': Placeholder('upload'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [Commit.from_spec( 325s name='reimport', 325s message='Test commit (new)', 325s )], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 4) An existing import tag with a different Git tree and no upload tag 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [Commit.from_spec( 325s name='reimport', 325s message='Test commit (new)', 325s )], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 5) No import tag and an existing upload tag with the same Git tree 325s # - Reuse upload tag, create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='upload')], 325s tags={'importer/upload/1-1': Placeholder('upload')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('upload'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('upload'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 6) No import tag and an existing upload tag with a different Git tree 325s # - Create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='upload', 325s mutate='The upload tag contents', 325s ), 325s ], 325s tags={'importer/upload/1-1': Placeholder('upload')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='publish', 325s message='Test commit (new)', 325s ), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('publish'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('publish'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 7) No import tags or upload tags 325s # - Create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo(), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='publish', 325s message='Test commit (new)', 325s ), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('publish'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('publish'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1' 325s ], 325s # reuse: 325s False, 325s ), 325s ] 325s ) 325s @patch('gitubuntu.importer.get_import_tag_msg') 325s @patch('gitubuntu.importer.get_import_commit_msg') 325s def test_import_unapplied_spi_tags( 325s get_import_commit_msg_mock, 325s get_import_tag_msg_mock, 325s repo, 325s input_repo, 325s expected_output_refs, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s reuse, 325s ): 325s """Test that unapplied tags are correctly created, adjusted and/or reused 325s 325s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 325s that determines the commit message to use for a given import 325s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 325s that determines the tag message to use for a given import 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param list(str) expected_output_refs: refs that must exist in the output 325s repository 325s :param dict validation_repo_delta: how to transform the input 325s repository into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 325s one supplied by the input repository (assumed to have a commit message 325s of "Test commit") and not one created by the importer in this run 325s (arranged by this test to have a different commit message) 325s 325s The input repository data is written into the output repository and then a 325s fake non-native source package publication of version 1-1 in the Trusty 325s release pocket is imported into it by calling import_unapplied_spi() 325s directly. expected_output_refs, validation_repo_expected_identical_refs and 325s reuse are then asserted. It is further asserted that no other refs exist in 325s the output repository except for those listed in expected_output_refs and 325s validation_repo_expected_identical_refs. 325s """ 325s # Match the repo_builder objects 325s get_import_tag_msg_mock.return_value = 'Test tag' 325s # Importantly, the following commit message must not be the same as the 325s # commit messages used by the test input repository commits, so that we can 325s # later detect the difference between commits that were already there and 325s # new commits created by the importer for the purposes of asserting the 325s # reuse parameter correctly. 325s get_import_commit_msg_mock.return_value = b'Test commit (new)' 325s 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_tag_test.py:463: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpa_9c_3cq/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_import_unapplied_spi_tags[input_repo5-expected_output_refs5-validation_repo_delta5-validation_repo_expected_identical_refs5-True] _ 325s 325s get_import_commit_msg_mock = 325s get_import_tag_msg_mock = 325s repo = 325s input_repo = 325s expected_output_refs = ['refs/heads/do-not-push', 'refs/tags/importer/upstream/ubuntu/1.gz', 'refs/heads/importer/importer/ubuntu/dsc', 'refs/heads/importer/importer/ubuntu/pristine-tar', 'refs/notes/importer/importer'] 325s validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }, 'update_tags': {'importer/import/1-1': }} 325s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1'] 325s reuse = True 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'expected_output_refs', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s 'reuse', 325s ], 325s [ 325s # 1) An existing import tag (or reimport tag) with the same Git tree 325s # - Reuse import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='import')], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('import'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='import tag contents', 325s ), 325s Commit.from_spec(name='reimport'), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 2) An existing import tag with a different Git tree and an existing 325s # upload tag with the same Git tree 325s # - Reuse upload tag, create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s Commit.from_spec(name='upload'), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-1': Placeholder('upload'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('upload'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('upload'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 3) An existing import tag with a different Git tree and an existing 325s # upload tag with a different Git tree 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s Commit.from_spec( 325s name='upload', 325s mutate='The upload tag contents', 325s ), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-1': Placeholder('upload'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [Commit.from_spec( 325s name='reimport', 325s message='Test commit (new)', 325s )], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 4) An existing import tag with a different Git tree and no upload tag 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [Commit.from_spec( 325s name='reimport', 325s message='Test commit (new)', 325s )], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 5) No import tag and an existing upload tag with the same Git tree 325s # - Reuse upload tag, create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='upload')], 325s tags={'importer/upload/1-1': Placeholder('upload')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('upload'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('upload'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 6) No import tag and an existing upload tag with a different Git tree 325s # - Create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='upload', 325s mutate='The upload tag contents', 325s ), 325s ], 325s tags={'importer/upload/1-1': Placeholder('upload')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='publish', 325s message='Test commit (new)', 325s ), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('publish'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('publish'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 7) No import tags or upload tags 325s # - Create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo(), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='publish', 325s message='Test commit (new)', 325s ), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('publish'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('publish'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1' 325s ], 325s # reuse: 325s False, 325s ), 325s ] 325s ) 325s @patch('gitubuntu.importer.get_import_tag_msg') 325s @patch('gitubuntu.importer.get_import_commit_msg') 325s def test_import_unapplied_spi_tags( 325s get_import_commit_msg_mock, 325s get_import_tag_msg_mock, 325s repo, 325s input_repo, 325s expected_output_refs, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s reuse, 325s ): 325s """Test that unapplied tags are correctly created, adjusted and/or reused 325s 325s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 325s that determines the commit message to use for a given import 325s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 325s that determines the tag message to use for a given import 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param list(str) expected_output_refs: refs that must exist in the output 325s repository 325s :param dict validation_repo_delta: how to transform the input 325s repository into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 325s one supplied by the input repository (assumed to have a commit message 325s of "Test commit") and not one created by the importer in this run 325s (arranged by this test to have a different commit message) 325s 325s The input repository data is written into the output repository and then a 325s fake non-native source package publication of version 1-1 in the Trusty 325s release pocket is imported into it by calling import_unapplied_spi() 325s directly. expected_output_refs, validation_repo_expected_identical_refs and 325s reuse are then asserted. It is further asserted that no other refs exist in 325s the output repository except for those listed in expected_output_refs and 325s validation_repo_expected_identical_refs. 325s """ 325s # Match the repo_builder objects 325s get_import_tag_msg_mock.return_value = 'Test tag' 325s # Importantly, the following commit message must not be the same as the 325s # commit messages used by the test input repository commits, so that we can 325s # later detect the difference between commits that were already there and 325s # new commits created by the importer for the purposes of asserting the 325s # reuse parameter correctly. 325s get_import_commit_msg_mock.return_value = b'Test commit (new)' 325s 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_tag_test.py:463: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpc7gkfh5h/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_import_unapplied_spi_tags[input_repo6-expected_output_refs6-validation_repo_delta6-validation_repo_expected_identical_refs6-False] _ 325s 325s get_import_commit_msg_mock = 325s get_import_tag_msg_mock = 325s repo = 325s input_repo = 325s expected_output_refs = ['refs/heads/do-not-push', 'refs/tags/importer/upstream/ubuntu/1.gz', 'refs/heads/importer/importer/ubuntu/dsc', 'refs/heads/importer/importer/ubuntu/pristine-tar', 'refs/notes/importer/changelog', 'refs/notes/importer/importer'] 325s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trust...x7598384245c0>}, 'update_tags': {'importer/import/1-1': }} 325s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1'] 325s reuse = False 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'expected_output_refs', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s 'reuse', 325s ], 325s [ 325s # 1) An existing import tag (or reimport tag) with the same Git tree 325s # - Reuse import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='import')], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('import'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='import tag contents', 325s ), 325s Commit.from_spec(name='reimport'), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 2) An existing import tag with a different Git tree and an existing 325s # upload tag with the same Git tree 325s # - Reuse upload tag, create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s Commit.from_spec(name='upload'), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-1': Placeholder('upload'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('upload'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('upload'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 3) An existing import tag with a different Git tree and an existing 325s # upload tag with a different Git tree 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s Commit.from_spec( 325s name='upload', 325s mutate='The upload tag contents', 325s ), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-1': Placeholder('upload'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [Commit.from_spec( 325s name='reimport', 325s message='Test commit (new)', 325s )], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 4) An existing import tag with a different Git tree and no upload tag 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [Commit.from_spec( 325s name='reimport', 325s message='Test commit (new)', 325s )], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 5) No import tag and an existing upload tag with the same Git tree 325s # - Reuse upload tag, create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='upload')], 325s tags={'importer/upload/1-1': Placeholder('upload')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('upload'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('upload'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 6) No import tag and an existing upload tag with a different Git tree 325s # - Create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='upload', 325s mutate='The upload tag contents', 325s ), 325s ], 325s tags={'importer/upload/1-1': Placeholder('upload')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='publish', 325s message='Test commit (new)', 325s ), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('publish'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('publish'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 7) No import tags or upload tags 325s # - Create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo(), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='publish', 325s message='Test commit (new)', 325s ), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('publish'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('publish'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1' 325s ], 325s # reuse: 325s False, 325s ), 325s ] 325s ) 325s @patch('gitubuntu.importer.get_import_tag_msg') 325s @patch('gitubuntu.importer.get_import_commit_msg') 325s def test_import_unapplied_spi_tags( 325s get_import_commit_msg_mock, 325s get_import_tag_msg_mock, 325s repo, 325s input_repo, 325s expected_output_refs, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s reuse, 325s ): 325s """Test that unapplied tags are correctly created, adjusted and/or reused 325s 325s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 325s that determines the commit message to use for a given import 325s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 325s that determines the tag message to use for a given import 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param list(str) expected_output_refs: refs that must exist in the output 325s repository 325s :param dict validation_repo_delta: how to transform the input 325s repository into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 325s one supplied by the input repository (assumed to have a commit message 325s of "Test commit") and not one created by the importer in this run 325s (arranged by this test to have a different commit message) 325s 325s The input repository data is written into the output repository and then a 325s fake non-native source package publication of version 1-1 in the Trusty 325s release pocket is imported into it by calling import_unapplied_spi() 325s directly. expected_output_refs, validation_repo_expected_identical_refs and 325s reuse are then asserted. It is further asserted that no other refs exist in 325s the output repository except for those listed in expected_output_refs and 325s validation_repo_expected_identical_refs. 325s """ 325s # Match the repo_builder objects 325s get_import_tag_msg_mock.return_value = 'Test tag' 325s # Importantly, the following commit message must not be the same as the 325s # commit messages used by the test input repository commits, so that we can 325s # later detect the difference between commits that were already there and 325s # new commits created by the importer for the purposes of asserting the 325s # reuse parameter correctly. 325s get_import_commit_msg_mock.return_value = b'Test commit (new)' 325s 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_tag_test.py:463: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp53fnfw42/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_import_unapplied_spi_tags[input_repo7-expected_output_refs7-validation_repo_delta7-validation_repo_expected_identical_refs7-False] _ 325s 325s get_import_commit_msg_mock = 325s get_import_tag_msg_mock = 325s repo = 325s input_repo = 325s expected_output_refs = ['refs/heads/do-not-push', 'refs/tags/importer/upstream/ubuntu/1.gz', 'refs/heads/importer/importer/ubuntu/dsc', 'refs/heads/importer/importer/ubuntu/pristine-tar', 'refs/notes/importer/changelog', 'refs/notes/importer/importer'] 325s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trust...x7598384248c0>}, 'update_tags': {'importer/import/1-1': }} 325s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1'] 325s reuse = False 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'expected_output_refs', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s 'reuse', 325s ], 325s [ 325s # 1) An existing import tag (or reimport tag) with the same Git tree 325s # - Reuse import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='import')], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('import'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='import tag contents', 325s ), 325s Commit.from_spec(name='reimport'), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 2) An existing import tag with a different Git tree and an existing 325s # upload tag with the same Git tree 325s # - Reuse upload tag, create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s Commit.from_spec(name='upload'), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-1': Placeholder('upload'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('upload'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('upload'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 3) An existing import tag with a different Git tree and an existing 325s # upload tag with a different Git tree 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s Commit.from_spec( 325s name='upload', 325s mutate='The upload tag contents', 325s ), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-1': Placeholder('upload'), 325s }, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [Commit.from_spec( 325s name='reimport', 325s message='Test commit (new)', 325s )], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 4) An existing import tag with a different Git tree and no upload tag 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='import', 325s mutate='The import tag contents', 325s ), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 325s }, 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [Commit.from_spec( 325s name='reimport', 325s message='Test commit (new)', 325s )], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('reimport'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty-proposed', 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 5) No import tag and an existing upload tag with the same Git tree 325s # - Reuse upload tag, create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='upload')], 325s tags={'importer/upload/1-1': Placeholder('upload')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('upload'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('upload'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 6) No import tag and an existing upload tag with a different Git tree 325s # - Create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='upload', 325s mutate='The upload tag contents', 325s ), 325s ], 325s tags={'importer/upload/1-1': Placeholder('upload')}, 325s ), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='publish', 325s message='Test commit (new)', 325s ), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('publish'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('publish'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/upload/1-1', 325s ], 325s # reuse: 325s False, 325s ), 325s 325s # 7) No import tags or upload tags 325s # - Create import tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo(), 325s # expected_output_refs: 325s [ 325s 'refs/heads/do-not-push', 325s 'refs/tags/importer/upstream/ubuntu/1.gz', 325s 'refs/heads/importer/importer/ubuntu/dsc', 325s 'refs/heads/importer/importer/ubuntu/pristine-tar', 325s 'refs/notes/importer/changelog', 325s 'refs/notes/importer/importer', 325s ], 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='publish', 325s message='Test commit (new)', 325s ), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('publish'), 325s }, 325s 'update_branches': { 325s 'importer/ubuntu/trusty': Placeholder('publish'), 325s }, 325s }, 325s # validation_repo_expected_identical_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1' 325s ], 325s # reuse: 325s False, 325s ), 325s ] 325s ) 325s @patch('gitubuntu.importer.get_import_tag_msg') 325s @patch('gitubuntu.importer.get_import_commit_msg') 325s def test_import_unapplied_spi_tags( 325s get_import_commit_msg_mock, 325s get_import_tag_msg_mock, 325s repo, 325s input_repo, 325s expected_output_refs, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s reuse, 325s ): 325s """Test that unapplied tags are correctly created, adjusted and/or reused 325s 325s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 325s that determines the commit message to use for a given import 325s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 325s that determines the tag message to use for a given import 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param list(str) expected_output_refs: refs that must exist in the output 325s repository 325s :param dict validation_repo_delta: how to transform the input 325s repository into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 325s one supplied by the input repository (assumed to have a commit message 325s of "Test commit") and not one created by the importer in this run 325s (arranged by this test to have a different commit message) 325s 325s The input repository data is written into the output repository and then a 325s fake non-native source package publication of version 1-1 in the Trusty 325s release pocket is imported into it by calling import_unapplied_spi() 325s directly. expected_output_refs, validation_repo_expected_identical_refs and 325s reuse are then asserted. It is further asserted that no other refs exist in 325s the output repository except for those listed in expected_output_refs and 325s validation_repo_expected_identical_refs. 325s """ 325s # Match the repo_builder objects 325s get_import_tag_msg_mock.return_value = 'Test tag' 325s # Importantly, the following commit message must not be the same as the 325s # commit messages used by the test input repository commits, so that we can 325s # later detect the difference between commits that were already there and 325s # new commits created by the importer for the purposes of asserting the 325s # reuse parameter correctly. 325s get_import_commit_msg_mock.return_value = b'Test commit (new)' 325s 325s input_repo.write(repo.raw_repo) 325s 325s publish_spec = source_builder.SourceSpec( 325s version='1-1', 325s native=False, 325s ) 325s 325s with source_builder.Source(publish_spec) as dsc_path: 325s > target.import_unapplied_spi( 325s repo=repo, 325s spi=MockSPI(dsc_path, publish_spec.version), 325s namespace='importer', 325s skip_orig=False, 325s parent_overrides={}, 325s ) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_tag_test.py:471: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:2308: in import_unapplied_spi 325s import_unapplied_dsc( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 325s commit, tag = find_or_create_unapplied_commit( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 325s changelog_parents = get_unapplied_import_parents( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 325s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 325s changelog = self.get_changelog_from_treeish(treeish) 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 325s return Changelog.from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:569: in from_treeish 325s blob = follow_symlinks_to_blob( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmp7dzmw245/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_import_applied_spi_tags[input_repo0-validation_repo_delta0-validation_repo_expected_treewise_refs0-True] _ 325s 325s get_import_commit_msg_mock = 325s get_import_tag_msg_mock = 325s repo = 325s input_repo = 325s validation_repo_delta = {} 325s validation_repo_expected_treewise_refs = ['refs/heads/importer/ubuntu/trusty', 'refs/heads/importer/applied/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/applied/1-1'] 325s reuse = True 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'validation_repo_delta', 325s 'validation_repo_expected_treewise_refs', 325s 'reuse', 325s ], 325s [ 325s # 1) An existing applied tag (or reimport tag) with the same Git tree 325s # - Reuse applied tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec(name='unapplied', has_patches=True), 325s Commit.from_spec(name='applied', patches_applied=True), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty': Placeholder('unapplied'), 325s 'importer/applied/ubuntu/trusty': Placeholder('applied'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('unapplied'), 325s 'importer/applied/1-1': Placeholder('applied'), 325s }, 325s ), 325s # validation_repo_delta: 325s { 325s # no output repository delta 325s }, 325s # validation_repo_expected_treewise_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/heads/importer/applied/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/applied/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 2) An existing applied tag with a different Git tree 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='unapplied', 325s has_patches=True, 325s mutate='import tag contents', 325s ), 325s Commit.from_spec( 325s name='unapplied_reimport', 325s has_patches=True, 325s ), 325s Commit.from_spec( 325s name='applied', 325s patches_applied=True, 325s mutate='import tag contents', 325s ) 325s ], 325s branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, 325s tags={ 325s 'importer/import/1-1': 325s Placeholder('unapplied'), 325s 'importer/reimport/import/1-1/0': 325s Placeholder('unapplied'), 325s 'importer/reimport/import/1-1/1': 325s Placeholder('unapplied_reimport'), 325s 'importer/applied/1-1': 325s Placeholder('applied'), 325s }, 325s ), 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='applied_reimport', 325s patches_applied=True, 325s parents=[Placeholder('unapplied_reimport')], 325s ), 325s ], 325s 'update_tags': { 325s 'importer/reimport/applied/1-1/0': 325s Placeholder('applied'), 325s 'importer/reimport/applied/1-1/1': 325s Placeholder('applied_reimport'), 325s }, 325s 'update_branches': { 325s 'importer/applied/ubuntu/trusty': 325s Placeholder('applied_reimport'), 325s }, 325s }, 325s # validation_repo_expected_treewise_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/heads/importer/applied/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s 'refs/tags/importer/applied/1-1', 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s ], 325s # reuse: 325s False, 325s 325s marks=pytest.mark.xfail(reason='LP: #1755247'), 325s ), 325s 325s # 3) No applied tags 325s # - Create applied tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='unapplied', has_patches=True)], 325s branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, 325s tags={'importer/import/1-1': Placeholder('unapplied')}, 325s ), 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='applied', 325s patches_applied=True, 325s parents=[Placeholder('unapplied')], 325s ), 325s ], 325s 'update_tags': { 325s 'importer/applied/1-1': Placeholder('applied') 325s }, 325s 'update_branches': { 325s 'importer/applied/ubuntu/trusty': Placeholder('applied'), 325s }, 325s }, 325s # validation_repo_expected_treewise_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/heads/importer/applied/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/applied/1-1' 325s ], 325s # reuse: 325s False, 325s ), 325s ] 325s ) 325s @patch('gitubuntu.importer.get_import_tag_msg') 325s @patch('gitubuntu.importer.get_import_commit_msg') 325s def test_import_applied_spi_tags( 325s get_import_commit_msg_mock, 325s get_import_tag_msg_mock, 325s repo, 325s input_repo, 325s validation_repo_delta, 325s validation_repo_expected_treewise_refs, 325s reuse, 325s ): 325s """Test that applied tags are correctly created, adjusted and/or reused 325s 325s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 325s that determines the commit message to use for a given import 325s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 325s that determines the tag message to use for a given import 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param dict validation_repo_delta: how to transform the input repository 325s into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_treewise_refs: refs whose trees 325s must be identical between the validation repository and the output 325s repository 325s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 325s one supplied by the input repository (assumed to have a commit message 325s of "Test commit") and not one created by the importer in this run 325s (arranged by this test to have a different commit message) 325s 325s The input repository data is written into the output repository and then a 325s fake non-native source package publication of version 1-1 in the Trusty 325s release pocket is imported into it by calling import_applied_spi() 325s directly. reuse and validation_repo_expected_treewise_refs are then 325s asserted. 325s 325s This is similar to test_unapplied_spi_tags except that it calls 325s import_applied_spi() instead of import_unapplied_spi() and only treewise 325s ref comparisons are made. 325s """ 325s # Match the repo_builder objects 325s get_import_tag_msg_mock.return_value = 'Test tag' 325s # Importantly, the following commit message must not be the same as the 325s # commit messages used by the test input repository commits, so that we can 325s # later detect the difference between commits that were already there and 325s # new commits created by the importer for the purposes of asserting the 325s # reuse parameter correctly. 325s get_import_commit_msg_mock.return_value = b'Test commit (new)' 325s 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_tag_test.py:711: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpkm_8p_e4/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: applying a 325s dpkg-source: info: applying b 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: applying a 325s dpkg-source: info: applying b 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: applying a 325s dpkg-source: info: applying b 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: applying a 325s dpkg-source: info: applying b 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: applying a 325s dpkg-source: info: applying b 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_import_applied_spi_tags[input_repo2-validation_repo_delta2-validation_repo_expected_treewise_refs2-False] _ 325s 325s get_import_commit_msg_mock = 325s get_import_tag_msg_mock = 325s repo = 325s input_repo = 325s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/applied/ubun...759838425d60>}, 'update_tags': {'importer/applied/1-1': }} 325s validation_repo_expected_treewise_refs = ['refs/heads/importer/ubuntu/trusty', 'refs/heads/importer/applied/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/applied/1-1'] 325s reuse = False 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'validation_repo_delta', 325s 'validation_repo_expected_treewise_refs', 325s 'reuse', 325s ], 325s [ 325s # 1) An existing applied tag (or reimport tag) with the same Git tree 325s # - Reuse applied tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec(name='unapplied', has_patches=True), 325s Commit.from_spec(name='applied', patches_applied=True), 325s ], 325s branches={ 325s 'importer/ubuntu/trusty': Placeholder('unapplied'), 325s 'importer/applied/ubuntu/trusty': Placeholder('applied'), 325s }, 325s tags={ 325s 'importer/import/1-1': Placeholder('unapplied'), 325s 'importer/applied/1-1': Placeholder('applied'), 325s }, 325s ), 325s # validation_repo_delta: 325s { 325s # no output repository delta 325s }, 325s # validation_repo_expected_treewise_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/heads/importer/applied/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/applied/1-1', 325s ], 325s # reuse: 325s True, 325s ), 325s 325s # 2) An existing applied tag with a different Git tree 325s # - Create reimport tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[ 325s Commit.from_spec( 325s name='unapplied', 325s has_patches=True, 325s mutate='import tag contents', 325s ), 325s Commit.from_spec( 325s name='unapplied_reimport', 325s has_patches=True, 325s ), 325s Commit.from_spec( 325s name='applied', 325s patches_applied=True, 325s mutate='import tag contents', 325s ) 325s ], 325s branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, 325s tags={ 325s 'importer/import/1-1': 325s Placeholder('unapplied'), 325s 'importer/reimport/import/1-1/0': 325s Placeholder('unapplied'), 325s 'importer/reimport/import/1-1/1': 325s Placeholder('unapplied_reimport'), 325s 'importer/applied/1-1': 325s Placeholder('applied'), 325s }, 325s ), 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='applied_reimport', 325s patches_applied=True, 325s parents=[Placeholder('unapplied_reimport')], 325s ), 325s ], 325s 'update_tags': { 325s 'importer/reimport/applied/1-1/0': 325s Placeholder('applied'), 325s 'importer/reimport/applied/1-1/1': 325s Placeholder('applied_reimport'), 325s }, 325s 'update_branches': { 325s 'importer/applied/ubuntu/trusty': 325s Placeholder('applied_reimport'), 325s }, 325s }, 325s # validation_repo_expected_treewise_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/heads/importer/applied/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s 'refs/tags/importer/applied/1-1', 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s ], 325s # reuse: 325s False, 325s 325s marks=pytest.mark.xfail(reason='LP: #1755247'), 325s ), 325s 325s # 3) No applied tags 325s # - Create applied tag 325s pytest.param( 325s # input_repo: 325s repo_builder.Repo( 325s commits=[Commit.from_spec(name='unapplied', has_patches=True)], 325s branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, 325s tags={'importer/import/1-1': Placeholder('unapplied')}, 325s ), 325s # validation_repo_delta: 325s { 325s 'add_commits': [ 325s Commit.from_spec( 325s name='applied', 325s patches_applied=True, 325s parents=[Placeholder('unapplied')], 325s ), 325s ], 325s 'update_tags': { 325s 'importer/applied/1-1': Placeholder('applied') 325s }, 325s 'update_branches': { 325s 'importer/applied/ubuntu/trusty': Placeholder('applied'), 325s }, 325s }, 325s # validation_repo_expected_treewise_refs: 325s [ 325s 'refs/heads/importer/ubuntu/trusty', 325s 'refs/heads/importer/applied/ubuntu/trusty', 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/applied/1-1' 325s ], 325s # reuse: 325s False, 325s ), 325s ] 325s ) 325s @patch('gitubuntu.importer.get_import_tag_msg') 325s @patch('gitubuntu.importer.get_import_commit_msg') 325s def test_import_applied_spi_tags( 325s get_import_commit_msg_mock, 325s get_import_tag_msg_mock, 325s repo, 325s input_repo, 325s validation_repo_delta, 325s validation_repo_expected_treewise_refs, 325s reuse, 325s ): 325s """Test that applied tags are correctly created, adjusted and/or reused 325s 325s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 325s that determines the commit message to use for a given import 325s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 325s that determines the tag message to use for a given import 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param dict validation_repo_delta: how to transform the input repository 325s into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_treewise_refs: refs whose trees 325s must be identical between the validation repository and the output 325s repository 325s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 325s one supplied by the input repository (assumed to have a commit message 325s of "Test commit") and not one created by the importer in this run 325s (arranged by this test to have a different commit message) 325s 325s The input repository data is written into the output repository and then a 325s fake non-native source package publication of version 1-1 in the Trusty 325s release pocket is imported into it by calling import_applied_spi() 325s directly. reuse and validation_repo_expected_treewise_refs are then 325s asserted. 325s 325s This is similar to test_unapplied_spi_tags except that it calls 325s import_applied_spi() instead of import_unapplied_spi() and only treewise 325s ref comparisons are made. 325s """ 325s # Match the repo_builder objects 325s get_import_tag_msg_mock.return_value = 'Test tag' 325s # Importantly, the following commit message must not be the same as the 325s # commit messages used by the test input repository commits, so that we can 325s # later detect the difference between commits that were already there and 325s # new commits created by the importer for the purposes of asserting the 325s # reuse parameter correctly. 325s get_import_commit_msg_mock.return_value = b'Test commit (new)' 325s 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_tag_test.py:711: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpjxe7aaah/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: applying a 325s dpkg-source: info: applying b 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: applying a 325s dpkg-source: info: applying b 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: applying a 325s dpkg-source: info: applying b 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s __ test_get_existing_import_tags[input_repo1-PatchState.UNAPPLIED-expected1] ___ 325s 325s repo = 325s patch_state = 325s input_repo = 325s expected = ['refs/tags/importer/import/1-1'] 325s 325s @pytest.mark.parametrize( 325s 'input_repo, patch_state, expected', [ 325s ( 325s repo_builder.Repo(), 325s PatchState.UNAPPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s tags={'importer/import/1-1': repo_builder.Commit()}, 325s ), 325s PatchState.UNAPPLIED, 325s ['refs/tags/importer/import/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit(name='import'), 325s repo_builder.Commit(name='reimport1'), 325s ], 325s tags={ 325s 'importer/import/1-1': repo_builder.Commit(), 325s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 325s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 325s }, 325s ), 325s PatchState.UNAPPLIED, 325s [ 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo(), 325s PatchState.APPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s tags={'importer/applied/1-1': repo_builder.Commit()}, 325s ), 325s PatchState.APPLIED, 325s ['refs/tags/importer/applied/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit(name='applied'), 325s repo_builder.Commit(name='reimport1'), 325s ], 325s tags={ 325s 'importer/applied/1-1': repo_builder.Commit(), 325s 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 325s 'importer/reimport/applied/1-1/1': repo_builder.Commit(), 325s }, 325s ), 325s PatchState.APPLIED, 325s [ 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s ], 325s ), 325s ], 325s ) 325s def test_get_existing_import_tags(repo, patch_state, input_repo, expected): 325s """Test that get_existing_import_tags is generally correct 325s 325s This is the general parameterised test for the common case uses of 325s target.get_existing_import_tags. 325s 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param PatchState patch_state: passed through to get_existing_import_tags 325s :param repo_builder.Repo input_repo: input repository data 325s :param list(str) expected: the names of the references that are expected to 325s be returned, in order. 325s """ 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:214: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpi0xcgnkq/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s __ test_get_existing_import_tags[input_repo2-PatchState.UNAPPLIED-expected2] ___ 325s 325s repo = 325s patch_state = 325s input_repo = 325s expected = ['refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1'] 325s 325s @pytest.mark.parametrize( 325s 'input_repo, patch_state, expected', [ 325s ( 325s repo_builder.Repo(), 325s PatchState.UNAPPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s tags={'importer/import/1-1': repo_builder.Commit()}, 325s ), 325s PatchState.UNAPPLIED, 325s ['refs/tags/importer/import/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit(name='import'), 325s repo_builder.Commit(name='reimport1'), 325s ], 325s tags={ 325s 'importer/import/1-1': repo_builder.Commit(), 325s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 325s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 325s }, 325s ), 325s PatchState.UNAPPLIED, 325s [ 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo(), 325s PatchState.APPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s tags={'importer/applied/1-1': repo_builder.Commit()}, 325s ), 325s PatchState.APPLIED, 325s ['refs/tags/importer/applied/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit(name='applied'), 325s repo_builder.Commit(name='reimport1'), 325s ], 325s tags={ 325s 'importer/applied/1-1': repo_builder.Commit(), 325s 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 325s 'importer/reimport/applied/1-1/1': repo_builder.Commit(), 325s }, 325s ), 325s PatchState.APPLIED, 325s [ 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s ], 325s ), 325s ], 325s ) 325s def test_get_existing_import_tags(repo, patch_state, input_repo, expected): 325s """Test that get_existing_import_tags is generally correct 325s 325s This is the general parameterised test for the common case uses of 325s target.get_existing_import_tags. 325s 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param PatchState patch_state: passed through to get_existing_import_tags 325s :param repo_builder.Repo input_repo: input repository data 325s :param list(str) expected: the names of the references that are expected to 325s be returned, in order. 325s """ 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:214: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpbo9fm_j8/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ___ test_get_existing_import_tags[input_repo4-PatchState.APPLIED-expected4] ____ 325s 325s repo = 325s patch_state = 325s input_repo = 325s expected = ['refs/tags/importer/applied/1-1'] 325s 325s @pytest.mark.parametrize( 325s 'input_repo, patch_state, expected', [ 325s ( 325s repo_builder.Repo(), 325s PatchState.UNAPPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s tags={'importer/import/1-1': repo_builder.Commit()}, 325s ), 325s PatchState.UNAPPLIED, 325s ['refs/tags/importer/import/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit(name='import'), 325s repo_builder.Commit(name='reimport1'), 325s ], 325s tags={ 325s 'importer/import/1-1': repo_builder.Commit(), 325s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 325s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 325s }, 325s ), 325s PatchState.UNAPPLIED, 325s [ 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo(), 325s PatchState.APPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s tags={'importer/applied/1-1': repo_builder.Commit()}, 325s ), 325s PatchState.APPLIED, 325s ['refs/tags/importer/applied/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit(name='applied'), 325s repo_builder.Commit(name='reimport1'), 325s ], 325s tags={ 325s 'importer/applied/1-1': repo_builder.Commit(), 325s 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 325s 'importer/reimport/applied/1-1/1': repo_builder.Commit(), 325s }, 325s ), 325s PatchState.APPLIED, 325s [ 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s ], 325s ), 325s ], 325s ) 325s def test_get_existing_import_tags(repo, patch_state, input_repo, expected): 325s """Test that get_existing_import_tags is generally correct 325s 325s This is the general parameterised test for the common case uses of 325s target.get_existing_import_tags. 325s 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param PatchState patch_state: passed through to get_existing_import_tags 325s :param repo_builder.Repo input_repo: input repository data 325s :param list(str) expected: the names of the references that are expected to 325s be returned, in order. 325s """ 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:214: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpgje_0phb/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ___ test_get_existing_import_tags[input_repo5-PatchState.APPLIED-expected5] ____ 325s 325s repo = 325s patch_state = 325s input_repo = 325s expected = ['refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1'] 325s 325s @pytest.mark.parametrize( 325s 'input_repo, patch_state, expected', [ 325s ( 325s repo_builder.Repo(), 325s PatchState.UNAPPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s tags={'importer/import/1-1': repo_builder.Commit()}, 325s ), 325s PatchState.UNAPPLIED, 325s ['refs/tags/importer/import/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit(name='import'), 325s repo_builder.Commit(name='reimport1'), 325s ], 325s tags={ 325s 'importer/import/1-1': repo_builder.Commit(), 325s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 325s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 325s }, 325s ), 325s PatchState.UNAPPLIED, 325s [ 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo(), 325s PatchState.APPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s tags={'importer/applied/1-1': repo_builder.Commit()}, 325s ), 325s PatchState.APPLIED, 325s ['refs/tags/importer/applied/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit(name='applied'), 325s repo_builder.Commit(name='reimport1'), 325s ], 325s tags={ 325s 'importer/applied/1-1': repo_builder.Commit(), 325s 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 325s 'importer/reimport/applied/1-1/1': repo_builder.Commit(), 325s }, 325s ), 325s PatchState.APPLIED, 325s [ 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s ], 325s ), 325s ], 325s ) 325s def test_get_existing_import_tags(repo, patch_state, input_repo, expected): 325s """Test that get_existing_import_tags is generally correct 325s 325s This is the general parameterised test for the common case uses of 325s target.get_existing_import_tags. 325s 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param PatchState patch_state: passed through to get_existing_import_tags 325s :param repo_builder.Repo input_repo: input repository data 325s :param list(str) expected: the names of the references that are expected to 325s be returned, in order. 325s """ 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:214: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpqr51snpc/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ____________________ test_get_existing_import_tags_ordering ____________________ 325s 325s repo = 325s 325s def test_get_existing_import_tags_ordering(repo): 325s """Test that get_existing_import_tags returns results in the correct order 325s 325s To maintain hash stability, the spec defines that multiple changelog 325s parents must appear in the order that they were published. For this to 325s work, get_existing_import_tags must return the tags in the correct order 325s even if the underlying git repository tags appear in an arbitrary order. 325s 325s :param GitUbuntuRepository repo: fixture of a temporary repository to use 325s """ 325s 325s # Construct a synthetic git repository containing tags 325s repo_builder.Repo( 325s tags={ 325s 'importer/import/1-1': repo_builder.Commit(), 325s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 325s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 325s } 325s > ).write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:240: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp0zkj5ixu/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s _ test_create_import_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] _ 325s 325s repo = 325s input_repo = 325s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-1': }} 325s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1'] 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s ], 325s [ 325s ( 325s repo_builder.Repo(), 325s { 325s 'add_commits': [ 325s repo_builder.Commit(name='import'), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('import'), 325s }, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s { 325s 'add_commits': [ 325s repo_builder.Commit(name='reimport'), 325s ], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit(name='import'), 325s repo_builder.Commit(name='reimport1'), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport1'), 325s }, 325s ), 325s { 325s 'add_commits': [ 325s repo_builder.Commit(name='reimport2'), 325s ], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/2': Placeholder('reimport2'), 325s }, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s 'refs/tags/importer/reimport/import/1-1/2', 325s ], 325s ), 325s ], 325s ) 325s def test_create_import_tag( 325s repo, 325s input_repo, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s ): 325s """ 325s Unit test that create_import_tag creates the correct import tag 325s 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param dict validation_repo_delta: how to transform the input repository 325s into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s """ 325s publish_commit = repo.raw_repo.get( 325s repo_builder.Commit().write(repo.raw_repo) 325s ).peel(pygit2.Commit) 325s input_repo.write(repo.raw_repo) 325s 325s > target.create_import_tag(repo, publish_commit, '1-1', 'importer') 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:370: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:1379: in create_import_tag 325s repo.create_tag( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s commit_hash = '240dd844a69653244edb52c57c42d709512d64cd' 325s tag_name = 'importer/import/1-1', tag_msg = 'git-ubuntu import' 325s tagger = pygit2.Signature('git-ubuntu importer', 'ubuntu-devel-discuss@lists.ubuntu.com', 0, 0, None) 325s 325s def create_tag(self, 325s commit_hash, 325s tag_name, 325s tag_msg, 325s tagger=None, 325s ): 325s """Create a tag in the repository 325s 325s :param str commit_hash: the commit hash the tag will point to. 325s :param str tag_name: the name of the tag to be created. 325s :param str tag_msg: the text of the tag annotation. 325s :param pygit2.Signature tagger: if supplied, use this signature in the 325s created tag's "tagger" metadata. If not supplied, an arbitrary name 325s and email address is used with the current time. 325s :returns: None 325s """ 325s if not tagger: 325s tagger_time, tagger_offset = datetime_to_signature_spec( 325s datetime.datetime.now(), 325s ) 325s tagger = pygit2.Signature( 325s gitubuntu.spec.SYNTHESIZED_COMMITTER_NAME, 325s gitubuntu.spec.SYNTHESIZED_COMMITTER_EMAIL, 325s tagger_time, 325s tagger_offset, 325s ) 325s 325s logging.debug("Creating tag %s pointing to %s", tag_name, commit_hash) 325s self.raw_repo.create_tag( 325s tag_name, 325s pygit2.Oid(hex=commit_hash), 325s > pygit2.GIT_OBJ_COMMIT, 325s tagger, 325s tag_msg, 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:2114: AttributeError 325s _ test_create_import_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] _ 325s 325s repo = 325s input_repo = 325s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/import/...t at 0x7598383a68a0>, 'importer/reimport/import/1-1/1': }} 325s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1', 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1'] 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s ], 325s [ 325s ( 325s repo_builder.Repo(), 325s { 325s 'add_commits': [ 325s repo_builder.Commit(name='import'), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('import'), 325s }, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s { 325s 'add_commits': [ 325s repo_builder.Commit(name='reimport'), 325s ], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit(name='import'), 325s repo_builder.Commit(name='reimport1'), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport1'), 325s }, 325s ), 325s { 325s 'add_commits': [ 325s repo_builder.Commit(name='reimport2'), 325s ], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/2': Placeholder('reimport2'), 325s }, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s 'refs/tags/importer/reimport/import/1-1/2', 325s ], 325s ), 325s ], 325s ) 325s def test_create_import_tag( 325s repo, 325s input_repo, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s ): 325s """ 325s Unit test that create_import_tag creates the correct import tag 325s 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param dict validation_repo_delta: how to transform the input repository 325s into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s """ 325s publish_commit = repo.raw_repo.get( 325s repo_builder.Commit().write(repo.raw_repo) 325s ).peel(pygit2.Commit) 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:368: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp8fiit4w5/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s _ test_create_import_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] _ 325s 325s repo = 325s input_repo = 325s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/import/1-1/2': }} 325s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1', 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1', 'refs/tags/importer/reimport/import/1-1/2'] 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s ], 325s [ 325s ( 325s repo_builder.Repo(), 325s { 325s 'add_commits': [ 325s repo_builder.Commit(name='import'), 325s ], 325s 'update_tags': { 325s 'importer/import/1-1': Placeholder('import'), 325s }, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s { 325s 'add_commits': [ 325s repo_builder.Commit(name='reimport'), 325s ], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit(name='import'), 325s repo_builder.Commit(name='reimport1'), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport1'), 325s }, 325s ), 325s { 325s 'add_commits': [ 325s repo_builder.Commit(name='reimport2'), 325s ], 325s 'update_tags': { 325s 'importer/reimport/import/1-1/2': Placeholder('reimport2'), 325s }, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s 'refs/tags/importer/reimport/import/1-1/2', 325s ], 325s ), 325s ], 325s ) 325s def test_create_import_tag( 325s repo, 325s input_repo, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s ): 325s """ 325s Unit test that create_import_tag creates the correct import tag 325s 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param dict validation_repo_delta: how to transform the input repository 325s into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s """ 325s publish_commit = repo.raw_repo.get( 325s repo_builder.Commit().write(repo.raw_repo) 325s ).peel(pygit2.Commit) 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:368: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpdagn8ati/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ____________ test_create_import_tag_hash_stability_on_first_import _____________ 325s 325s repo = 325s 325s def test_create_import_tag_hash_stability_on_first_import(repo): 325s """Created import tags should be hash stable on first import 325s 325s :param GitUbuntuRepository repo: fixture providing a temporary 325s GitUbuntuRepository instance to use 325s """ 325s publish_commit = repo.raw_repo.get( 325s repo_builder.Commit( 325s author=pygit2.Signature( 325s 'Hash stability test author', 325s 'newauthor@example.com', 325s 1, 325s 2, 325s ), 325s committer=pygit2.Signature( 325s 'Hash stability test committer', 325s 'newcommitter@example.com', 325s 3, 325s 4, 325s ), 325s ).write(repo.raw_repo) 325s ).peel(pygit2.Commit) 325s > target.create_import_tag(repo, publish_commit, '1-1', 'importer') 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:402: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:1379: in create_import_tag 325s repo.create_tag( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s commit_hash = '65729a1dca101328820bf4f49fbca4e9571a772a' 325s tag_name = 'importer/import/1-1', tag_msg = 'git-ubuntu import' 325s tagger = pygit2.Signature('git-ubuntu importer', 'ubuntu-devel-discuss@lists.ubuntu.com', 3, 4, None) 325s 325s def create_tag(self, 325s commit_hash, 325s tag_name, 325s tag_msg, 325s tagger=None, 325s ): 325s """Create a tag in the repository 325s 325s :param str commit_hash: the commit hash the tag will point to. 325s :param str tag_name: the name of the tag to be created. 325s :param str tag_msg: the text of the tag annotation. 325s :param pygit2.Signature tagger: if supplied, use this signature in the 325s created tag's "tagger" metadata. If not supplied, an arbitrary name 325s and email address is used with the current time. 325s :returns: None 325s """ 325s if not tagger: 325s tagger_time, tagger_offset = datetime_to_signature_spec( 325s datetime.datetime.now(), 325s ) 325s tagger = pygit2.Signature( 325s gitubuntu.spec.SYNTHESIZED_COMMITTER_NAME, 325s gitubuntu.spec.SYNTHESIZED_COMMITTER_EMAIL, 325s tagger_time, 325s tagger_offset, 325s ) 325s 325s logging.debug("Creating tag %s pointing to %s", tag_name, commit_hash) 325s self.raw_repo.create_tag( 325s tag_name, 325s pygit2.Oid(hex=commit_hash), 325s > pygit2.GIT_OBJ_COMMIT, 325s tagger, 325s tag_msg, 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:2114: AttributeError 325s ______________ test_create_import_tag_hash_stability_on_reimport _______________ 325s 325s repo = 325s 325s def test_create_import_tag_hash_stability_on_reimport(repo): 325s """Created import tags should be hash stable on reimport 325s 325s This includes both the /0 duplicate reimport tag of the original import tag 325s as well as the /1 reimport tag being created. 325s 325s :param GitUbuntuRepository repo: fixture providing a temporary 325s GitUbuntuRepository instance to use 325s """ 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit( 325s name='root', 325s author=pygit2.Signature( 325s 'Hash stability test author', 325s 'author@example.com', 325s 1, 325s 2, 325s ), 325s committer=pygit2.Signature( 325s 'Hash stability test committer', 325s 'committer@example.com', 325s 3, 325s 4, 325s ), 325s ), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('root'), 325s }, 325s tagger=pygit2.Signature( 325s 'Hash stability test name', 325s 'stability@example.com', 325s 5, 325s 6, 325s ), 325s > ).write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:449: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpzpvd1v51/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s _ test_create_applied_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] _ 325s 325s repo = 325s input_repo = 325s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/applied/1-1': }} 325s validation_repo_expected_identical_refs = ['refs/tags/importer/applied/1-1'] 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s ], 325s [ 325s ( 325s repo_builder.Repo(), 325s { 325s 'add_commits': [repo_builder.Commit(name='import')], 325s 'update_tags': {'importer/applied/1-1': Placeholder('import')}, 325s }, 325s [ 325s 'refs/tags/importer/applied/1-1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit(name='import')], 325s tags={'importer/applied/1-1': Placeholder('import')}, 325s ), 325s { 325s 'add_commits': [repo_builder.Commit(name='reimport')], 325s 'update_tags': { 325s 'importer/reimport/applied/1-1/0': Placeholder('import'), 325s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 325s }, 325s }, 325s [ 325s 'refs/tags/importer/applied/1-1', 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit(name='import'), 325s repo_builder.Commit(name='reimport1'), 325s ], 325s tags={ 325s 'importer/applied/1-1': Placeholder('import'), 325s 'importer/reimport/applied/1-1/0': Placeholder('import'), 325s 'importer/reimport/applied/1-1/1': Placeholder('reimport1'), 325s }, 325s ), 325s { 325s 'add_commits': [ 325s repo_builder.Commit(name='reimport2') 325s ], 325s 'update_tags': { 325s 'importer/reimport/applied/1-1/2': Placeholder('reimport2'), 325s }, 325s }, 325s [ 325s 'refs/tags/importer/applied/1-1', 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s 'refs/tags/importer/reimport/applied/1-1/2', 325s ], 325s ), 325s ], 325s ) 325s def test_create_applied_tag( 325s repo, 325s input_repo, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s ): 325s """ 325s Unit test that create_applied_tag creates the correct import tag 325s 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param dict validation_repo_delta: how to transform the input repository 325s into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s """ 325s publish_commit_str = str( 325s repo.raw_repo.get( 325s repo_builder.Commit().write(repo.raw_repo) 325s ).peel(pygit2.Commit).id 325s ) 325s 325s input_repo.write(repo.raw_repo) 325s 325s > target.create_applied_tag(repo, publish_commit_str, '1-1', 'importer') 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:577: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:1309: in create_applied_tag 325s repo.create_tag( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s commit_hash = '240dd844a69653244edb52c57c42d709512d64cd' 325s tag_name = 'importer/applied/1-1', tag_msg = 'git-ubuntu import' 325s tagger = pygit2.Signature('git-ubuntu importer', 'ubuntu-devel-discuss@lists.ubuntu.com', 1732638063, 0, None) 325s 325s def create_tag(self, 325s commit_hash, 325s tag_name, 325s tag_msg, 325s tagger=None, 325s ): 325s """Create a tag in the repository 325s 325s :param str commit_hash: the commit hash the tag will point to. 325s :param str tag_name: the name of the tag to be created. 325s :param str tag_msg: the text of the tag annotation. 325s :param pygit2.Signature tagger: if supplied, use this signature in the 325s created tag's "tagger" metadata. If not supplied, an arbitrary name 325s and email address is used with the current time. 325s :returns: None 325s """ 325s if not tagger: 325s tagger_time, tagger_offset = datetime_to_signature_spec( 325s datetime.datetime.now(), 325s ) 325s tagger = pygit2.Signature( 325s gitubuntu.spec.SYNTHESIZED_COMMITTER_NAME, 325s gitubuntu.spec.SYNTHESIZED_COMMITTER_EMAIL, 325s tagger_time, 325s tagger_offset, 325s ) 325s 325s logging.debug("Creating tag %s pointing to %s", tag_name, commit_hash) 325s self.raw_repo.create_tag( 325s tag_name, 325s pygit2.Oid(hex=commit_hash), 325s > pygit2.GIT_OBJ_COMMIT, 325s tagger, 325s tag_msg, 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:2114: AttributeError 325s _ test_create_applied_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] _ 325s 325s repo = 325s input_repo = 325s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/applied... at 0x7598383a5880>, 'importer/reimport/applied/1-1/1': }} 325s validation_repo_expected_identical_refs = ['refs/tags/importer/applied/1-1', 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1'] 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s ], 325s [ 325s ( 325s repo_builder.Repo(), 325s { 325s 'add_commits': [repo_builder.Commit(name='import')], 325s 'update_tags': {'importer/applied/1-1': Placeholder('import')}, 325s }, 325s [ 325s 'refs/tags/importer/applied/1-1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit(name='import')], 325s tags={'importer/applied/1-1': Placeholder('import')}, 325s ), 325s { 325s 'add_commits': [repo_builder.Commit(name='reimport')], 325s 'update_tags': { 325s 'importer/reimport/applied/1-1/0': Placeholder('import'), 325s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 325s }, 325s }, 325s [ 325s 'refs/tags/importer/applied/1-1', 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit(name='import'), 325s repo_builder.Commit(name='reimport1'), 325s ], 325s tags={ 325s 'importer/applied/1-1': Placeholder('import'), 325s 'importer/reimport/applied/1-1/0': Placeholder('import'), 325s 'importer/reimport/applied/1-1/1': Placeholder('reimport1'), 325s }, 325s ), 325s { 325s 'add_commits': [ 325s repo_builder.Commit(name='reimport2') 325s ], 325s 'update_tags': { 325s 'importer/reimport/applied/1-1/2': Placeholder('reimport2'), 325s }, 325s }, 325s [ 325s 'refs/tags/importer/applied/1-1', 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s 'refs/tags/importer/reimport/applied/1-1/2', 325s ], 325s ), 325s ], 325s ) 325s def test_create_applied_tag( 325s repo, 325s input_repo, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s ): 325s """ 325s Unit test that create_applied_tag creates the correct import tag 325s 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param dict validation_repo_delta: how to transform the input repository 325s into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s """ 325s publish_commit_str = str( 325s repo.raw_repo.get( 325s repo_builder.Commit().write(repo.raw_repo) 325s ).peel(pygit2.Commit).id 325s ) 325s 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:575: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpfszt6chc/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s _ test_create_applied_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] _ 325s 325s repo = 325s input_repo = 325s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/applied/1-1/2': }} 325s validation_repo_expected_identical_refs = ['refs/tags/importer/applied/1-1', 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1', 'refs/tags/importer/reimport/applied/1-1/2'] 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s ], 325s [ 325s ( 325s repo_builder.Repo(), 325s { 325s 'add_commits': [repo_builder.Commit(name='import')], 325s 'update_tags': {'importer/applied/1-1': Placeholder('import')}, 325s }, 325s [ 325s 'refs/tags/importer/applied/1-1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit(name='import')], 325s tags={'importer/applied/1-1': Placeholder('import')}, 325s ), 325s { 325s 'add_commits': [repo_builder.Commit(name='reimport')], 325s 'update_tags': { 325s 'importer/reimport/applied/1-1/0': Placeholder('import'), 325s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 325s }, 325s }, 325s [ 325s 'refs/tags/importer/applied/1-1', 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit(name='import'), 325s repo_builder.Commit(name='reimport1'), 325s ], 325s tags={ 325s 'importer/applied/1-1': Placeholder('import'), 325s 'importer/reimport/applied/1-1/0': Placeholder('import'), 325s 'importer/reimport/applied/1-1/1': Placeholder('reimport1'), 325s }, 325s ), 325s { 325s 'add_commits': [ 325s repo_builder.Commit(name='reimport2') 325s ], 325s 'update_tags': { 325s 'importer/reimport/applied/1-1/2': Placeholder('reimport2'), 325s }, 325s }, 325s [ 325s 'refs/tags/importer/applied/1-1', 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s 'refs/tags/importer/reimport/applied/1-1/2', 325s ], 325s ), 325s ], 325s ) 325s def test_create_applied_tag( 325s repo, 325s input_repo, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s ): 325s """ 325s Unit test that create_applied_tag creates the correct import tag 325s 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param dict validation_repo_delta: how to transform the input repository 325s into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s """ 325s publish_commit_str = str( 325s repo.raw_repo.get( 325s repo_builder.Commit().write(repo.raw_repo) 325s ).peel(pygit2.Commit).id 325s ) 325s 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:575: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpj1re1w88/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s _ test_get_changelog_parent_commits[input_repo1-parent_overrides1-changelog_versions1-PatchState.UNAPPLIED-expected_refs1] _ 325s 325s repo = 325s input_repo = 325s parent_overrides = {}, changelog_versions = ['1-2', '1-1'] 325s patch_state = 325s expected_refs = ['refs/tags/importer/import/1-1'] 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'parent_overrides', 325s 'changelog_versions', 325s 'patch_state', 325s 'expected_refs', 325s ], 325s [ 325s ( 325s repo_builder.Repo(), 325s {}, 325s ['1-2', '1-1',], 325s PatchState.UNAPPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s ['refs/tags/importer/import/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec(name='reimport', mutate=1), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s [ 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s {}, 325s ['1-3', '1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s ['refs/tags/importer/import/1-1'], 325s ), 325s ( 325s repo_builder.Repo(), 325s {}, 325s ['1-2', '1-1',], 325s PatchState.APPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='applied')], 325s tags={'importer/applied/1-1': Placeholder('applied')}, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.APPLIED, 325s ['refs/tags/importer/applied/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec(name='reimport', mutate=1), 325s ], 325s tags={ 325s 'importer/applied/1-1': Placeholder('import'), 325s 'importer/reimport/applied/1-1/0': Placeholder('import'), 325s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.APPLIED, 325s [ 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='applied')], 325s tags={'importer/applied/1-1': Placeholder('applied')}, 325s ), 325s {}, 325s ['1-3', '1-2', '1-1'], 325s PatchState.APPLIED, 325s ['refs/tags/importer/applied/1-1'], 325s ), 325s ], 325s ) 325s def test_get_changelog_parent_commits( 325s repo, 325s input_repo, 325s parent_overrides, 325s changelog_versions, 325s patch_state, 325s expected_refs, 325s ): 325s """Test that get_changelog_parent_commits is generally correct 325s 325s This is the general parameterised test for the common case uses of 325s target.get_changelog_parent_commits. 325s 325s :param GitUbuntuRepository repo: fixture providing a temporary 325s GitUbuntuRepository instance to use 325s :param repo_builder.Repo input_repo: the input repository data to use that 325s will be populated into @repo before @repo is passed through to 325s get_changelog_parent_commits 325s :param dict parent_overrides: passed through to 325s get_changelog_parent_commits. 325s :param PatchState patch_state: passed through to 325s get_changelog_parent_commits 325s :param list(str) expected_refs: the expected return value of 325s get_changelog_parent_commits expressed using a list of reference names. 325s Since get_changelog_parent_commits returns a list of commit hash 325s strings, the reference names will need to be dereferenced before 325s comparison; this way the test parameters don't need to be opaque hash 325s strings. 325s """ 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:721: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpj2qnmpfc/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_get_changelog_parent_commits[input_repo2-parent_overrides2-changelog_versions2-PatchState.UNAPPLIED-expected_refs2] _ 325s 325s repo = 325s input_repo = 325s parent_overrides = {}, changelog_versions = ['1-2', '1-1'] 325s patch_state = 325s expected_refs = ['refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1'] 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'parent_overrides', 325s 'changelog_versions', 325s 'patch_state', 325s 'expected_refs', 325s ], 325s [ 325s ( 325s repo_builder.Repo(), 325s {}, 325s ['1-2', '1-1',], 325s PatchState.UNAPPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s ['refs/tags/importer/import/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec(name='reimport', mutate=1), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s [ 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s {}, 325s ['1-3', '1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s ['refs/tags/importer/import/1-1'], 325s ), 325s ( 325s repo_builder.Repo(), 325s {}, 325s ['1-2', '1-1',], 325s PatchState.APPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='applied')], 325s tags={'importer/applied/1-1': Placeholder('applied')}, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.APPLIED, 325s ['refs/tags/importer/applied/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec(name='reimport', mutate=1), 325s ], 325s tags={ 325s 'importer/applied/1-1': Placeholder('import'), 325s 'importer/reimport/applied/1-1/0': Placeholder('import'), 325s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.APPLIED, 325s [ 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='applied')], 325s tags={'importer/applied/1-1': Placeholder('applied')}, 325s ), 325s {}, 325s ['1-3', '1-2', '1-1'], 325s PatchState.APPLIED, 325s ['refs/tags/importer/applied/1-1'], 325s ), 325s ], 325s ) 325s def test_get_changelog_parent_commits( 325s repo, 325s input_repo, 325s parent_overrides, 325s changelog_versions, 325s patch_state, 325s expected_refs, 325s ): 325s """Test that get_changelog_parent_commits is generally correct 325s 325s This is the general parameterised test for the common case uses of 325s target.get_changelog_parent_commits. 325s 325s :param GitUbuntuRepository repo: fixture providing a temporary 325s GitUbuntuRepository instance to use 325s :param repo_builder.Repo input_repo: the input repository data to use that 325s will be populated into @repo before @repo is passed through to 325s get_changelog_parent_commits 325s :param dict parent_overrides: passed through to 325s get_changelog_parent_commits. 325s :param PatchState patch_state: passed through to 325s get_changelog_parent_commits 325s :param list(str) expected_refs: the expected return value of 325s get_changelog_parent_commits expressed using a list of reference names. 325s Since get_changelog_parent_commits returns a list of commit hash 325s strings, the reference names will need to be dereferenced before 325s comparison; this way the test parameters don't need to be opaque hash 325s strings. 325s """ 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:721: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpee7qw0bu/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_get_changelog_parent_commits[input_repo3-parent_overrides3-changelog_versions3-PatchState.UNAPPLIED-expected_refs3] _ 325s 325s repo = 325s input_repo = 325s parent_overrides = {}, changelog_versions = ['1-3', '1-2', '1-1'] 325s patch_state = 325s expected_refs = ['refs/tags/importer/import/1-1'] 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'parent_overrides', 325s 'changelog_versions', 325s 'patch_state', 325s 'expected_refs', 325s ], 325s [ 325s ( 325s repo_builder.Repo(), 325s {}, 325s ['1-2', '1-1',], 325s PatchState.UNAPPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s ['refs/tags/importer/import/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec(name='reimport', mutate=1), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s [ 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s {}, 325s ['1-3', '1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s ['refs/tags/importer/import/1-1'], 325s ), 325s ( 325s repo_builder.Repo(), 325s {}, 325s ['1-2', '1-1',], 325s PatchState.APPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='applied')], 325s tags={'importer/applied/1-1': Placeholder('applied')}, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.APPLIED, 325s ['refs/tags/importer/applied/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec(name='reimport', mutate=1), 325s ], 325s tags={ 325s 'importer/applied/1-1': Placeholder('import'), 325s 'importer/reimport/applied/1-1/0': Placeholder('import'), 325s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.APPLIED, 325s [ 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='applied')], 325s tags={'importer/applied/1-1': Placeholder('applied')}, 325s ), 325s {}, 325s ['1-3', '1-2', '1-1'], 325s PatchState.APPLIED, 325s ['refs/tags/importer/applied/1-1'], 325s ), 325s ], 325s ) 325s def test_get_changelog_parent_commits( 325s repo, 325s input_repo, 325s parent_overrides, 325s changelog_versions, 325s patch_state, 325s expected_refs, 325s ): 325s """Test that get_changelog_parent_commits is generally correct 325s 325s This is the general parameterised test for the common case uses of 325s target.get_changelog_parent_commits. 325s 325s :param GitUbuntuRepository repo: fixture providing a temporary 325s GitUbuntuRepository instance to use 325s :param repo_builder.Repo input_repo: the input repository data to use that 325s will be populated into @repo before @repo is passed through to 325s get_changelog_parent_commits 325s :param dict parent_overrides: passed through to 325s get_changelog_parent_commits. 325s :param PatchState patch_state: passed through to 325s get_changelog_parent_commits 325s :param list(str) expected_refs: the expected return value of 325s get_changelog_parent_commits expressed using a list of reference names. 325s Since get_changelog_parent_commits returns a list of commit hash 325s strings, the reference names will need to be dereferenced before 325s comparison; this way the test parameters don't need to be opaque hash 325s strings. 325s """ 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:721: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpktt5_m3w/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_get_changelog_parent_commits[input_repo5-parent_overrides5-changelog_versions5-PatchState.APPLIED-expected_refs5] _ 325s 325s repo = 325s input_repo = 325s parent_overrides = {}, changelog_versions = ['1-2', '1-1'] 325s patch_state = 325s expected_refs = ['refs/tags/importer/applied/1-1'] 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'parent_overrides', 325s 'changelog_versions', 325s 'patch_state', 325s 'expected_refs', 325s ], 325s [ 325s ( 325s repo_builder.Repo(), 325s {}, 325s ['1-2', '1-1',], 325s PatchState.UNAPPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s ['refs/tags/importer/import/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec(name='reimport', mutate=1), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s [ 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s {}, 325s ['1-3', '1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s ['refs/tags/importer/import/1-1'], 325s ), 325s ( 325s repo_builder.Repo(), 325s {}, 325s ['1-2', '1-1',], 325s PatchState.APPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='applied')], 325s tags={'importer/applied/1-1': Placeholder('applied')}, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.APPLIED, 325s ['refs/tags/importer/applied/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec(name='reimport', mutate=1), 325s ], 325s tags={ 325s 'importer/applied/1-1': Placeholder('import'), 325s 'importer/reimport/applied/1-1/0': Placeholder('import'), 325s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.APPLIED, 325s [ 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='applied')], 325s tags={'importer/applied/1-1': Placeholder('applied')}, 325s ), 325s {}, 325s ['1-3', '1-2', '1-1'], 325s PatchState.APPLIED, 325s ['refs/tags/importer/applied/1-1'], 325s ), 325s ], 325s ) 325s def test_get_changelog_parent_commits( 325s repo, 325s input_repo, 325s parent_overrides, 325s changelog_versions, 325s patch_state, 325s expected_refs, 325s ): 325s """Test that get_changelog_parent_commits is generally correct 325s 325s This is the general parameterised test for the common case uses of 325s target.get_changelog_parent_commits. 325s 325s :param GitUbuntuRepository repo: fixture providing a temporary 325s GitUbuntuRepository instance to use 325s :param repo_builder.Repo input_repo: the input repository data to use that 325s will be populated into @repo before @repo is passed through to 325s get_changelog_parent_commits 325s :param dict parent_overrides: passed through to 325s get_changelog_parent_commits. 325s :param PatchState patch_state: passed through to 325s get_changelog_parent_commits 325s :param list(str) expected_refs: the expected return value of 325s get_changelog_parent_commits expressed using a list of reference names. 325s Since get_changelog_parent_commits returns a list of commit hash 325s strings, the reference names will need to be dereferenced before 325s comparison; this way the test parameters don't need to be opaque hash 325s strings. 325s """ 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:721: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpkyupt34v/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_get_changelog_parent_commits[input_repo6-parent_overrides6-changelog_versions6-PatchState.APPLIED-expected_refs6] _ 325s 325s repo = 325s input_repo = 325s parent_overrides = {}, changelog_versions = ['1-2', '1-1'] 325s patch_state = 325s expected_refs = ['refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1'] 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'parent_overrides', 325s 'changelog_versions', 325s 'patch_state', 325s 'expected_refs', 325s ], 325s [ 325s ( 325s repo_builder.Repo(), 325s {}, 325s ['1-2', '1-1',], 325s PatchState.UNAPPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s ['refs/tags/importer/import/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec(name='reimport', mutate=1), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s [ 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s {}, 325s ['1-3', '1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s ['refs/tags/importer/import/1-1'], 325s ), 325s ( 325s repo_builder.Repo(), 325s {}, 325s ['1-2', '1-1',], 325s PatchState.APPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='applied')], 325s tags={'importer/applied/1-1': Placeholder('applied')}, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.APPLIED, 325s ['refs/tags/importer/applied/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec(name='reimport', mutate=1), 325s ], 325s tags={ 325s 'importer/applied/1-1': Placeholder('import'), 325s 'importer/reimport/applied/1-1/0': Placeholder('import'), 325s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.APPLIED, 325s [ 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='applied')], 325s tags={'importer/applied/1-1': Placeholder('applied')}, 325s ), 325s {}, 325s ['1-3', '1-2', '1-1'], 325s PatchState.APPLIED, 325s ['refs/tags/importer/applied/1-1'], 325s ), 325s ], 325s ) 325s def test_get_changelog_parent_commits( 325s repo, 325s input_repo, 325s parent_overrides, 325s changelog_versions, 325s patch_state, 325s expected_refs, 325s ): 325s """Test that get_changelog_parent_commits is generally correct 325s 325s This is the general parameterised test for the common case uses of 325s target.get_changelog_parent_commits. 325s 325s :param GitUbuntuRepository repo: fixture providing a temporary 325s GitUbuntuRepository instance to use 325s :param repo_builder.Repo input_repo: the input repository data to use that 325s will be populated into @repo before @repo is passed through to 325s get_changelog_parent_commits 325s :param dict parent_overrides: passed through to 325s get_changelog_parent_commits. 325s :param PatchState patch_state: passed through to 325s get_changelog_parent_commits 325s :param list(str) expected_refs: the expected return value of 325s get_changelog_parent_commits expressed using a list of reference names. 325s Since get_changelog_parent_commits returns a list of commit hash 325s strings, the reference names will need to be dereferenced before 325s comparison; this way the test parameters don't need to be opaque hash 325s strings. 325s """ 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:721: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpjc39tbmx/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_get_changelog_parent_commits[input_repo7-parent_overrides7-changelog_versions7-PatchState.APPLIED-expected_refs7] _ 325s 325s repo = 325s input_repo = 325s parent_overrides = {}, changelog_versions = ['1-3', '1-2', '1-1'] 325s patch_state = 325s expected_refs = ['refs/tags/importer/applied/1-1'] 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'parent_overrides', 325s 'changelog_versions', 325s 'patch_state', 325s 'expected_refs', 325s ], 325s [ 325s ( 325s repo_builder.Repo(), 325s {}, 325s ['1-2', '1-1',], 325s PatchState.UNAPPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s ['refs/tags/importer/import/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec(name='reimport', mutate=1), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s [ 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s {}, 325s ['1-3', '1-2', '1-1'], 325s PatchState.UNAPPLIED, 325s ['refs/tags/importer/import/1-1'], 325s ), 325s ( 325s repo_builder.Repo(), 325s {}, 325s ['1-2', '1-1',], 325s PatchState.APPLIED, 325s [], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='applied')], 325s tags={'importer/applied/1-1': Placeholder('applied')}, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.APPLIED, 325s ['refs/tags/importer/applied/1-1'], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec(name='reimport', mutate=1), 325s ], 325s tags={ 325s 'importer/applied/1-1': Placeholder('import'), 325s 'importer/reimport/applied/1-1/0': Placeholder('import'), 325s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s {}, 325s ['1-2', '1-1'], 325s PatchState.APPLIED, 325s [ 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='applied')], 325s tags={'importer/applied/1-1': Placeholder('applied')}, 325s ), 325s {}, 325s ['1-3', '1-2', '1-1'], 325s PatchState.APPLIED, 325s ['refs/tags/importer/applied/1-1'], 325s ), 325s ], 325s ) 325s def test_get_changelog_parent_commits( 325s repo, 325s input_repo, 325s parent_overrides, 325s changelog_versions, 325s patch_state, 325s expected_refs, 325s ): 325s """Test that get_changelog_parent_commits is generally correct 325s 325s This is the general parameterised test for the common case uses of 325s target.get_changelog_parent_commits. 325s 325s :param GitUbuntuRepository repo: fixture providing a temporary 325s GitUbuntuRepository instance to use 325s :param repo_builder.Repo input_repo: the input repository data to use that 325s will be populated into @repo before @repo is passed through to 325s get_changelog_parent_commits 325s :param dict parent_overrides: passed through to 325s get_changelog_parent_commits. 325s :param PatchState patch_state: passed through to 325s get_changelog_parent_commits 325s :param list(str) expected_refs: the expected return value of 325s get_changelog_parent_commits expressed using a list of reference names. 325s Since get_changelog_parent_commits returns a list of commit hash 325s strings, the reference names will need to be dereferenced before 325s comparison; this way the test parameters don't need to be opaque hash 325s strings. 325s """ 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:721: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp9z_igc44/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _________ test_validate_rich_history[input_repo0-published_spec0-True] _________ 325s 325s repo = 325s input_repo = 325s published_spec = {'changelog_versions': ['1-2', '1-1']}, expected_result = True 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'published_spec', 325s 'expected_result', 325s ], 325s [ 325s ( 325s # Common case: upload tag has a changelog parent as an ancestor 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec( 325s name='upload', 325s changelog_versions=['1-2', '1-1'], 325s parents=[Placeholder('import')], 325s ), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-2': Placeholder('upload'), 325s }, 325s ), 325s {'changelog_versions': ['1-2', '1-1']}, 325s True, 325s ), 325s ( 325s # Upload tag is the first one, with no parents present 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec( 325s name='upload', 325s version='1-2', 325s ), 325s ], 325s tags={ 325s 'importer/upload/1-2': Placeholder('upload'), 325s }, 325s ), 325s {'changelog_versions': ['1-2']}, 325s True, 325s ), 325s ( 325s # Upload tag mismatches published tree but is otherwise correct 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec( 325s name='upload', 325s changelog_versions=['1-2', '1-1'], 325s parents=[Placeholder('import')], 325s mutate=True, 325s ), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-2': Placeholder('upload'), 325s }, 325s ), 325s {'changelog_versions': ['1-2', '1-1']}, 325s target.RichHistoryTreeMismatch, 325s ), 325s ( 325s # Upload tag doesn't have a changelog parent as an ancestor but is 325s # otherwise correct 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec( 325s name='upload', 325s changelog_versions=['1-2', '1-1'], 325s ), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-2': Placeholder('upload'), 325s }, 325s ), 325s {'changelog_versions': ['1-2', '1-1']}, 325s target.RichHistoryHasNoChangelogParentAncestor, 325s ), 325s ], 325s ) 325s def test_validate_rich_history( 325s repo, 325s input_repo, 325s published_spec, 325s expected_result, 325s ): 325s """ 325s General test for validate_rich_history(). 325s 325s This unit tests validate_rich_history() for various parameterized cases. 325s Given an input repository and the specification of a Launchpad publication 325s of a source package, we check that validate_rich_history() correctly 325s accepts or rejects the rich history corresponding to the upload tag named 325s 'importer/upload/1-2'. It is assumed that the package being imported is 325s always of version '1-2' for all parameter sets. 325s 325s Since the target function requires rich history, the case of there not 325s being rich history does not need to be tested here, as it wouldn't be 325s called in this case. 325s 325s validate_rich_history() is generic for all sourced rich history, not just 325s rich history sourced from an upload tag. But since it is independent of how 325s the rich history commit arrived, it is easiest to use upload tags to test 325s it; this results in coverage for all sources. 325s 325s :param GitUbuntuRepository repo: fixture providing a temporary 325s GitUbuntuRepository instance to use 325s :param repo_builder.Repo input_repo: input repository data 325s :param dict published_spec: the package simulated being imported from the 325s archive, specified as a dict to pass as **kwargs to 325s repo_builder.Commit.from_spec() 325s :param bool expected_result: the expected return value of, or exception 325s raised by, the call to validate_rich_history() 325s """ 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:910: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp1ansbdhd/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _________ test_validate_rich_history[input_repo1-published_spec1-True] _________ 325s 325s repo = 325s input_repo = 325s published_spec = {'changelog_versions': ['1-2']}, expected_result = True 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'published_spec', 325s 'expected_result', 325s ], 325s [ 325s ( 325s # Common case: upload tag has a changelog parent as an ancestor 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec( 325s name='upload', 325s changelog_versions=['1-2', '1-1'], 325s parents=[Placeholder('import')], 325s ), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-2': Placeholder('upload'), 325s }, 325s ), 325s {'changelog_versions': ['1-2', '1-1']}, 325s True, 325s ), 325s ( 325s # Upload tag is the first one, with no parents present 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec( 325s name='upload', 325s version='1-2', 325s ), 325s ], 325s tags={ 325s 'importer/upload/1-2': Placeholder('upload'), 325s }, 325s ), 325s {'changelog_versions': ['1-2']}, 325s True, 325s ), 325s ( 325s # Upload tag mismatches published tree but is otherwise correct 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec( 325s name='upload', 325s changelog_versions=['1-2', '1-1'], 325s parents=[Placeholder('import')], 325s mutate=True, 325s ), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-2': Placeholder('upload'), 325s }, 325s ), 325s {'changelog_versions': ['1-2', '1-1']}, 325s target.RichHistoryTreeMismatch, 325s ), 325s ( 325s # Upload tag doesn't have a changelog parent as an ancestor but is 325s # otherwise correct 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec( 325s name='upload', 325s changelog_versions=['1-2', '1-1'], 325s ), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-2': Placeholder('upload'), 325s }, 325s ), 325s {'changelog_versions': ['1-2', '1-1']}, 325s target.RichHistoryHasNoChangelogParentAncestor, 325s ), 325s ], 325s ) 325s def test_validate_rich_history( 325s repo, 325s input_repo, 325s published_spec, 325s expected_result, 325s ): 325s """ 325s General test for validate_rich_history(). 325s 325s This unit tests validate_rich_history() for various parameterized cases. 325s Given an input repository and the specification of a Launchpad publication 325s of a source package, we check that validate_rich_history() correctly 325s accepts or rejects the rich history corresponding to the upload tag named 325s 'importer/upload/1-2'. It is assumed that the package being imported is 325s always of version '1-2' for all parameter sets. 325s 325s Since the target function requires rich history, the case of there not 325s being rich history does not need to be tested here, as it wouldn't be 325s called in this case. 325s 325s validate_rich_history() is generic for all sourced rich history, not just 325s rich history sourced from an upload tag. But since it is independent of how 325s the rich history commit arrived, it is easiest to use upload tags to test 325s it; this results in coverage for all sources. 325s 325s :param GitUbuntuRepository repo: fixture providing a temporary 325s GitUbuntuRepository instance to use 325s :param repo_builder.Repo input_repo: input repository data 325s :param dict published_spec: the package simulated being imported from the 325s archive, specified as a dict to pass as **kwargs to 325s repo_builder.Commit.from_spec() 325s :param bool expected_result: the expected return value of, or exception 325s raised by, the call to validate_rich_history() 325s """ 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:910: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp3kg3pfmk/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_validate_rich_history[input_repo2-published_spec2-RichHistoryTreeMismatch] _ 325s 325s repo = 325s input_repo = 325s published_spec = {'changelog_versions': ['1-2', '1-1']} 325s expected_result = 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'published_spec', 325s 'expected_result', 325s ], 325s [ 325s ( 325s # Common case: upload tag has a changelog parent as an ancestor 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec( 325s name='upload', 325s changelog_versions=['1-2', '1-1'], 325s parents=[Placeholder('import')], 325s ), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-2': Placeholder('upload'), 325s }, 325s ), 325s {'changelog_versions': ['1-2', '1-1']}, 325s True, 325s ), 325s ( 325s # Upload tag is the first one, with no parents present 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec( 325s name='upload', 325s version='1-2', 325s ), 325s ], 325s tags={ 325s 'importer/upload/1-2': Placeholder('upload'), 325s }, 325s ), 325s {'changelog_versions': ['1-2']}, 325s True, 325s ), 325s ( 325s # Upload tag mismatches published tree but is otherwise correct 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec( 325s name='upload', 325s changelog_versions=['1-2', '1-1'], 325s parents=[Placeholder('import')], 325s mutate=True, 325s ), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-2': Placeholder('upload'), 325s }, 325s ), 325s {'changelog_versions': ['1-2', '1-1']}, 325s target.RichHistoryTreeMismatch, 325s ), 325s ( 325s # Upload tag doesn't have a changelog parent as an ancestor but is 325s # otherwise correct 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec( 325s name='upload', 325s changelog_versions=['1-2', '1-1'], 325s ), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-2': Placeholder('upload'), 325s }, 325s ), 325s {'changelog_versions': ['1-2', '1-1']}, 325s target.RichHistoryHasNoChangelogParentAncestor, 325s ), 325s ], 325s ) 325s def test_validate_rich_history( 325s repo, 325s input_repo, 325s published_spec, 325s expected_result, 325s ): 325s """ 325s General test for validate_rich_history(). 325s 325s This unit tests validate_rich_history() for various parameterized cases. 325s Given an input repository and the specification of a Launchpad publication 325s of a source package, we check that validate_rich_history() correctly 325s accepts or rejects the rich history corresponding to the upload tag named 325s 'importer/upload/1-2'. It is assumed that the package being imported is 325s always of version '1-2' for all parameter sets. 325s 325s Since the target function requires rich history, the case of there not 325s being rich history does not need to be tested here, as it wouldn't be 325s called in this case. 325s 325s validate_rich_history() is generic for all sourced rich history, not just 325s rich history sourced from an upload tag. But since it is independent of how 325s the rich history commit arrived, it is easiest to use upload tags to test 325s it; this results in coverage for all sources. 325s 325s :param GitUbuntuRepository repo: fixture providing a temporary 325s GitUbuntuRepository instance to use 325s :param repo_builder.Repo input_repo: input repository data 325s :param dict published_spec: the package simulated being imported from the 325s archive, specified as a dict to pass as **kwargs to 325s repo_builder.Commit.from_spec() 325s :param bool expected_result: the expected return value of, or exception 325s raised by, the call to validate_rich_history() 325s """ 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:910: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpmwreougl/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_validate_rich_history[input_repo3-published_spec3-RichHistoryHasNoChangelogParentAncestor] _ 325s 325s repo = 325s input_repo = 325s published_spec = {'changelog_versions': ['1-2', '1-1']} 325s expected_result = 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'published_spec', 325s 'expected_result', 325s ], 325s [ 325s ( 325s # Common case: upload tag has a changelog parent as an ancestor 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec( 325s name='upload', 325s changelog_versions=['1-2', '1-1'], 325s parents=[Placeholder('import')], 325s ), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-2': Placeholder('upload'), 325s }, 325s ), 325s {'changelog_versions': ['1-2', '1-1']}, 325s True, 325s ), 325s ( 325s # Upload tag is the first one, with no parents present 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec( 325s name='upload', 325s version='1-2', 325s ), 325s ], 325s tags={ 325s 'importer/upload/1-2': Placeholder('upload'), 325s }, 325s ), 325s {'changelog_versions': ['1-2']}, 325s True, 325s ), 325s ( 325s # Upload tag mismatches published tree but is otherwise correct 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec( 325s name='upload', 325s changelog_versions=['1-2', '1-1'], 325s parents=[Placeholder('import')], 325s mutate=True, 325s ), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-2': Placeholder('upload'), 325s }, 325s ), 325s {'changelog_versions': ['1-2', '1-1']}, 325s target.RichHistoryTreeMismatch, 325s ), 325s ( 325s # Upload tag doesn't have a changelog parent as an ancestor but is 325s # otherwise correct 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec( 325s name='upload', 325s changelog_versions=['1-2', '1-1'], 325s ), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/upload/1-2': Placeholder('upload'), 325s }, 325s ), 325s {'changelog_versions': ['1-2', '1-1']}, 325s target.RichHistoryHasNoChangelogParentAncestor, 325s ), 325s ], 325s ) 325s def test_validate_rich_history( 325s repo, 325s input_repo, 325s published_spec, 325s expected_result, 325s ): 325s """ 325s General test for validate_rich_history(). 325s 325s This unit tests validate_rich_history() for various parameterized cases. 325s Given an input repository and the specification of a Launchpad publication 325s of a source package, we check that validate_rich_history() correctly 325s accepts or rejects the rich history corresponding to the upload tag named 325s 'importer/upload/1-2'. It is assumed that the package being imported is 325s always of version '1-2' for all parameter sets. 325s 325s Since the target function requires rich history, the case of there not 325s being rich history does not need to be tested here, as it wouldn't be 325s called in this case. 325s 325s validate_rich_history() is generic for all sourced rich history, not just 325s rich history sourced from an upload tag. But since it is independent of how 325s the rich history commit arrived, it is easiest to use upload tags to test 325s it; this results in coverage for all sources. 325s 325s :param GitUbuntuRepository repo: fixture providing a temporary 325s GitUbuntuRepository instance to use 325s :param repo_builder.Repo input_repo: input repository data 325s :param dict published_spec: the package simulated being imported from the 325s archive, specified as a dict to pass as **kwargs to 325s repo_builder.Commit.from_spec() 325s :param bool expected_result: the expected return value of, or exception 325s raised by, the call to validate_rich_history() 325s """ 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:910: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp2t0oewx5/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s ______________________ test_add_changelog_note_to_commit _______________________ 325s 325s repo = 325s 325s def test_add_changelog_note_to_commit(repo): 325s """add_changelog_note_to_commit should add the expected note""" 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='1-1'), 325s repo_builder.Commit.from_spec( 325s name='1-2', 325s changelog_versions=['1-1', '1-2'], 325s parents=[Placeholder('1-1')], 325s ), 325s ], 325s tags={'1-1': Placeholder('1-1'), '1-2': Placeholder('1-2')}, 325s > ).write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:953: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpnyq124e0/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s ____________________ test_add_changelog_note_to_commit_utf8 ____________________ 325s 325s repo = 325s 325s def test_add_changelog_note_to_commit_utf8(repo): 325s """A changelog file with non-UTF8 should have such characters substituted 325s 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s """ 325s test_utf8_error_changelog_path = os.path.join( 325s pkg_resources.resource_filename('gitubuntu', 'changelog_tests'), 325s 'test_utf8_error', 325s ) 325s with open(test_utf8_error_changelog_path, 'rb') as f: 325s utf8_changelog_blob = f.read() 325s 325s # We only need an example child commit with a debian/changelog file since 325s # this is the only file accessed by add_changelog_note_to_commit(). 325s # Further, the parent need only exist and can be empty. 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit(name='parent'), 325s repo_builder.Commit( 325s tree=repo_builder.Tree({'debian': repo_builder.Tree( 325s {'changelog': repo_builder.Blob(utf8_changelog_blob)} 325s )}), 325s name='child', 325s ) 325s ], 325s tags={'parent': Placeholder('parent'), 'child': Placeholder('child')}, 325s > ).write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:1002: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpvq375x2c/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s _________________ test_double_changelog_note_add_does_not_fail _________________ 325s 325s repo = 325s 325s def test_double_changelog_note_add_does_not_fail(repo): 325s """add_changelog_note_to_commit shouldn't fail if a note already exists""" 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='1-1'), 325s repo_builder.Commit.from_spec( 325s name='1-2', 325s changelog_versions=['1-1', '1-2'], 325s parents=[Placeholder('1-1')], 325s ), 325s ], 325s tags={'1-1': Placeholder('1-1'), '1-2': Placeholder('1-2')}, 325s > ).write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:1035: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmplxwv_35f/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s ___________________________ test_create_import_note ____________________________ 325s 325s repo = 325s 325s def test_create_import_note(repo): 325s """create_import_note() should create a note in the correct ref""" 325s repo_builder.Repo( 325s commits=[repo_builder.Commit(name='root')], 325s tags={'root': repo_builder.Placeholder('root')}, 325s > ).write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:1066: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp2s8m4vp2/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ______________________ test_create_import_note_timestamp _______________________ 325s 325s repo = 325s 325s def test_create_import_note_timestamp(repo): 325s """create_import_note() should include the timestamp in the note""" 325s repo_builder.Repo( 325s commits=[repo_builder.Commit(name='root')], 325s tags={'root': repo_builder.Placeholder('root')}, 325s > ).write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:1082: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpxjmdaze2/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s _______________________ test_import_creates_import_note ________________________ 325s 325s repo = 325s 325s def test_import_creates_import_note(repo): 325s """When an import runs, the note should appear in the correct ref""" 325s with source_builder.Source() as dsc_pathname: 325s > target.import_unapplied_dsc( 325s repo=repo, 325s version='1-1', 325s namespace='importer', 325s dist='ubuntu', 325s dsc_pathname=dsc_pathname, 325s head_name='ubuntu/focal', 325s skip_orig=True, 325s parent_overrides={}, 325s ) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:1102: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 325s commit, tag = find_or_create_unapplied_commit( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 325s changelog_parents = get_unapplied_import_parents( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 325s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 325s changelog = self.get_changelog_from_treeish(treeish) 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 325s return Changelog.from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:569: in from_treeish 325s blob = follow_symlinks_to_blob( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpc0qpoosf/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s ___________________ test_import_unapplied_spi_quilt_patches ____________________ 325s 325s get_import_commit_msg_mock = 325s get_import_tag_msg_mock = 325s repo = 325s 325s @patch('gitubuntu.importer.get_import_tag_msg') 325s @patch('gitubuntu.importer.get_import_commit_msg') 325s def test_import_unapplied_spi_quilt_patches( 325s get_import_commit_msg_mock, 325s get_import_tag_msg_mock, 325s repo, 325s ): 325s """Test that a package with quilt patches is imported with correct 325s unapplied refs 325s 325s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 325s that determines the commit message to use for a given import 325s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 325s that determines the tag message to use for a given import 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s """ 325s # Match the repo_builder objects 325s get_import_tag_msg_mock.return_value = 'Test tag' 325s get_import_commit_msg_mock.return_value = b'Test commit' 325s 325s publish_spec = source_builder.SourceSpec(has_patches=True) 325s 325s input_repo = repo_builder.Repo() 325s input_repo.write(repo.raw_repo) 325s expected_result = repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit( 325s tree=repo_builder.SourceTree( 325s source_builder.Source(publish_spec) 325s ), 325s name='publish' 325s ), 325s ], 325s tags={'importer/import/1-1': Placeholder('publish')}, 325s branches={'importer/ubuntu/trusty': Placeholder('publish')}, 325s ) 325s 325s with source_builder.Source(publish_spec) as dsc_path: 325s # import_unapplied_spi currently assumes it is called from the 325s # repository directory (pristine-tar and other commands rely on 325s # this) 325s > target.import_unapplied_spi( 325s repo=repo, 325s spi=MockSPI(dsc_path, publish_spec.version), 325s namespace='importer', 325s skip_orig=False, 325s parent_overrides={}, 325s ) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:1222: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:2308: in import_unapplied_spi 325s import_unapplied_dsc( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 325s commit, tag = find_or_create_unapplied_commit( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 325s changelog_parents = get_unapplied_import_parents( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 325s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 325s changelog = self.get_changelog_from_treeish(treeish) 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 325s return Changelog.from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:569: in from_treeish 325s blob = follow_symlinks_to_blob( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpodxdh_1k/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: applying a 325s dpkg-source: info: applying b 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_import_unapplied_spi_parenting[input_repo0-changelog_versions0-validation_repo_delta0-validation_repo_expected_identical_refs0] _ 325s 325s get_import_commit_msg_mock = 325s get_import_tag_msg_mock = 325s repo = 325s input_repo = 325s changelog_versions = ['1-1'] 325s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-1': }} 325s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1'] 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'changelog_versions', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s ], 325s [ 325s pytest.param( 325s repo_builder.Repo(), 325s ['1-1'], 325s { 325s 'add_commits': [ 325s repo_builder.Commit.from_spec(name='publish'), 325s ], 325s 'update_tags': {'importer/import/1-1': Placeholder('publish')}, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s ] 325s ), 325s pytest.param( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s ['1-2', '1-1'], 325s { 325s 'add_commits': [ 325s repo_builder.Commit.from_spec( 325s name='publish', 325s parents=[Placeholder('import')], 325s changelog_versions=['1-2', '1-1'], 325s ), 325s ], 325s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/import/1-2', 325s ], 325s ), 325s pytest.param( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s ['1-3', '1-2', '1-1'], 325s { 325s 'add_commits': [ 325s repo_builder.Commit.from_spec( 325s parents=[Placeholder('import')], 325s name='publish', 325s changelog_versions=['1-3', '1-2', '1-1'], 325s ), 325s ], 325s 'update_tags': {'importer/import/1-3': Placeholder('publish')}, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/import/1-3', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec( 325s name='reimport', 325s mutate='Reimport tag contents', 325s ), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s ['1-2', '1-1'], 325s { 325s 'add_commits': [ 325s repo_builder.Commit.from_spec( 325s parents=[ 325s Placeholder('import'), 325s Placeholder('reimport'), 325s ], 325s name='publish', 325s changelog_versions=['1-2', '1-1'], 325s ), 325s ], 325s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s 'refs/tags/importer/import/1-2', 325s ], 325s ), 325s ] 325s ) 325s @patch('gitubuntu.importer.get_import_tag_msg') 325s @patch('gitubuntu.importer.get_import_commit_msg') 325s def test_import_unapplied_spi_parenting( 325s get_import_commit_msg_mock, 325s get_import_tag_msg_mock, 325s repo, 325s input_repo, 325s changelog_versions, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s ): 325s """Test that unapplied import commits have the correct parents 325s 325s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 325s that determines the commit message to use for a given import 325s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 325s that determines the tag message to use for a given import 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param list(str) changelog_versions: the versions in the changelog of a 325s fake package to test import 325s :param dict validation_repo_delta: how to transform the input 325s repository into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s 325s Verify that if an import of a package is made into input_repo where the 325s package being imported has the given changelog_versions, then the output 325s repository has commits with the parents we expect. This is tested by 325s comparing specific output references against the validation repository. 325s """ 325s 325s # Match the repo_builder objects 325s get_import_tag_msg_mock.return_value = 'Test tag' 325s get_import_commit_msg_mock.return_value = b'Test commit' 325s 325s input_repo.write(repo.raw_repo) 325s 325s publish_spec = source_builder.SourceSpec( 325s changelog_versions=changelog_versions, 325s ) 325s 325s with source_builder.Source(publish_spec) as dsc_path: 325s # import_unapplied_spi currently assumes it is called from the 325s # repository directory (pristine-tar and other commands rely on 325s # this) 325s > target.import_unapplied_spi( 325s repo=repo, 325s spi=MockSPI(dsc_path, publish_spec.version), 325s namespace='importer', 325s skip_orig=False, 325s parent_overrides={}, 325s ) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:1391: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:2308: in import_unapplied_spi 325s import_unapplied_dsc( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 325s commit, tag = find_or_create_unapplied_commit( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 325s changelog_parents = get_unapplied_import_parents( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 325s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 325s changelog = self.get_changelog_from_treeish(treeish) 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 325s return Changelog.from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:569: in from_treeish 325s blob = follow_symlinks_to_blob( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpcj9k3o15/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_import_unapplied_spi_parenting[input_repo1-changelog_versions1-validation_repo_delta1-validation_repo_expected_identical_refs1] _ 325s 325s get_import_commit_msg_mock = 325s get_import_tag_msg_mock = 325s repo = 325s input_repo = 325s changelog_versions = ['1-2', '1-1'] 325s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-2': }} 325s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-2'] 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'changelog_versions', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s ], 325s [ 325s pytest.param( 325s repo_builder.Repo(), 325s ['1-1'], 325s { 325s 'add_commits': [ 325s repo_builder.Commit.from_spec(name='publish'), 325s ], 325s 'update_tags': {'importer/import/1-1': Placeholder('publish')}, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s ] 325s ), 325s pytest.param( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s ['1-2', '1-1'], 325s { 325s 'add_commits': [ 325s repo_builder.Commit.from_spec( 325s name='publish', 325s parents=[Placeholder('import')], 325s changelog_versions=['1-2', '1-1'], 325s ), 325s ], 325s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/import/1-2', 325s ], 325s ), 325s pytest.param( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s ['1-3', '1-2', '1-1'], 325s { 325s 'add_commits': [ 325s repo_builder.Commit.from_spec( 325s parents=[Placeholder('import')], 325s name='publish', 325s changelog_versions=['1-3', '1-2', '1-1'], 325s ), 325s ], 325s 'update_tags': {'importer/import/1-3': Placeholder('publish')}, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/import/1-3', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec( 325s name='reimport', 325s mutate='Reimport tag contents', 325s ), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s ['1-2', '1-1'], 325s { 325s 'add_commits': [ 325s repo_builder.Commit.from_spec( 325s parents=[ 325s Placeholder('import'), 325s Placeholder('reimport'), 325s ], 325s name='publish', 325s changelog_versions=['1-2', '1-1'], 325s ), 325s ], 325s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s 'refs/tags/importer/import/1-2', 325s ], 325s ), 325s ] 325s ) 325s @patch('gitubuntu.importer.get_import_tag_msg') 325s @patch('gitubuntu.importer.get_import_commit_msg') 325s def test_import_unapplied_spi_parenting( 325s get_import_commit_msg_mock, 325s get_import_tag_msg_mock, 325s repo, 325s input_repo, 325s changelog_versions, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s ): 325s """Test that unapplied import commits have the correct parents 325s 325s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 325s that determines the commit message to use for a given import 325s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 325s that determines the tag message to use for a given import 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param list(str) changelog_versions: the versions in the changelog of a 325s fake package to test import 325s :param dict validation_repo_delta: how to transform the input 325s repository into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s 325s Verify that if an import of a package is made into input_repo where the 325s package being imported has the given changelog_versions, then the output 325s repository has commits with the parents we expect. This is tested by 325s comparing specific output references against the validation repository. 325s """ 325s 325s # Match the repo_builder objects 325s get_import_tag_msg_mock.return_value = 'Test tag' 325s get_import_commit_msg_mock.return_value = b'Test commit' 325s 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:1381: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp9uos8mzp/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_import_unapplied_spi_parenting[input_repo2-changelog_versions2-validation_repo_delta2-validation_repo_expected_identical_refs2] _ 325s 325s get_import_commit_msg_mock = 325s get_import_tag_msg_mock = 325s repo = 325s input_repo = 325s changelog_versions = ['1-3', '1-2', '1-1'] 325s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-3': }} 325s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-3'] 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'changelog_versions', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s ], 325s [ 325s pytest.param( 325s repo_builder.Repo(), 325s ['1-1'], 325s { 325s 'add_commits': [ 325s repo_builder.Commit.from_spec(name='publish'), 325s ], 325s 'update_tags': {'importer/import/1-1': Placeholder('publish')}, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s ] 325s ), 325s pytest.param( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s ['1-2', '1-1'], 325s { 325s 'add_commits': [ 325s repo_builder.Commit.from_spec( 325s name='publish', 325s parents=[Placeholder('import')], 325s changelog_versions=['1-2', '1-1'], 325s ), 325s ], 325s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/import/1-2', 325s ], 325s ), 325s pytest.param( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s ['1-3', '1-2', '1-1'], 325s { 325s 'add_commits': [ 325s repo_builder.Commit.from_spec( 325s parents=[Placeholder('import')], 325s name='publish', 325s changelog_versions=['1-3', '1-2', '1-1'], 325s ), 325s ], 325s 'update_tags': {'importer/import/1-3': Placeholder('publish')}, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/import/1-3', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec( 325s name='reimport', 325s mutate='Reimport tag contents', 325s ), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s ['1-2', '1-1'], 325s { 325s 'add_commits': [ 325s repo_builder.Commit.from_spec( 325s parents=[ 325s Placeholder('import'), 325s Placeholder('reimport'), 325s ], 325s name='publish', 325s changelog_versions=['1-2', '1-1'], 325s ), 325s ], 325s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s 'refs/tags/importer/import/1-2', 325s ], 325s ), 325s ] 325s ) 325s @patch('gitubuntu.importer.get_import_tag_msg') 325s @patch('gitubuntu.importer.get_import_commit_msg') 325s def test_import_unapplied_spi_parenting( 325s get_import_commit_msg_mock, 325s get_import_tag_msg_mock, 325s repo, 325s input_repo, 325s changelog_versions, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s ): 325s """Test that unapplied import commits have the correct parents 325s 325s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 325s that determines the commit message to use for a given import 325s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 325s that determines the tag message to use for a given import 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param list(str) changelog_versions: the versions in the changelog of a 325s fake package to test import 325s :param dict validation_repo_delta: how to transform the input 325s repository into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s 325s Verify that if an import of a package is made into input_repo where the 325s package being imported has the given changelog_versions, then the output 325s repository has commits with the parents we expect. This is tested by 325s comparing specific output references against the validation repository. 325s """ 325s 325s # Match the repo_builder objects 325s get_import_tag_msg_mock.return_value = 'Test tag' 325s get_import_commit_msg_mock.return_value = b'Test commit' 325s 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:1381: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp4pbzx2fc/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_import_unapplied_spi_parenting[input_repo3-changelog_versions3-validation_repo_delta3-validation_repo_expected_identical_refs3] _ 325s 325s get_import_commit_msg_mock = 325s get_import_tag_msg_mock = 325s repo = 325s input_repo = 325s changelog_versions = ['1-2', '1-1'] 325s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-2': }} 325s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1', 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1', 'refs/tags/importer/import/1-2'] 325s 325s @pytest.mark.parametrize( 325s [ 325s 'input_repo', 325s 'changelog_versions', 325s 'validation_repo_delta', 325s 'validation_repo_expected_identical_refs', 325s ], 325s [ 325s pytest.param( 325s repo_builder.Repo(), 325s ['1-1'], 325s { 325s 'add_commits': [ 325s repo_builder.Commit.from_spec(name='publish'), 325s ], 325s 'update_tags': {'importer/import/1-1': Placeholder('publish')}, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s ] 325s ), 325s pytest.param( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s ['1-2', '1-1'], 325s { 325s 'add_commits': [ 325s repo_builder.Commit.from_spec( 325s name='publish', 325s parents=[Placeholder('import')], 325s changelog_versions=['1-2', '1-1'], 325s ), 325s ], 325s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/import/1-2', 325s ], 325s ), 325s pytest.param( 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import')], 325s tags={'importer/import/1-1': Placeholder('import')}, 325s ), 325s ['1-3', '1-2', '1-1'], 325s { 325s 'add_commits': [ 325s repo_builder.Commit.from_spec( 325s parents=[Placeholder('import')], 325s name='publish', 325s changelog_versions=['1-3', '1-2', '1-1'], 325s ), 325s ], 325s 'update_tags': {'importer/import/1-3': Placeholder('publish')}, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/import/1-3', 325s ], 325s ), 325s ( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import'), 325s repo_builder.Commit.from_spec( 325s name='reimport', 325s mutate='Reimport tag contents', 325s ), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import'), 325s 'importer/reimport/import/1-1/0': Placeholder('import'), 325s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 325s }, 325s ), 325s ['1-2', '1-1'], 325s { 325s 'add_commits': [ 325s repo_builder.Commit.from_spec( 325s parents=[ 325s Placeholder('import'), 325s Placeholder('reimport'), 325s ], 325s name='publish', 325s changelog_versions=['1-2', '1-1'], 325s ), 325s ], 325s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 325s }, 325s [ 325s 'refs/tags/importer/import/1-1', 325s 'refs/tags/importer/reimport/import/1-1/0', 325s 'refs/tags/importer/reimport/import/1-1/1', 325s 'refs/tags/importer/import/1-2', 325s ], 325s ), 325s ] 325s ) 325s @patch('gitubuntu.importer.get_import_tag_msg') 325s @patch('gitubuntu.importer.get_import_commit_msg') 325s def test_import_unapplied_spi_parenting( 325s get_import_commit_msg_mock, 325s get_import_tag_msg_mock, 325s repo, 325s input_repo, 325s changelog_versions, 325s validation_repo_delta, 325s validation_repo_expected_identical_refs, 325s ): 325s """Test that unapplied import commits have the correct parents 325s 325s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 325s that determines the commit message to use for a given import 325s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 325s that determines the tag message to use for a given import 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param list(str) changelog_versions: the versions in the changelog of a 325s fake package to test import 325s :param dict validation_repo_delta: how to transform the input 325s repository into a "validation repository", expressed as a dict to 325s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 325s input repository. The validation repository is then used for the 325s purposes of comparison against the output repository. 325s :param list(str) validation_repo_expected_identical_refs: refs that must be 325s identical between the validation repository and the output repository 325s 325s Verify that if an import of a package is made into input_repo where the 325s package being imported has the given changelog_versions, then the output 325s repository has commits with the parents we expect. This is tested by 325s comparing specific output references against the validation repository. 325s """ 325s 325s # Match the repo_builder objects 325s get_import_tag_msg_mock.return_value = 'Test tag' 325s get_import_commit_msg_mock.return_value = b'Test commit' 325s 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:1381: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpp7nht7g1/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s __________________ test_import_unapplied_spi_parent_override ___________________ 325s 325s get_import_commit_msg_mock = 325s get_import_tag_msg_mock = 325s repo = 325s 325s @patch('gitubuntu.importer.get_import_tag_msg') 325s @patch('gitubuntu.importer.get_import_commit_msg') 325s def test_import_unapplied_spi_parent_override( 325s get_import_commit_msg_mock, 325s get_import_tag_msg_mock, 325s repo, 325s ): 325s """Test import_unapplied_spi() parent_override functionality 325s 325s Test that if parent_overrides is used in the import_unapplied_spi call then 325s the resulting commit correctly uses the overridden parents specified. 325s 325s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 325s that determines the commit message to use for a given import 325s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 325s that determines the tag message to use for a given import 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s """ 325s # Match the repo_builder objects 325s get_import_tag_msg_mock.return_value = 'Test tag' 325s get_import_commit_msg_mock.return_value = b'Test commit' 325s 325s input_repo = repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec(name='import1-1', version='1-1'), 325s repo_builder.Commit.from_spec(name='import1-2', version='1-2'), 325s ], 325s tags={ 325s 'importer/import/1-1': Placeholder('import1-1'), 325s 'importer/import/1-2': Placeholder('import1-2'), 325s }, 325s ) 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:1444: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp2qry80ds/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s ______________ test_import_unapplied_spi_parent_override_failure _______________ 325s 325s repo = 325s 325s def test_import_unapplied_spi_parent_override_failure(repo): 325s """ 325s Test override_parents ParentOverrideError raise 325s 325s When a parent override is specified but the specified version doesn't have 325s an import tag, an exception should be raised. 325s 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s """ 325s repo_builder.Repo( 325s commits=[repo_builder.Commit.from_spec(name='import1-1')], 325s tags={'importer/import/1-1': Placeholder('import1-1')}, 325s > ).write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:1499: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmphw709mcl/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_import_applied_spi_parenting[input_repo0-expected_ancestor_commits0-expected_parent_commits0] _ 325s 325s get_import_commit_msg_mock = 325s get_import_tag_msg_mock = 325s repo = 325s input_repo = 325s expected_ancestor_commits = ['refs/tags/importer/import/1-2'] 325s expected_parent_commits = ['refs/tags/importer/applied/1-1'] 325s 325s @pytest.mark.parametrize( 325s 'input_repo, expected_ancestor_commits, expected_parent_commits', [ 325s # In general, these tests do not set applied commit parents in the 325s # input repository since we have no mechanism to do that correctly, but 325s # this doesn't matter for the purposes of these tests. 325s 325s # if only one import tag exists, then it is the parent 325s pytest.param( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec( 325s name='unapplied1', 325s has_patches=True, 325s ), 325s repo_builder.Commit.from_spec( 325s parents=[Placeholder('unapplied1')], 325s name='unapplied2', 325s changelog_versions=['1-2', '1-1'], 325s has_patches=True, 325s ), 325s repo_builder.Commit.from_spec( 325s name='applied1', 325s patches_applied=True, 325s ), 325s ], 325s # no branches: technically not possible but branches are not 325s # relevant to the test 325s branches={}, 325s tags={ 325s 'importer/import/1-1': Placeholder('unapplied1'), 325s 'importer/import/1-2': Placeholder('unapplied2'), 325s 'importer/applied/1-1': Placeholder('applied1'), 325s }, 325s ), 325s ['refs/tags/importer/import/1-2'], 325s ['refs/tags/importer/applied/1-1'], 325s ), 325s 325s # if multiple import tags exist, then do they all end up as parents? 325s pytest.param( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec( 325s name='unapplied1', 325s has_patches=True, 325s ), 325s repo_builder.Commit.from_spec( 325s parents=[Placeholder('unapplied1')], 325s name='unapplied2', 325s changelog_versions=['1-2', '1-1'], 325s has_patches=True, 325s ), 325s repo_builder.Commit.from_spec( 325s parents=[Placeholder('unapplied1')], 325s name='unapplied2reimport', 325s changelog_versions=['1-2', '1-1'], 325s has_patches=True, 325s mutate='reimport tag', 325s ), 325s repo_builder.Commit.from_spec( 325s name='applied1', 325s patches_applied=True, 325s ), 325s ], 325s # no branches: technically not possible but branches are not 325s # relevant to the test 325s branches={}, 325s tags={ 325s 'importer/import/1-1': 325s Placeholder('unapplied1'), 325s 'importer/import/1-2': 325s Placeholder('unapplied2'), 325s 'importer/reimport/import/1-2/0': 325s Placeholder('unapplied2'), 325s 'importer/reimport/import/1-2/1': 325s Placeholder('unapplied2reimport'), 325s 'importer/applied/1-1': 325s Placeholder('applied1'), 325s }, 325s ), 325s [ 325s 'refs/tags/importer/reimport/import/1-2/0', 325s 'refs/tags/importer/reimport/import/1-2/1', 325s ], 325s [ 325s 'refs/tags/importer/applied/1-1', 325s ], 325s marks=pytest.mark.xfail(reason='LP: #1755247'), 325s ), 325s 325s # do we correctly create a reimport tag because a different import 325s # already exists? 325s pytest.param( 325s repo_builder.Repo( 325s commits=[ 325s repo_builder.Commit.from_spec( 325s name='unapplied1', 325s has_patches=True, 325s ), 325s repo_builder.Commit.from_spec( 325s name='unapplied1_reimport', 325s has_patches=True, 325s mutate='reimport contents', 325s ), 325s repo_builder.Commit.from_spec( 325s parents=[Placeholder('unapplied1')], 325s name='unapplied2', 325s changelog_versions=['1-2', '1-1'], 325s has_patches=True, 325s ), 325s repo_builder.Commit.from_spec( 325s name='applied1', 325s patches_applied=True, 325s ), 325s repo_builder.Commit.from_spec( 325s name='applied1_reimport', 325s patches_applied=True, 325s mutate='reimport contents', 325s ), 325s ], 325s # no branches: technically not possible but branches are not 325s # relevant to the test 325s branches={}, 325s tags={ 325s 'importer/import/1-1': 325s Placeholder('unapplied1'), 325s 'importer/reimport/import/1-1/0': 325s Placeholder('unapplied1'), 325s 'importer/reimport/import/1-1/1': 325s Placeholder('unapplied1_reimport'), 325s 'importer/import/1-2': 325s Placeholder('unapplied2'), 325s 'importer/applied/1-1': 325s Placeholder('applied1'), 325s 'importer/reimport/applied/1-1/0': 325s Placeholder('applied1'), 325s 'importer/reimport/applied/1-1/1': 325s Placeholder('applied1_reimport'), 325s }, 325s ), 325s [ 325s 'refs/tags/importer/reimport/import/1-2/0', 325s 'refs/tags/importer/reimport/import/1-2/1', 325s ], 325s [ 325s 'refs/tags/importer/reimport/applied/1-1/0', 325s 'refs/tags/importer/reimport/applied/1-1/1', 325s ], 325s marks=pytest.mark.xfail(reason='LP: #1755247'), 325s ), 325s ], 325s ) 325s @patch('gitubuntu.importer.get_import_tag_msg') 325s @patch('gitubuntu.importer.get_import_commit_msg') 325s def test_import_applied_spi_parenting( 325s get_import_commit_msg_mock, 325s get_import_tag_msg_mock, 325s repo, 325s input_repo, 325s expected_ancestor_commits, 325s expected_parent_commits, 325s ): 325s """Test that applied import commits have the right parents 325s 325s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 325s that determines the commit message to use for a given import 325s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 325s that determines the tag message to use for a given import 325s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 325s temporary output repository 325s :param repo_builder.Repo input_repo: input repository data 325s :param list(str) expected_ancestor_commits: list of commit-ish strings that 325s must be ancestors of the 'applied/1-2' tag following the applied import 325s :param list(str) expected_parent_commits: list of commit-ish strings that 325s must be parents of the 'applied/1-2' tag following the applied import. 325s 325s A fake package with version '1-2' that has a changelog parent of '1-1' is 325s imported on top of the provided input_repo. The test fails if any 325s of the expected_ancestor_commits or expected_parent_commits are not 325s present. 325s 325s This test is ugly because we do not yet have a programmatic way 325s to get the interstitial commits of the patch applications. 325s """ 325s # Match the repo_builder objects 325s get_import_tag_msg_mock.return_value = 'Test tag' 325s get_import_commit_msg_mock.return_value = b'Test commit' 325s 325s > input_repo.write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:1698: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpp8j458uh/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: applying a 325s dpkg-source: info: applying b 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: applying a 325s dpkg-source: info: applying b 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: applying a 325s dpkg-source: info: applying b 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: applying a 325s dpkg-source: info: applying b 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: applying a 325s dpkg-source: info: applying b 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_authorship_date[False-Fri, 2 Feb 1971 12:34:56 +0100-expected_result0] __ 325s 325s repo = 325s override = False, input_string = 'Fri, 2 Feb 1971 12:34:56 +0100' 325s expected_result = (1971, 2, 2, 11, 34, 56, ...) 325s 325s @pytest.mark.parametrize(['override', 'input_string', 'expected_result'], [ 325s # Standard date that should parse and be used 325s (False, 'Fri, 2 Feb 1971 12:34:56 +0100', (1971, 2, 2, 11, 34, 56, 60)), 325s # Deliberately illegal date that cannot be parsed 325s (True, 'Failday, 30 Feb 1971 99:99:99 +9999', (1972, 3, 3, 12, 45, 57, 0)), 325s ]) 325s def test_authorship_date(repo, override, input_string, expected_result): 325s """Synthesized commit should use changelog or override when provided 325s 325s A synthesized commit should use the date of the changelog entry in the 325s usual case, or commit_date when an override is requested. 325s 325s :param GitUbuntuRepository repo: fixture providing a temporary 325s GitUbuntuRepository instance to use 325s :param bool override: whether a changelog date override should be requested 325s from import_unapplied_dsc() 325s :param str input_string: the timestamp part of the changelog entry to use 325s :param tuple expected_result: the expected author date of the synthesized 325s commit, specified as six parameters to datetime.datetime() followed by 325s the expected tz offset in minutes. 325s """ 325s spec = source_builder.SourceSpec(changelog_date=input_string) 325s with source_builder.Source(spec) as dsc_pathname: 325s > target.import_unapplied_dsc( 325s repo=repo, 325s version='1-1', 325s namespace='importer', 325s dist='ubuntu', 325s dsc_pathname=dsc_pathname, 325s head_name='ubuntu/focal', 325s skip_orig=True, 325s parent_overrides={}, 325s commit_date=datetime.datetime( 325s 1972, 325s 3, 325s 3, 325s 12, 325s 45, 325s 57, 325s tzinfo=datetime.timezone.utc, 325s ), 325s changelog_date_overrides=( 325s frozenset({'1-1'}) if override else frozenset() 325s ), 325s ) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:1815: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 325s commit, tag = find_or_create_unapplied_commit( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 325s changelog_parents = get_unapplied_import_parents( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 325s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 325s changelog = self.get_changelog_from_treeish(treeish) 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 325s return Changelog.from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:569: in from_treeish 325s blob = follow_symlinks_to_blob( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmp222x5ssf/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s _ test_authorship_date[True-Failday, 30 Feb 1971 99:99:99 +9999-expected_result1] _ 325s 325s repo = 325s override = True, input_string = 'Failday, 30 Feb 1971 99:99:99 +9999' 325s expected_result = (1972, 3, 3, 12, 45, 57, ...) 325s 325s @pytest.mark.parametrize(['override', 'input_string', 'expected_result'], [ 325s # Standard date that should parse and be used 325s (False, 'Fri, 2 Feb 1971 12:34:56 +0100', (1971, 2, 2, 11, 34, 56, 60)), 325s # Deliberately illegal date that cannot be parsed 325s (True, 'Failday, 30 Feb 1971 99:99:99 +9999', (1972, 3, 3, 12, 45, 57, 0)), 325s ]) 325s def test_authorship_date(repo, override, input_string, expected_result): 325s """Synthesized commit should use changelog or override when provided 325s 325s A synthesized commit should use the date of the changelog entry in the 325s usual case, or commit_date when an override is requested. 325s 325s :param GitUbuntuRepository repo: fixture providing a temporary 325s GitUbuntuRepository instance to use 325s :param bool override: whether a changelog date override should be requested 325s from import_unapplied_dsc() 325s :param str input_string: the timestamp part of the changelog entry to use 325s :param tuple expected_result: the expected author date of the synthesized 325s commit, specified as six parameters to datetime.datetime() followed by 325s the expected tz offset in minutes. 325s """ 325s spec = source_builder.SourceSpec(changelog_date=input_string) 325s with source_builder.Source(spec) as dsc_pathname: 325s > target.import_unapplied_dsc( 325s repo=repo, 325s version='1-1', 325s namespace='importer', 325s dist='ubuntu', 325s dsc_pathname=dsc_pathname, 325s head_name='ubuntu/focal', 325s skip_orig=True, 325s parent_overrides={}, 325s commit_date=datetime.datetime( 325s 1972, 325s 3, 325s 3, 325s 12, 325s 45, 325s 57, 325s tzinfo=datetime.timezone.utc, 325s ), 325s changelog_date_overrides=( 325s frozenset({'1-1'}) if override else frozenset() 325s ), 325s ) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:1815: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 325s commit, tag = find_or_create_unapplied_commit( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 325s changelog_parents = get_unapplied_import_parents( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 325s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 325s changelog = self.get_changelog_from_treeish(treeish) 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 325s return Changelog.from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:569: in from_treeish 325s blob = follow_symlinks_to_blob( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpizxwgfg4/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: srcpkg/debian/changelog(l4): ignoring invalid week day 'Failday' 325s LINE: -- git ubuntu Failday, 30 Feb 1971 99:99:99 +9999 325s dpkg-source: warning: srcpkg/debian/changelog(l4): cannot parse non-conformant date '30 Feb 1971 99:99:99 +9999' 325s LINE: -- git ubuntu Failday, 30 Feb 1971 99:99:99 +9999 325s dpkg-source: warning: missing information for output field Standards-Version 325s __________________ test_fetch_rich_history_from_changes_file ___________________ 325s 325s repo = 325s pygit2_repo = pygit2.Repository('/tmp/tmpd2vvovke/.git/') 325s 325s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 325s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 325s def test_fetch_rich_history_from_changes_file(repo, pygit2_repo): 325s """Rich history specified in a changes file is found and validated""" 325s > rich_commit, parent_commit, import_tree = populate_rich_history( 325s import_repo=repo.raw_repo, 325s uploader_repo=pygit2_repo, 325s ) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:2111: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:2080: in populate_rich_history 325s ).write(import_repo) 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpvrspm5ks/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s ________ test_fetch_rich_history_from_changes_file_fetch_failure_retry _________ 325s 325s repo = 325s pygit2_repo = pygit2.Repository('/tmp/tmpg718ktyh/.git/') 325s 325s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 325s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 325s def test_fetch_rich_history_from_changes_file_fetch_failure_retry( 325s repo, 325s pygit2_repo, 325s ): 325s """If rich history cannot be fetched once, it is retried""" 325s > rich_commit, parent_commit, import_tree = populate_rich_history( 325s import_repo=repo.raw_repo, 325s uploader_repo=pygit2_repo, 325s ) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:2204: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:2080: in populate_rich_history 325s ).write(import_repo) 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpaycgrlex/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s ____________ test_fetch_rich_history_from_changes_file_missing_ref _____________ 325s 325s repo = 325s pygit2_repo = pygit2.Repository('/tmp/tmpxt1a0di_/.git/') 325s 325s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 325s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 325s def test_fetch_rich_history_from_changes_file_missing_ref( 325s repo, 325s pygit2_repo, 325s ): 325s """If rich history is specified but the ref cannot be found, a hard 325s exception is raised 325s """ 325s > rich_commit, _, _ = populate_rich_history( 325s import_repo=repo.raw_repo, 325s uploader_repo=pygit2_repo, 325s ) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:2243: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:2080: in populate_rich_history 325s ).write(import_repo) 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpddznio_7/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s ___________ test_fetch_rich_history_from_changes_file_missing_commit ___________ 325s 325s repo = 325s pygit2_repo = pygit2.Repository('/tmp/tmp7ujycb8y/.git/') 325s 325s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 325s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 325s def test_fetch_rich_history_from_changes_file_missing_commit( 325s repo, 325s pygit2_repo, 325s ): 325s """If rich history is specified but the commit cannot be found, an 325s exception is raised 325s """ 325s > rich_commit, _, _ = populate_rich_history( 325s import_repo=repo.raw_repo, 325s uploader_repo=pygit2_repo, 325s ) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:2271: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:2080: in populate_rich_history 325s ).write(import_repo) 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmplhb193au/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s ____________ test_fetch_rich_history_from_changes_file_not_a_commit ____________ 325s 325s repo = 325s pygit2_repo = pygit2.Repository('/tmp/tmph2n6s3m5/.git/') 325s 325s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 325s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 325s def test_fetch_rich_history_from_changes_file_not_a_commit(repo, pygit2_repo): 325s """If rich history is specified but the commit hash resolves to something 325s other than a commit, an exception is raised 325s """ 325s > rich_commit, _, _ = populate_rich_history( 325s import_repo=repo.raw_repo, 325s uploader_repo=pygit2_repo, 325s ) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:2297: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/importer_test.py:2080: in populate_rich_history 325s ).write(import_repo) 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp4y4b07qc/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s __________________________ test_reconstruct_changelog __________________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmpprt_s3lx/.git/') 325s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x759836ea1610> 325s 325s @pytest.mark.skipif( 325s ENTRY_POINT_TYPE is None, 325s reason="Entry point testing not available", 325s ) 325s def test_reconstruct_changelog(pygit2_repo, monkeypatch): 325s '''The reconstruct-changelog endpoint should add the expected commit''' 325s monkeypatch.setenv('DEBFULLNAME', 'Test User') 325s monkeypatch.setenv('DEBEMAIL', 'test@example.com') 325s Repo( 325s commits=[ 325s Commit(tree=SourceTree(Source()), name='root'), 325s Commit( 325s tree=SourceTree(Source(spec=SourceSpec(mutate=1))), 325s message=' * Test changelog entry', 325s name='child', 325s parents=[Placeholder('root')], 325s ), 325s ], 325s tags={'root': Placeholder('root'), 'child': Placeholder('child')}, 325s > ).write(pygit2_repo) 325s 325s gitubuntu/integration_test.py:219: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpprt_s3lx/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s gitubuntu/repo_builder.py:389: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s dpkg-source: warning: missing information for output field Standards-Version 325s ___________________ TestObjectCreation.testRepoBranchesTags ____________________ 325s 325s self = 325s 325s def testRepoBranchesTags(self): 325s graph = Repo( 325s commits=[ 325s Commit( 325s Tree({}), 325s parents=[Placeholder('parent')], 325s name='child', 325s ), 325s Commit(Tree({}), name='parent'), 325s ], 325s branches={ 325s 'branch1': Placeholder('parent'), 325s 'branch2': Commit(Tree({'foo': Blob(b'qux')})), 325s }, 325s tags={ 325s 'tag1': Placeholder('child'), 325s 'tag2': Commit(Tree({'foo': Blob(b'quz')})), 325s }, 325s ) 325s > child_ref = graph.write(self.repo) 325s 325s gitubuntu/repo_builder_test.py:154: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp1x9uux7h/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s gitubuntu/repo_builder.py:389: AttributeError 325s ______________________ TestObjectCreation.testRepoTagger _______________________ 325s 325s self = 325s 325s def testRepoTagger(self): 325s """The tagger parameter should make it through to the tag""" 325s input_repo = Repo( 325s commits=[Commit(name='root')], 325s tags={'root': Placeholder('root')}, 325s tagger=pygit2.Signature( 325s 'Test Tagger', 325s 'test@example.com', 325s 1, 325s 2, 325s ), 325s ) 325s > input_repo.write(self.repo) 325s 325s gitubuntu/repo_builder_test.py:178: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpyz89x6ho/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s gitubuntu/repo_builder.py:389: AttributeError 325s _______________________________ test_source_tree _______________________________ 325s 325s pygit2_repo = pygit2.Repository('/tmp/tmp4g6n0_c3/.git/') 325s 325s def test_source_tree(pygit2_repo): 325s commit_str = Commit(SourceTree(Source())).write(pygit2_repo) 325s commit = pygit2_repo.get(commit_str) 325s > assert gitubuntu.git_repository.follow_symlinks_to_blob( 325s repo=pygit2_repo, 325s treeish_object=commit, 325s path='debian/changelog', 325s ) 325s 325s gitubuntu/repo_builder_test.py:190: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmp4g6n0_c3/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s ______________________________ test_preservation _______________________________ 325s 325s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_preservation0') 325s repo = 325s 325s def test_preservation(tmpdir, repo): 325s """An export followed by an import should preserve rich history 325s 325s Given a minimal repository that should be able to have upload tags be 325s exported, when we import the export result into a similar repository with a 325s subtly different upload tag in which the rich history should still apply, 325s the result should be a correctly reconstructed upload tag. 325s 325s :param py.path tmpdir: the pytest standard tmpdir fixture. 325s :param repo: our standard repo fixture. 325s """ 325s Repo( 325s commits=[ 325s Commit( 325s name='1', 325s tree=Tree({ 325s 'a': Blob(b'a'), 325s }), 325s ), 325s Commit( 325s name='2', 325s parents=[Placeholder('1')], 325s tree=Tree({ 325s 'a': Blob(b'ab'), 325s }), 325s ), 325s Commit( 325s name='3', 325s parents=[Placeholder('2')], 325s tree=Tree({ 325s 'a': Blob(b'abc'), 325s }), 325s ), 325s ], 325s tags={ 325s 'importer/import/1': Placeholder('1'), 325s 'importer/upload/2': Placeholder('3'), 325s } 325s > ).write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/rich_history_test.py:51: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp3zvm3i52/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s ______________________ test_preservation_multiple_parents ______________________ 325s 325s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_preservation_multiple_par0') 325s repo = 325s 325s def test_preservation_multiple_parents(tmpdir, repo): 325s """An export of rich history should omit multiple parent cases 325s 325s If an upload tag leads to multiple parents before we reach an import tag, 325s it should be excluded from the export as this type of upload tag is not 325s supported for rich history preservation. This test also serves to verify 325s code paths that handle the MultipleParentError exception in the export 325s code. 325s 325s :param py.path tmpdir: the pytest standard tmpdir fixture. 325s :param repo: our standard repo fixture. 325s """ 325s Repo( 325s commits=[ 325s Commit(name='1', message='a'), 325s Commit(name='2', message='b'), 325s Commit(name='child', parents=[Placeholder('1'), Placeholder('2')]), 325s ], 325s tags={ 325s 'importer/import/1': Placeholder('1'), 325s 'importer/upload/2': Placeholder('child'), 325s } 325s > ).write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/rich_history_test.py:102: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp6u27enke/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s _________________________ test_preservation_no_parents _________________________ 325s 325s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_preservation_no_parents0') 325s repo = 325s 325s def test_preservation_no_parents(tmpdir, repo): 325s """An export of rich history should omit no parent cases 325s 325s If an upload tag leads to no parents before we reach an import tag, 325s it should be excluded from the export as this type of upload tag is not 325s supported for rich history preservation. This test also serves to verify 325s code paths that handle the NoParentError exception in the export 325s code. 325s 325s :param py.path tmpdir: the pytest standard tmpdir fixture. 325s :param repo: our standard repo fixture. 325s """ 325s Repo( 325s commits=[ 325s Commit(name='1', message='a'), 325s Commit(name='2', message='b'), 325s ], 325s tags={ 325s 'importer/import/1': Placeholder('1'), 325s 'importer/upload/2': Placeholder('2'), 325s } 325s > ).write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/rich_history_test.py:129: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmphryiori6/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s _____________ test_input_edge_cases[before_export0-before_import0] _____________ 325s 325s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_input_edge_cases_before_e0') 325s repo = 325s before_export = {'commits': [, , 'importer/upload/2': }} 325s before_import = {'commits': [], 'tags': {'importer/import/1': }} 325s 325s @pytest.mark.parametrize(['before_export', 'before_import'], [ 325s ( 325s # Commit messages with patch-like contents should not fail 325s 325s # If a commit message in rich history contains text in a patch-like 325s # format (such as a diff of some file), it should not prevent correct 325s # round-tripping. "git format-patch" followed by "git am" fails this 325s # test, for example. 325s { 325s 'commits': [ 325s Commit(name='1', message='a', tree=Tree({'a': Blob(b'a')})), 325s Commit( 325s name='2', 325s message='''First line 325s 325s Inline patch that isn't part of the real patch starts here 325s 325s --- a/foo 325s +++ b/foo 325s @@ -1 +1,2 @@ 325s foo 325s +bar 325s ''', 325s tree=Tree({'a': Blob(b'ab')}), 325s parents=[Placeholder('1')], 325s ), 325s ], 325s 'tags': { 325s 'importer/import/1': Placeholder('1'), 325s 'importer/upload/2': Placeholder('2'), 325s } 325s }, 325s { 325s 'commits': [ 325s Commit(name='b1', message='c', tree=Tree({'a': Blob(b'a')})), 325s ], 325s 'tags': {'importer/import/1': Placeholder('b1')}, 325s }, 325s ), 325s ( 325s # Commits that have no changes should round trip 325s { 325s 'commits': [ 325s Commit( 325s name='1', 325s message='a', 325s ), 325s Commit( 325s name='2', 325s message='b', 325s parents=[Placeholder('1')], 325s ), 325s ], 325s 'tags': { 325s 'importer/import/1': Placeholder('1'), 325s 'importer/upload/2': Placeholder('2'), 325s }, 325s }, 325s { 325s 'commits': [Commit(name='b1', message='c')], 325s 'tags': {'importer/import/1': Placeholder('b1')}, 325s }, 325s ), 325s ( 325s # Commits that have no commit message should round trip 325s { 325s 'commits': [ 325s Commit( 325s name='1', 325s message='a', 325s ), 325s Commit( 325s name='2', 325s message='', 325s tree=Tree({'a': Blob(b'a')}), 325s parents=[Placeholder('1')], 325s ), 325s ], 325s 'tags': { 325s 'importer/import/1': Placeholder('1'), 325s 'importer/upload/2': Placeholder('2'), 325s } 325s }, 325s { 325s 'commits': [Commit(name='b1', message='c')], 325s 'tags': {'importer/import/1': Placeholder('b1')}, 325s }, 325s ), 325s ]) 325s def test_input_edge_cases(tmpdir, repo, before_export, before_import): 325s """ 325s Edge cases in input rich history should reimport without failure 325s 325s Check that rich history preservation completes without an exception in 325s various cases. Details of each case are described in comments in the test 325s parameters above. 325s 325s Since these tests generally cover the mutated case (where rich history has 325s to be ported forward because parent commits have mutated), we must remove 325s and recreate the 'importer/import/1' tag so that it is different before 325s attempting reimport. This is done by deleting all ('importer/*') tags and 325s then using the before_import parameter to recreate it again. 325s 325s :param py.path tmpdir: the pytest standard tmpdir fixture. 325s :param GitUbuntuRepository repo: our standard repo fixture. 325s :param dict before_export: the parameters to supply to Repo() to construct 325s the repository that will be exported. 325s :param dict before_import: the parametsrs to supply to Repo() to add to the 325s repository before attempting reimport. 325s """ 325s > Repo(**before_export).write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/rich_history_test.py:260: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpxwclqgno/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s _____________ test_input_edge_cases[before_export1-before_import1] _____________ 325s 325s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_input_edge_cases_before_e1') 325s repo = 325s before_export = {'commits': [, , 'importer/upload/2': }} 325s before_import = {'commits': [], 'tags': {'importer/import/1': }} 325s 325s @pytest.mark.parametrize(['before_export', 'before_import'], [ 325s ( 325s # Commit messages with patch-like contents should not fail 325s 325s # If a commit message in rich history contains text in a patch-like 325s # format (such as a diff of some file), it should not prevent correct 325s # round-tripping. "git format-patch" followed by "git am" fails this 325s # test, for example. 325s { 325s 'commits': [ 325s Commit(name='1', message='a', tree=Tree({'a': Blob(b'a')})), 325s Commit( 325s name='2', 325s message='''First line 325s 325s Inline patch that isn't part of the real patch starts here 325s 325s --- a/foo 325s +++ b/foo 325s @@ -1 +1,2 @@ 325s foo 325s +bar 325s ''', 325s tree=Tree({'a': Blob(b'ab')}), 325s parents=[Placeholder('1')], 325s ), 325s ], 325s 'tags': { 325s 'importer/import/1': Placeholder('1'), 325s 'importer/upload/2': Placeholder('2'), 325s } 325s }, 325s { 325s 'commits': [ 325s Commit(name='b1', message='c', tree=Tree({'a': Blob(b'a')})), 325s ], 325s 'tags': {'importer/import/1': Placeholder('b1')}, 325s }, 325s ), 325s ( 325s # Commits that have no changes should round trip 325s { 325s 'commits': [ 325s Commit( 325s name='1', 325s message='a', 325s ), 325s Commit( 325s name='2', 325s message='b', 325s parents=[Placeholder('1')], 325s ), 325s ], 325s 'tags': { 325s 'importer/import/1': Placeholder('1'), 325s 'importer/upload/2': Placeholder('2'), 325s }, 325s }, 325s { 325s 'commits': [Commit(name='b1', message='c')], 325s 'tags': {'importer/import/1': Placeholder('b1')}, 325s }, 325s ), 325s ( 325s # Commits that have no commit message should round trip 325s { 325s 'commits': [ 325s Commit( 325s name='1', 325s message='a', 325s ), 325s Commit( 325s name='2', 325s message='', 325s tree=Tree({'a': Blob(b'a')}), 325s parents=[Placeholder('1')], 325s ), 325s ], 325s 'tags': { 325s 'importer/import/1': Placeholder('1'), 325s 'importer/upload/2': Placeholder('2'), 325s } 325s }, 325s { 325s 'commits': [Commit(name='b1', message='c')], 325s 'tags': {'importer/import/1': Placeholder('b1')}, 325s }, 325s ), 325s ]) 325s def test_input_edge_cases(tmpdir, repo, before_export, before_import): 325s """ 325s Edge cases in input rich history should reimport without failure 325s 325s Check that rich history preservation completes without an exception in 325s various cases. Details of each case are described in comments in the test 325s parameters above. 325s 325s Since these tests generally cover the mutated case (where rich history has 325s to be ported forward because parent commits have mutated), we must remove 325s and recreate the 'importer/import/1' tag so that it is different before 325s attempting reimport. This is done by deleting all ('importer/*') tags and 325s then using the before_import parameter to recreate it again. 325s 325s :param py.path tmpdir: the pytest standard tmpdir fixture. 325s :param GitUbuntuRepository repo: our standard repo fixture. 325s :param dict before_export: the parameters to supply to Repo() to construct 325s the repository that will be exported. 325s :param dict before_import: the parametsrs to supply to Repo() to add to the 325s repository before attempting reimport. 325s """ 325s > Repo(**before_export).write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/rich_history_test.py:260: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp8xwgoyn8/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s _____________ test_input_edge_cases[before_export2-before_import2] _____________ 325s 325s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_input_edge_cases_before_e2') 325s repo = 325s before_export = {'commits': [, , 'importer/upload/2': }} 325s before_import = {'commits': [], 'tags': {'importer/import/1': }} 325s 325s @pytest.mark.parametrize(['before_export', 'before_import'], [ 325s ( 325s # Commit messages with patch-like contents should not fail 325s 325s # If a commit message in rich history contains text in a patch-like 325s # format (such as a diff of some file), it should not prevent correct 325s # round-tripping. "git format-patch" followed by "git am" fails this 325s # test, for example. 325s { 325s 'commits': [ 325s Commit(name='1', message='a', tree=Tree({'a': Blob(b'a')})), 325s Commit( 325s name='2', 325s message='''First line 325s 325s Inline patch that isn't part of the real patch starts here 325s 325s --- a/foo 325s +++ b/foo 325s @@ -1 +1,2 @@ 325s foo 325s +bar 325s ''', 325s tree=Tree({'a': Blob(b'ab')}), 325s parents=[Placeholder('1')], 325s ), 325s ], 325s 'tags': { 325s 'importer/import/1': Placeholder('1'), 325s 'importer/upload/2': Placeholder('2'), 325s } 325s }, 325s { 325s 'commits': [ 325s Commit(name='b1', message='c', tree=Tree({'a': Blob(b'a')})), 325s ], 325s 'tags': {'importer/import/1': Placeholder('b1')}, 325s }, 325s ), 325s ( 325s # Commits that have no changes should round trip 325s { 325s 'commits': [ 325s Commit( 325s name='1', 325s message='a', 325s ), 325s Commit( 325s name='2', 325s message='b', 325s parents=[Placeholder('1')], 325s ), 325s ], 325s 'tags': { 325s 'importer/import/1': Placeholder('1'), 325s 'importer/upload/2': Placeholder('2'), 325s }, 325s }, 325s { 325s 'commits': [Commit(name='b1', message='c')], 325s 'tags': {'importer/import/1': Placeholder('b1')}, 325s }, 325s ), 325s ( 325s # Commits that have no commit message should round trip 325s { 325s 'commits': [ 325s Commit( 325s name='1', 325s message='a', 325s ), 325s Commit( 325s name='2', 325s message='', 325s tree=Tree({'a': Blob(b'a')}), 325s parents=[Placeholder('1')], 325s ), 325s ], 325s 'tags': { 325s 'importer/import/1': Placeholder('1'), 325s 'importer/upload/2': Placeholder('2'), 325s } 325s }, 325s { 325s 'commits': [Commit(name='b1', message='c')], 325s 'tags': {'importer/import/1': Placeholder('b1')}, 325s }, 325s ), 325s ]) 325s def test_input_edge_cases(tmpdir, repo, before_export, before_import): 325s """ 325s Edge cases in input rich history should reimport without failure 325s 325s Check that rich history preservation completes without an exception in 325s various cases. Details of each case are described in comments in the test 325s parameters above. 325s 325s Since these tests generally cover the mutated case (where rich history has 325s to be ported forward because parent commits have mutated), we must remove 325s and recreate the 'importer/import/1' tag so that it is different before 325s attempting reimport. This is done by deleting all ('importer/*') tags and 325s then using the before_import parameter to recreate it again. 325s 325s :param py.path tmpdir: the pytest standard tmpdir fixture. 325s :param GitUbuntuRepository repo: our standard repo fixture. 325s :param dict before_export: the parameters to supply to Repo() to construct 325s the repository that will be exported. 325s :param dict before_import: the parametsrs to supply to Repo() to add to the 325s repository before attempting reimport. 325s """ 325s > Repo(**before_export).write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/rich_history_test.py:260: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmpmqk61hvj/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s _______________________ test_preservation_fast_forwards ________________________ 325s 325s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_preservation_fast_forward0') 325s repo = 325s 325s def test_preservation_fast_forwards(tmpdir, repo): 325s """Rich history that can be fast forwarded should not mutate 325s 325s :param py.path tmpdir: the pytest standard tmpdir fixture. 325s :param GitUbuntuRepository repo: our standard repo fixture. 325s """ 325s Repo( 325s commits=[ 325s Commit( 325s name='1', 325s message='a', 325s ), 325s Commit( 325s name='2', 325s message='', 325s tree=Tree({'a': Blob(b'a')}), 325s parents=[Placeholder('1')], 325s ), 325s ], 325s tags={ 325s 'importer/import/1': Placeholder('1'), 325s 'importer/upload/2': Placeholder('2'), 325s } 325s > ).write(repo.raw_repo) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/rich_history_test.py:294: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s self = 325s repo = pygit2.Repository('/tmp/tmp45i7u92c/.git/'), record = {} 325s 325s def write(self, repo, record=None): 325s replace_placeholders(self) 325s record = record or dict() 325s written_commits = [ 325s commit.write(repo=repo, record=record) 325s for commit 325s in self.commit_list 325s ] 325s for name, target in self.branches.items(): 325s repo.create_branch( 325s name, 325s repo.get(target.write(repo)).peel(pygit2.Commit), 325s ) 325s for name, target in self.tags.items(): 325s repo.create_tag( 325s name, 325s target.write(repo), 325s > pygit2.GIT_OBJ_COMMIT, 325s self.tagger.signature, 325s 'Tag message', 325s ) 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/repo_builder.py:389: AttributeError 325s _______________________ test_source_create_with_version ________________________ 325s 325s repo = 325s 325s def test_source_create_with_version(repo): 325s > version = get_spec_changelog_version(repo, version='3', native=True) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/source_builder_test.py:57: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 325s changelog = repo.get_changelog_from_treeish(tree_hash) 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 325s return Changelog.from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:569: in from_treeish 325s blob = follow_symlinks_to_blob( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmp9rte60me/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (native)' 325s dpkg-source: info: building source-builder-package in source-builder-package_3.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_3.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s _______________________ test_source_create_with_versions _______________________ 325s 325s repo = 325s 325s def test_source_create_with_versions(repo): 325s source_spec = target.SourceSpec(changelog_versions=['3', '4'], native=True) 325s with target.Source(source_spec) as f: 325s tree_hash = importer.dsc_to_tree_hash(repo.raw_repo, f) 325s > changelog = repo.get_changelog_from_treeish(tree_hash) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/source_builder_test.py:65: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 325s return Changelog.from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:569: in from_treeish 325s blob = follow_symlinks_to_blob( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpf68yx6cp/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (native)' 325s dpkg-source: info: building source-builder-package in source-builder-package_3.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_3.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s ____________ test_source_native_source_format[True-3.0 (native)\n] _____________ 325s 325s repo = 325s native = True, expected = b'3.0 (native)\n' 325s 325s @pytest.mark.parametrize('native,expected', [ 325s (True, b"3.0 (native)\n"), 325s (False, b"3.0 (quilt)\n"), 325s ]) 325s def test_source_native_source_format(repo, native, expected): 325s with target.Source(target.SourceSpec(native=native)) as dsc_path: 325s > blob = git_repository.follow_symlinks_to_blob( 325s repo.raw_repo, 325s dsc_path_to_tree(repo, dsc_path), 325s 'debian/source/format', 325s ) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/source_builder_test.py:133: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmp35c_8y94/.git/') 325s top_tree_object = 325s search_path = 'debian/source/format' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (native)' 325s dpkg-source: info: building source-builder-package in source-builder-package_1.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s ____________ test_source_native_source_format[False-3.0 (quilt)\n] _____________ 325s 325s repo = 325s native = False, expected = b'3.0 (quilt)\n' 325s 325s @pytest.mark.parametrize('native,expected', [ 325s (True, b"3.0 (native)\n"), 325s (False, b"3.0 (quilt)\n"), 325s ]) 325s def test_source_native_source_format(repo, native, expected): 325s with target.Source(target.SourceSpec(native=native)) as dsc_path: 325s > blob = git_repository.follow_symlinks_to_blob( 325s repo.raw_repo, 325s dsc_path_to_tree(repo, dsc_path), 325s 'debian/source/format', 325s ) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/source_builder_test.py:133: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpj2zb_ru3/.git/') 325s top_tree_object = 325s search_path = 'debian/source/format' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s _________________________ test_source_quilt_no_patches _________________________ 325s 325s repo = 325s 325s def test_source_quilt_no_patches(repo): 325s with target.Source(target.SourceSpec()) as dsc_path: 325s top = dsc_path_to_tree(repo, dsc_path) 325s debian_entry = top['debian'] 325s > assert debian_entry.type in [pygit2.GIT_OBJ_TREE, 'tree'] 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/source_builder_test.py:144: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s ________________________ test_source_quilt_with_patches ________________________ 325s 325s repo = 325s 325s def test_source_quilt_with_patches(repo): 325s spec = target.SourceSpec(has_patches=True) 325s with target.Source(spec) as dsc_path: 325s top = dsc_path_to_tree(repo, dsc_path) 325s expected_files = ['series', 'a', 'b'] 325s for basename in expected_files: 325s > assert git_repository.follow_symlinks_to_blob( 325s repo.raw_repo, 325s top, 325s 'debian/patches/%s' % basename, 325s ) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/source_builder_test.py:156: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmp3h2qwyx7/.git/') 325s top_tree_object = 325s search_path = 'debian/patches/series' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: applying a 325s dpkg-source: info: applying b 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s ____________________ test_source_quilt_with_patches_applied ____________________ 325s 325s repo = 325s 325s def test_source_quilt_with_patches_applied(repo): 325s spec = target.SourceSpec(has_patches=True) 325s with target.Source(spec) as dsc_path: 325s top = dsc_path_to_tree(repo, dsc_path, patches_applied=True) 325s expected_files = [ 325s 'debian/patches/series', 325s 'debian/patches/a', 325s 'debian/patches/b', 325s 'a', 325s 'b', 325s ] 325s for filename in expected_files: 325s > assert git_repository.follow_symlinks_to_blob( 325s repo.raw_repo, 325s top, 325s filename, 325s ) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/source_builder_test.py:183: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpkjg1qema/.git/') 325s top_tree_object = 325s search_path = 'debian/patches/series' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: applying a 325s dpkg-source: info: applying b 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: using patch list from debian/patches/series 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s ______________________ test_source_version_native_default ______________________ 325s 325s repo = 325s 325s def test_source_version_native_default(repo): 325s """The default version string for a native package should not have a 325s '-' in it. 325s """ 325s > version = get_spec_changelog_version(repo, native=True) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/source_builder_test.py:194: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 325s changelog = repo.get_changelog_from_treeish(tree_hash) 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 325s return Changelog.from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:569: in from_treeish 325s blob = follow_symlinks_to_blob( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpisqs22sg/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (native)' 325s dpkg-source: info: building source-builder-package in source-builder-package_1.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s ____________________ test_source_version_non_native_default ____________________ 325s 325s repo = 325s 325s def test_source_version_non_native_default(repo): 325s """The default version string for a non-native package should have a 325s '-' in it. 325s """ 325s > version = get_spec_changelog_version(repo, native=False) 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/source_builder_test.py:202: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 325s changelog = repo.get_changelog_from_treeish(tree_hash) 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 325s return Changelog.from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:569: in from_treeish 325s blob = follow_symlinks_to_blob( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpdhmfbvgw/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s _____________________ test_source_version_native_specific ______________________ 325s 325s repo = 325s 325s def test_source_version_native_specific(repo): 325s """We should be able to create a native package with a 325s native-looking version string. 325s """ 325s > version = get_spec_changelog_version(repo, native=True, version='1.0') 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/source_builder_test.py:210: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 325s changelog = repo.get_changelog_from_treeish(tree_hash) 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 325s return Changelog.from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:569: in from_treeish 325s blob = follow_symlinks_to_blob( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpq6f4typs/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (native)' 325s dpkg-source: info: building source-builder-package in source-builder-package_1.0.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1.0.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s ___________________ test_source_version_non_native_specific ____________________ 325s 325s repo = 325s 325s def test_source_version_non_native_specific(repo): 325s """We should be able to create a non-native package with a 325s non-native-looking version string. 325s """ 325s > version = get_spec_changelog_version(repo, native=False, version='1.0-1') 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/source_builder_test.py:218: 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 325s changelog = repo.get_changelog_from_treeish(tree_hash) 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 325s return Changelog.from_treeish( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:569: in from_treeish 325s blob = follow_symlinks_to_blob( 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 325s return _follow_symlinks_to_blob( 325s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 325s 325s repo = pygit2.Repository('/tmp/tmpv0zcb3sp/.git/') 325s top_tree_object = 325s search_path = 'debian/changelog' 325s _rel_tree = 325s _rel_path = '' 325s 325s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 325s _rel_tree=None, _rel_path='' 325s ): 325s '''Recursively follow a path down a tree, following symlinks, to find blob 325s 325s repo: pygit2.Repository object 325s top_tree: pygit2.Tree object of the top of the tree structure 325s search_path: '/'-separated path string of blob to find 325s _rel_tree: (internal) which tree to look further into 325s _rel_path: (internal) the path we are in so far 325s ''' 325s 325s NORMAL_BLOB_MODES = set([ 325s pygit2.GIT_FILEMODE_BLOB, 325s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 325s ]) 325s 325s _rel_tree = _rel_tree or top_tree_object 325s head, tail = posixpath.split(search_path) 325s 325s # A traditional functional split would put a single entry in head with tail 325s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 325s # to make it appear to have traditional semantics. 325s if not head: 325s head = tail 325s tail = None 325s 325s entry = _rel_tree[head] 325s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 325s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 325s 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/git_repository.py:68: AttributeError 325s ----------------------------- Captured stdout call ----------------------------- 325s dpkg-source: info: using source format '3.0 (quilt)' 325s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.0.orig.tar.gz 325s dpkg-source: info: building source-builder-package in source-builder-package_1.0-1.debian.tar.xz 325s dpkg-source: info: building source-builder-package in source-builder-package_1.0-1.dsc 325s ----------------------------- Captured stderr call ----------------------------- 325s dpkg-source: warning: missing information for output field Standards-Version 325s =============================== warnings summary =============================== 325s gitubuntu/__main__.py:7 325s /tmp/autopkgtest.qOEoya/build.EOv/src/gitubuntu/__main__.py:7: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html 325s import pkg_resources 325s 325s ../../../../usr/lib/python3/dist-packages/pkg_resources/__init__.py:3154 325s /usr/lib/python3/dist-packages/pkg_resources/__init__.py:3154: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('logilab')`. 325s Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages 325s declare_namespace(pkg) 325s 325s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 325s 325s ---------- coverage: platform linux, python 3.12.7-final-0 ----------- 325s Name Stmts Miss Cover 325s --------------------------------------------------------------- 325s gitubuntu/__init__.py 0 0 100% 325s gitubuntu/__main__.py 103 94 9% 325s gitubuntu/build.py 185 131 29% 325s gitubuntu/cache.py 1 0 100% 325s gitubuntu/clone.py 70 54 23% 325s gitubuntu/dsc.py 65 16 75% 325s gitubuntu/exportorig.py 48 37 23% 325s gitubuntu/git_repository.py 1103 521 53% 325s gitubuntu/git_repository_test.py 316 40 87% 325s gitubuntu/importer.py 707 446 37% 325s gitubuntu/importer_service.py 215 22 90% 325s gitubuntu/importer_service_broker.py 60 49 18% 325s gitubuntu/importer_service_ipc.py 12 2 83% 325s gitubuntu/importer_service_poller.py 37 25 32% 325s gitubuntu/importer_service_test.py 147 0 100% 325s gitubuntu/importer_service_worker.py 87 64 26% 325s gitubuntu/importer_service_worker_test.py 18 0 100% 325s gitubuntu/importer_tag_test.py 47 20 57% 325s gitubuntu/importer_test.py 388 133 66% 325s gitubuntu/integration_test.py 67 26 61% 325s gitubuntu/logging.py 8 4 50% 325s gitubuntu/merge.py 219 192 12% 325s gitubuntu/patch_state.py 2 0 100% 325s gitubuntu/prepare_upload.py 86 3 97% 325s gitubuntu/prepare_upload_test.py 152 0 100% 325s gitubuntu/queue.py 174 148 15% 325s gitubuntu/remote.py 100 85 15% 325s gitubuntu/repo_builder.py 162 0 100% 325s gitubuntu/repo_builder_test.py 159 12 92% 325s gitubuntu/repo_comparator.py 32 25 22% 325s gitubuntu/rich_history.py 67 45 33% 325s gitubuntu/rich_history_test.py 53 31 42% 325s gitubuntu/run.py 72 12 83% 325s gitubuntu/scriptutils.py 11 0 100% 325s gitubuntu/source_builder.py 119 0 100% 325s gitubuntu/source_builder_test.py 105 18 83% 325s gitubuntu/source_information.py 339 133 61% 325s gitubuntu/source_information_test.py 78 3 96% 325s gitubuntu/spec.py 3 0 100% 325s gitubuntu/submit.py 103 86 17% 325s gitubuntu/tag.py 78 69 12% 325s gitubuntu/test_fixtures.py 29 5 83% 325s gitubuntu/test_util.py 5 0 100% 325s gitubuntu/version.py 1 0 100% 325s gitubuntu/versioning.py 124 16 87% 325s --------------------------------------------------------------- 325s TOTAL 5957 2567 57% 325s 325s =========================== short test summary info ============================ 325s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[0] 325s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[1] 325s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[2] 325s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[3] 325s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[4] 325s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob_not_found[tree1] 325s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob_not_found[tree2] 325s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob_not_found[tree3] 325s FAILED gitubuntu/git_repository_test.py::test_git_escape_dir_to_tree - Attrib... 325s FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data1-debian/patches/series] 325s FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data2-debian/patches/series] 325s FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data3-debian/patches/debian.series] 325s FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data4-debian/patches/debian.series] 325s FAILED gitubuntu/git_repository_test.py::test_quilt_env - AttributeError: mod... 325s FAILED gitubuntu/git_repository_test.py::test_repo_quilt_env - AttributeError... 325s FAILED gitubuntu/git_repository_test.py::test_repo_quilt_env_from_treeish_str 325s FAILED gitubuntu/git_repository_test.py::test_repo_find_ubuntu_merge[Common case-input_data0-pkg/import/1-1ubuntu1-pkg/import/2-1-pkg/import/1-1] 325s FAILED gitubuntu/git_repository_test.py::test_repo_find_ubuntu_merge[Ubuntu delta based on a NMU-input_data1-pkg/import/1-1.1ubuntu1-pkg/import/2-1-pkg/import/1-1.1] 325s FAILED gitubuntu/git_repository_test.py::test_repo_find_ubuntu_merge[Ubuntu upstream version head of Debian-input_data2-pkg/import/2-0ubuntu1-pkg/import/3-1-pkg/import/1-1] 325s FAILED gitubuntu/git_repository_test.py::test_commit_tree - AttributeError: m... 325s FAILED gitubuntu/git_repository_test.py::test_descendant_of[root-root-False] 325s FAILED gitubuntu/git_repository_test.py::test_descendant_of[child1-root-True] 325s FAILED gitubuntu/git_repository_test.py::test_descendant_of[root-child1-False] 325s FAILED gitubuntu/git_repository_test.py::test_descendant_of[grandchild1-root-True] 325s FAILED gitubuntu/git_repository_test.py::test_descendant_of[child1-child2-False] 325s FAILED gitubuntu/git_repository_test.py::test_descendant_of[root-disjoint-False] 325s FAILED gitubuntu/git_repository_test.py::test_create_tag - AttributeError: mo... 325s FAILED gitubuntu/git_repository_test.py::test_get_all_reimport_tags - Attribu... 325s FAILED gitubuntu/git_repository_test.py::test_get_head_info - AttributeError:... 325s FAILED gitubuntu/importer_tag_test.py::test_import_unapplied_spi_tags[input_repo0-expected_output_refs0-validation_repo_delta0-validation_repo_expected_identical_refs0-True] 325s FAILED gitubuntu/importer_tag_test.py::test_import_unapplied_spi_tags[input_repo1-expected_output_refs1-validation_repo_delta1-validation_repo_expected_identical_refs1-True] 325s FAILED gitubuntu/importer_tag_test.py::test_import_unapplied_spi_tags[input_repo2-expected_output_refs2-validation_repo_delta2-validation_repo_expected_identical_refs2-True] 325s FAILED gitubuntu/importer_tag_test.py::test_import_unapplied_spi_tags[input_repo3-expected_output_refs3-validation_repo_delta3-validation_repo_expected_identical_refs3-False] 325s FAILED gitubuntu/importer_tag_test.py::test_import_unapplied_spi_tags[input_repo4-expected_output_refs4-validation_repo_delta4-validation_repo_expected_identical_refs4-False] 325s FAILED gitubuntu/importer_tag_test.py::test_import_unapplied_spi_tags[input_repo5-expected_output_refs5-validation_repo_delta5-validation_repo_expected_identical_refs5-True] 325s FAILED gitubuntu/importer_tag_test.py::test_import_unapplied_spi_tags[input_repo6-expected_output_refs6-validation_repo_delta6-validation_repo_expected_identical_refs6-False] 325s FAILED gitubuntu/importer_tag_test.py::test_import_unapplied_spi_tags[input_repo7-expected_output_refs7-validation_repo_delta7-validation_repo_expected_identical_refs7-False] 325s FAILED gitubuntu/importer_tag_test.py::test_import_applied_spi_tags[input_repo0-validation_repo_delta0-validation_repo_expected_treewise_refs0-True] 325s FAILED gitubuntu/importer_tag_test.py::test_import_applied_spi_tags[input_repo2-validation_repo_delta2-validation_repo_expected_treewise_refs2-False] 325s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo1-PatchState.UNAPPLIED-expected1] 325s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo2-PatchState.UNAPPLIED-expected2] 325s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo4-PatchState.APPLIED-expected4] 325s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo5-PatchState.APPLIED-expected5] 325s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags_ordering - A... 325s FAILED gitubuntu/importer_test.py::test_create_import_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] 325s FAILED gitubuntu/importer_test.py::test_create_import_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] 325s FAILED gitubuntu/importer_test.py::test_create_import_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] 325s FAILED gitubuntu/importer_test.py::test_create_import_tag_hash_stability_on_first_import 325s FAILED gitubuntu/importer_test.py::test_create_import_tag_hash_stability_on_reimport 325s FAILED gitubuntu/importer_test.py::test_create_applied_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] 325s FAILED gitubuntu/importer_test.py::test_create_applied_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] 325s FAILED gitubuntu/importer_test.py::test_create_applied_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] 325s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo1-parent_overrides1-changelog_versions1-PatchState.UNAPPLIED-expected_refs1] 325s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo2-parent_overrides2-changelog_versions2-PatchState.UNAPPLIED-expected_refs2] 325s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo3-parent_overrides3-changelog_versions3-PatchState.UNAPPLIED-expected_refs3] 325s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo5-parent_overrides5-changelog_versions5-PatchState.APPLIED-expected_refs5] 325s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo6-parent_overrides6-changelog_versions6-PatchState.APPLIED-expected_refs6] 325s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo7-parent_overrides7-changelog_versions7-PatchState.APPLIED-expected_refs7] 325s FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo0-published_spec0-True] 325s FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo1-published_spec1-True] 325s FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo2-published_spec2-RichHistoryTreeMismatch] 325s FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo3-published_spec3-RichHistoryHasNoChangelogParentAncestor] 325s FAILED gitubuntu/importer_test.py::test_add_changelog_note_to_commit - Attrib... 325s FAILED gitubuntu/importer_test.py::test_add_changelog_note_to_commit_utf8 - A... 325s FAILED gitubuntu/importer_test.py::test_double_changelog_note_add_does_not_fail 325s FAILED gitubuntu/importer_test.py::test_create_import_note - AttributeError: ... 325s FAILED gitubuntu/importer_test.py::test_create_import_note_timestamp - Attrib... 325s FAILED gitubuntu/importer_test.py::test_import_creates_import_note - Attribut... 325s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_quilt_patches - ... 325s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo0-changelog_versions0-validation_repo_delta0-validation_repo_expected_identical_refs0] 325s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo1-changelog_versions1-validation_repo_delta1-validation_repo_expected_identical_refs1] 325s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo2-changelog_versions2-validation_repo_delta2-validation_repo_expected_identical_refs2] 325s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo3-changelog_versions3-validation_repo_delta3-validation_repo_expected_identical_refs3] 325s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parent_override 325s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parent_override_failure 325s FAILED gitubuntu/importer_test.py::test_import_applied_spi_parenting[input_repo0-expected_ancestor_commits0-expected_parent_commits0] 325s FAILED gitubuntu/importer_test.py::test_authorship_date[False-Fri, 2 Feb 1971 12:34:56 +0100-expected_result0] 325s FAILED gitubuntu/importer_test.py::test_authorship_date[True-Failday, 30 Feb 1971 99:99:99 +9999-expected_result1] 325s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file 325s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_fetch_failure_retry 325s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_missing_ref 325s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_missing_commit 325s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_not_a_commit 325s FAILED gitubuntu/integration_test.py::test_reconstruct_changelog - AttributeE... 325s FAILED gitubuntu/repo_builder_test.py::TestObjectCreation::testRepoBranchesTags 325s FAILED gitubuntu/repo_builder_test.py::TestObjectCreation::testRepoTagger - A... 325s FAILED gitubuntu/repo_builder_test.py::test_source_tree - AttributeError: mod... 325s FAILED gitubuntu/rich_history_test.py::test_preservation - AttributeError: mo... 325s FAILED gitubuntu/rich_history_test.py::test_preservation_multiple_parents - A... 325s FAILED gitubuntu/rich_history_test.py::test_preservation_no_parents - Attribu... 325s FAILED gitubuntu/rich_history_test.py::test_input_edge_cases[before_export0-before_import0] 325s FAILED gitubuntu/rich_history_test.py::test_input_edge_cases[before_export1-before_import1] 325s FAILED gitubuntu/rich_history_test.py::test_input_edge_cases[before_export2-before_import2] 325s FAILED gitubuntu/rich_history_test.py::test_preservation_fast_forwards - Attr... 325s FAILED gitubuntu/source_builder_test.py::test_source_create_with_version - At... 325s FAILED gitubuntu/source_builder_test.py::test_source_create_with_versions - A... 325s FAILED gitubuntu/source_builder_test.py::test_source_native_source_format[True-3.0 (native)\n] 325s FAILED gitubuntu/source_builder_test.py::test_source_native_source_format[False-3.0 (quilt)\n] 325s FAILED gitubuntu/source_builder_test.py::test_source_quilt_no_patches - Attri... 325s FAILED gitubuntu/source_builder_test.py::test_source_quilt_with_patches - Att... 325s FAILED gitubuntu/source_builder_test.py::test_source_quilt_with_patches_applied 325s FAILED gitubuntu/source_builder_test.py::test_source_version_native_default 325s FAILED gitubuntu/source_builder_test.py::test_source_version_non_native_default 325s FAILED gitubuntu/source_builder_test.py::test_source_version_native_specific 325s FAILED gitubuntu/source_builder_test.py::test_source_version_non_native_specific 325s = 105 failed, 348 passed, 3 skipped, 3 xfailed, 2 warnings in 88.53s (0:01:28) = 325s pytest failed; self test will fail 326s autopkgtest [16:21:49]: test self-test: -----------------------] 326s autopkgtest [16:21:49]: test self-test: - - - - - - - - - - results - - - - - - - - - - 326s self-test FAIL non-zero exit status 1 327s autopkgtest [16:21:50]: @@@@@@@@@@@@@@@@@@@@ summary 327s self-test FAIL non-zero exit status 1 339s nova [W] Using flock in prodstack6-ppc64el 339s Creating nova instance adt-plucky-ppc64el-git-ubuntu-20241126-153829-juju-7f2275-prod-proposed-migration-environment-15-7558842c-d723-4cda-be82-81cdacc6144e from image adt/ubuntu-plucky-ppc64el-server-20241119.img (UUID dcc6a44c-21fb-45bb-821a-d64a8784c175)...