0s autopkgtest [09:33:39]: starting date and time: 2024-11-26 09:33:39+0000 0s autopkgtest [09:33:39]: git checkout: 6f3be7a8 Fix armhf LXD image generation for plucky 0s autopkgtest [09:33:39]: host juju-7f2275-prod-proposed-migration-environment-20; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.g7ez7zb4/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 --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-20@bos03-arm64-40.secgroup --name adt-plucky-arm64-git-ubuntu-20241126-093339-juju-7f2275-prod-proposed-migration-environment-20-916f025c-9def-45fe-b711-db247adf9003 --image adt/ubuntu-plucky-arm64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-20 --net-id=net_prod-proposed-migration -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/ 76s autopkgtest [09:34:55]: testbed dpkg architecture: arm64 77s autopkgtest [09:34:56]: testbed apt version: 2.9.8 77s autopkgtest [09:34:56]: @@@@@@@@@@@@@@@@@@@@ test bed setup 78s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [73.9 kB] 78s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/restricted Sources [9708 B] 78s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [58.7 kB] 78s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [811 kB] 78s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [14.2 kB] 78s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 Packages [88.7 kB] 78s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/restricted arm64 Packages [58.2 kB] 78s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/universe arm64 Packages [654 kB] 78s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse arm64 Packages [19.5 kB] 79s Fetched 1788 kB in 1s (1878 kB/s) 79s Reading package lists... 82s Reading package lists... 82s Building dependency tree... 82s Reading state information... 83s Calculating upgrade... 84s The following package was automatically installed and is no longer required: 84s libsgutils2-1.46-2 84s Use 'sudo apt autoremove' to remove it. 84s The following NEW packages will be installed: 84s libsgutils2-1.48 84s The following packages will be upgraded: 84s apt apt-utils bash bpftrace curl debconf debconf-i18n distro-info 84s dracut-install fwupd-signed gir1.2-girepository-2.0 gir1.2-glib-2.0 hostname 84s init init-system-helpers libapt-pkg6.0t64 libaudit-common libaudit1 84s libcurl3t64-gnutls libcurl4t64 libgirepository-1.0-1 libglib2.0-0t64 84s libglib2.0-data liblzma5 libpam-modules libpam-modules-bin libpam-runtime 84s libpam0g libplymouth5 libpolkit-agent-1-0 libpolkit-gobject-1-0 libselinux1 84s libsemanage-common libsemanage2 linux-base lto-disabled-list lxd-installer 84s openssh-client openssh-server openssh-sftp-server pinentry-curses plymouth 84s plymouth-theme-ubuntu-text python-apt-common python3-apt python3-blinker 84s python3-dbus python3-debconf python3-gi python3-jsonschema-specifications 84s python3-rpds-py python3-yaml sg3-utils sg3-utils-udev vim-common vim-tiny 84s xxd xz-utils 84s 58 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 84s Need to get 15.0 MB of archives. 84s After this operation, 2697 kB of additional disk space will be used. 84s Get:1 http://ftpmaster.internal/ubuntu plucky/main arm64 bash arm64 5.2.32-1ubuntu2 [791 kB] 85s Get:2 http://ftpmaster.internal/ubuntu plucky/main arm64 hostname arm64 3.25 [11.0 kB] 85s Get:3 http://ftpmaster.internal/ubuntu plucky/main arm64 init-system-helpers all 1.67ubuntu1 [39.1 kB] 85s Get:4 http://ftpmaster.internal/ubuntu plucky/main arm64 liblzma5 arm64 5.6.3-1 [138 kB] 85s Get:5 http://ftpmaster.internal/ubuntu plucky/main arm64 libapt-pkg6.0t64 arm64 2.9.14ubuntu1 [1015 kB] 85s Get:6 http://ftpmaster.internal/ubuntu plucky/main arm64 apt arm64 2.9.14ubuntu1 [1323 kB] 85s Get:7 http://ftpmaster.internal/ubuntu plucky/main arm64 apt-utils arm64 2.9.14ubuntu1 [207 kB] 85s Get:8 http://ftpmaster.internal/ubuntu plucky/main arm64 libaudit-common all 1:4.0.2-2ubuntu1 [6578 B] 85s Get:9 http://ftpmaster.internal/ubuntu plucky/main arm64 libaudit1 arm64 1:4.0.2-2ubuntu1 [54.2 kB] 85s Get:10 http://ftpmaster.internal/ubuntu plucky/main arm64 debconf-i18n all 1.5.87ubuntu1 [204 kB] 85s Get:11 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-debconf all 1.5.87ubuntu1 [4156 B] 85s Get:12 http://ftpmaster.internal/ubuntu plucky/main arm64 debconf all 1.5.87ubuntu1 [124 kB] 85s Get:13 http://ftpmaster.internal/ubuntu plucky/main arm64 libpam0g arm64 1.5.3-7ubuntu4 [68.6 kB] 85s Get:14 http://ftpmaster.internal/ubuntu plucky/main arm64 libselinux1 arm64 3.7-3ubuntu1 [81.6 kB] 85s Get:15 http://ftpmaster.internal/ubuntu plucky/main arm64 libpam-modules-bin arm64 1.5.3-7ubuntu4 [50.4 kB] 85s Get:16 http://ftpmaster.internal/ubuntu plucky/main arm64 libpam-modules arm64 1.5.3-7ubuntu4 [285 kB] 85s Get:17 http://ftpmaster.internal/ubuntu plucky/main arm64 init arm64 1.67ubuntu1 [6428 B] 85s Get:18 http://ftpmaster.internal/ubuntu plucky/main arm64 openssh-sftp-server arm64 1:9.9p1-3ubuntu2 [36.8 kB] 85s Get:19 http://ftpmaster.internal/ubuntu plucky/main arm64 openssh-server arm64 1:9.9p1-3ubuntu2 [524 kB] 85s Get:20 http://ftpmaster.internal/ubuntu plucky/main arm64 openssh-client arm64 1:9.9p1-3ubuntu2 [920 kB] 85s Get:21 http://ftpmaster.internal/ubuntu plucky/main arm64 libpam-runtime all 1.5.3-7ubuntu4 [40.8 kB] 85s Get:22 http://ftpmaster.internal/ubuntu plucky/main arm64 libsemanage-common all 3.7-2build1 [7186 B] 85s Get:23 http://ftpmaster.internal/ubuntu plucky/main arm64 libsemanage2 arm64 3.7-2build1 [92.2 kB] 85s Get:24 http://ftpmaster.internal/ubuntu plucky/main arm64 distro-info arm64 1.12 [19.4 kB] 85s Get:25 http://ftpmaster.internal/ubuntu plucky/main arm64 gir1.2-girepository-2.0 arm64 1.82.0-2 [25.2 kB] 85s Get:26 http://ftpmaster.internal/ubuntu plucky/main arm64 gir1.2-glib-2.0 arm64 2.82.2-3 [182 kB] 85s Get:27 http://ftpmaster.internal/ubuntu plucky/main arm64 libglib2.0-0t64 arm64 2.82.2-3 [1560 kB] 86s Get:28 http://ftpmaster.internal/ubuntu plucky/main arm64 libgirepository-1.0-1 arm64 1.82.0-2 [83.0 kB] 86s Get:29 http://ftpmaster.internal/ubuntu plucky/main arm64 libglib2.0-data all 2.82.2-3 [51.7 kB] 86s Get:30 http://ftpmaster.internal/ubuntu plucky/main arm64 python-apt-common all 2.9.0ubuntu2 [20.3 kB] 86s Get:31 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-apt arm64 2.9.0ubuntu2 [188 kB] 86s Get:32 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-dbus arm64 1.3.2-5build4 [109 kB] 86s Get:33 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-gi arm64 3.50.0-3build1 [279 kB] 86s Get:34 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-yaml arm64 6.0.2-1build1 [164 kB] 86s Get:35 http://ftpmaster.internal/ubuntu plucky/main arm64 vim-tiny arm64 2:9.1.0861-1ubuntu1 [805 kB] 86s Get:36 http://ftpmaster.internal/ubuntu plucky/main arm64 vim-common all 2:9.1.0861-1ubuntu1 [395 kB] 86s Get:37 http://ftpmaster.internal/ubuntu plucky/main arm64 xxd arm64 2:9.1.0861-1ubuntu1 [67.3 kB] 86s Get:38 http://ftpmaster.internal/ubuntu plucky/main arm64 libplymouth5 arm64 24.004.60-2ubuntu4 [141 kB] 86s Get:39 http://ftpmaster.internal/ubuntu plucky/main arm64 plymouth-theme-ubuntu-text arm64 24.004.60-2ubuntu4 [9904 B] 86s Get:40 http://ftpmaster.internal/ubuntu plucky/main arm64 plymouth arm64 24.004.60-2ubuntu4 [135 kB] 86s Get:41 http://ftpmaster.internal/ubuntu plucky/main arm64 xz-utils arm64 5.6.3-1 [272 kB] 86s Get:42 http://ftpmaster.internal/ubuntu plucky/main arm64 bpftrace arm64 0.21.2-2ubuntu3 [1854 kB] 86s Get:43 http://ftpmaster.internal/ubuntu plucky/main arm64 curl arm64 8.11.0-1ubuntu2 [243 kB] 86s Get:44 http://ftpmaster.internal/ubuntu plucky/main arm64 libcurl4t64 arm64 8.11.0-1ubuntu2 [372 kB] 87s Get:45 http://ftpmaster.internal/ubuntu plucky/main arm64 dracut-install arm64 105-2ubuntu2 [34.7 kB] 87s Get:46 http://ftpmaster.internal/ubuntu plucky/main arm64 fwupd-signed arm64 1.55+1.7-1 [30.9 kB] 87s Get:47 http://ftpmaster.internal/ubuntu plucky/main arm64 libcurl3t64-gnutls arm64 8.11.0-1ubuntu2 [367 kB] 87s Get:48 http://ftpmaster.internal/ubuntu plucky/main arm64 libpolkit-agent-1-0 arm64 125-2ubuntu1 [16.7 kB] 87s Get:49 http://ftpmaster.internal/ubuntu plucky/main arm64 libpolkit-gobject-1-0 arm64 125-2ubuntu1 [49.4 kB] 87s Get:50 http://ftpmaster.internal/ubuntu plucky/main arm64 libsgutils2-1.48 arm64 1.48-0ubuntu1 [118 kB] 87s Get:51 http://ftpmaster.internal/ubuntu plucky/main arm64 linux-base all 4.10.1ubuntu1 [34.8 kB] 87s Get:52 http://ftpmaster.internal/ubuntu plucky/main arm64 lto-disabled-list all 54 [12.2 kB] 87s Get:53 http://ftpmaster.internal/ubuntu plucky/main arm64 lxd-installer all 10 [5264 B] 87s Get:54 http://ftpmaster.internal/ubuntu plucky/main arm64 pinentry-curses arm64 1.3.1-0ubuntu2 [38.5 kB] 87s Get:55 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-blinker all 1.9.0-1 [10.7 kB] 87s Get:56 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-rpds-py arm64 0.21.0-2ubuntu1 [302 kB] 88s Get:57 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-jsonschema-specifications all 2023.12.1-2 [9116 B] 88s Get:58 http://ftpmaster.internal/ubuntu plucky/main arm64 sg3-utils arm64 1.48-0ubuntu1 [999 kB] 88s Get:59 http://ftpmaster.internal/ubuntu plucky/main arm64 sg3-utils-udev all 1.48-0ubuntu1 [6608 B] 88s Preconfiguring packages ... 89s Fetched 15.0 MB in 4s (3958 kB/s) 89s (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 ... 80002 files and directories currently installed.) 89s Preparing to unpack .../bash_5.2.32-1ubuntu2_arm64.deb ... 89s Unpacking bash (5.2.32-1ubuntu2) over (5.2.32-1ubuntu1) ... 89s Setting up bash (5.2.32-1ubuntu2) ... 89s 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 89s (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 ... 80002 files and directories currently installed.) 89s Preparing to unpack .../hostname_3.25_arm64.deb ... 89s Unpacking hostname (3.25) over (3.23+nmu2ubuntu2) ... 89s Setting up hostname (3.25) ... 89s (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 ... 80002 files and directories currently installed.) 89s Preparing to unpack .../init-system-helpers_1.67ubuntu1_all.deb ... 89s Unpacking init-system-helpers (1.67ubuntu1) over (1.66ubuntu1) ... 89s Setting up init-system-helpers (1.67ubuntu1) ... 90s (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 ... 80002 files and directories currently installed.) 90s Preparing to unpack .../liblzma5_5.6.3-1_arm64.deb ... 90s Unpacking liblzma5:arm64 (5.6.3-1) over (5.6.2-2) ... 90s Setting up liblzma5:arm64 (5.6.3-1) ... 90s (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 ... 80002 files and directories currently installed.) 90s Preparing to unpack .../libapt-pkg6.0t64_2.9.14ubuntu1_arm64.deb ... 90s Unpacking libapt-pkg6.0t64:arm64 (2.9.14ubuntu1) over (2.9.8) ... 90s Setting up libapt-pkg6.0t64:arm64 (2.9.14ubuntu1) ... 90s (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 ... 80002 files and directories currently installed.) 90s Preparing to unpack .../apt_2.9.14ubuntu1_arm64.deb ... 90s Unpacking apt (2.9.14ubuntu1) over (2.9.8) ... 90s Setting up apt (2.9.14ubuntu1) ... 91s (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 ... 79994 files and directories currently installed.) 91s Preparing to unpack .../apt-utils_2.9.14ubuntu1_arm64.deb ... 91s Unpacking apt-utils (2.9.14ubuntu1) over (2.9.8) ... 91s Preparing to unpack .../libaudit-common_1%3a4.0.2-2ubuntu1_all.deb ... 91s Unpacking libaudit-common (1:4.0.2-2ubuntu1) over (1:4.0.1-1ubuntu2) ... 91s Setting up libaudit-common (1:4.0.2-2ubuntu1) ... 91s (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 ... 79994 files and directories currently installed.) 91s Preparing to unpack .../libaudit1_1%3a4.0.2-2ubuntu1_arm64.deb ... 91s Unpacking libaudit1:arm64 (1:4.0.2-2ubuntu1) over (1:4.0.1-1ubuntu2) ... 91s Setting up libaudit1:arm64 (1:4.0.2-2ubuntu1) ... 92s (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 ... 79994 files and directories currently installed.) 92s Preparing to unpack .../debconf-i18n_1.5.87ubuntu1_all.deb ... 92s Unpacking debconf-i18n (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 92s Preparing to unpack .../python3-debconf_1.5.87ubuntu1_all.deb ... 92s Unpacking python3-debconf (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 92s Preparing to unpack .../debconf_1.5.87ubuntu1_all.deb ... 92s Unpacking debconf (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 92s Setting up debconf (1.5.87ubuntu1) ... 92s (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 ... 79994 files and directories currently installed.) 92s Preparing to unpack .../libpam0g_1.5.3-7ubuntu4_arm64.deb ... 92s Unpacking libpam0g:arm64 (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 92s Setting up libpam0g:arm64 (1.5.3-7ubuntu4) ... 93s (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 ... 79994 files and directories currently installed.) 93s Preparing to unpack .../libselinux1_3.7-3ubuntu1_arm64.deb ... 93s Unpacking libselinux1:arm64 (3.7-3ubuntu1) over (3.5-2ubuntu5) ... 93s Setting up libselinux1:arm64 (3.7-3ubuntu1) ... 93s (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 ... 79994 files and directories currently installed.) 93s Preparing to unpack .../libpam-modules-bin_1.5.3-7ubuntu4_arm64.deb ... 93s Unpacking libpam-modules-bin (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 93s Setting up libpam-modules-bin (1.5.3-7ubuntu4) ... 93s pam_namespace.service is a disabled or a static unit not running, not starting it. 93s (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 ... 79994 files and directories currently installed.) 93s Preparing to unpack .../libpam-modules_1.5.3-7ubuntu4_arm64.deb ... 94s Unpacking libpam-modules:arm64 (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 94s Setting up libpam-modules:arm64 (1.5.3-7ubuntu4) ... 94s (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 ... 79994 files and directories currently installed.) 94s Preparing to unpack .../init_1.67ubuntu1_arm64.deb ... 94s Unpacking init (1.67ubuntu1) over (1.66ubuntu1) ... 94s Preparing to unpack .../openssh-sftp-server_1%3a9.9p1-3ubuntu2_arm64.deb ... 94s Unpacking openssh-sftp-server (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 94s Preparing to unpack .../openssh-server_1%3a9.9p1-3ubuntu2_arm64.deb ... 94s Unpacking openssh-server (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 94s Preparing to unpack .../openssh-client_1%3a9.9p1-3ubuntu2_arm64.deb ... 94s Unpacking openssh-client (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 94s Preparing to unpack .../libpam-runtime_1.5.3-7ubuntu4_all.deb ... 94s Unpacking libpam-runtime (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 94s Setting up libpam-runtime (1.5.3-7ubuntu4) ... 95s (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 ... 79996 files and directories currently installed.) 95s Preparing to unpack .../libsemanage-common_3.7-2build1_all.deb ... 95s Unpacking libsemanage-common (3.7-2build1) over (3.5-1build6) ... 95s Setting up libsemanage-common (3.7-2build1) ... 95s (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 ... 79995 files and directories currently installed.) 95s Preparing to unpack .../libsemanage2_3.7-2build1_arm64.deb ... 95s Unpacking libsemanage2:arm64 (3.7-2build1) over (3.5-1build6) ... 95s Setting up libsemanage2:arm64 (3.7-2build1) ... 95s (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 ... 79995 files and directories currently installed.) 95s Preparing to unpack .../00-distro-info_1.12_arm64.deb ... 95s Unpacking distro-info (1.12) over (1.9) ... 95s Preparing to unpack .../01-gir1.2-girepository-2.0_1.82.0-2_arm64.deb ... 95s Unpacking gir1.2-girepository-2.0:arm64 (1.82.0-2) over (1.80.1-4) ... 95s Preparing to unpack .../02-gir1.2-glib-2.0_2.82.2-3_arm64.deb ... 95s Unpacking gir1.2-glib-2.0:arm64 (2.82.2-3) over (2.82.1-0ubuntu1) ... 95s Preparing to unpack .../03-libglib2.0-0t64_2.82.2-3_arm64.deb ... 95s Unpacking libglib2.0-0t64:arm64 (2.82.2-3) over (2.82.1-0ubuntu1) ... 95s Preparing to unpack .../04-libgirepository-1.0-1_1.82.0-2_arm64.deb ... 95s Unpacking libgirepository-1.0-1:arm64 (1.82.0-2) over (1.80.1-4) ... 95s Preparing to unpack .../05-libglib2.0-data_2.82.2-3_all.deb ... 95s Unpacking libglib2.0-data (2.82.2-3) over (2.82.1-0ubuntu1) ... 95s Preparing to unpack .../06-python-apt-common_2.9.0ubuntu2_all.deb ... 95s Unpacking python-apt-common (2.9.0ubuntu2) over (2.9.0ubuntu1) ... 96s Preparing to unpack .../07-python3-apt_2.9.0ubuntu2_arm64.deb ... 96s Unpacking python3-apt (2.9.0ubuntu2) over (2.9.0ubuntu1) ... 96s Preparing to unpack .../08-python3-dbus_1.3.2-5build4_arm64.deb ... 96s Unpacking python3-dbus (1.3.2-5build4) over (1.3.2-5build3) ... 96s Preparing to unpack .../09-python3-gi_3.50.0-3build1_arm64.deb ... 96s Unpacking python3-gi (3.50.0-3build1) over (3.50.0-3) ... 96s Preparing to unpack .../10-python3-yaml_6.0.2-1build1_arm64.deb ... 96s Unpacking python3-yaml (6.0.2-1build1) over (6.0.2-1) ... 96s Preparing to unpack .../11-vim-tiny_2%3a9.1.0861-1ubuntu1_arm64.deb ... 96s Unpacking vim-tiny (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 96s Preparing to unpack .../12-vim-common_2%3a9.1.0861-1ubuntu1_all.deb ... 96s Unpacking vim-common (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 97s Preparing to unpack .../13-xxd_2%3a9.1.0861-1ubuntu1_arm64.deb ... 97s Unpacking xxd (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 97s Preparing to unpack .../14-libplymouth5_24.004.60-2ubuntu4_arm64.deb ... 97s Unpacking libplymouth5:arm64 (24.004.60-2ubuntu4) over (24.004.60-1ubuntu11) ... 97s Preparing to unpack .../15-plymouth-theme-ubuntu-text_24.004.60-2ubuntu4_arm64.deb ... 97s Unpacking plymouth-theme-ubuntu-text (24.004.60-2ubuntu4) over (24.004.60-1ubuntu11) ... 97s Preparing to unpack .../16-plymouth_24.004.60-2ubuntu4_arm64.deb ... 97s Unpacking plymouth (24.004.60-2ubuntu4) over (24.004.60-1ubuntu11) ... 97s Preparing to unpack .../17-xz-utils_5.6.3-1_arm64.deb ... 97s Unpacking xz-utils (5.6.3-1) over (5.6.2-2) ... 97s Preparing to unpack .../18-bpftrace_0.21.2-2ubuntu3_arm64.deb ... 97s Unpacking bpftrace (0.21.2-2ubuntu3) over (0.21.2-2ubuntu2) ... 97s Preparing to unpack .../19-curl_8.11.0-1ubuntu2_arm64.deb ... 97s Unpacking curl (8.11.0-1ubuntu2) over (8.9.1-2ubuntu2) ... 97s Preparing to unpack .../20-libcurl4t64_8.11.0-1ubuntu2_arm64.deb ... 97s Unpacking libcurl4t64:arm64 (8.11.0-1ubuntu2) over (8.9.1-2ubuntu2) ... 97s Preparing to unpack .../21-dracut-install_105-2ubuntu2_arm64.deb ... 97s Unpacking dracut-install (105-2ubuntu2) over (105-1ubuntu1) ... 97s Preparing to unpack .../22-fwupd-signed_1.55+1.7-1_arm64.deb ... 97s Unpacking fwupd-signed (1.55+1.7-1) over (1.54+1.6-1build1) ... 97s Preparing to unpack .../23-libcurl3t64-gnutls_8.11.0-1ubuntu2_arm64.deb ... 97s Unpacking libcurl3t64-gnutls:arm64 (8.11.0-1ubuntu2) over (8.9.1-2ubuntu2) ... 97s Preparing to unpack .../24-libpolkit-agent-1-0_125-2ubuntu1_arm64.deb ... 97s Unpacking libpolkit-agent-1-0:arm64 (125-2ubuntu1) over (124-2ubuntu1) ... 98s Preparing to unpack .../25-libpolkit-gobject-1-0_125-2ubuntu1_arm64.deb ... 98s Unpacking libpolkit-gobject-1-0:arm64 (125-2ubuntu1) over (124-2ubuntu1) ... 98s Selecting previously unselected package libsgutils2-1.48:arm64. 98s Preparing to unpack .../26-libsgutils2-1.48_1.48-0ubuntu1_arm64.deb ... 98s Unpacking libsgutils2-1.48:arm64 (1.48-0ubuntu1) ... 98s Preparing to unpack .../27-linux-base_4.10.1ubuntu1_all.deb ... 98s Unpacking linux-base (4.10.1ubuntu1) over (4.5ubuntu9) ... 98s Preparing to unpack .../28-lto-disabled-list_54_all.deb ... 98s Unpacking lto-disabled-list (54) over (53) ... 98s Preparing to unpack .../29-lxd-installer_10_all.deb ... 98s Unpacking lxd-installer (10) over (9) ... 98s Preparing to unpack .../30-pinentry-curses_1.3.1-0ubuntu2_arm64.deb ... 98s Unpacking pinentry-curses (1.3.1-0ubuntu2) over (1.2.1-3ubuntu5) ... 98s Preparing to unpack .../31-python3-blinker_1.9.0-1_all.deb ... 98s Unpacking python3-blinker (1.9.0-1) over (1.8.2-1) ... 98s Preparing to unpack .../32-python3-rpds-py_0.21.0-2ubuntu1_arm64.deb ... 98s Unpacking python3-rpds-py (0.21.0-2ubuntu1) over (0.20.0-0ubuntu3) ... 98s Preparing to unpack .../33-python3-jsonschema-specifications_2023.12.1-2_all.deb ... 98s Unpacking python3-jsonschema-specifications (2023.12.1-2) over (2023.12.1-1ubuntu1) ... 98s Preparing to unpack .../34-sg3-utils_1.48-0ubuntu1_arm64.deb ... 98s Unpacking sg3-utils (1.48-0ubuntu1) over (1.46-3ubuntu5) ... 99s Preparing to unpack .../35-sg3-utils-udev_1.48-0ubuntu1_all.deb ... 99s Unpacking sg3-utils-udev (1.48-0ubuntu1) over (1.46-3ubuntu5) ... 99s Setting up pinentry-curses (1.3.1-0ubuntu2) ... 99s Setting up distro-info (1.12) ... 99s Setting up lto-disabled-list (54) ... 99s Setting up apt-utils (2.9.14ubuntu1) ... 99s Setting up linux-base (4.10.1ubuntu1) ... 99s Setting up init (1.67ubuntu1) ... 99s Setting up libcurl4t64:arm64 (8.11.0-1ubuntu2) ... 99s Setting up bpftrace (0.21.2-2ubuntu3) ... 99s Setting up openssh-client (1:9.9p1-3ubuntu2) ... 99s Setting up python3-debconf (1.5.87ubuntu1) ... 99s Setting up libcurl3t64-gnutls:arm64 (8.11.0-1ubuntu2) ... 99s Setting up fwupd-signed (1.55+1.7-1) ... 99s Setting up libsgutils2-1.48:arm64 (1.48-0ubuntu1) ... 99s Setting up python3-yaml (6.0.2-1build1) ... 99s Setting up debconf-i18n (1.5.87ubuntu1) ... 99s Setting up xxd (2:9.1.0861-1ubuntu1) ... 99s Setting up libglib2.0-0t64:arm64 (2.82.2-3) ... 99s No schema files found: doing nothing. 99s Setting up libglib2.0-data (2.82.2-3) ... 99s Setting up vim-common (2:9.1.0861-1ubuntu1) ... 99s Setting up xz-utils (5.6.3-1) ... 99s Setting up gir1.2-glib-2.0:arm64 (2.82.2-3) ... 99s Setting up lxd-installer (10) ... 100s Setting up python3-rpds-py (0.21.0-2ubuntu1) ... 100s Setting up python-apt-common (2.9.0ubuntu2) ... 100s Setting up dracut-install (105-2ubuntu2) ... 100s Setting up libplymouth5:arm64 (24.004.60-2ubuntu4) ... 100s Setting up libgirepository-1.0-1:arm64 (1.82.0-2) ... 100s Setting up curl (8.11.0-1ubuntu2) ... 100s Setting up python3-jsonschema-specifications (2023.12.1-2) ... 100s Setting up libpolkit-gobject-1-0:arm64 (125-2ubuntu1) ... 100s Setting up sg3-utils (1.48-0ubuntu1) ... 100s Setting up python3-blinker (1.9.0-1) ... 101s Setting up openssh-sftp-server (1:9.9p1-3ubuntu2) ... 101s Setting up python3-dbus (1.3.2-5build4) ... 101s Setting up openssh-server (1:9.9p1-3ubuntu2) ... 101s Installing new version of config file /etc/ssh/moduli ... 101s Replacing config file /etc/ssh/sshd_config with new version 103s Setting up plymouth (24.004.60-2ubuntu4) ... 103s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 103s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 103s Setting up python3-apt (2.9.0ubuntu2) ... 104s Setting up vim-tiny (2:9.1.0861-1ubuntu1) ... 104s Setting up sg3-utils-udev (1.48-0ubuntu1) ... 104s update-initramfs: deferring update (trigger activated) 104s Setting up gir1.2-girepository-2.0:arm64 (1.82.0-2) ... 104s Setting up python3-gi (3.50.0-3build1) ... 104s Setting up libpolkit-agent-1-0:arm64 (125-2ubuntu1) ... 104s Processing triggers for debianutils (5.21) ... 104s Processing triggers for install-info (7.1.1-1) ... 104s Processing triggers for initramfs-tools (0.142ubuntu35) ... 104s update-initramfs: Generating /boot/initrd.img-6.11.0-8-generic 105s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 130s System running in EFI mode, skipping. 130s Processing triggers for libc-bin (2.40-1ubuntu3) ... 130s Processing triggers for ufw (0.36.2-8) ... 130s Processing triggers for man-db (2.13.0-1) ... 132s Setting up plymouth-theme-ubuntu-text (24.004.60-2ubuntu4) ... 132s Processing triggers for initramfs-tools (0.142ubuntu35) ... 133s update-initramfs: Generating /boot/initrd.img-6.11.0-8-generic 133s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 154s System running in EFI mode, skipping. 156s Reading package lists... 156s Building dependency tree... 156s Reading state information... 157s The following packages will be REMOVED: 157s libsgutils2-1.46-2* 157s 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 157s After this operation, 314 kB disk space will be freed. 158s (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 ... 80030 files and directories currently installed.) 158s Removing libsgutils2-1.46-2:arm64 (1.46-3ubuntu5) ... 158s Processing triggers for libc-bin (2.40-1ubuntu3) ... 158s Hit:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease 158s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 158s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 158s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 159s Reading package lists... 160s Reading package lists... 160s Building dependency tree... 160s Reading state information... 161s Calculating upgrade... 161s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 161s Reading package lists... 161s Building dependency tree... 161s Reading state information... 162s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 162s autopkgtest [09:36:21]: rebooting testbed after setup commands that affected boot 166s autopkgtest-virt-ssh: WARNING: ssh connection failed. Retrying in 3 seconds... 189s autopkgtest [09:36:48]: testbed running kernel: Linux 6.11.0-8-generic #8-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep 16 14:19:41 UTC 2024 192s autopkgtest [09:36:51]: @@@@@@@@@@@@@@@@@@@@ apt-source git-ubuntu 194s Get:1 http://ftpmaster.internal/ubuntu plucky/universe git-ubuntu 1.1-1 (dsc) [2280 B] 194s Get:2 http://ftpmaster.internal/ubuntu plucky/universe git-ubuntu 1.1-1 (tar) [179 kB] 194s Get:3 http://ftpmaster.internal/ubuntu plucky/universe git-ubuntu 1.1-1 (diff) [5776 B] 194s gpgv: Signature made Wed Jul 3 16:18:24 2024 UTC 194s gpgv: using RSA key A62D2CFBD50B9B5BF360D54B159EB5C4EFC8774C 194s gpgv: Can't check signature: No public key 194s dpkg-source: warning: cannot verify inline signature for ./git-ubuntu_1.1-1.dsc: no acceptable signature found 195s autopkgtest [09:36:54]: testing package git-ubuntu version 1.1-1 195s autopkgtest [09:36:54]: build not needed 195s autopkgtest [09:36:54]: test self-test: preparing testbed 201s Reading package lists... 202s Building dependency tree... 202s Reading state information... 202s Starting pkgProblemResolver with broken count: 0 202s Starting 2 pkgProblemResolver with broken count: 0 202s Done 203s The following additional packages will be installed: 203s dctrl-tools debian-archive-keyring devscripts diffstat dput gettext git 203s git-buildpackage git-man git-ubuntu libb-hooks-op-check-perl 203s libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-perl 203s libdevel-callchecker-perl libdynaloader-functions-perl libencode-locale-perl 203s liberror-perl libfile-dirlist-perl libfile-homedir-perl libfile-listing-perl 203s libfile-touch-perl libfile-which-perl libgit2-1.8 libgomp1 203s libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl 203s libhttp-cookies-perl libhttp-date-perl libhttp-message-perl 203s libhttp-negotiate-perl libhttp-parser2.9 libimport-into-perl libio-html-perl 203s libio-pty-perl libio-socket-ssl-perl libipc-run-perl libjs-jquery 203s libjs-jquery-hotkeys libjs-jquery-isonscreen libjs-jquery-metadata 203s libjs-jquery-tablesorter libjs-jquery-throttle-debounce libjs-sphinxdoc 203s libjs-underscore liblwp-mediatypes-perl liblwp-protocol-https-perl 203s libmodule-runtime-perl libmoo-perl libnet-http-perl libnet-ssleay-perl 203s libnorm1t64 libparams-classify-perl libpgm-5.3-0t64 libpython3.13-minimal 203s libpython3.13-stdlib librole-tiny-perl libsodium23 libsub-quote-perl 203s libsys-cpuaffinity-perl libtimedate-perl libtry-tiny-perl liburi-perl 203s libwww-perl libwww-robotrules-perl libxdelta2t64 libzmq5 patchutils pbzip2 203s perl-openssl-defaults pixz pristine-tar pylint python3-argcomplete 203s python3-astroid python3-cachetools python3-coverage python3-dateutil 203s python3-debian python3-debianbts python3-dill python3-distro-info 203s python3-gpg python3-importlib-metadata python3-iniconfig python3-isort 203s python3-jaraco.classes python3-jeepney python3-keyring python3-keyrings.alt 203s python3-launchpadlib-desktop python3-logilab-common python3-mccabe 203s python3-mypy-extensions python3-packaging python3-platformdirs 203s python3-pluggy python3-py python3-pycryptodome python3-pygit2 python3-pytest 203s python3-pytest-cov python3-secretstorage python3-tenacity python3-tomlkit 203s python3-ubuntutools python3-xdg python3-zmq python3.13 python3.13-minimal 203s quilt ubuntu-dev-tools wdiff xdelta xdelta3 203s Suggested packages: 203s debtags adequate at autopkgtest bls-standalone bsd-mailx | mailx 203s build-essential check-all-the-things cvs-buildpackage debhelper diffoscope 203s disorderfs docker.io dose-extra duck elpa-devscripts faketime gnuplot 203s how-can-i-help libauthen-sasl-perl libdbd-pg-perl libfile-desktopentry-perl 203s libterm-size-perl libyaml-syck-perl mmdebstrap mutt piuparts 203s postgresql-client pristine-lfs python3-pycurl ratt reprotest 203s svn-buildpackage w3m debian-keyring equivs libgitlab-api-v4-perl 203s libsoap-lite-perl lintian mini-dinstall autopoint gettext-doc 203s libasprintf-dev libgettextpo-dev git-daemon-run | git-daemon-sysvinit 203s git-doc git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn 203s python3-notify2 unzip libdata-dump-perl libio-compress-brotli-perl 203s libcrypt-ssleay-perl libscalar-number-perl libxstring-perl libsub-name-perl 203s libbusiness-isbn-perl libmime-base32-perl libregexp-ipv6-perl 203s libauthen-ntlm-perl python-coverage-doc python3-objgraph gir1.2-secret-1 203s gnome-keyring libkf5wallet-bin python3-shtab subversion python-pygit2-doc 203s gnome-keyring | libkf5wallet-bin | keepassxc python-secretstorage-doc 203s python-tenacity-doc python-pyxdg-doc python3.13-venv python3.13-doc 203s binfmt-support default-mta | mail-transport-agent graphviz procmail bzr 203s | brz bzr-builddeb | brz-debian qemu-user-static wdiff-doc 203s Recommended packages: 203s libdistro-info-perl libgit-wrapper-perl libjson-perl liblist-compare-perl 203s libstring-shellquote-perl licensecheck lintian python3-magic python3-unidiff 203s unzip python3-paramiko cowbuilder | pbuilder | sbuild libhtml-format-perl 203s javascript-common libnamespace-clean-perl libdata-dump-perl 203s libhtml-form-perl libhttp-daemon-perl libmailtools-perl python3-tk arch-test 203s debian-keyring debootstrap genisoimage sbuild | pbuilder | cowbuilder 203s python3-dns reportbug 204s The following NEW packages will be installed: 204s autopkgtest-satdep dctrl-tools debian-archive-keyring devscripts diffstat 204s dput gettext git git-buildpackage git-man git-ubuntu 204s libb-hooks-op-check-perl libclass-method-modifiers-perl 204s libclass-xsaccessor-perl libclone-perl libdevel-callchecker-perl 204s libdynaloader-functions-perl libencode-locale-perl liberror-perl 204s libfile-dirlist-perl libfile-homedir-perl libfile-listing-perl 204s libfile-touch-perl libfile-which-perl libgit2-1.8 libgomp1 204s libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl 204s libhttp-cookies-perl libhttp-date-perl libhttp-message-perl 204s libhttp-negotiate-perl libhttp-parser2.9 libimport-into-perl libio-html-perl 204s libio-pty-perl libio-socket-ssl-perl libipc-run-perl libjs-jquery 204s libjs-jquery-hotkeys libjs-jquery-isonscreen libjs-jquery-metadata 204s libjs-jquery-tablesorter libjs-jquery-throttle-debounce libjs-sphinxdoc 204s libjs-underscore liblwp-mediatypes-perl liblwp-protocol-https-perl 204s libmodule-runtime-perl libmoo-perl libnet-http-perl libnet-ssleay-perl 204s libnorm1t64 libparams-classify-perl libpgm-5.3-0t64 libpython3.13-minimal 204s libpython3.13-stdlib librole-tiny-perl libsodium23 libsub-quote-perl 204s libsys-cpuaffinity-perl libtimedate-perl libtry-tiny-perl liburi-perl 204s libwww-perl libwww-robotrules-perl libxdelta2t64 libzmq5 patchutils pbzip2 204s perl-openssl-defaults pixz pristine-tar pylint python3-argcomplete 204s python3-astroid python3-cachetools python3-coverage python3-dateutil 204s python3-debian python3-debianbts python3-dill python3-distro-info 204s python3-gpg python3-importlib-metadata python3-iniconfig python3-isort 204s python3-jaraco.classes python3-jeepney python3-keyring python3-keyrings.alt 204s python3-launchpadlib-desktop python3-logilab-common python3-mccabe 204s python3-mypy-extensions python3-packaging python3-platformdirs 204s python3-pluggy python3-py python3-pycryptodome python3-pygit2 python3-pytest 204s python3-pytest-cov python3-secretstorage python3-tenacity python3-tomlkit 204s python3-ubuntutools python3-xdg python3-zmq python3.13 python3.13-minimal 204s quilt ubuntu-dev-tools wdiff xdelta xdelta3 204s 0 upgraded, 117 newly installed, 0 to remove and 0 not upgraded. 204s Need to get 23.2 MB/23.2 MB of archives. 204s After this operation, 103 MB of additional disk space will be used. 204s Get:1 /tmp/autopkgtest.TiWmv1/1-autopkgtest-satdep.deb autopkgtest-satdep arm64 0 [708 B] 204s Get:2 http://ftpmaster.internal/ubuntu plucky/main arm64 libpython3.13-minimal arm64 3.13.0-2 [877 kB] 204s Get:3 http://ftpmaster.internal/ubuntu plucky/main arm64 python3.13-minimal arm64 3.13.0-2 [2100 kB] 204s Get:4 http://ftpmaster.internal/ubuntu plucky/main arm64 libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 204s Get:5 http://ftpmaster.internal/ubuntu plucky/universe arm64 libjs-jquery-hotkeys all 0~20130707+git2d51e3a9+dfsg-2.1 [11.5 kB] 204s Get:6 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-distro-info all 1.12 [7754 B] 204s Get:7 http://ftpmaster.internal/ubuntu plucky/main arm64 dctrl-tools arm64 2.24-3build3 [103 kB] 204s Get:8 http://ftpmaster.internal/ubuntu plucky/universe arm64 debian-archive-keyring all 2023.4ubuntu1 [168 kB] 205s Get:9 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-dirlist-perl all 0.05-3 [7286 B] 205s Get:10 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-which-perl all 1.27-2 [12.5 kB] 205s Get:11 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-homedir-perl all 1.006-2 [37.0 kB] 205s Get:12 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-touch-perl all 0.12-2 [7498 B] 205s Get:13 http://ftpmaster.internal/ubuntu plucky/main arm64 libio-pty-perl arm64 1:1.20-1build3 [31.3 kB] 205s Get:14 http://ftpmaster.internal/ubuntu plucky/main arm64 libipc-run-perl all 20231003.0-2 [91.5 kB] 205s Get:15 http://ftpmaster.internal/ubuntu plucky/main arm64 libclass-method-modifiers-perl all 2.15-1 [16.1 kB] 205s Get:16 http://ftpmaster.internal/ubuntu plucky/main arm64 libclass-xsaccessor-perl arm64 1.19-4build5 [32.7 kB] 205s Get:17 http://ftpmaster.internal/ubuntu plucky/main arm64 libb-hooks-op-check-perl arm64 0.22-3build2 [9348 B] 205s Get:18 http://ftpmaster.internal/ubuntu plucky/main arm64 libdynaloader-functions-perl all 0.004-1 [11.4 kB] 205s Get:19 http://ftpmaster.internal/ubuntu plucky/main arm64 libdevel-callchecker-perl arm64 0.009-1build1 [14.0 kB] 205s Get:20 http://ftpmaster.internal/ubuntu plucky/main arm64 libparams-classify-perl arm64 0.015-2build6 [19.8 kB] 205s Get:21 http://ftpmaster.internal/ubuntu plucky/main arm64 libmodule-runtime-perl all 0.016-2 [16.4 kB] 205s Get:22 http://ftpmaster.internal/ubuntu plucky/main arm64 libimport-into-perl all 1.002005-2 [10.7 kB] 205s Get:23 http://ftpmaster.internal/ubuntu plucky/main arm64 librole-tiny-perl all 2.002004-1 [16.3 kB] 205s Get:24 http://ftpmaster.internal/ubuntu plucky/main arm64 libsub-quote-perl all 2.006008-1ubuntu1 [20.7 kB] 205s Get:25 http://ftpmaster.internal/ubuntu plucky/main arm64 libmoo-perl all 2.005005-1 [47.4 kB] 205s Get:26 http://ftpmaster.internal/ubuntu plucky/main arm64 libencode-locale-perl all 1.05-3 [11.6 kB] 205s Get:27 http://ftpmaster.internal/ubuntu plucky/main arm64 libtimedate-perl all 2.3300-2 [34.0 kB] 205s Get:28 http://ftpmaster.internal/ubuntu plucky/main arm64 libhttp-date-perl all 6.06-1 [10.2 kB] 205s Get:29 http://ftpmaster.internal/ubuntu plucky/main arm64 libfile-listing-perl all 6.16-1 [11.3 kB] 205s Get:30 http://ftpmaster.internal/ubuntu plucky/main arm64 libhtml-tagset-perl all 3.24-1 [14.1 kB] 205s Get:31 http://ftpmaster.internal/ubuntu plucky/main arm64 liburi-perl all 5.30-1 [94.4 kB] 205s Get:32 http://ftpmaster.internal/ubuntu plucky/main arm64 libhtml-parser-perl arm64 3.83-1build1 [85.3 kB] 205s Get:33 http://ftpmaster.internal/ubuntu plucky/main arm64 libhtml-tree-perl all 5.07-3 [200 kB] 205s Get:34 http://ftpmaster.internal/ubuntu plucky/main arm64 libclone-perl arm64 0.47-1 [10.4 kB] 205s Get:35 http://ftpmaster.internal/ubuntu plucky/main arm64 libio-html-perl all 1.004-3 [15.9 kB] 205s Get:36 http://ftpmaster.internal/ubuntu plucky/main arm64 liblwp-mediatypes-perl all 6.04-2 [20.1 kB] 205s Get:37 http://ftpmaster.internal/ubuntu plucky/main arm64 libhttp-message-perl all 7.00-2ubuntu1 [75.9 kB] 205s Get:38 http://ftpmaster.internal/ubuntu plucky/main arm64 libhttp-cookies-perl all 6.11-1 [18.2 kB] 205s Get:39 http://ftpmaster.internal/ubuntu plucky/main arm64 libhttp-negotiate-perl all 6.01-2 [12.4 kB] 205s Get:40 http://ftpmaster.internal/ubuntu plucky/main arm64 perl-openssl-defaults arm64 7build3 [6628 B] 205s Get:41 http://ftpmaster.internal/ubuntu plucky/main arm64 libnet-ssleay-perl arm64 1.94-2 [307 kB] 205s Get:42 http://ftpmaster.internal/ubuntu plucky/main arm64 libio-socket-ssl-perl all 2.089-1 [200 kB] 205s Get:43 http://ftpmaster.internal/ubuntu plucky/main arm64 libnet-http-perl all 6.23-1 [22.3 kB] 205s Get:44 http://ftpmaster.internal/ubuntu plucky/main arm64 liblwp-protocol-https-perl all 6.14-1 [9040 B] 205s Get:45 http://ftpmaster.internal/ubuntu plucky/main arm64 libtry-tiny-perl all 0.32-1 [21.2 kB] 205s Get:46 http://ftpmaster.internal/ubuntu plucky/main arm64 libwww-robotrules-perl all 6.02-1 [12.6 kB] 205s Get:47 http://ftpmaster.internal/ubuntu plucky/main arm64 libwww-perl all 6.77-1 [138 kB] 205s Get:48 http://ftpmaster.internal/ubuntu plucky/main arm64 patchutils arm64 0.4.2-1build3 [75.3 kB] 205s Get:49 http://ftpmaster.internal/ubuntu plucky/main arm64 wdiff arm64 1.2.2-6build1 [28.6 kB] 205s Get:50 http://ftpmaster.internal/ubuntu plucky/main arm64 devscripts all 2.24.3 [1080 kB] 205s Get:51 http://ftpmaster.internal/ubuntu plucky/main arm64 diffstat arm64 1.67-1 [29.1 kB] 205s Get:52 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-debian all 0.1.49ubuntu3 [116 kB] 205s Get:53 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-gpg arm64 1.24.0-2ubuntu1 [288 kB] 205s Get:54 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-xdg all 0.28-2 [38.3 kB] 205s Get:55 http://ftpmaster.internal/ubuntu plucky/main arm64 dput all 1.2.4ubuntu1 [49.1 kB] 205s Get:56 http://ftpmaster.internal/ubuntu plucky/main arm64 libgomp1 arm64 14.2.0-8ubuntu1 [145 kB] 205s Get:57 http://ftpmaster.internal/ubuntu plucky/main arm64 gettext arm64 0.22.5-2 [930 kB] 205s Get:58 http://ftpmaster.internal/ubuntu plucky/main arm64 liberror-perl all 0.17029-2 [25.6 kB] 205s Get:59 http://ftpmaster.internal/ubuntu plucky/main arm64 git-man all 1:2.45.2-1.2ubuntu1 [1122 kB] 205s Get:60 http://ftpmaster.internal/ubuntu plucky/main arm64 git arm64 1:2.45.2-1.2ubuntu1 [4123 kB] 206s Get:61 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-dateutil all 2.9.0-3 [80.2 kB] 206s Get:62 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-importlib-metadata all 8.5.0-1 [20.7 kB] 206s Get:63 http://ftpmaster.internal/ubuntu plucky/universe arm64 git-buildpackage all 0.9.35 [677 kB] 206s Get:64 http://ftpmaster.internal/ubuntu plucky/universe arm64 libsys-cpuaffinity-perl arm64 1.13~03-2build4 [31.6 kB] 206s Get:65 http://ftpmaster.internal/ubuntu plucky/universe arm64 pbzip2 arm64 1.1.13-1build1 [38.0 kB] 206s Get:66 http://ftpmaster.internal/ubuntu plucky/universe arm64 pixz arm64 1.0.7-3 [21.4 kB] 206s Get:67 http://ftpmaster.internal/ubuntu plucky/universe arm64 libxdelta2t64 arm64 1.1.3-10.7 [52.5 kB] 206s Get:68 http://ftpmaster.internal/ubuntu plucky/universe arm64 xdelta arm64 1.1.3-10.7 [25.1 kB] 206s Get:69 http://ftpmaster.internal/ubuntu plucky/universe arm64 xdelta3 arm64 3.0.11-dfsg-1.2 [73.9 kB] 206s Get:70 http://ftpmaster.internal/ubuntu plucky/universe arm64 pristine-tar arm64 1.50+nmu2build1 [118 kB] 206s Get:71 http://ftpmaster.internal/ubuntu plucky/universe arm64 quilt all 0.68-1 [439 kB] 206s Get:72 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-debianbts all 4.1.1 [12.8 kB] 206s Get:73 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-jeepney all 0.8.0-4 [33.1 kB] 206s Get:74 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-secretstorage all 3.3.3-3 [13.7 kB] 206s Get:75 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-jaraco.classes all 3.4.0-1 [7664 B] 206s Get:76 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-keyring all 25.4.1-1 [40.5 kB] 206s Get:77 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-launchpadlib-desktop all 2.0.0-1 [1778 B] 206s Get:78 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-ubuntutools all 0.203 [67.4 kB] 206s Get:79 http://ftpmaster.internal/ubuntu plucky/universe arm64 ubuntu-dev-tools all 0.203 [93.2 kB] 206s Get:80 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-astroid all 3.3.5-1 [174 kB] 206s Get:81 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-isort all 5.13.2-2 [59.3 kB] 206s Get:82 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-mypy-extensions all 1.0.0-1 [6148 B] 206s Get:83 http://ftpmaster.internal/ubuntu plucky/main arm64 libjs-underscore all 1.13.4~dfsg+~1.11.4-3 [118 kB] 206s Get:84 http://ftpmaster.internal/ubuntu plucky/main arm64 libjs-sphinxdoc all 7.4.7-4 [158 kB] 206s Get:85 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-logilab-common all 2.0.0-1 [281 kB] 206s Get:86 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-dill all 0.3.9-1 [84.5 kB] 206s Get:87 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-mccabe all 0.7.0-1 [8678 B] 206s Get:88 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-platformdirs all 4.3.6-1 [16.8 kB] 206s Get:89 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-tomlkit all 0.13.2-1 [37.6 kB] 206s Get:90 http://ftpmaster.internal/ubuntu plucky/universe arm64 pylint all 3.3.1-2 [345 kB] 206s Get:91 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-argcomplete all 3.5.1-1ubuntu1 [35.6 kB] 206s Get:92 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-cachetools all 5.3.3-1 [10.3 kB] 206s Get:93 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-pycryptodome arm64 3.20.0+dfsg-3build1 [1093 kB] 206s Get:94 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-keyrings.alt all 5.0.2-1 [16.6 kB] 206s Get:95 http://ftpmaster.internal/ubuntu plucky/main arm64 libhttp-parser2.9 arm64 2.9.4-6build1 [21.9 kB] 206s Get:96 http://ftpmaster.internal/ubuntu plucky-proposed/main arm64 libgit2-1.8 arm64 1.8.4+ds-1ubuntu1 [548 kB] 206s Get:97 http://ftpmaster.internal/ubuntu plucky-proposed/universe arm64 python3-pygit2 arm64 1.16.0-2 [194 kB] 206s Get:98 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-iniconfig all 1.1.1-2 [6024 B] 206s Get:99 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-packaging all 24.2-1 [51.5 kB] 206s Get:100 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-pluggy all 1.5.0-1 [21.0 kB] 206s Get:101 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-pytest all 8.3.3-1 [251 kB] 206s Get:102 http://ftpmaster.internal/ubuntu plucky/main arm64 libpython3.13-stdlib arm64 3.13.0-2 [2073 kB] 206s Get:103 http://ftpmaster.internal/ubuntu plucky/main arm64 python3.13 arm64 3.13.0-2 [719 kB] 207s Get:104 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-coverage arm64 7.4.4+dfsg1-0ubuntu3 [150 kB] 207s Get:105 http://ftpmaster.internal/ubuntu plucky/universe arm64 libjs-jquery-isonscreen all 1.2.0-1.1 [3244 B] 207s Get:106 http://ftpmaster.internal/ubuntu plucky/universe arm64 libjs-jquery-metadata all 12-4 [6582 B] 207s Get:107 http://ftpmaster.internal/ubuntu plucky/universe arm64 libjs-jquery-tablesorter all 1:2.31.3+dfsg1-4 [192 kB] 207s Get:108 http://ftpmaster.internal/ubuntu plucky/universe arm64 libjs-jquery-throttle-debounce all 1.1+dfsg.1-2 [12.5 kB] 207s Get:109 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-pytest-cov all 5.0.0-1 [21.3 kB] 207s Get:110 http://ftpmaster.internal/ubuntu plucky/main arm64 python3-tenacity all 8.5.0-0ubuntu1 [17.0 kB] 207s Get:111 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-py all 1.11.0-2 [72.7 kB] 207s Get:112 http://ftpmaster.internal/ubuntu plucky/universe arm64 libnorm1t64 arm64 1.5.9+dfsg-3.1build1 [150 kB] 207s Get:113 http://ftpmaster.internal/ubuntu plucky/universe arm64 libpgm-5.3-0t64 arm64 5.3.128~dfsg-2.1build1 [162 kB] 207s Get:114 http://ftpmaster.internal/ubuntu plucky/main arm64 libsodium23 arm64 1.0.18-1build3 [119 kB] 207s Get:115 http://ftpmaster.internal/ubuntu plucky/universe arm64 libzmq5 arm64 4.3.5-1build2 [247 kB] 207s Get:116 http://ftpmaster.internal/ubuntu plucky/universe arm64 python3-zmq arm64 24.0.1-5build2 [347 kB] 207s Get:117 http://ftpmaster.internal/ubuntu plucky/universe arm64 git-ubuntu all 1.1-1 [152 kB] 208s Fetched 23.2 MB in 3s (6927 kB/s) 208s Selecting previously unselected package libpython3.13-minimal:arm64. 208s (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 ... 80025 files and directories currently installed.) 208s Preparing to unpack .../000-libpython3.13-minimal_3.13.0-2_arm64.deb ... 208s Unpacking libpython3.13-minimal:arm64 (3.13.0-2) ... 208s Selecting previously unselected package python3.13-minimal. 208s Preparing to unpack .../001-python3.13-minimal_3.13.0-2_arm64.deb ... 208s Unpacking python3.13-minimal (3.13.0-2) ... 208s Selecting previously unselected package libjs-jquery. 208s Preparing to unpack .../002-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 208s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 208s Selecting previously unselected package libjs-jquery-hotkeys. 208s Preparing to unpack .../003-libjs-jquery-hotkeys_0~20130707+git2d51e3a9+dfsg-2.1_all.deb ... 208s Unpacking libjs-jquery-hotkeys (0~20130707+git2d51e3a9+dfsg-2.1) ... 208s Selecting previously unselected package python3-distro-info. 208s Preparing to unpack .../004-python3-distro-info_1.12_all.deb ... 208s Unpacking python3-distro-info (1.12) ... 208s Selecting previously unselected package dctrl-tools. 208s Preparing to unpack .../005-dctrl-tools_2.24-3build3_arm64.deb ... 208s Unpacking dctrl-tools (2.24-3build3) ... 208s Selecting previously unselected package debian-archive-keyring. 208s Preparing to unpack .../006-debian-archive-keyring_2023.4ubuntu1_all.deb ... 209s Unpacking debian-archive-keyring (2023.4ubuntu1) ... 209s Selecting previously unselected package libfile-dirlist-perl. 209s Preparing to unpack .../007-libfile-dirlist-perl_0.05-3_all.deb ... 209s Unpacking libfile-dirlist-perl (0.05-3) ... 209s Selecting previously unselected package libfile-which-perl. 209s Preparing to unpack .../008-libfile-which-perl_1.27-2_all.deb ... 209s Unpacking libfile-which-perl (1.27-2) ... 209s Selecting previously unselected package libfile-homedir-perl. 209s Preparing to unpack .../009-libfile-homedir-perl_1.006-2_all.deb ... 209s Unpacking libfile-homedir-perl (1.006-2) ... 209s Selecting previously unselected package libfile-touch-perl. 209s Preparing to unpack .../010-libfile-touch-perl_0.12-2_all.deb ... 209s Unpacking libfile-touch-perl (0.12-2) ... 209s Selecting previously unselected package libio-pty-perl. 209s Preparing to unpack .../011-libio-pty-perl_1%3a1.20-1build3_arm64.deb ... 209s Unpacking libio-pty-perl (1:1.20-1build3) ... 209s Selecting previously unselected package libipc-run-perl. 209s Preparing to unpack .../012-libipc-run-perl_20231003.0-2_all.deb ... 209s Unpacking libipc-run-perl (20231003.0-2) ... 209s Selecting previously unselected package libclass-method-modifiers-perl. 209s Preparing to unpack .../013-libclass-method-modifiers-perl_2.15-1_all.deb ... 209s Unpacking libclass-method-modifiers-perl (2.15-1) ... 209s Selecting previously unselected package libclass-xsaccessor-perl. 209s Preparing to unpack .../014-libclass-xsaccessor-perl_1.19-4build5_arm64.deb ... 209s Unpacking libclass-xsaccessor-perl (1.19-4build5) ... 209s Selecting previously unselected package libb-hooks-op-check-perl:arm64. 209s Preparing to unpack .../015-libb-hooks-op-check-perl_0.22-3build2_arm64.deb ... 209s Unpacking libb-hooks-op-check-perl:arm64 (0.22-3build2) ... 209s Selecting previously unselected package libdynaloader-functions-perl. 209s Preparing to unpack .../016-libdynaloader-functions-perl_0.004-1_all.deb ... 209s Unpacking libdynaloader-functions-perl (0.004-1) ... 209s Selecting previously unselected package libdevel-callchecker-perl:arm64. 209s Preparing to unpack .../017-libdevel-callchecker-perl_0.009-1build1_arm64.deb ... 209s Unpacking libdevel-callchecker-perl:arm64 (0.009-1build1) ... 209s Selecting previously unselected package libparams-classify-perl:arm64. 209s Preparing to unpack .../018-libparams-classify-perl_0.015-2build6_arm64.deb ... 209s Unpacking libparams-classify-perl:arm64 (0.015-2build6) ... 209s Selecting previously unselected package libmodule-runtime-perl. 209s Preparing to unpack .../019-libmodule-runtime-perl_0.016-2_all.deb ... 209s Unpacking libmodule-runtime-perl (0.016-2) ... 209s Selecting previously unselected package libimport-into-perl. 209s Preparing to unpack .../020-libimport-into-perl_1.002005-2_all.deb ... 209s Unpacking libimport-into-perl (1.002005-2) ... 209s Selecting previously unselected package librole-tiny-perl. 209s Preparing to unpack .../021-librole-tiny-perl_2.002004-1_all.deb ... 209s Unpacking librole-tiny-perl (2.002004-1) ... 209s Selecting previously unselected package libsub-quote-perl. 209s Preparing to unpack .../022-libsub-quote-perl_2.006008-1ubuntu1_all.deb ... 209s Unpacking libsub-quote-perl (2.006008-1ubuntu1) ... 209s Selecting previously unselected package libmoo-perl. 209s Preparing to unpack .../023-libmoo-perl_2.005005-1_all.deb ... 209s Unpacking libmoo-perl (2.005005-1) ... 209s Selecting previously unselected package libencode-locale-perl. 209s Preparing to unpack .../024-libencode-locale-perl_1.05-3_all.deb ... 209s Unpacking libencode-locale-perl (1.05-3) ... 209s Selecting previously unselected package libtimedate-perl. 209s Preparing to unpack .../025-libtimedate-perl_2.3300-2_all.deb ... 209s Unpacking libtimedate-perl (2.3300-2) ... 209s Selecting previously unselected package libhttp-date-perl. 209s Preparing to unpack .../026-libhttp-date-perl_6.06-1_all.deb ... 209s Unpacking libhttp-date-perl (6.06-1) ... 209s Selecting previously unselected package libfile-listing-perl. 209s Preparing to unpack .../027-libfile-listing-perl_6.16-1_all.deb ... 209s Unpacking libfile-listing-perl (6.16-1) ... 210s Selecting previously unselected package libhtml-tagset-perl. 210s Preparing to unpack .../028-libhtml-tagset-perl_3.24-1_all.deb ... 210s Unpacking libhtml-tagset-perl (3.24-1) ... 210s Selecting previously unselected package liburi-perl. 210s Preparing to unpack .../029-liburi-perl_5.30-1_all.deb ... 210s Unpacking liburi-perl (5.30-1) ... 210s Selecting previously unselected package libhtml-parser-perl:arm64. 210s Preparing to unpack .../030-libhtml-parser-perl_3.83-1build1_arm64.deb ... 210s Unpacking libhtml-parser-perl:arm64 (3.83-1build1) ... 210s Selecting previously unselected package libhtml-tree-perl. 210s Preparing to unpack .../031-libhtml-tree-perl_5.07-3_all.deb ... 210s Unpacking libhtml-tree-perl (5.07-3) ... 210s Selecting previously unselected package libclone-perl:arm64. 210s Preparing to unpack .../032-libclone-perl_0.47-1_arm64.deb ... 210s Unpacking libclone-perl:arm64 (0.47-1) ... 210s Selecting previously unselected package libio-html-perl. 210s Preparing to unpack .../033-libio-html-perl_1.004-3_all.deb ... 210s Unpacking libio-html-perl (1.004-3) ... 210s Selecting previously unselected package liblwp-mediatypes-perl. 210s Preparing to unpack .../034-liblwp-mediatypes-perl_6.04-2_all.deb ... 210s Unpacking liblwp-mediatypes-perl (6.04-2) ... 210s Selecting previously unselected package libhttp-message-perl. 210s Preparing to unpack .../035-libhttp-message-perl_7.00-2ubuntu1_all.deb ... 210s Unpacking libhttp-message-perl (7.00-2ubuntu1) ... 210s Selecting previously unselected package libhttp-cookies-perl. 210s Preparing to unpack .../036-libhttp-cookies-perl_6.11-1_all.deb ... 210s Unpacking libhttp-cookies-perl (6.11-1) ... 210s Selecting previously unselected package libhttp-negotiate-perl. 210s Preparing to unpack .../037-libhttp-negotiate-perl_6.01-2_all.deb ... 210s Unpacking libhttp-negotiate-perl (6.01-2) ... 210s Selecting previously unselected package perl-openssl-defaults:arm64. 210s Preparing to unpack .../038-perl-openssl-defaults_7build3_arm64.deb ... 210s Unpacking perl-openssl-defaults:arm64 (7build3) ... 210s Selecting previously unselected package libnet-ssleay-perl:arm64. 210s Preparing to unpack .../039-libnet-ssleay-perl_1.94-2_arm64.deb ... 210s Unpacking libnet-ssleay-perl:arm64 (1.94-2) ... 210s Selecting previously unselected package libio-socket-ssl-perl. 210s Preparing to unpack .../040-libio-socket-ssl-perl_2.089-1_all.deb ... 210s Unpacking libio-socket-ssl-perl (2.089-1) ... 210s Selecting previously unselected package libnet-http-perl. 210s Preparing to unpack .../041-libnet-http-perl_6.23-1_all.deb ... 210s Unpacking libnet-http-perl (6.23-1) ... 210s Selecting previously unselected package liblwp-protocol-https-perl. 210s Preparing to unpack .../042-liblwp-protocol-https-perl_6.14-1_all.deb ... 210s Unpacking liblwp-protocol-https-perl (6.14-1) ... 210s Selecting previously unselected package libtry-tiny-perl. 210s Preparing to unpack .../043-libtry-tiny-perl_0.32-1_all.deb ... 210s Unpacking libtry-tiny-perl (0.32-1) ... 210s Selecting previously unselected package libwww-robotrules-perl. 210s Preparing to unpack .../044-libwww-robotrules-perl_6.02-1_all.deb ... 210s Unpacking libwww-robotrules-perl (6.02-1) ... 210s Selecting previously unselected package libwww-perl. 210s Preparing to unpack .../045-libwww-perl_6.77-1_all.deb ... 210s Unpacking libwww-perl (6.77-1) ... 210s Selecting previously unselected package patchutils. 210s Preparing to unpack .../046-patchutils_0.4.2-1build3_arm64.deb ... 210s Unpacking patchutils (0.4.2-1build3) ... 210s Selecting previously unselected package wdiff. 210s Preparing to unpack .../047-wdiff_1.2.2-6build1_arm64.deb ... 210s Unpacking wdiff (1.2.2-6build1) ... 210s Selecting previously unselected package devscripts. 210s Preparing to unpack .../048-devscripts_2.24.3_all.deb ... 210s Unpacking devscripts (2.24.3) ... 211s Selecting previously unselected package diffstat. 211s Preparing to unpack .../049-diffstat_1.67-1_arm64.deb ... 211s Unpacking diffstat (1.67-1) ... 211s Selecting previously unselected package python3-debian. 211s Preparing to unpack .../050-python3-debian_0.1.49ubuntu3_all.deb ... 211s Unpacking python3-debian (0.1.49ubuntu3) ... 211s Selecting previously unselected package python3-gpg. 211s Preparing to unpack .../051-python3-gpg_1.24.0-2ubuntu1_arm64.deb ... 211s Unpacking python3-gpg (1.24.0-2ubuntu1) ... 211s Selecting previously unselected package python3-xdg. 211s Preparing to unpack .../052-python3-xdg_0.28-2_all.deb ... 211s Unpacking python3-xdg (0.28-2) ... 211s Selecting previously unselected package dput. 211s Preparing to unpack .../053-dput_1.2.4ubuntu1_all.deb ... 211s Unpacking dput (1.2.4ubuntu1) ... 211s Selecting previously unselected package libgomp1:arm64. 211s Preparing to unpack .../054-libgomp1_14.2.0-8ubuntu1_arm64.deb ... 211s Unpacking libgomp1:arm64 (14.2.0-8ubuntu1) ... 211s Selecting previously unselected package gettext. 211s Preparing to unpack .../055-gettext_0.22.5-2_arm64.deb ... 211s Unpacking gettext (0.22.5-2) ... 211s Selecting previously unselected package liberror-perl. 211s Preparing to unpack .../056-liberror-perl_0.17029-2_all.deb ... 211s Unpacking liberror-perl (0.17029-2) ... 211s Selecting previously unselected package git-man. 211s Preparing to unpack .../057-git-man_1%3a2.45.2-1.2ubuntu1_all.deb ... 211s Unpacking git-man (1:2.45.2-1.2ubuntu1) ... 211s Selecting previously unselected package git. 211s Preparing to unpack .../058-git_1%3a2.45.2-1.2ubuntu1_arm64.deb ... 211s Unpacking git (1:2.45.2-1.2ubuntu1) ... 211s Selecting previously unselected package python3-dateutil. 211s Preparing to unpack .../059-python3-dateutil_2.9.0-3_all.deb ... 211s Unpacking python3-dateutil (2.9.0-3) ... 211s Selecting previously unselected package python3-importlib-metadata. 211s Preparing to unpack .../060-python3-importlib-metadata_8.5.0-1_all.deb ... 211s Unpacking python3-importlib-metadata (8.5.0-1) ... 212s Selecting previously unselected package git-buildpackage. 212s Preparing to unpack .../061-git-buildpackage_0.9.35_all.deb ... 212s Unpacking git-buildpackage (0.9.35) ... 212s Selecting previously unselected package libsys-cpuaffinity-perl. 212s Preparing to unpack .../062-libsys-cpuaffinity-perl_1.13~03-2build4_arm64.deb ... 212s Unpacking libsys-cpuaffinity-perl (1.13~03-2build4) ... 212s Selecting previously unselected package pbzip2. 212s Preparing to unpack .../063-pbzip2_1.1.13-1build1_arm64.deb ... 212s Unpacking pbzip2 (1.1.13-1build1) ... 212s Selecting previously unselected package pixz. 212s Preparing to unpack .../064-pixz_1.0.7-3_arm64.deb ... 212s Unpacking pixz (1.0.7-3) ... 212s Selecting previously unselected package libxdelta2t64:arm64. 212s Preparing to unpack .../065-libxdelta2t64_1.1.3-10.7_arm64.deb ... 212s Unpacking libxdelta2t64:arm64 (1.1.3-10.7) ... 212s Selecting previously unselected package xdelta. 212s Preparing to unpack .../066-xdelta_1.1.3-10.7_arm64.deb ... 212s Unpacking xdelta (1.1.3-10.7) ... 212s Selecting previously unselected package xdelta3. 212s Preparing to unpack .../067-xdelta3_3.0.11-dfsg-1.2_arm64.deb ... 212s Unpacking xdelta3 (3.0.11-dfsg-1.2) ... 212s Selecting previously unselected package pristine-tar. 212s Preparing to unpack .../068-pristine-tar_1.50+nmu2build1_arm64.deb ... 212s Unpacking pristine-tar (1.50+nmu2build1) ... 212s Selecting previously unselected package quilt. 212s Preparing to unpack .../069-quilt_0.68-1_all.deb ... 212s Unpacking quilt (0.68-1) ... 212s Selecting previously unselected package python3-debianbts. 212s Preparing to unpack .../070-python3-debianbts_4.1.1_all.deb ... 212s Unpacking python3-debianbts (4.1.1) ... 212s Selecting previously unselected package python3-jeepney. 212s Preparing to unpack .../071-python3-jeepney_0.8.0-4_all.deb ... 212s Unpacking python3-jeepney (0.8.0-4) ... 212s Selecting previously unselected package python3-secretstorage. 212s Preparing to unpack .../072-python3-secretstorage_3.3.3-3_all.deb ... 212s Unpacking python3-secretstorage (3.3.3-3) ... 212s Selecting previously unselected package python3-jaraco.classes. 212s Preparing to unpack .../073-python3-jaraco.classes_3.4.0-1_all.deb ... 212s Unpacking python3-jaraco.classes (3.4.0-1) ... 212s Selecting previously unselected package python3-keyring. 212s Preparing to unpack .../074-python3-keyring_25.4.1-1_all.deb ... 212s Unpacking python3-keyring (25.4.1-1) ... 212s Selecting previously unselected package python3-launchpadlib-desktop. 212s Preparing to unpack .../075-python3-launchpadlib-desktop_2.0.0-1_all.deb ... 212s Unpacking python3-launchpadlib-desktop (2.0.0-1) ... 212s Selecting previously unselected package python3-ubuntutools. 212s Preparing to unpack .../076-python3-ubuntutools_0.203_all.deb ... 212s Unpacking python3-ubuntutools (0.203) ... 212s Selecting previously unselected package ubuntu-dev-tools. 212s Preparing to unpack .../077-ubuntu-dev-tools_0.203_all.deb ... 212s Unpacking ubuntu-dev-tools (0.203) ... 212s Selecting previously unselected package python3-astroid. 212s Preparing to unpack .../078-python3-astroid_3.3.5-1_all.deb ... 212s Unpacking python3-astroid (3.3.5-1) ... 212s Selecting previously unselected package python3-isort. 212s Preparing to unpack .../079-python3-isort_5.13.2-2_all.deb ... 212s Unpacking python3-isort (5.13.2-2) ... 212s Selecting previously unselected package python3-mypy-extensions. 213s Preparing to unpack .../080-python3-mypy-extensions_1.0.0-1_all.deb ... 213s Unpacking python3-mypy-extensions (1.0.0-1) ... 213s Selecting previously unselected package libjs-underscore. 213s Preparing to unpack .../081-libjs-underscore_1.13.4~dfsg+~1.11.4-3_all.deb ... 213s Unpacking libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 213s Selecting previously unselected package libjs-sphinxdoc. 213s Preparing to unpack .../082-libjs-sphinxdoc_7.4.7-4_all.deb ... 213s Unpacking libjs-sphinxdoc (7.4.7-4) ... 213s Selecting previously unselected package python3-logilab-common. 213s Preparing to unpack .../083-python3-logilab-common_2.0.0-1_all.deb ... 213s Unpacking python3-logilab-common (2.0.0-1) ... 213s Selecting previously unselected package python3-dill. 213s Preparing to unpack .../084-python3-dill_0.3.9-1_all.deb ... 213s Unpacking python3-dill (0.3.9-1) ... 213s Selecting previously unselected package python3-mccabe. 213s Preparing to unpack .../085-python3-mccabe_0.7.0-1_all.deb ... 213s Unpacking python3-mccabe (0.7.0-1) ... 213s Selecting previously unselected package python3-platformdirs. 213s Preparing to unpack .../086-python3-platformdirs_4.3.6-1_all.deb ... 213s Unpacking python3-platformdirs (4.3.6-1) ... 213s Selecting previously unselected package python3-tomlkit. 213s Preparing to unpack .../087-python3-tomlkit_0.13.2-1_all.deb ... 213s Unpacking python3-tomlkit (0.13.2-1) ... 213s Selecting previously unselected package pylint. 213s Preparing to unpack .../088-pylint_3.3.1-2_all.deb ... 213s Unpacking pylint (3.3.1-2) ... 213s Selecting previously unselected package python3-argcomplete. 213s Preparing to unpack .../089-python3-argcomplete_3.5.1-1ubuntu1_all.deb ... 213s Unpacking python3-argcomplete (3.5.1-1ubuntu1) ... 213s Selecting previously unselected package python3-cachetools. 213s Preparing to unpack .../090-python3-cachetools_5.3.3-1_all.deb ... 213s Unpacking python3-cachetools (5.3.3-1) ... 213s Selecting previously unselected package python3-pycryptodome. 213s Preparing to unpack .../091-python3-pycryptodome_3.20.0+dfsg-3build1_arm64.deb ... 213s Unpacking python3-pycryptodome (3.20.0+dfsg-3build1) ... 213s Selecting previously unselected package python3-keyrings.alt. 213s Preparing to unpack .../092-python3-keyrings.alt_5.0.2-1_all.deb ... 213s Unpacking python3-keyrings.alt (5.0.2-1) ... 213s Selecting previously unselected package libhttp-parser2.9:arm64. 213s Preparing to unpack .../093-libhttp-parser2.9_2.9.4-6build1_arm64.deb ... 213s Unpacking libhttp-parser2.9:arm64 (2.9.4-6build1) ... 213s Selecting previously unselected package libgit2-1.8:arm64. 213s Preparing to unpack .../094-libgit2-1.8_1.8.4+ds-1ubuntu1_arm64.deb ... 213s Unpacking libgit2-1.8:arm64 (1.8.4+ds-1ubuntu1) ... 213s Selecting previously unselected package python3-pygit2. 213s Preparing to unpack .../095-python3-pygit2_1.16.0-2_arm64.deb ... 213s Unpacking python3-pygit2 (1.16.0-2) ... 213s Selecting previously unselected package python3-iniconfig. 213s Preparing to unpack .../096-python3-iniconfig_1.1.1-2_all.deb ... 213s Unpacking python3-iniconfig (1.1.1-2) ... 213s Selecting previously unselected package python3-packaging. 213s Preparing to unpack .../097-python3-packaging_24.2-1_all.deb ... 213s Unpacking python3-packaging (24.2-1) ... 214s Selecting previously unselected package python3-pluggy. 214s Preparing to unpack .../098-python3-pluggy_1.5.0-1_all.deb ... 214s Unpacking python3-pluggy (1.5.0-1) ... 214s Selecting previously unselected package python3-pytest. 214s Preparing to unpack .../099-python3-pytest_8.3.3-1_all.deb ... 214s Unpacking python3-pytest (8.3.3-1) ... 214s Selecting previously unselected package libpython3.13-stdlib:arm64. 214s Preparing to unpack .../100-libpython3.13-stdlib_3.13.0-2_arm64.deb ... 214s Unpacking libpython3.13-stdlib:arm64 (3.13.0-2) ... 214s Selecting previously unselected package python3.13. 214s Preparing to unpack .../101-python3.13_3.13.0-2_arm64.deb ... 214s Unpacking python3.13 (3.13.0-2) ... 214s Selecting previously unselected package python3-coverage. 214s Preparing to unpack .../102-python3-coverage_7.4.4+dfsg1-0ubuntu3_arm64.deb ... 214s Unpacking python3-coverage (7.4.4+dfsg1-0ubuntu3) ... 214s Selecting previously unselected package libjs-jquery-isonscreen. 214s Preparing to unpack .../103-libjs-jquery-isonscreen_1.2.0-1.1_all.deb ... 214s Unpacking libjs-jquery-isonscreen (1.2.0-1.1) ... 214s Selecting previously unselected package libjs-jquery-metadata. 214s Preparing to unpack .../104-libjs-jquery-metadata_12-4_all.deb ... 214s Unpacking libjs-jquery-metadata (12-4) ... 214s Selecting previously unselected package libjs-jquery-tablesorter. 214s Preparing to unpack .../105-libjs-jquery-tablesorter_1%3a2.31.3+dfsg1-4_all.deb ... 214s Unpacking libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 214s Selecting previously unselected package libjs-jquery-throttle-debounce. 214s Preparing to unpack .../106-libjs-jquery-throttle-debounce_1.1+dfsg.1-2_all.deb ... 214s Unpacking libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 214s Selecting previously unselected package python3-pytest-cov. 214s Preparing to unpack .../107-python3-pytest-cov_5.0.0-1_all.deb ... 214s Unpacking python3-pytest-cov (5.0.0-1) ... 214s Selecting previously unselected package python3-tenacity. 214s Preparing to unpack .../108-python3-tenacity_8.5.0-0ubuntu1_all.deb ... 214s Unpacking python3-tenacity (8.5.0-0ubuntu1) ... 214s Selecting previously unselected package python3-py. 214s Preparing to unpack .../109-python3-py_1.11.0-2_all.deb ... 214s Unpacking python3-py (1.11.0-2) ... 214s Selecting previously unselected package libnorm1t64:arm64. 214s Preparing to unpack .../110-libnorm1t64_1.5.9+dfsg-3.1build1_arm64.deb ... 214s Unpacking libnorm1t64:arm64 (1.5.9+dfsg-3.1build1) ... 214s Selecting previously unselected package libpgm-5.3-0t64:arm64. 214s Preparing to unpack .../111-libpgm-5.3-0t64_5.3.128~dfsg-2.1build1_arm64.deb ... 214s Unpacking libpgm-5.3-0t64:arm64 (5.3.128~dfsg-2.1build1) ... 214s Selecting previously unselected package libsodium23:arm64. 214s Preparing to unpack .../112-libsodium23_1.0.18-1build3_arm64.deb ... 214s Unpacking libsodium23:arm64 (1.0.18-1build3) ... 214s Selecting previously unselected package libzmq5:arm64. 214s Preparing to unpack .../113-libzmq5_4.3.5-1build2_arm64.deb ... 214s Unpacking libzmq5:arm64 (4.3.5-1build2) ... 214s Selecting previously unselected package python3-zmq. 214s Preparing to unpack .../114-python3-zmq_24.0.1-5build2_arm64.deb ... 214s Unpacking python3-zmq (24.0.1-5build2) ... 215s Selecting previously unselected package git-ubuntu. 215s Preparing to unpack .../115-git-ubuntu_1.1-1_all.deb ... 215s Unpacking git-ubuntu (1.1-1) ... 215s Selecting previously unselected package autopkgtest-satdep. 215s Preparing to unpack .../116-1-autopkgtest-satdep.deb ... 215s Unpacking autopkgtest-satdep (0) ... 215s Setting up python3-iniconfig (1.1.1-2) ... 215s Setting up libnorm1t64:arm64 (1.5.9+dfsg-3.1build1) ... 215s Setting up wdiff (1.2.2-6build1) ... 215s Setting up libfile-which-perl (1.27-2) ... 215s Setting up libsodium23:arm64 (1.0.18-1build3) ... 215s Setting up python3-jaraco.classes (3.4.0-1) ... 215s Setting up libxdelta2t64:arm64 (1.1.3-10.7) ... 215s Setting up python3-importlib-metadata (8.5.0-1) ... 215s Setting up xdelta (1.1.3-10.7) ... 215s Setting up libsys-cpuaffinity-perl (1.13~03-2build4) ... 215s Setting up python3-py (1.11.0-2) ... 215s Setting up libdynaloader-functions-perl (0.004-1) ... 215s Setting up libclass-method-modifiers-perl (2.15-1) ... 215s Setting up libio-pty-perl (1:1.20-1build3) ... 215s Setting up python3-cachetools (5.3.3-1) ... 216s Setting up python3-debianbts (4.1.1) ... 216s Setting up libclone-perl:arm64 (0.47-1) ... 216s Setting up libhtml-tagset-perl (3.24-1) ... 216s Setting up python3-mypy-extensions (1.0.0-1) ... 216s Setting up python3-pycryptodome (3.20.0+dfsg-3build1) ... 217s Setting up python3-tenacity (8.5.0-0ubuntu1) ... 217s Setting up liblwp-mediatypes-perl (6.04-2) ... 217s Setting up debian-archive-keyring (2023.4ubuntu1) ... 217s Setting up libtry-tiny-perl (0.32-1) ... 217s Setting up perl-openssl-defaults:arm64 (7build3) ... 217s Setting up libencode-locale-perl (1.05-3) ... 217s Setting up libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 217s Setting up libgomp1:arm64 (14.2.0-8ubuntu1) ... 217s Setting up python3-xdg (0.28-2) ... 217s Setting up pbzip2 (1.1.13-1build1) ... 217s Setting up python3-platformdirs (4.3.6-1) ... 217s Setting up liberror-perl (0.17029-2) ... 217s Setting up libpython3.13-minimal:arm64 (3.13.0-2) ... 217s Setting up patchutils (0.4.2-1build3) ... 217s Setting up libpgm-5.3-0t64:arm64 (5.3.128~dfsg-2.1build1) ... 217s Setting up python3-packaging (24.2-1) ... 217s Setting up python3-gpg (1.24.0-2ubuntu1) ... 218s Setting up python3-dill (0.3.9-1) ... 218s Setting up python3-debian (0.1.49ubuntu3) ... 218s Setting up diffstat (1.67-1) ... 218s Setting up libio-html-perl (1.004-3) ... 218s Setting up libb-hooks-op-check-perl:arm64 (0.22-3build2) ... 218s Setting up libipc-run-perl (20231003.0-2) ... 218s Setting up python3-jeepney (0.8.0-4) ... 218s Setting up python3-isort (5.13.2-2) ... 219s Setting up python3-pluggy (1.5.0-1) ... 219s Setting up libtimedate-perl (2.3300-2) ... 219s Setting up python3-astroid (3.3.5-1) ... 219s Setting up xdelta3 (3.0.11-dfsg-1.2) ... 219s Setting up pixz (1.0.7-3) ... 219s Setting up librole-tiny-perl (2.002004-1) ... 219s Setting up python3.13-minimal (3.13.0-2) ... 220s Setting up git-man (1:2.45.2-1.2ubuntu1) ... 220s Setting up python3-dateutil (2.9.0-3) ... 220s Setting up python3-mccabe (0.7.0-1) ... 221s Setting up libsub-quote-perl (2.006008-1ubuntu1) ... 221s Setting up libclass-xsaccessor-perl (1.19-4build5) ... 221s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 221s Setting up libfile-dirlist-perl (0.05-3) ... 221s Setting up libjs-jquery-hotkeys (0~20130707+git2d51e3a9+dfsg-2.1) ... 221s Setting up python3-argcomplete (3.5.1-1ubuntu1) ... 221s Setting up libfile-homedir-perl (1.006-2) ... 221s Setting up python3-tomlkit (0.13.2-1) ... 221s Setting up python3-distro-info (1.12) ... 221s Setting up libpython3.13-stdlib:arm64 (3.13.0-2) ... 221s Setting up liburi-perl (5.30-1) ... 221s Setting up pristine-tar (1.50+nmu2build1) ... 221s Setting up libfile-touch-perl (0.12-2) ... 221s Setting up dctrl-tools (2.24-3build3) ... 221s Setting up libhttp-parser2.9:arm64 (2.9.4-6build1) ... 221s Setting up libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 221s Setting up libnet-ssleay-perl:arm64 (1.94-2) ... 221s Setting up libhttp-date-perl (6.06-1) ... 221s Setting up gettext (0.22.5-2) ... 221s Setting up libfile-listing-perl (6.16-1) ... 221s Setting up libzmq5:arm64 (4.3.5-1build2) ... 221s Setting up python3.13 (3.13.0-2) ... 222s Setting up python3-pytest (8.3.3-1) ... 223s Setting up libnet-http-perl (6.23-1) ... 223s Setting up python3-coverage (7.4.4+dfsg1-0ubuntu3) ... 223s Setting up quilt (0.68-1) ... 223s Setting up libdevel-callchecker-perl:arm64 (0.009-1build1) ... 223s Setting up dput (1.2.4ubuntu1) ... 223s Setting up python3-secretstorage (3.3.3-3) ... 223s Setting up python3-zmq (24.0.1-5build2) ... 224s Setting up libjs-jquery-metadata (12-4) ... 224s Setting up libgit2-1.8:arm64 (1.8.4+ds-1ubuntu1) ... 224s Setting up libjs-jquery-isonscreen (1.2.0-1.1) ... 224s Setting up git (1:2.45.2-1.2ubuntu1) ... 224s Setting up libjs-sphinxdoc (7.4.7-4) ... 224s Setting up libwww-robotrules-perl (6.02-1) ... 224s Setting up libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 224s Setting up libhtml-parser-perl:arm64 (3.83-1build1) ... 224s Setting up python3-keyring (25.4.1-1) ... 224s Setting up libio-socket-ssl-perl (2.089-1) ... 224s Setting up libhttp-message-perl (7.00-2ubuntu1) ... 224s Setting up libhttp-negotiate-perl (6.01-2) ... 224s Setting up libhttp-cookies-perl (6.11-1) ... 224s Setting up python3-logilab-common (2.0.0-1) ... 224s Setting up python3-pygit2 (1.16.0-2) ... 224s Setting up libhtml-tree-perl (5.07-3) ... 224s Setting up libparams-classify-perl:arm64 (0.015-2build6) ... 224s Setting up python3-pytest-cov (5.0.0-1) ... 225s Setting up libmodule-runtime-perl (0.016-2) ... 225s Setting up python3-launchpadlib-desktop (2.0.0-1) ... 225s Setting up python3-keyrings.alt (5.0.2-1) ... 225s Setting up pylint (3.3.1-2) ... 225s Setting up libimport-into-perl (1.002005-2) ... 225s Setting up libmoo-perl (2.005005-1) ... 225s Setting up python3-ubuntutools (0.203) ... 226s Setting up liblwp-protocol-https-perl (6.14-1) ... 226s Setting up libwww-perl (6.77-1) ... 226s Setting up devscripts (2.24.3) ... 226s Setting up git-buildpackage (0.9.35) ... 226s Setting up ubuntu-dev-tools (0.203) ... 226s Setting up git-ubuntu (1.1-1) ... 226s Setting up autopkgtest-satdep (0) ... 226s Processing triggers for libc-bin (2.40-1ubuntu3) ... 226s Processing triggers for systemd (256.5-2ubuntu4) ... 226s Processing triggers for man-db (2.13.0-1) ... 228s Processing triggers for install-info (7.1.1-1) ... 233s (Reading database ... 86253 files and directories currently installed.) 233s Removing autopkgtest-satdep (0) ... 234s autopkgtest [09:37:33]: test self-test: TEST_SYSTEM_TREE=1 /usr/share/git-ubuntu/self-test 234s autopkgtest [09:37:33]: test self-test: [----------------------- 234s Testing git-ubuntu system installation. 234s Testing tree in /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu 234s Working dir /tmp/autopkgtest.TiWmv1/build.FF8/src 249s pylint passed! 257s ============================= test session starts ============================== 257s platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0 257s rootdir: /tmp/autopkgtest.TiWmv1/build.FF8/src 257s configfile: pytest.ini 257s plugins: cov-5.0.0, typeguard-4.4.1 257s collected 459 items 257s 257s gitubuntu/build.py ..... [ 1%] 259s gitubuntu/git_repository_test.py ....................................... [ 9%] 273s ...FFFFF.FFF...........................F.FFFFFFF.FFF.......FFFFFFFFFF [ 24%] 273s gitubuntu/importer_service_test.py ..................................... [ 32%] 273s ..... [ 33%] 273s gitubuntu/importer_service_worker_test.py ... [ 34%] 285s gitubuntu/importer_tag_test.py FFFFFFFFFxF [ 36%] 304s gitubuntu/importer_test.py .......FF.FFFFFFFFFFF.FFF.FFF..FFFFFFFFFFFFFF [ 46%] 320s FFFFxx..FF.................................................F....FFFF. [ 61%] 323s gitubuntu/integration_test.py ...............Fsss [ 65%] 323s gitubuntu/prepare_upload_test.py .............. [ 68%] 324s gitubuntu/repo_builder_test.py .........FF.F................ [ 75%] 324s gitubuntu/rich_history_test.py FFF.FFFF [ 76%] 330s gitubuntu/source_builder_test.py .FF.......FFFFFFFFF.. [ 81%] 330s gitubuntu/source_information_test.py ................................... [ 89%] 330s ... [ 89%] 331s gitubuntu/versioning.py ............................................... [100%] 331s 331s =================================== FAILURES =================================== 331s ___________________ test_follow_symlinks_to_blob[0] ____________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmps5b77s61/.git/') 331s tree_func = at 0xe00ad8d8d300> 331s 331s @pytest.mark.parametrize('tree_func', [ 331s # The tree_func parameter is a function that accepts a mock Blob that is to 331s # represent the changelog blob itself and returns a mock Tree with the mock 331s # Blob embedded somewhere within it. The test function can then ensure that 331s # follow_symlinks_to_blob can correctly find the changelog Blob given the 331s # Tree. 331s 331s # Of course this is only expected to work if, after checking out the Tree, 331s # "cat debian/changelog" would work. But this allows us to test the various 331s # permutations of symlink following in Trees that _are_ valid. 331s 331s # Simple case 331s lambda b: Tree({ 331s 'debian': Tree({'changelog': b}), 331s }), 331s 331s # Symlink in debian/ 331s lambda b: Tree({ 331s 'debian': Tree({ 331s 'changelog.real': b, 331s 'changelog': Symlink('changelog.real'), 331s }), 331s }), 331s 331s # Symlink to parent directory 331s lambda b: Tree({ 331s 'changelog': b, 331s 'debian': Tree({ 331s 'changelog': Symlink('../changelog'), 331s }) 331s }), 331s 331s # Symlink to subdirectory 331s lambda b: Tree({ 331s 'debian': Tree({ 331s 'changelog': Symlink('subdirectory/changelog'), 331s 'subdirectory': Tree({'changelog': b}), 331s }) 331s }), 331s 331s # debian/ itself is a symlink to a different directory 331s lambda b: Tree({ 331s 'pkg': Tree({'changelog': b}), 331s 'debian': Symlink('pkg'), 331s }) 331s ]) 331s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 331s blob = Blob(b'') 331s blob_id = blob.write(pygit2_repo) 331s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 331s > result_blob = target.follow_symlinks_to_blob( 331s pygit2_repo, 331s tree, 331s 'debian/changelog', 331s ) 331s 331s gitubuntu/git_repository_test.py:342: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmps5b77s61/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s gitubuntu/git_repository.py:68: AttributeError 331s ___________________ test_follow_symlinks_to_blob[1] ____________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmpjg8qltdw/.git/') 331s tree_func = at 0xe00ad8d8d3a0> 331s 331s @pytest.mark.parametrize('tree_func', [ 331s # The tree_func parameter is a function that accepts a mock Blob that is to 331s # represent the changelog blob itself and returns a mock Tree with the mock 331s # Blob embedded somewhere within it. The test function can then ensure that 331s # follow_symlinks_to_blob can correctly find the changelog Blob given the 331s # Tree. 331s 331s # Of course this is only expected to work if, after checking out the Tree, 331s # "cat debian/changelog" would work. But this allows us to test the various 331s # permutations of symlink following in Trees that _are_ valid. 331s 331s # Simple case 331s lambda b: Tree({ 331s 'debian': Tree({'changelog': b}), 331s }), 331s 331s # Symlink in debian/ 331s lambda b: Tree({ 331s 'debian': Tree({ 331s 'changelog.real': b, 331s 'changelog': Symlink('changelog.real'), 331s }), 331s }), 331s 331s # Symlink to parent directory 331s lambda b: Tree({ 331s 'changelog': b, 331s 'debian': Tree({ 331s 'changelog': Symlink('../changelog'), 331s }) 331s }), 331s 331s # Symlink to subdirectory 331s lambda b: Tree({ 331s 'debian': Tree({ 331s 'changelog': Symlink('subdirectory/changelog'), 331s 'subdirectory': Tree({'changelog': b}), 331s }) 331s }), 331s 331s # debian/ itself is a symlink to a different directory 331s lambda b: Tree({ 331s 'pkg': Tree({'changelog': b}), 331s 'debian': Symlink('pkg'), 331s }) 331s ]) 331s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 331s blob = Blob(b'') 331s blob_id = blob.write(pygit2_repo) 331s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 331s > result_blob = target.follow_symlinks_to_blob( 331s pygit2_repo, 331s tree, 331s 'debian/changelog', 331s ) 331s 331s gitubuntu/git_repository_test.py:342: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpjg8qltdw/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s gitubuntu/git_repository.py:68: AttributeError 331s ___________________ test_follow_symlinks_to_blob[2] ____________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmpridzhiga/.git/') 331s tree_func = at 0xe00ad8d8d440> 331s 331s @pytest.mark.parametrize('tree_func', [ 331s # The tree_func parameter is a function that accepts a mock Blob that is to 331s # represent the changelog blob itself and returns a mock Tree with the mock 331s # Blob embedded somewhere within it. The test function can then ensure that 331s # follow_symlinks_to_blob can correctly find the changelog Blob given the 331s # Tree. 331s 331s # Of course this is only expected to work if, after checking out the Tree, 331s # "cat debian/changelog" would work. But this allows us to test the various 331s # permutations of symlink following in Trees that _are_ valid. 331s 331s # Simple case 331s lambda b: Tree({ 331s 'debian': Tree({'changelog': b}), 331s }), 331s 331s # Symlink in debian/ 331s lambda b: Tree({ 331s 'debian': Tree({ 331s 'changelog.real': b, 331s 'changelog': Symlink('changelog.real'), 331s }), 331s }), 331s 331s # Symlink to parent directory 331s lambda b: Tree({ 331s 'changelog': b, 331s 'debian': Tree({ 331s 'changelog': Symlink('../changelog'), 331s }) 331s }), 331s 331s # Symlink to subdirectory 331s lambda b: Tree({ 331s 'debian': Tree({ 331s 'changelog': Symlink('subdirectory/changelog'), 331s 'subdirectory': Tree({'changelog': b}), 331s }) 331s }), 331s 331s # debian/ itself is a symlink to a different directory 331s lambda b: Tree({ 331s 'pkg': Tree({'changelog': b}), 331s 'debian': Symlink('pkg'), 331s }) 331s ]) 331s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 331s blob = Blob(b'') 331s blob_id = blob.write(pygit2_repo) 331s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 331s > result_blob = target.follow_symlinks_to_blob( 331s pygit2_repo, 331s tree, 331s 'debian/changelog', 331s ) 331s 331s gitubuntu/git_repository_test.py:342: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpridzhiga/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s gitubuntu/git_repository.py:68: AttributeError 331s ___________________ test_follow_symlinks_to_blob[3] ____________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmpqlj1lwlu/.git/') 331s tree_func = at 0xe00ad8d8d4e0> 331s 331s @pytest.mark.parametrize('tree_func', [ 331s # The tree_func parameter is a function that accepts a mock Blob that is to 331s # represent the changelog blob itself and returns a mock Tree with the mock 331s # Blob embedded somewhere within it. The test function can then ensure that 331s # follow_symlinks_to_blob can correctly find the changelog Blob given the 331s # Tree. 331s 331s # Of course this is only expected to work if, after checking out the Tree, 331s # "cat debian/changelog" would work. But this allows us to test the various 331s # permutations of symlink following in Trees that _are_ valid. 331s 331s # Simple case 331s lambda b: Tree({ 331s 'debian': Tree({'changelog': b}), 331s }), 331s 331s # Symlink in debian/ 331s lambda b: Tree({ 331s 'debian': Tree({ 331s 'changelog.real': b, 331s 'changelog': Symlink('changelog.real'), 331s }), 331s }), 331s 331s # Symlink to parent directory 331s lambda b: Tree({ 331s 'changelog': b, 331s 'debian': Tree({ 331s 'changelog': Symlink('../changelog'), 331s }) 331s }), 331s 331s # Symlink to subdirectory 331s lambda b: Tree({ 331s 'debian': Tree({ 331s 'changelog': Symlink('subdirectory/changelog'), 331s 'subdirectory': Tree({'changelog': b}), 331s }) 331s }), 331s 331s # debian/ itself is a symlink to a different directory 331s lambda b: Tree({ 331s 'pkg': Tree({'changelog': b}), 331s 'debian': Symlink('pkg'), 331s }) 331s ]) 331s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 331s blob = Blob(b'') 331s blob_id = blob.write(pygit2_repo) 331s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 331s > result_blob = target.follow_symlinks_to_blob( 331s pygit2_repo, 331s tree, 331s 'debian/changelog', 331s ) 331s 331s gitubuntu/git_repository_test.py:342: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpqlj1lwlu/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s gitubuntu/git_repository.py:68: AttributeError 331s ___________________ test_follow_symlinks_to_blob[4] ____________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmp6ghsoxmf/.git/') 331s tree_func = at 0xe00ad8d8d580> 331s 331s @pytest.mark.parametrize('tree_func', [ 331s # The tree_func parameter is a function that accepts a mock Blob that is to 331s # represent the changelog blob itself and returns a mock Tree with the mock 331s # Blob embedded somewhere within it. The test function can then ensure that 331s # follow_symlinks_to_blob can correctly find the changelog Blob given the 331s # Tree. 331s 331s # Of course this is only expected to work if, after checking out the Tree, 331s # "cat debian/changelog" would work. But this allows us to test the various 331s # permutations of symlink following in Trees that _are_ valid. 331s 331s # Simple case 331s lambda b: Tree({ 331s 'debian': Tree({'changelog': b}), 331s }), 331s 331s # Symlink in debian/ 331s lambda b: Tree({ 331s 'debian': Tree({ 331s 'changelog.real': b, 331s 'changelog': Symlink('changelog.real'), 331s }), 331s }), 331s 331s # Symlink to parent directory 331s lambda b: Tree({ 331s 'changelog': b, 331s 'debian': Tree({ 331s 'changelog': Symlink('../changelog'), 331s }) 331s }), 331s 331s # Symlink to subdirectory 331s lambda b: Tree({ 331s 'debian': Tree({ 331s 'changelog': Symlink('subdirectory/changelog'), 331s 'subdirectory': Tree({'changelog': b}), 331s }) 331s }), 331s 331s # debian/ itself is a symlink to a different directory 331s lambda b: Tree({ 331s 'pkg': Tree({'changelog': b}), 331s 'debian': Symlink('pkg'), 331s }) 331s ]) 331s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 331s blob = Blob(b'') 331s blob_id = blob.write(pygit2_repo) 331s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 331s > result_blob = target.follow_symlinks_to_blob( 331s pygit2_repo, 331s tree, 331s 'debian/changelog', 331s ) 331s 331s gitubuntu/git_repository_test.py:342: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmp6ghsoxmf/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s gitubuntu/git_repository.py:68: AttributeError 331s ________________ test_follow_symlinks_to_blob_not_found[tree1] _________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmpe934moa3/.git/') 331s tree = 331s 331s @pytest.mark.parametrize('tree', [ 331s Tree({}), 331s Tree({'debian': Tree({})}), 331s Tree({'debian': Tree({'changelog': Symlink('other')})}), 331s Tree({'debian': Tree({'changelog': Symlink('../other')})}), 331s ]) 331s def test_follow_symlinks_to_blob_not_found(pygit2_repo, tree): 331s pygit2_tree = pygit2_repo.get(tree.write(pygit2_repo)) 331s with pytest.raises(KeyError): 331s > target.follow_symlinks_to_blob( 331s pygit2_repo, 331s pygit2_tree, 331s 'debian/changelog', 331s ) 331s 331s gitubuntu/git_repository_test.py:359: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpe934moa3/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s gitubuntu/git_repository.py:68: AttributeError 331s ________________ test_follow_symlinks_to_blob_not_found[tree2] _________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmpcn7aossl/.git/') 331s tree = 331s 331s @pytest.mark.parametrize('tree', [ 331s Tree({}), 331s Tree({'debian': Tree({})}), 331s Tree({'debian': Tree({'changelog': Symlink('other')})}), 331s Tree({'debian': Tree({'changelog': Symlink('../other')})}), 331s ]) 331s def test_follow_symlinks_to_blob_not_found(pygit2_repo, tree): 331s pygit2_tree = pygit2_repo.get(tree.write(pygit2_repo)) 331s with pytest.raises(KeyError): 331s > target.follow_symlinks_to_blob( 331s pygit2_repo, 331s pygit2_tree, 331s 'debian/changelog', 331s ) 331s 331s gitubuntu/git_repository_test.py:359: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpcn7aossl/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s gitubuntu/git_repository.py:68: AttributeError 331s ________________ test_follow_symlinks_to_blob_not_found[tree3] _________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmp8kje1wrv/.git/') 331s tree = 331s 331s @pytest.mark.parametrize('tree', [ 331s Tree({}), 331s Tree({'debian': Tree({})}), 331s Tree({'debian': Tree({'changelog': Symlink('other')})}), 331s Tree({'debian': Tree({'changelog': Symlink('../other')})}), 331s ]) 331s def test_follow_symlinks_to_blob_not_found(pygit2_repo, tree): 331s pygit2_tree = pygit2_repo.get(tree.write(pygit2_repo)) 331s with pytest.raises(KeyError): 331s > target.follow_symlinks_to_blob( 331s pygit2_repo, 331s pygit2_tree, 331s 'debian/changelog', 331s ) 331s 331s gitubuntu/git_repository_test.py:359: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmp8kje1wrv/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s gitubuntu/git_repository.py:68: AttributeError 331s _________________________ test_git_escape_dir_to_tree __________________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmpu0l83x2z/.git/') 331s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_git_escape_dir_to_tree0') 331s 331s def test_git_escape_dir_to_tree(pygit2_repo, tmpdir): 331s tmpdir.mkdir('.git') 331s > tree_hash = target.GitUbuntuRepository.dir_to_tree( 331s pygit2_repo, 331s str(tmpdir), 331s escape=True, 331s ) 331s 331s gitubuntu/git_repository_test.py:668: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s gitubuntu/git_repository.py:2463: in dir_to_tree 331s replacement_oid = cls._add_missing_tree_dirs( 331s gitubuntu/git_repository.py:2397: in _add_missing_tree_dirs 331s tree_builder = cls._create_replacement_tree_builder( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s cls = 331s repo = pygit2.Repository('/tmp/tmpu0l83x2z/.git/') 331s treeish = 331s sub_path = '' 331s 331s @classmethod 331s def _create_replacement_tree_builder(cls, repo, treeish, sub_path): 331s '''Create a replacement TreeBuilder 331s 331s Create a TreeBuilder based on an existing repository, top-level 331s tree-ish and path inside that tree. 331s 331s A sub_path of '' is taken to mean a request for a replacement 331s TreeBuilder for the top level tree. 331s 331s Returns a TreeBuilder object pre-populated with the previous contents. 331s If the path did not previously exist in the tree-ish, then return an 331s empty TreeBuilder instead. 331s ''' 331s 331s > tree = treeish.peel(pygit2.GIT_OBJ_TREE) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s gitubuntu/git_repository.py:2331: AttributeError 331s ______ test_determine_quilt_series_path[tree_data1-debian/patches/series] ______ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmpq1l44_oh/.git/') 331s tree_data = 331s expected_path = 'debian/patches/series' 331s 331s @pytest.mark.parametrize('tree_data,expected_path', [ 331s # Empty tree -> default 331s (Tree({}), 'debian/patches/series'), 331s 331s # Empty debian/patches directory -> default 331s (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), 331s 331s # Only debian/patches/series -> that one 331s ( 331s Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 331s 'debian/patches/series', 331s ), 331s 331s # Only debian/patches/debian.series -> that one 331s ( 331s Tree({'debian': Tree({'patches': Tree({ 331s 'debian.series': Blob(b'') 331s })})}), 331s 'debian/patches/debian.series', 331s ), 331s 331s # Both -> debian.series 331s ( 331s Tree({'debian': Tree({'patches': Tree({ 331s 'debian.series': Blob(b''), 331s 'series': Blob(b''), 331s })})}), 331s 'debian/patches/debian.series', 331s ), 331s ]) 331s def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): 331s tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) 331s > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) 331s 331s gitubuntu/git_repository_test.py:708: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s gitubuntu/git_repository.py:991: in determine_quilt_series_path 331s blob = follow_symlinks_to_blob( 331s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpq1l44_oh/.git/') 331s top_tree_object = 331s search_path = 'debian/patches/debian.series' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s gitubuntu/git_repository.py:68: AttributeError 331s ______ test_determine_quilt_series_path[tree_data2-debian/patches/series] ______ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmp0tuslxmi/.git/') 331s tree_data = 331s expected_path = 'debian/patches/series' 331s 331s @pytest.mark.parametrize('tree_data,expected_path', [ 331s # Empty tree -> default 331s (Tree({}), 'debian/patches/series'), 331s 331s # Empty debian/patches directory -> default 331s (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), 331s 331s # Only debian/patches/series -> that one 331s ( 331s Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 331s 'debian/patches/series', 331s ), 331s 331s # Only debian/patches/debian.series -> that one 331s ( 331s Tree({'debian': Tree({'patches': Tree({ 331s 'debian.series': Blob(b'') 331s })})}), 331s 'debian/patches/debian.series', 331s ), 331s 331s # Both -> debian.series 331s ( 331s Tree({'debian': Tree({'patches': Tree({ 331s 'debian.series': Blob(b''), 331s 'series': Blob(b''), 331s })})}), 331s 'debian/patches/debian.series', 331s ), 331s ]) 331s def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): 331s tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) 331s > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) 331s 331s gitubuntu/git_repository_test.py:708: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s gitubuntu/git_repository.py:991: in determine_quilt_series_path 331s blob = follow_symlinks_to_blob( 331s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmp0tuslxmi/.git/') 331s top_tree_object = 331s search_path = 'debian/patches/debian.series' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s gitubuntu/git_repository.py:68: AttributeError 331s __ test_determine_quilt_series_path[tree_data3-debian/patches/debian.series] ___ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmpp3rqwx6l/.git/') 331s tree_data = 331s expected_path = 'debian/patches/debian.series' 331s 331s @pytest.mark.parametrize('tree_data,expected_path', [ 331s # Empty tree -> default 331s (Tree({}), 'debian/patches/series'), 331s 331s # Empty debian/patches directory -> default 331s (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), 331s 331s # Only debian/patches/series -> that one 331s ( 331s Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 331s 'debian/patches/series', 331s ), 331s 331s # Only debian/patches/debian.series -> that one 331s ( 331s Tree({'debian': Tree({'patches': Tree({ 331s 'debian.series': Blob(b'') 331s })})}), 331s 'debian/patches/debian.series', 331s ), 331s 331s # Both -> debian.series 331s ( 331s Tree({'debian': Tree({'patches': Tree({ 331s 'debian.series': Blob(b''), 331s 'series': Blob(b''), 331s })})}), 331s 'debian/patches/debian.series', 331s ), 331s ]) 331s def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): 331s tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) 331s > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) 331s 331s gitubuntu/git_repository_test.py:708: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s gitubuntu/git_repository.py:991: in determine_quilt_series_path 331s blob = follow_symlinks_to_blob( 331s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpp3rqwx6l/.git/') 331s top_tree_object = 331s search_path = 'debian/patches/debian.series' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s gitubuntu/git_repository.py:68: AttributeError 331s __ test_determine_quilt_series_path[tree_data4-debian/patches/debian.series] ___ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmpya6hqh9_/.git/') 331s tree_data = 331s expected_path = 'debian/patches/debian.series' 331s 331s @pytest.mark.parametrize('tree_data,expected_path', [ 331s # Empty tree -> default 331s (Tree({}), 'debian/patches/series'), 331s 331s # Empty debian/patches directory -> default 331s (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), 331s 331s # Only debian/patches/series -> that one 331s ( 331s Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 331s 'debian/patches/series', 331s ), 331s 331s # Only debian/patches/debian.series -> that one 331s ( 331s Tree({'debian': Tree({'patches': Tree({ 331s 'debian.series': Blob(b'') 331s })})}), 331s 'debian/patches/debian.series', 331s ), 331s 331s # Both -> debian.series 331s ( 331s Tree({'debian': Tree({'patches': Tree({ 331s 'debian.series': Blob(b''), 331s 'series': Blob(b''), 331s })})}), 331s 'debian/patches/debian.series', 331s ), 331s ]) 331s def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): 331s tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) 331s > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) 331s 331s gitubuntu/git_repository_test.py:708: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s gitubuntu/git_repository.py:991: in determine_quilt_series_path 331s blob = follow_symlinks_to_blob( 331s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpya6hqh9_/.git/') 331s top_tree_object = 331s search_path = 'debian/patches/debian.series' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s gitubuntu/git_repository.py:68: AttributeError 331s ________________________________ test_quilt_env ________________________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmp8ixd4vcf/.git/') 331s 331s def test_quilt_env(pygit2_repo): 331s tree_builder = Tree({'debian': 331s Tree({'patches': Tree({'debian.series': Blob(b'')})}) 331s }) 331s tree_obj = pygit2_repo.get(tree_builder.write(pygit2_repo)) 331s > env = target.quilt_env(pygit2_repo, tree_obj) 331s 331s gitubuntu/git_repository_test.py:717: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s gitubuntu/git_repository.py:1022: in quilt_env 331s 'QUILT_SERIES': determine_quilt_series_path(pygit2_repo, treeish), 331s gitubuntu/git_repository.py:991: in determine_quilt_series_path 331s blob = follow_symlinks_to_blob( 331s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmp8ixd4vcf/.git/') 331s top_tree_object = 331s search_path = 'debian/patches/debian.series' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s gitubuntu/git_repository.py:68: AttributeError 331s _____________________________ test_repo_quilt_env ______________________________ 331s 331s repo = 331s 331s def test_repo_quilt_env(repo): 331s tree_builder = Tree({'debian': 331s Tree({'patches': Tree({'debian.series': Blob(b'')})}) 331s }) 331s tree_obj = repo.raw_repo.get(tree_builder.write(repo.raw_repo)) 331s > env = repo.quilt_env(tree_obj) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository_test.py:732: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:2575: in quilt_env 331s env.update(quilt_env(self.raw_repo, treeish)) 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1022: in quilt_env 331s 'QUILT_SERIES': determine_quilt_series_path(pygit2_repo, treeish), 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:991: in determine_quilt_series_path 331s blob = follow_symlinks_to_blob( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpd54jd8r9/.git/') 331s top_tree_object = 331s search_path = 'debian/patches/debian.series' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s _____________________ test_repo_quilt_env_from_treeish_str _____________________ 331s 331s repo = 331s 331s def test_repo_quilt_env_from_treeish_str(repo): 331s tree_builder = Tree({'debian': 331s Tree({'patches': Tree({'debian.series': Blob(b'')})}) 331s }) 331s tree_obj = repo.raw_repo.get(tree_builder.write(repo.raw_repo)) 331s > env = repo.quilt_env_from_treeish_str(str(tree_obj.id)) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository_test.py:757: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:2589: in quilt_env_from_treeish_str 331s return self.quilt_env(self.raw_repo.get(treeish_str)) 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:2575: in quilt_env 331s env.update(quilt_env(self.raw_repo, treeish)) 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1022: in quilt_env 331s 'QUILT_SERIES': determine_quilt_series_path(pygit2_repo, treeish), 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:991: in determine_quilt_series_path 331s blob = follow_symlinks_to_blob( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpmxcv6pkq/.git/') 331s top_tree_object = 331s search_path = 'debian/patches/debian.series' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s _ test_repo_find_ubuntu_merge[Common case-input_data0-pkg/import/1-1ubuntu1-pkg/import/2-1-pkg/import/1-1] _ 331s 331s description = 'Common case' 331s repo = 331s input_data = 331s old_ubuntu = 'pkg/import/1-1ubuntu1', new_debian = 'pkg/import/2-1' 331s expected = 'pkg/import/1-1' 331s 331s @pytest.mark.parametrize( 331s 'description, input_data, old_ubuntu, new_debian, expected', 331s [ 331s ( 331s 'Common case', 331s Repo( 331s commits=[ 331s Commit.from_spec( 331s name='old/debian' 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('old/debian')], 331s name='old/ubuntu', 331s changelog_versions=['1-1ubuntu1', '1-1'], 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('old/debian')], 331s name='new/debian', 331s changelog_versions=['2-1', '1-1'], 331s ), 331s ], 331s tags={ 331s 'pkg/import/1-1': Placeholder('old/debian'), 331s 'pkg/import/1-1ubuntu1': Placeholder('old/ubuntu'), 331s 'pkg/import/2-1': Placeholder('new/debian'), 331s }, 331s ), 331s 'pkg/import/1-1ubuntu1', 331s 'pkg/import/2-1', 331s 'pkg/import/1-1', 331s ), 331s ( 331s 'Ubuntu delta based on a NMU', 331s Repo( 331s commits=[ 331s Commit.from_spec( 331s name='fork_point' 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('fork_point')], 331s name='old/debian', 331s changelog_versions=['1-1.1', '1-1'], 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('old/debian')], 331s name='old/ubuntu', 331s changelog_versions=['1-1.1ubuntu1', '1-1.1', '1-1'], 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('fork_point')], 331s name='new/debian', 331s changelog_versions=['2-1', '1-1'], 331s ), 331s ], 331s tags={ 331s 'pkg/import/1-1': Placeholder('fork_point'), 331s 'pkg/import/1-1.1': Placeholder('old/debian'), 331s 'pkg/import/1-1.1ubuntu1': Placeholder('old/ubuntu'), 331s 'pkg/import/2-1': Placeholder('new/debian'), 331s }, 331s ), 331s 'pkg/import/1-1.1ubuntu1', 331s 'pkg/import/2-1', 331s 'pkg/import/1-1.1', 331s ), 331s ( 331s 'Ubuntu upstream version head of Debian', 331s Repo( 331s commits=[ 331s Commit.from_spec( 331s name='old/debian' 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('old/debian')], 331s name='mid_ubuntu', 331s changelog_versions=['1-1ubuntu1', '1-1'], 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('mid_ubuntu')], 331s name='old/ubuntu', 331s changelog_versions=['2-0ubuntu1', '1-1ubuntu1', '1-1'], 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('old/debian')], 331s name='new/debian', 331s changelog_versions=['3-1', '1-1'], 331s ), 331s ], 331s tags={ 331s 'pkg/import/1-1': Placeholder('old/debian'), 331s 'pkg/import/1-1ubuntu1': Placeholder('mid_ubuntu'), 331s 'pkg/import/2-0ubuntu1': Placeholder('old/ubuntu'), 331s 'pkg/import/3-1': Placeholder('new/debian'), 331s }, 331s ), 331s 'pkg/import/2-0ubuntu1', 331s 'pkg/import/3-1', 331s 'pkg/import/1-1', 331s ), 331s ], 331s ) 331s def test_repo_find_ubuntu_merge( 331s description, 331s repo, 331s input_data, 331s old_ubuntu, 331s new_debian, 331s expected, 331s ): 331s > input_data.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository_test.py:889: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpt07gij8a/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_2.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_2-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_2-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ 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] _ 331s 331s description = 'Ubuntu delta based on a NMU' 331s repo = 331s input_data = 331s old_ubuntu = 'pkg/import/1-1.1ubuntu1', new_debian = 'pkg/import/2-1' 331s expected = 'pkg/import/1-1.1' 331s 331s @pytest.mark.parametrize( 331s 'description, input_data, old_ubuntu, new_debian, expected', 331s [ 331s ( 331s 'Common case', 331s Repo( 331s commits=[ 331s Commit.from_spec( 331s name='old/debian' 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('old/debian')], 331s name='old/ubuntu', 331s changelog_versions=['1-1ubuntu1', '1-1'], 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('old/debian')], 331s name='new/debian', 331s changelog_versions=['2-1', '1-1'], 331s ), 331s ], 331s tags={ 331s 'pkg/import/1-1': Placeholder('old/debian'), 331s 'pkg/import/1-1ubuntu1': Placeholder('old/ubuntu'), 331s 'pkg/import/2-1': Placeholder('new/debian'), 331s }, 331s ), 331s 'pkg/import/1-1ubuntu1', 331s 'pkg/import/2-1', 331s 'pkg/import/1-1', 331s ), 331s ( 331s 'Ubuntu delta based on a NMU', 331s Repo( 331s commits=[ 331s Commit.from_spec( 331s name='fork_point' 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('fork_point')], 331s name='old/debian', 331s changelog_versions=['1-1.1', '1-1'], 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('old/debian')], 331s name='old/ubuntu', 331s changelog_versions=['1-1.1ubuntu1', '1-1.1', '1-1'], 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('fork_point')], 331s name='new/debian', 331s changelog_versions=['2-1', '1-1'], 331s ), 331s ], 331s tags={ 331s 'pkg/import/1-1': Placeholder('fork_point'), 331s 'pkg/import/1-1.1': Placeholder('old/debian'), 331s 'pkg/import/1-1.1ubuntu1': Placeholder('old/ubuntu'), 331s 'pkg/import/2-1': Placeholder('new/debian'), 331s }, 331s ), 331s 'pkg/import/1-1.1ubuntu1', 331s 'pkg/import/2-1', 331s 'pkg/import/1-1.1', 331s ), 331s ( 331s 'Ubuntu upstream version head of Debian', 331s Repo( 331s commits=[ 331s Commit.from_spec( 331s name='old/debian' 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('old/debian')], 331s name='mid_ubuntu', 331s changelog_versions=['1-1ubuntu1', '1-1'], 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('mid_ubuntu')], 331s name='old/ubuntu', 331s changelog_versions=['2-0ubuntu1', '1-1ubuntu1', '1-1'], 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('old/debian')], 331s name='new/debian', 331s changelog_versions=['3-1', '1-1'], 331s ), 331s ], 331s tags={ 331s 'pkg/import/1-1': Placeholder('old/debian'), 331s 'pkg/import/1-1ubuntu1': Placeholder('mid_ubuntu'), 331s 'pkg/import/2-0ubuntu1': Placeholder('old/ubuntu'), 331s 'pkg/import/3-1': Placeholder('new/debian'), 331s }, 331s ), 331s 'pkg/import/2-0ubuntu1', 331s 'pkg/import/3-1', 331s 'pkg/import/1-1', 331s ), 331s ], 331s ) 331s def test_repo_find_ubuntu_merge( 331s description, 331s repo, 331s input_data, 331s old_ubuntu, 331s new_debian, 331s expected, 331s ): 331s > input_data.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository_test.py:889: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpbypzv_o6/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1ubuntu1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1ubuntu1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_2.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_2-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_2-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ 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] _ 331s 331s description = 'Ubuntu upstream version head of Debian' 331s repo = 331s input_data = 331s old_ubuntu = 'pkg/import/2-0ubuntu1', new_debian = 'pkg/import/3-1' 331s expected = 'pkg/import/1-1' 331s 331s @pytest.mark.parametrize( 331s 'description, input_data, old_ubuntu, new_debian, expected', 331s [ 331s ( 331s 'Common case', 331s Repo( 331s commits=[ 331s Commit.from_spec( 331s name='old/debian' 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('old/debian')], 331s name='old/ubuntu', 331s changelog_versions=['1-1ubuntu1', '1-1'], 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('old/debian')], 331s name='new/debian', 331s changelog_versions=['2-1', '1-1'], 331s ), 331s ], 331s tags={ 331s 'pkg/import/1-1': Placeholder('old/debian'), 331s 'pkg/import/1-1ubuntu1': Placeholder('old/ubuntu'), 331s 'pkg/import/2-1': Placeholder('new/debian'), 331s }, 331s ), 331s 'pkg/import/1-1ubuntu1', 331s 'pkg/import/2-1', 331s 'pkg/import/1-1', 331s ), 331s ( 331s 'Ubuntu delta based on a NMU', 331s Repo( 331s commits=[ 331s Commit.from_spec( 331s name='fork_point' 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('fork_point')], 331s name='old/debian', 331s changelog_versions=['1-1.1', '1-1'], 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('old/debian')], 331s name='old/ubuntu', 331s changelog_versions=['1-1.1ubuntu1', '1-1.1', '1-1'], 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('fork_point')], 331s name='new/debian', 331s changelog_versions=['2-1', '1-1'], 331s ), 331s ], 331s tags={ 331s 'pkg/import/1-1': Placeholder('fork_point'), 331s 'pkg/import/1-1.1': Placeholder('old/debian'), 331s 'pkg/import/1-1.1ubuntu1': Placeholder('old/ubuntu'), 331s 'pkg/import/2-1': Placeholder('new/debian'), 331s }, 331s ), 331s 'pkg/import/1-1.1ubuntu1', 331s 'pkg/import/2-1', 331s 'pkg/import/1-1.1', 331s ), 331s ( 331s 'Ubuntu upstream version head of Debian', 331s Repo( 331s commits=[ 331s Commit.from_spec( 331s name='old/debian' 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('old/debian')], 331s name='mid_ubuntu', 331s changelog_versions=['1-1ubuntu1', '1-1'], 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('mid_ubuntu')], 331s name='old/ubuntu', 331s changelog_versions=['2-0ubuntu1', '1-1ubuntu1', '1-1'], 331s ), 331s Commit.from_spec( 331s parents=[Placeholder('old/debian')], 331s name='new/debian', 331s changelog_versions=['3-1', '1-1'], 331s ), 331s ], 331s tags={ 331s 'pkg/import/1-1': Placeholder('old/debian'), 331s 'pkg/import/1-1ubuntu1': Placeholder('mid_ubuntu'), 331s 'pkg/import/2-0ubuntu1': Placeholder('old/ubuntu'), 331s 'pkg/import/3-1': Placeholder('new/debian'), 331s }, 331s ), 331s 'pkg/import/2-0ubuntu1', 331s 'pkg/import/3-1', 331s 'pkg/import/1-1', 331s ), 331s ], 331s ) 331s def test_repo_find_ubuntu_merge( 331s description, 331s repo, 331s input_data, 331s old_ubuntu, 331s new_debian, 331s expected, 331s ): 331s > input_data.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository_test.py:889: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpw9uuy39n/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_2.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_2-0ubuntu1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_2-0ubuntu1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_3.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_3-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_3-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _______________________________ test_commit_tree _______________________________ 331s 331s repo = 331s 331s def test_commit_tree(repo): 331s # Construct a repository with an initial commit on the master branch so 331s # that we can verify later parentage and lack of branch movement 331s parent_commit_oid = Repo( 331s commits=[Commit(name='master')], 331s branches={'master': Placeholder('master')} 331s ).write(repo.raw_repo) 331s repo.raw_repo.lookup_reference('HEAD').set_target('refs/heads/master') 331s 331s # Construct a tree inside the repository with a debian/changelog in it to 331s # feed to the method under test 331s test_changelog_path = os.path.join( 331s pkg_resources.resource_filename('gitubuntu', 'changelog_tests'), 331s 'test_date_1', 331s ) 331s with open(test_changelog_path, 'rb') as f: 331s test_changelog_bytes = f.read() 331s test_changelog_blob = Blob(test_changelog_bytes) 331s source_tree = Tree({'debian': Tree({'changelog': test_changelog_blob})}) 331s source_tree_oid = source_tree.write(repo.raw_repo) 331s 331s # Call the method under test 331s > commit_oid = repo.commit_source_tree( 331s tree=source_tree_oid, 331s parents=[parent_commit_oid], 331s log_message='test_commit_msg', 331s commit_date=datetime.datetime( 331s 1971, # year 331s 2, # month 331s 3, # day 331s 4, # hours 331s 5, # minutes 331s 6, # seconds 331s 7, # milliseconds (this should get truncated down to 0) 331s datetime.timezone(datetime.timedelta(hours=-8)) 331s ), 331s ) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository_test.py:993: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:2299: in commit_source_tree 331s changelog = self.get_changelog_from_treeish(str(tree)) 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 331s return Changelog.from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:569: in from_treeish 331s blob = follow_symlinks_to_blob( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmptc_g563i/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s _____________________ test_descendant_of[root-root-False] ______________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmpxnuvo0i1/.git/'), a = 'root' 331s b = 'root', expected = False 331s 331s @pytest.mark.parametrize(['a', 'b', 'expected'], 331s [ 331s ('root', 'root', False), 331s ('child1', 'root', True), 331s ('root', 'child1', False), 331s ('grandchild1', 'root', True), 331s ('child1', 'child2', False), 331s ('root', 'disjoint', False), 331s ] 331s ) 331s def test_descendant_of(pygit2_repo, a, b, expected): 331s """ 331s General test for pygit2.Repository.descendant_of(). 331s 331s This test was formerly for a temporary alternative implementation of 331s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 331s use until we updated our pinning to use a newer version of pygit2 that 331s included the pygit2.Repository.descendant_of() method. After the pinning 331s was removed and this implementation replacement took place, we kept the 331s test to ensure that actual behaviour did not change. 331s 331s This unit tests validate_upload_tag() for various parameterized cases. The 331s paramater sets assume the repository structure encoded in the Repo() call 331s below. 331s 331s :param pygit2.Repository pygit2_repo: fixture providing a temporary 331s pygit2.Repository instance to use 331s :param str a: tag name of the first commit to pass to descendant_of() 331s :param str b: tag name of the second commit to pass to descendant_of() 331s :param bool expected: the expected result of descendant_of() 331s """ 331s Repo( 331s # Unique message parameters are used in each entry here in order to 331s # ensure that otherwise-identical commits do not end up being the same 331s # commit (with the same hash, etc). 331s commits=[ 331s Commit(name='root', message='1'), 331s Commit(name='child1', parents=[Placeholder('root')], message='2'), 331s Commit(name='child2', parents=[Placeholder('root')], message='3'), 331s Commit( 331s name='grandchild1', 331s parents=[Placeholder('child1')], 331s message='4' 331s ), 331s Commit(name='disjoint', message='5'), 331s ], 331s tags={ 331s 'root': Placeholder('root'), 331s 'child1': Placeholder('child1'), 331s 'child2': Placeholder('child2'), 331s 'grandchild1': Placeholder('grandchild1'), 331s 'disjoint': Placeholder('disjoint'), 331s } 331s > ).write(pygit2_repo) 331s 331s gitubuntu/git_repository_test.py:1099: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpxnuvo0i1/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s gitubuntu/repo_builder.py:389: AttributeError 331s _____________________ test_descendant_of[child1-root-True] _____________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmp26y4qwrk/.git/'), a = 'child1' 331s b = 'root', expected = True 331s 331s @pytest.mark.parametrize(['a', 'b', 'expected'], 331s [ 331s ('root', 'root', False), 331s ('child1', 'root', True), 331s ('root', 'child1', False), 331s ('grandchild1', 'root', True), 331s ('child1', 'child2', False), 331s ('root', 'disjoint', False), 331s ] 331s ) 331s def test_descendant_of(pygit2_repo, a, b, expected): 331s """ 331s General test for pygit2.Repository.descendant_of(). 331s 331s This test was formerly for a temporary alternative implementation of 331s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 331s use until we updated our pinning to use a newer version of pygit2 that 331s included the pygit2.Repository.descendant_of() method. After the pinning 331s was removed and this implementation replacement took place, we kept the 331s test to ensure that actual behaviour did not change. 331s 331s This unit tests validate_upload_tag() for various parameterized cases. The 331s paramater sets assume the repository structure encoded in the Repo() call 331s below. 331s 331s :param pygit2.Repository pygit2_repo: fixture providing a temporary 331s pygit2.Repository instance to use 331s :param str a: tag name of the first commit to pass to descendant_of() 331s :param str b: tag name of the second commit to pass to descendant_of() 331s :param bool expected: the expected result of descendant_of() 331s """ 331s Repo( 331s # Unique message parameters are used in each entry here in order to 331s # ensure that otherwise-identical commits do not end up being the same 331s # commit (with the same hash, etc). 331s commits=[ 331s Commit(name='root', message='1'), 331s Commit(name='child1', parents=[Placeholder('root')], message='2'), 331s Commit(name='child2', parents=[Placeholder('root')], message='3'), 331s Commit( 331s name='grandchild1', 331s parents=[Placeholder('child1')], 331s message='4' 331s ), 331s Commit(name='disjoint', message='5'), 331s ], 331s tags={ 331s 'root': Placeholder('root'), 331s 'child1': Placeholder('child1'), 331s 'child2': Placeholder('child2'), 331s 'grandchild1': Placeholder('grandchild1'), 331s 'disjoint': Placeholder('disjoint'), 331s } 331s > ).write(pygit2_repo) 331s 331s gitubuntu/git_repository_test.py:1099: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmp26y4qwrk/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s gitubuntu/repo_builder.py:389: AttributeError 331s ____________________ test_descendant_of[root-child1-False] _____________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmpdiro9941/.git/'), a = 'root' 331s b = 'child1', expected = False 331s 331s @pytest.mark.parametrize(['a', 'b', 'expected'], 331s [ 331s ('root', 'root', False), 331s ('child1', 'root', True), 331s ('root', 'child1', False), 331s ('grandchild1', 'root', True), 331s ('child1', 'child2', False), 331s ('root', 'disjoint', False), 331s ] 331s ) 331s def test_descendant_of(pygit2_repo, a, b, expected): 331s """ 331s General test for pygit2.Repository.descendant_of(). 331s 331s This test was formerly for a temporary alternative implementation of 331s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 331s use until we updated our pinning to use a newer version of pygit2 that 331s included the pygit2.Repository.descendant_of() method. After the pinning 331s was removed and this implementation replacement took place, we kept the 331s test to ensure that actual behaviour did not change. 331s 331s This unit tests validate_upload_tag() for various parameterized cases. The 331s paramater sets assume the repository structure encoded in the Repo() call 331s below. 331s 331s :param pygit2.Repository pygit2_repo: fixture providing a temporary 331s pygit2.Repository instance to use 331s :param str a: tag name of the first commit to pass to descendant_of() 331s :param str b: tag name of the second commit to pass to descendant_of() 331s :param bool expected: the expected result of descendant_of() 331s """ 331s Repo( 331s # Unique message parameters are used in each entry here in order to 331s # ensure that otherwise-identical commits do not end up being the same 331s # commit (with the same hash, etc). 331s commits=[ 331s Commit(name='root', message='1'), 331s Commit(name='child1', parents=[Placeholder('root')], message='2'), 331s Commit(name='child2', parents=[Placeholder('root')], message='3'), 331s Commit( 331s name='grandchild1', 331s parents=[Placeholder('child1')], 331s message='4' 331s ), 331s Commit(name='disjoint', message='5'), 331s ], 331s tags={ 331s 'root': Placeholder('root'), 331s 'child1': Placeholder('child1'), 331s 'child2': Placeholder('child2'), 331s 'grandchild1': Placeholder('grandchild1'), 331s 'disjoint': Placeholder('disjoint'), 331s } 331s > ).write(pygit2_repo) 331s 331s gitubuntu/git_repository_test.py:1099: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpdiro9941/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s gitubuntu/repo_builder.py:389: AttributeError 331s __________________ test_descendant_of[grandchild1-root-True] ___________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmpiftp1bkf/.git/'), a = 'grandchild1' 331s b = 'root', expected = True 331s 331s @pytest.mark.parametrize(['a', 'b', 'expected'], 331s [ 331s ('root', 'root', False), 331s ('child1', 'root', True), 331s ('root', 'child1', False), 331s ('grandchild1', 'root', True), 331s ('child1', 'child2', False), 331s ('root', 'disjoint', False), 331s ] 331s ) 331s def test_descendant_of(pygit2_repo, a, b, expected): 331s """ 331s General test for pygit2.Repository.descendant_of(). 331s 331s This test was formerly for a temporary alternative implementation of 331s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 331s use until we updated our pinning to use a newer version of pygit2 that 331s included the pygit2.Repository.descendant_of() method. After the pinning 331s was removed and this implementation replacement took place, we kept the 331s test to ensure that actual behaviour did not change. 331s 331s This unit tests validate_upload_tag() for various parameterized cases. The 331s paramater sets assume the repository structure encoded in the Repo() call 331s below. 331s 331s :param pygit2.Repository pygit2_repo: fixture providing a temporary 331s pygit2.Repository instance to use 331s :param str a: tag name of the first commit to pass to descendant_of() 331s :param str b: tag name of the second commit to pass to descendant_of() 331s :param bool expected: the expected result of descendant_of() 331s """ 331s Repo( 331s # Unique message parameters are used in each entry here in order to 331s # ensure that otherwise-identical commits do not end up being the same 331s # commit (with the same hash, etc). 331s commits=[ 331s Commit(name='root', message='1'), 331s Commit(name='child1', parents=[Placeholder('root')], message='2'), 331s Commit(name='child2', parents=[Placeholder('root')], message='3'), 331s Commit( 331s name='grandchild1', 331s parents=[Placeholder('child1')], 331s message='4' 331s ), 331s Commit(name='disjoint', message='5'), 331s ], 331s tags={ 331s 'root': Placeholder('root'), 331s 'child1': Placeholder('child1'), 331s 'child2': Placeholder('child2'), 331s 'grandchild1': Placeholder('grandchild1'), 331s 'disjoint': Placeholder('disjoint'), 331s } 331s > ).write(pygit2_repo) 331s 331s gitubuntu/git_repository_test.py:1099: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpiftp1bkf/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s gitubuntu/repo_builder.py:389: AttributeError 331s ___________________ test_descendant_of[child1-child2-False] ____________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmpz2wiczsu/.git/'), a = 'child1' 331s b = 'child2', expected = False 331s 331s @pytest.mark.parametrize(['a', 'b', 'expected'], 331s [ 331s ('root', 'root', False), 331s ('child1', 'root', True), 331s ('root', 'child1', False), 331s ('grandchild1', 'root', True), 331s ('child1', 'child2', False), 331s ('root', 'disjoint', False), 331s ] 331s ) 331s def test_descendant_of(pygit2_repo, a, b, expected): 331s """ 331s General test for pygit2.Repository.descendant_of(). 331s 331s This test was formerly for a temporary alternative implementation of 331s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 331s use until we updated our pinning to use a newer version of pygit2 that 331s included the pygit2.Repository.descendant_of() method. After the pinning 331s was removed and this implementation replacement took place, we kept the 331s test to ensure that actual behaviour did not change. 331s 331s This unit tests validate_upload_tag() for various parameterized cases. The 331s paramater sets assume the repository structure encoded in the Repo() call 331s below. 331s 331s :param pygit2.Repository pygit2_repo: fixture providing a temporary 331s pygit2.Repository instance to use 331s :param str a: tag name of the first commit to pass to descendant_of() 331s :param str b: tag name of the second commit to pass to descendant_of() 331s :param bool expected: the expected result of descendant_of() 331s """ 331s Repo( 331s # Unique message parameters are used in each entry here in order to 331s # ensure that otherwise-identical commits do not end up being the same 331s # commit (with the same hash, etc). 331s commits=[ 331s Commit(name='root', message='1'), 331s Commit(name='child1', parents=[Placeholder('root')], message='2'), 331s Commit(name='child2', parents=[Placeholder('root')], message='3'), 331s Commit( 331s name='grandchild1', 331s parents=[Placeholder('child1')], 331s message='4' 331s ), 331s Commit(name='disjoint', message='5'), 331s ], 331s tags={ 331s 'root': Placeholder('root'), 331s 'child1': Placeholder('child1'), 331s 'child2': Placeholder('child2'), 331s 'grandchild1': Placeholder('grandchild1'), 331s 'disjoint': Placeholder('disjoint'), 331s } 331s > ).write(pygit2_repo) 331s 331s gitubuntu/git_repository_test.py:1099: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpz2wiczsu/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s gitubuntu/repo_builder.py:389: AttributeError 331s ___________________ test_descendant_of[root-disjoint-False] ____________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmpwr9pccap/.git/'), a = 'root' 331s b = 'disjoint', expected = False 331s 331s @pytest.mark.parametrize(['a', 'b', 'expected'], 331s [ 331s ('root', 'root', False), 331s ('child1', 'root', True), 331s ('root', 'child1', False), 331s ('grandchild1', 'root', True), 331s ('child1', 'child2', False), 331s ('root', 'disjoint', False), 331s ] 331s ) 331s def test_descendant_of(pygit2_repo, a, b, expected): 331s """ 331s General test for pygit2.Repository.descendant_of(). 331s 331s This test was formerly for a temporary alternative implementation of 331s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 331s use until we updated our pinning to use a newer version of pygit2 that 331s included the pygit2.Repository.descendant_of() method. After the pinning 331s was removed and this implementation replacement took place, we kept the 331s test to ensure that actual behaviour did not change. 331s 331s This unit tests validate_upload_tag() for various parameterized cases. The 331s paramater sets assume the repository structure encoded in the Repo() call 331s below. 331s 331s :param pygit2.Repository pygit2_repo: fixture providing a temporary 331s pygit2.Repository instance to use 331s :param str a: tag name of the first commit to pass to descendant_of() 331s :param str b: tag name of the second commit to pass to descendant_of() 331s :param bool expected: the expected result of descendant_of() 331s """ 331s Repo( 331s # Unique message parameters are used in each entry here in order to 331s # ensure that otherwise-identical commits do not end up being the same 331s # commit (with the same hash, etc). 331s commits=[ 331s Commit(name='root', message='1'), 331s Commit(name='child1', parents=[Placeholder('root')], message='2'), 331s Commit(name='child2', parents=[Placeholder('root')], message='3'), 331s Commit( 331s name='grandchild1', 331s parents=[Placeholder('child1')], 331s message='4' 331s ), 331s Commit(name='disjoint', message='5'), 331s ], 331s tags={ 331s 'root': Placeholder('root'), 331s 'child1': Placeholder('child1'), 331s 'child2': Placeholder('child2'), 331s 'grandchild1': Placeholder('grandchild1'), 331s 'disjoint': Placeholder('disjoint'), 331s } 331s > ).write(pygit2_repo) 331s 331s gitubuntu/git_repository_test.py:1099: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpwr9pccap/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s gitubuntu/repo_builder.py:389: AttributeError 331s _______________________________ test_create_tag ________________________________ 331s 331s repo = 331s 331s def test_create_tag(repo): 331s """create_tag() should create a tag 331s 331s :param GitUbuntuRepository repo: fixture providing a temporary 331s GitUbuntuRepository instance to use 331s """ 331s Repo( 331s commits=[Commit(name='root')], 331s tags={'root': Placeholder('root')}, 331s > ).write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository_test.py:1127: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpy07p513k/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s __________________________ test_get_all_reimport_tags __________________________ 331s 331s repo = 331s 331s def test_get_all_reimport_tags(repo): 331s """get_all_reimport_tags() should return only matching reimport tags 331s 331s :param GitUbuntuRepository repo: fixture providing a temporary 331s GitUbuntuRepository instance to use 331s """ 331s Repo( 331s commits=[Commit(name='root')], 331s tags={ 331s 'importer/reimport/import/1/0': Placeholder('root'), 331s 'importer/reimport/import/1/1': Placeholder('root'), 331s 331s # This entry must not be identified as one of version 1's reimport 331s # tags, even though it shares the same base prefix. 331s 'importer/reimport/import/11/0': Placeholder('root'), 331s }, 331s > ).write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository_test.py:1165: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmp9h2bo7pj/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ______________________________ test_get_head_info ______________________________ 331s 331s repo = 331s 331s def test_get_head_info(repo): 331s """get_head_info() extracts expected commit and version info from the head 331s commit 331s """ 331s Repo( 331s commits=[ 331s Commit(name='foo', tree=SourceTree(source=Source())), 331s ], 331s branches={ 331s 'importer/ubuntu/foo': Placeholder('foo'), 331s 'importer/debian/bar': Placeholder('foo'), 331s 'other/ubuntu/baz': Placeholder('foo'), 331s }, 331s ).write(repo.raw_repo) 331s foo_commit_id = ( 331s repo.raw_repo 331s .lookup_reference('refs/heads/importer/ubuntu/foo') 331s .peel(pygit2.Commit).id 331s ) 331s > assert repo.get_head_info('ubuntu', 'importer') == { 331s 'importer/ubuntu/foo': HeadInfoItem( 331s version='1-1', 331s commit_time=0, 331s commit_id=foo_commit_id, 331s ), 331s } 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository_test.py:1193: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1952: in get_head_info 331s self.get_changelog_versions_from_treeish(str(head.peel().id)) 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1888: in get_changelog_versions_from_treeish 331s changelog = self.get_changelog_from_treeish(treeish_string) 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 331s return Changelog.from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:569: in from_treeish 331s blob = follow_symlinks_to_blob( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpnyamsll8/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_import_unapplied_spi_tags[input_repo0-expected_output_refs0-validation_repo_delta0-validation_repo_expected_identical_refs0-True] _ 331s 331s get_import_commit_msg_mock = 331s get_import_tag_msg_mock = 331s repo = 331s input_repo = 331s 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'] 331s validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }} 331s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty-proposed', 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1'] 331s reuse = True 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'expected_output_refs', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s 'reuse', 331s ], 331s [ 331s # 1) An existing import tag (or reimport tag) with the same Git tree 331s # - Reuse import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='import')], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('import'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='import tag contents', 331s ), 331s Commit.from_spec(name='reimport'), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 2) An existing import tag with a different Git tree and an existing 331s # upload tag with the same Git tree 331s # - Reuse upload tag, create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s Commit.from_spec(name='upload'), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-1': Placeholder('upload'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('upload'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('upload'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 3) An existing import tag with a different Git tree and an existing 331s # upload tag with a different Git tree 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s Commit.from_spec( 331s name='upload', 331s mutate='The upload tag contents', 331s ), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-1': Placeholder('upload'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [Commit.from_spec( 331s name='reimport', 331s message='Test commit (new)', 331s )], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 4) An existing import tag with a different Git tree and no upload tag 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [Commit.from_spec( 331s name='reimport', 331s message='Test commit (new)', 331s )], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 5) No import tag and an existing upload tag with the same Git tree 331s # - Reuse upload tag, create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='upload')], 331s tags={'importer/upload/1-1': Placeholder('upload')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('upload'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('upload'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 6) No import tag and an existing upload tag with a different Git tree 331s # - Create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='upload', 331s mutate='The upload tag contents', 331s ), 331s ], 331s tags={'importer/upload/1-1': Placeholder('upload')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='publish', 331s message='Test commit (new)', 331s ), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('publish'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('publish'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 7) No import tags or upload tags 331s # - Create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo(), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='publish', 331s message='Test commit (new)', 331s ), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('publish'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('publish'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1' 331s ], 331s # reuse: 331s False, 331s ), 331s ] 331s ) 331s @patch('gitubuntu.importer.get_import_tag_msg') 331s @patch('gitubuntu.importer.get_import_commit_msg') 331s def test_import_unapplied_spi_tags( 331s get_import_commit_msg_mock, 331s get_import_tag_msg_mock, 331s repo, 331s input_repo, 331s expected_output_refs, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s reuse, 331s ): 331s """Test that unapplied tags are correctly created, adjusted and/or reused 331s 331s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 331s that determines the commit message to use for a given import 331s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 331s that determines the tag message to use for a given import 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param list(str) expected_output_refs: refs that must exist in the output 331s repository 331s :param dict validation_repo_delta: how to transform the input 331s repository into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 331s one supplied by the input repository (assumed to have a commit message 331s of "Test commit") and not one created by the importer in this run 331s (arranged by this test to have a different commit message) 331s 331s The input repository data is written into the output repository and then a 331s fake non-native source package publication of version 1-1 in the Trusty 331s release pocket is imported into it by calling import_unapplied_spi() 331s directly. expected_output_refs, validation_repo_expected_identical_refs and 331s reuse are then asserted. It is further asserted that no other refs exist in 331s the output repository except for those listed in expected_output_refs and 331s validation_repo_expected_identical_refs. 331s """ 331s # Match the repo_builder objects 331s get_import_tag_msg_mock.return_value = 'Test tag' 331s # Importantly, the following commit message must not be the same as the 331s # commit messages used by the test input repository commits, so that we can 331s # later detect the difference between commits that were already there and 331s # new commits created by the importer for the purposes of asserting the 331s # reuse parameter correctly. 331s get_import_commit_msg_mock.return_value = b'Test commit (new)' 331s 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_tag_test.py:463: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmp18eipbsh/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_import_unapplied_spi_tags[input_repo1-expected_output_refs1-validation_repo_delta1-validation_repo_expected_identical_refs1-True] _ 331s 331s get_import_commit_msg_mock = 331s get_import_tag_msg_mock = 331s repo = 331s input_repo = 331s 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'] 331s validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }} 331s 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'] 331s reuse = True 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'expected_output_refs', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s 'reuse', 331s ], 331s [ 331s # 1) An existing import tag (or reimport tag) with the same Git tree 331s # - Reuse import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='import')], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('import'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='import tag contents', 331s ), 331s Commit.from_spec(name='reimport'), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 2) An existing import tag with a different Git tree and an existing 331s # upload tag with the same Git tree 331s # - Reuse upload tag, create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s Commit.from_spec(name='upload'), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-1': Placeholder('upload'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('upload'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('upload'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 3) An existing import tag with a different Git tree and an existing 331s # upload tag with a different Git tree 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s Commit.from_spec( 331s name='upload', 331s mutate='The upload tag contents', 331s ), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-1': Placeholder('upload'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [Commit.from_spec( 331s name='reimport', 331s message='Test commit (new)', 331s )], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 4) An existing import tag with a different Git tree and no upload tag 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [Commit.from_spec( 331s name='reimport', 331s message='Test commit (new)', 331s )], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 5) No import tag and an existing upload tag with the same Git tree 331s # - Reuse upload tag, create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='upload')], 331s tags={'importer/upload/1-1': Placeholder('upload')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('upload'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('upload'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 6) No import tag and an existing upload tag with a different Git tree 331s # - Create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='upload', 331s mutate='The upload tag contents', 331s ), 331s ], 331s tags={'importer/upload/1-1': Placeholder('upload')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='publish', 331s message='Test commit (new)', 331s ), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('publish'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('publish'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 7) No import tags or upload tags 331s # - Create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo(), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='publish', 331s message='Test commit (new)', 331s ), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('publish'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('publish'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1' 331s ], 331s # reuse: 331s False, 331s ), 331s ] 331s ) 331s @patch('gitubuntu.importer.get_import_tag_msg') 331s @patch('gitubuntu.importer.get_import_commit_msg') 331s def test_import_unapplied_spi_tags( 331s get_import_commit_msg_mock, 331s get_import_tag_msg_mock, 331s repo, 331s input_repo, 331s expected_output_refs, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s reuse, 331s ): 331s """Test that unapplied tags are correctly created, adjusted and/or reused 331s 331s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 331s that determines the commit message to use for a given import 331s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 331s that determines the tag message to use for a given import 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param list(str) expected_output_refs: refs that must exist in the output 331s repository 331s :param dict validation_repo_delta: how to transform the input 331s repository into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 331s one supplied by the input repository (assumed to have a commit message 331s of "Test commit") and not one created by the importer in this run 331s (arranged by this test to have a different commit message) 331s 331s The input repository data is written into the output repository and then a 331s fake non-native source package publication of version 1-1 in the Trusty 331s release pocket is imported into it by calling import_unapplied_spi() 331s directly. expected_output_refs, validation_repo_expected_identical_refs and 331s reuse are then asserted. It is further asserted that no other refs exist in 331s the output repository except for those listed in expected_output_refs and 331s validation_repo_expected_identical_refs. 331s """ 331s # Match the repo_builder objects 331s get_import_tag_msg_mock.return_value = 'Test tag' 331s # Importantly, the following commit message must not be the same as the 331s # commit messages used by the test input repository commits, so that we can 331s # later detect the difference between commits that were already there and 331s # new commits created by the importer for the purposes of asserting the 331s # reuse parameter correctly. 331s get_import_commit_msg_mock.return_value = b'Test commit (new)' 331s 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_tag_test.py:463: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpk3780yri/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_import_unapplied_spi_tags[input_repo2-expected_output_refs2-validation_repo_delta2-validation_repo_expected_identical_refs2-True] _ 331s 331s get_import_commit_msg_mock = 331s get_import_tag_msg_mock = 331s repo = 331s input_repo = 331s 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'] 331s validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }, 'update...t at 0xe00ad95b27e0>, 'importer/reimport/import/1-1/1': }} 331s 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'] 331s reuse = True 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'expected_output_refs', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s 'reuse', 331s ], 331s [ 331s # 1) An existing import tag (or reimport tag) with the same Git tree 331s # - Reuse import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='import')], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('import'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='import tag contents', 331s ), 331s Commit.from_spec(name='reimport'), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 2) An existing import tag with a different Git tree and an existing 331s # upload tag with the same Git tree 331s # - Reuse upload tag, create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s Commit.from_spec(name='upload'), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-1': Placeholder('upload'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('upload'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('upload'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 3) An existing import tag with a different Git tree and an existing 331s # upload tag with a different Git tree 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s Commit.from_spec( 331s name='upload', 331s mutate='The upload tag contents', 331s ), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-1': Placeholder('upload'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [Commit.from_spec( 331s name='reimport', 331s message='Test commit (new)', 331s )], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 4) An existing import tag with a different Git tree and no upload tag 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [Commit.from_spec( 331s name='reimport', 331s message='Test commit (new)', 331s )], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 5) No import tag and an existing upload tag with the same Git tree 331s # - Reuse upload tag, create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='upload')], 331s tags={'importer/upload/1-1': Placeholder('upload')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('upload'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('upload'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 6) No import tag and an existing upload tag with a different Git tree 331s # - Create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='upload', 331s mutate='The upload tag contents', 331s ), 331s ], 331s tags={'importer/upload/1-1': Placeholder('upload')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='publish', 331s message='Test commit (new)', 331s ), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('publish'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('publish'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 7) No import tags or upload tags 331s # - Create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo(), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='publish', 331s message='Test commit (new)', 331s ), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('publish'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('publish'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1' 331s ], 331s # reuse: 331s False, 331s ), 331s ] 331s ) 331s @patch('gitubuntu.importer.get_import_tag_msg') 331s @patch('gitubuntu.importer.get_import_commit_msg') 331s def test_import_unapplied_spi_tags( 331s get_import_commit_msg_mock, 331s get_import_tag_msg_mock, 331s repo, 331s input_repo, 331s expected_output_refs, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s reuse, 331s ): 331s """Test that unapplied tags are correctly created, adjusted and/or reused 331s 331s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 331s that determines the commit message to use for a given import 331s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 331s that determines the tag message to use for a given import 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param list(str) expected_output_refs: refs that must exist in the output 331s repository 331s :param dict validation_repo_delta: how to transform the input 331s repository into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 331s one supplied by the input repository (assumed to have a commit message 331s of "Test commit") and not one created by the importer in this run 331s (arranged by this test to have a different commit message) 331s 331s The input repository data is written into the output repository and then a 331s fake non-native source package publication of version 1-1 in the Trusty 331s release pocket is imported into it by calling import_unapplied_spi() 331s directly. expected_output_refs, validation_repo_expected_identical_refs and 331s reuse are then asserted. It is further asserted that no other refs exist in 331s the output repository except for those listed in expected_output_refs and 331s validation_repo_expected_identical_refs. 331s """ 331s # Match the repo_builder objects 331s get_import_tag_msg_mock.return_value = 'Test tag' 331s # Importantly, the following commit message must not be the same as the 331s # commit messages used by the test input repository commits, so that we can 331s # later detect the difference between commits that were already there and 331s # new commits created by the importer for the purposes of asserting the 331s # reuse parameter correctly. 331s get_import_commit_msg_mock.return_value = b'Test commit (new)' 331s 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_tag_test.py:463: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpej62w6l5/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_import_unapplied_spi_tags[input_repo3-expected_output_refs3-validation_repo_delta3-validation_repo_expected_identical_refs3-False] _ 331s 331s get_import_commit_msg_mock = 331s get_import_tag_msg_mock = 331s repo = 331s input_repo = 331s 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'] 331s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trust...t at 0xe00ad95b03e0>, 'importer/reimport/import/1-1/1': }} 331s 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'] 331s reuse = False 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'expected_output_refs', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s 'reuse', 331s ], 331s [ 331s # 1) An existing import tag (or reimport tag) with the same Git tree 331s # - Reuse import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='import')], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('import'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='import tag contents', 331s ), 331s Commit.from_spec(name='reimport'), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 2) An existing import tag with a different Git tree and an existing 331s # upload tag with the same Git tree 331s # - Reuse upload tag, create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s Commit.from_spec(name='upload'), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-1': Placeholder('upload'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('upload'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('upload'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 3) An existing import tag with a different Git tree and an existing 331s # upload tag with a different Git tree 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s Commit.from_spec( 331s name='upload', 331s mutate='The upload tag contents', 331s ), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-1': Placeholder('upload'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [Commit.from_spec( 331s name='reimport', 331s message='Test commit (new)', 331s )], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 4) An existing import tag with a different Git tree and no upload tag 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [Commit.from_spec( 331s name='reimport', 331s message='Test commit (new)', 331s )], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 5) No import tag and an existing upload tag with the same Git tree 331s # - Reuse upload tag, create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='upload')], 331s tags={'importer/upload/1-1': Placeholder('upload')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('upload'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('upload'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 6) No import tag and an existing upload tag with a different Git tree 331s # - Create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='upload', 331s mutate='The upload tag contents', 331s ), 331s ], 331s tags={'importer/upload/1-1': Placeholder('upload')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='publish', 331s message='Test commit (new)', 331s ), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('publish'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('publish'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 7) No import tags or upload tags 331s # - Create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo(), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='publish', 331s message='Test commit (new)', 331s ), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('publish'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('publish'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1' 331s ], 331s # reuse: 331s False, 331s ), 331s ] 331s ) 331s @patch('gitubuntu.importer.get_import_tag_msg') 331s @patch('gitubuntu.importer.get_import_commit_msg') 331s def test_import_unapplied_spi_tags( 331s get_import_commit_msg_mock, 331s get_import_tag_msg_mock, 331s repo, 331s input_repo, 331s expected_output_refs, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s reuse, 331s ): 331s """Test that unapplied tags are correctly created, adjusted and/or reused 331s 331s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 331s that determines the commit message to use for a given import 331s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 331s that determines the tag message to use for a given import 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param list(str) expected_output_refs: refs that must exist in the output 331s repository 331s :param dict validation_repo_delta: how to transform the input 331s repository into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 331s one supplied by the input repository (assumed to have a commit message 331s of "Test commit") and not one created by the importer in this run 331s (arranged by this test to have a different commit message) 331s 331s The input repository data is written into the output repository and then a 331s fake non-native source package publication of version 1-1 in the Trusty 331s release pocket is imported into it by calling import_unapplied_spi() 331s directly. expected_output_refs, validation_repo_expected_identical_refs and 331s reuse are then asserted. It is further asserted that no other refs exist in 331s the output repository except for those listed in expected_output_refs and 331s validation_repo_expected_identical_refs. 331s """ 331s # Match the repo_builder objects 331s get_import_tag_msg_mock.return_value = 'Test tag' 331s # Importantly, the following commit message must not be the same as the 331s # commit messages used by the test input repository commits, so that we can 331s # later detect the difference between commits that were already there and 331s # new commits created by the importer for the purposes of asserting the 331s # reuse parameter correctly. 331s get_import_commit_msg_mock.return_value = b'Test commit (new)' 331s 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_tag_test.py:463: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpqntmtwld/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_import_unapplied_spi_tags[input_repo4-expected_output_refs4-validation_repo_delta4-validation_repo_expected_identical_refs4-False] _ 331s 331s get_import_commit_msg_mock = 331s get_import_tag_msg_mock = 331s repo = 331s input_repo = 331s 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'] 331s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trust...t at 0xe00ad95b26c0>, 'importer/reimport/import/1-1/1': }} 331s 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'] 331s reuse = False 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'expected_output_refs', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s 'reuse', 331s ], 331s [ 331s # 1) An existing import tag (or reimport tag) with the same Git tree 331s # - Reuse import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='import')], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('import'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='import tag contents', 331s ), 331s Commit.from_spec(name='reimport'), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 2) An existing import tag with a different Git tree and an existing 331s # upload tag with the same Git tree 331s # - Reuse upload tag, create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s Commit.from_spec(name='upload'), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-1': Placeholder('upload'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('upload'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('upload'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 3) An existing import tag with a different Git tree and an existing 331s # upload tag with a different Git tree 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s Commit.from_spec( 331s name='upload', 331s mutate='The upload tag contents', 331s ), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-1': Placeholder('upload'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [Commit.from_spec( 331s name='reimport', 331s message='Test commit (new)', 331s )], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 4) An existing import tag with a different Git tree and no upload tag 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [Commit.from_spec( 331s name='reimport', 331s message='Test commit (new)', 331s )], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 5) No import tag and an existing upload tag with the same Git tree 331s # - Reuse upload tag, create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='upload')], 331s tags={'importer/upload/1-1': Placeholder('upload')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('upload'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('upload'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 6) No import tag and an existing upload tag with a different Git tree 331s # - Create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='upload', 331s mutate='The upload tag contents', 331s ), 331s ], 331s tags={'importer/upload/1-1': Placeholder('upload')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='publish', 331s message='Test commit (new)', 331s ), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('publish'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('publish'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 7) No import tags or upload tags 331s # - Create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo(), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='publish', 331s message='Test commit (new)', 331s ), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('publish'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('publish'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1' 331s ], 331s # reuse: 331s False, 331s ), 331s ] 331s ) 331s @patch('gitubuntu.importer.get_import_tag_msg') 331s @patch('gitubuntu.importer.get_import_commit_msg') 331s def test_import_unapplied_spi_tags( 331s get_import_commit_msg_mock, 331s get_import_tag_msg_mock, 331s repo, 331s input_repo, 331s expected_output_refs, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s reuse, 331s ): 331s """Test that unapplied tags are correctly created, adjusted and/or reused 331s 331s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 331s that determines the commit message to use for a given import 331s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 331s that determines the tag message to use for a given import 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param list(str) expected_output_refs: refs that must exist in the output 331s repository 331s :param dict validation_repo_delta: how to transform the input 331s repository into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 331s one supplied by the input repository (assumed to have a commit message 331s of "Test commit") and not one created by the importer in this run 331s (arranged by this test to have a different commit message) 331s 331s The input repository data is written into the output repository and then a 331s fake non-native source package publication of version 1-1 in the Trusty 331s release pocket is imported into it by calling import_unapplied_spi() 331s directly. expected_output_refs, validation_repo_expected_identical_refs and 331s reuse are then asserted. It is further asserted that no other refs exist in 331s the output repository except for those listed in expected_output_refs and 331s validation_repo_expected_identical_refs. 331s """ 331s # Match the repo_builder objects 331s get_import_tag_msg_mock.return_value = 'Test tag' 331s # Importantly, the following commit message must not be the same as the 331s # commit messages used by the test input repository commits, so that we can 331s # later detect the difference between commits that were already there and 331s # new commits created by the importer for the purposes of asserting the 331s # reuse parameter correctly. 331s get_import_commit_msg_mock.return_value = b'Test commit (new)' 331s 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_tag_test.py:463: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmptddkwne5/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_import_unapplied_spi_tags[input_repo5-expected_output_refs5-validation_repo_delta5-validation_repo_expected_identical_refs5-True] _ 331s 331s get_import_commit_msg_mock = 331s get_import_tag_msg_mock = 331s repo = 331s input_repo = 331s 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'] 331s validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }, 'update_tags': {'importer/import/1-1': }} 331s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1'] 331s reuse = True 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'expected_output_refs', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s 'reuse', 331s ], 331s [ 331s # 1) An existing import tag (or reimport tag) with the same Git tree 331s # - Reuse import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='import')], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('import'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='import tag contents', 331s ), 331s Commit.from_spec(name='reimport'), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 2) An existing import tag with a different Git tree and an existing 331s # upload tag with the same Git tree 331s # - Reuse upload tag, create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s Commit.from_spec(name='upload'), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-1': Placeholder('upload'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('upload'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('upload'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 3) An existing import tag with a different Git tree and an existing 331s # upload tag with a different Git tree 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s Commit.from_spec( 331s name='upload', 331s mutate='The upload tag contents', 331s ), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-1': Placeholder('upload'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [Commit.from_spec( 331s name='reimport', 331s message='Test commit (new)', 331s )], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 4) An existing import tag with a different Git tree and no upload tag 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [Commit.from_spec( 331s name='reimport', 331s message='Test commit (new)', 331s )], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 5) No import tag and an existing upload tag with the same Git tree 331s # - Reuse upload tag, create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='upload')], 331s tags={'importer/upload/1-1': Placeholder('upload')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('upload'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('upload'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 6) No import tag and an existing upload tag with a different Git tree 331s # - Create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='upload', 331s mutate='The upload tag contents', 331s ), 331s ], 331s tags={'importer/upload/1-1': Placeholder('upload')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='publish', 331s message='Test commit (new)', 331s ), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('publish'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('publish'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 7) No import tags or upload tags 331s # - Create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo(), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='publish', 331s message='Test commit (new)', 331s ), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('publish'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('publish'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1' 331s ], 331s # reuse: 331s False, 331s ), 331s ] 331s ) 331s @patch('gitubuntu.importer.get_import_tag_msg') 331s @patch('gitubuntu.importer.get_import_commit_msg') 331s def test_import_unapplied_spi_tags( 331s get_import_commit_msg_mock, 331s get_import_tag_msg_mock, 331s repo, 331s input_repo, 331s expected_output_refs, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s reuse, 331s ): 331s """Test that unapplied tags are correctly created, adjusted and/or reused 331s 331s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 331s that determines the commit message to use for a given import 331s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 331s that determines the tag message to use for a given import 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param list(str) expected_output_refs: refs that must exist in the output 331s repository 331s :param dict validation_repo_delta: how to transform the input 331s repository into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 331s one supplied by the input repository (assumed to have a commit message 331s of "Test commit") and not one created by the importer in this run 331s (arranged by this test to have a different commit message) 331s 331s The input repository data is written into the output repository and then a 331s fake non-native source package publication of version 1-1 in the Trusty 331s release pocket is imported into it by calling import_unapplied_spi() 331s directly. expected_output_refs, validation_repo_expected_identical_refs and 331s reuse are then asserted. It is further asserted that no other refs exist in 331s the output repository except for those listed in expected_output_refs and 331s validation_repo_expected_identical_refs. 331s """ 331s # Match the repo_builder objects 331s get_import_tag_msg_mock.return_value = 'Test tag' 331s # Importantly, the following commit message must not be the same as the 331s # commit messages used by the test input repository commits, so that we can 331s # later detect the difference between commits that were already there and 331s # new commits created by the importer for the purposes of asserting the 331s # reuse parameter correctly. 331s get_import_commit_msg_mock.return_value = b'Test commit (new)' 331s 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_tag_test.py:463: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmp86i4h_q8/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_import_unapplied_spi_tags[input_repo6-expected_output_refs6-validation_repo_delta6-validation_repo_expected_identical_refs6-False] _ 331s 331s get_import_commit_msg_mock = 331s get_import_tag_msg_mock = 331s repo = 331s input_repo = 331s 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'] 331s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trust...xe00ad95b0920>}, 'update_tags': {'importer/import/1-1': }} 331s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1'] 331s reuse = False 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'expected_output_refs', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s 'reuse', 331s ], 331s [ 331s # 1) An existing import tag (or reimport tag) with the same Git tree 331s # - Reuse import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='import')], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('import'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='import tag contents', 331s ), 331s Commit.from_spec(name='reimport'), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 2) An existing import tag with a different Git tree and an existing 331s # upload tag with the same Git tree 331s # - Reuse upload tag, create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s Commit.from_spec(name='upload'), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-1': Placeholder('upload'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('upload'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('upload'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 3) An existing import tag with a different Git tree and an existing 331s # upload tag with a different Git tree 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s Commit.from_spec( 331s name='upload', 331s mutate='The upload tag contents', 331s ), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-1': Placeholder('upload'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [Commit.from_spec( 331s name='reimport', 331s message='Test commit (new)', 331s )], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 4) An existing import tag with a different Git tree and no upload tag 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [Commit.from_spec( 331s name='reimport', 331s message='Test commit (new)', 331s )], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 5) No import tag and an existing upload tag with the same Git tree 331s # - Reuse upload tag, create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='upload')], 331s tags={'importer/upload/1-1': Placeholder('upload')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('upload'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('upload'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 6) No import tag and an existing upload tag with a different Git tree 331s # - Create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='upload', 331s mutate='The upload tag contents', 331s ), 331s ], 331s tags={'importer/upload/1-1': Placeholder('upload')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='publish', 331s message='Test commit (new)', 331s ), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('publish'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('publish'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 7) No import tags or upload tags 331s # - Create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo(), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='publish', 331s message='Test commit (new)', 331s ), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('publish'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('publish'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1' 331s ], 331s # reuse: 331s False, 331s ), 331s ] 331s ) 331s @patch('gitubuntu.importer.get_import_tag_msg') 331s @patch('gitubuntu.importer.get_import_commit_msg') 331s def test_import_unapplied_spi_tags( 331s get_import_commit_msg_mock, 331s get_import_tag_msg_mock, 331s repo, 331s input_repo, 331s expected_output_refs, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s reuse, 331s ): 331s """Test that unapplied tags are correctly created, adjusted and/or reused 331s 331s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 331s that determines the commit message to use for a given import 331s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 331s that determines the tag message to use for a given import 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param list(str) expected_output_refs: refs that must exist in the output 331s repository 331s :param dict validation_repo_delta: how to transform the input 331s repository into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 331s one supplied by the input repository (assumed to have a commit message 331s of "Test commit") and not one created by the importer in this run 331s (arranged by this test to have a different commit message) 331s 331s The input repository data is written into the output repository and then a 331s fake non-native source package publication of version 1-1 in the Trusty 331s release pocket is imported into it by calling import_unapplied_spi() 331s directly. expected_output_refs, validation_repo_expected_identical_refs and 331s reuse are then asserted. It is further asserted that no other refs exist in 331s the output repository except for those listed in expected_output_refs and 331s validation_repo_expected_identical_refs. 331s """ 331s # Match the repo_builder objects 331s get_import_tag_msg_mock.return_value = 'Test tag' 331s # Importantly, the following commit message must not be the same as the 331s # commit messages used by the test input repository commits, so that we can 331s # later detect the difference between commits that were already there and 331s # new commits created by the importer for the purposes of asserting the 331s # reuse parameter correctly. 331s get_import_commit_msg_mock.return_value = b'Test commit (new)' 331s 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_tag_test.py:463: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpwau06qrj/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_import_unapplied_spi_tags[input_repo7-expected_output_refs7-validation_repo_delta7-validation_repo_expected_identical_refs7-False] _ 331s 331s get_import_commit_msg_mock = 331s get_import_tag_msg_mock = 331s repo = 331s input_repo = 331s 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'] 331s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trust...xe00ad95b0bf0>}, 'update_tags': {'importer/import/1-1': }} 331s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1'] 331s reuse = False 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'expected_output_refs', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s 'reuse', 331s ], 331s [ 331s # 1) An existing import tag (or reimport tag) with the same Git tree 331s # - Reuse import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='import')], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('import'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='import tag contents', 331s ), 331s Commit.from_spec(name='reimport'), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 2) An existing import tag with a different Git tree and an existing 331s # upload tag with the same Git tree 331s # - Reuse upload tag, create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s Commit.from_spec(name='upload'), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-1': Placeholder('upload'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('upload'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('upload'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 3) An existing import tag with a different Git tree and an existing 331s # upload tag with a different Git tree 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s Commit.from_spec( 331s name='upload', 331s mutate='The upload tag contents', 331s ), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-1': Placeholder('upload'), 331s }, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [Commit.from_spec( 331s name='reimport', 331s message='Test commit (new)', 331s )], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 4) An existing import tag with a different Git tree and no upload tag 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='import', 331s mutate='The import tag contents', 331s ), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 331s }, 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [Commit.from_spec( 331s name='reimport', 331s message='Test commit (new)', 331s )], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('reimport'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty-proposed', 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 5) No import tag and an existing upload tag with the same Git tree 331s # - Reuse upload tag, create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='upload')], 331s tags={'importer/upload/1-1': Placeholder('upload')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('upload'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('upload'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 6) No import tag and an existing upload tag with a different Git tree 331s # - Create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='upload', 331s mutate='The upload tag contents', 331s ), 331s ], 331s tags={'importer/upload/1-1': Placeholder('upload')}, 331s ), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='publish', 331s message='Test commit (new)', 331s ), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('publish'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('publish'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/upload/1-1', 331s ], 331s # reuse: 331s False, 331s ), 331s 331s # 7) No import tags or upload tags 331s # - Create import tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo(), 331s # expected_output_refs: 331s [ 331s 'refs/heads/do-not-push', 331s 'refs/tags/importer/upstream/ubuntu/1.gz', 331s 'refs/heads/importer/importer/ubuntu/dsc', 331s 'refs/heads/importer/importer/ubuntu/pristine-tar', 331s 'refs/notes/importer/changelog', 331s 'refs/notes/importer/importer', 331s ], 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='publish', 331s message='Test commit (new)', 331s ), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('publish'), 331s }, 331s 'update_branches': { 331s 'importer/ubuntu/trusty': Placeholder('publish'), 331s }, 331s }, 331s # validation_repo_expected_identical_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1' 331s ], 331s # reuse: 331s False, 331s ), 331s ] 331s ) 331s @patch('gitubuntu.importer.get_import_tag_msg') 331s @patch('gitubuntu.importer.get_import_commit_msg') 331s def test_import_unapplied_spi_tags( 331s get_import_commit_msg_mock, 331s get_import_tag_msg_mock, 331s repo, 331s input_repo, 331s expected_output_refs, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s reuse, 331s ): 331s """Test that unapplied tags are correctly created, adjusted and/or reused 331s 331s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 331s that determines the commit message to use for a given import 331s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 331s that determines the tag message to use for a given import 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param list(str) expected_output_refs: refs that must exist in the output 331s repository 331s :param dict validation_repo_delta: how to transform the input 331s repository into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 331s one supplied by the input repository (assumed to have a commit message 331s of "Test commit") and not one created by the importer in this run 331s (arranged by this test to have a different commit message) 331s 331s The input repository data is written into the output repository and then a 331s fake non-native source package publication of version 1-1 in the Trusty 331s release pocket is imported into it by calling import_unapplied_spi() 331s directly. expected_output_refs, validation_repo_expected_identical_refs and 331s reuse are then asserted. It is further asserted that no other refs exist in 331s the output repository except for those listed in expected_output_refs and 331s validation_repo_expected_identical_refs. 331s """ 331s # Match the repo_builder objects 331s get_import_tag_msg_mock.return_value = 'Test tag' 331s # Importantly, the following commit message must not be the same as the 331s # commit messages used by the test input repository commits, so that we can 331s # later detect the difference between commits that were already there and 331s # new commits created by the importer for the purposes of asserting the 331s # reuse parameter correctly. 331s get_import_commit_msg_mock.return_value = b'Test commit (new)' 331s 331s input_repo.write(repo.raw_repo) 331s 331s publish_spec = source_builder.SourceSpec( 331s version='1-1', 331s native=False, 331s ) 331s 331s with source_builder.Source(publish_spec) as dsc_path: 331s > target.import_unapplied_spi( 331s repo=repo, 331s spi=MockSPI(dsc_path, publish_spec.version), 331s namespace='importer', 331s skip_orig=False, 331s parent_overrides={}, 331s ) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_tag_test.py:471: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:2308: in import_unapplied_spi 331s import_unapplied_dsc( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 331s commit, tag = find_or_create_unapplied_commit( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 331s changelog_parents = get_unapplied_import_parents( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 331s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 331s changelog = self.get_changelog_from_treeish(treeish) 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 331s return Changelog.from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:569: in from_treeish 331s blob = follow_symlinks_to_blob( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmp0ostyxn9/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_import_applied_spi_tags[input_repo0-validation_repo_delta0-validation_repo_expected_treewise_refs0-True] _ 331s 331s get_import_commit_msg_mock = 331s get_import_tag_msg_mock = 331s repo = 331s input_repo = 331s validation_repo_delta = {} 331s 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'] 331s reuse = True 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'validation_repo_delta', 331s 'validation_repo_expected_treewise_refs', 331s 'reuse', 331s ], 331s [ 331s # 1) An existing applied tag (or reimport tag) with the same Git tree 331s # - Reuse applied tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec(name='unapplied', has_patches=True), 331s Commit.from_spec(name='applied', patches_applied=True), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty': Placeholder('unapplied'), 331s 'importer/applied/ubuntu/trusty': Placeholder('applied'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('unapplied'), 331s 'importer/applied/1-1': Placeholder('applied'), 331s }, 331s ), 331s # validation_repo_delta: 331s { 331s # no output repository delta 331s }, 331s # validation_repo_expected_treewise_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/heads/importer/applied/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/applied/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 2) An existing applied tag with a different Git tree 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='unapplied', 331s has_patches=True, 331s mutate='import tag contents', 331s ), 331s Commit.from_spec( 331s name='unapplied_reimport', 331s has_patches=True, 331s ), 331s Commit.from_spec( 331s name='applied', 331s patches_applied=True, 331s mutate='import tag contents', 331s ) 331s ], 331s branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, 331s tags={ 331s 'importer/import/1-1': 331s Placeholder('unapplied'), 331s 'importer/reimport/import/1-1/0': 331s Placeholder('unapplied'), 331s 'importer/reimport/import/1-1/1': 331s Placeholder('unapplied_reimport'), 331s 'importer/applied/1-1': 331s Placeholder('applied'), 331s }, 331s ), 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='applied_reimport', 331s patches_applied=True, 331s parents=[Placeholder('unapplied_reimport')], 331s ), 331s ], 331s 'update_tags': { 331s 'importer/reimport/applied/1-1/0': 331s Placeholder('applied'), 331s 'importer/reimport/applied/1-1/1': 331s Placeholder('applied_reimport'), 331s }, 331s 'update_branches': { 331s 'importer/applied/ubuntu/trusty': 331s Placeholder('applied_reimport'), 331s }, 331s }, 331s # validation_repo_expected_treewise_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/heads/importer/applied/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s 'refs/tags/importer/applied/1-1', 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s ], 331s # reuse: 331s False, 331s 331s marks=pytest.mark.xfail(reason='LP: #1755247'), 331s ), 331s 331s # 3) No applied tags 331s # - Create applied tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='unapplied', has_patches=True)], 331s branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, 331s tags={'importer/import/1-1': Placeholder('unapplied')}, 331s ), 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='applied', 331s patches_applied=True, 331s parents=[Placeholder('unapplied')], 331s ), 331s ], 331s 'update_tags': { 331s 'importer/applied/1-1': Placeholder('applied') 331s }, 331s 'update_branches': { 331s 'importer/applied/ubuntu/trusty': Placeholder('applied'), 331s }, 331s }, 331s # validation_repo_expected_treewise_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/heads/importer/applied/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/applied/1-1' 331s ], 331s # reuse: 331s False, 331s ), 331s ] 331s ) 331s @patch('gitubuntu.importer.get_import_tag_msg') 331s @patch('gitubuntu.importer.get_import_commit_msg') 331s def test_import_applied_spi_tags( 331s get_import_commit_msg_mock, 331s get_import_tag_msg_mock, 331s repo, 331s input_repo, 331s validation_repo_delta, 331s validation_repo_expected_treewise_refs, 331s reuse, 331s ): 331s """Test that applied tags are correctly created, adjusted and/or reused 331s 331s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 331s that determines the commit message to use for a given import 331s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 331s that determines the tag message to use for a given import 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param dict validation_repo_delta: how to transform the input repository 331s into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_treewise_refs: refs whose trees 331s must be identical between the validation repository and the output 331s repository 331s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 331s one supplied by the input repository (assumed to have a commit message 331s of "Test commit") and not one created by the importer in this run 331s (arranged by this test to have a different commit message) 331s 331s The input repository data is written into the output repository and then a 331s fake non-native source package publication of version 1-1 in the Trusty 331s release pocket is imported into it by calling import_applied_spi() 331s directly. reuse and validation_repo_expected_treewise_refs are then 331s asserted. 331s 331s This is similar to test_unapplied_spi_tags except that it calls 331s import_applied_spi() instead of import_unapplied_spi() and only treewise 331s ref comparisons are made. 331s """ 331s # Match the repo_builder objects 331s get_import_tag_msg_mock.return_value = 'Test tag' 331s # Importantly, the following commit message must not be the same as the 331s # commit messages used by the test input repository commits, so that we can 331s # later detect the difference between commits that were already there and 331s # new commits created by the importer for the purposes of asserting the 331s # reuse parameter correctly. 331s get_import_commit_msg_mock.return_value = b'Test commit (new)' 331s 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_tag_test.py:711: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpd98dz230/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: applying a 331s dpkg-source: info: applying b 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: applying a 331s dpkg-source: info: applying b 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: applying a 331s dpkg-source: info: applying b 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: applying a 331s dpkg-source: info: applying b 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: applying a 331s dpkg-source: info: applying b 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_import_applied_spi_tags[input_repo2-validation_repo_delta2-validation_repo_expected_treewise_refs2-False] _ 331s 331s get_import_commit_msg_mock = 331s get_import_tag_msg_mock = 331s repo = 331s input_repo = 331s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/applied/ubun...e00ad95b2060>}, 'update_tags': {'importer/applied/1-1': }} 331s 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'] 331s reuse = False 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'validation_repo_delta', 331s 'validation_repo_expected_treewise_refs', 331s 'reuse', 331s ], 331s [ 331s # 1) An existing applied tag (or reimport tag) with the same Git tree 331s # - Reuse applied tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec(name='unapplied', has_patches=True), 331s Commit.from_spec(name='applied', patches_applied=True), 331s ], 331s branches={ 331s 'importer/ubuntu/trusty': Placeholder('unapplied'), 331s 'importer/applied/ubuntu/trusty': Placeholder('applied'), 331s }, 331s tags={ 331s 'importer/import/1-1': Placeholder('unapplied'), 331s 'importer/applied/1-1': Placeholder('applied'), 331s }, 331s ), 331s # validation_repo_delta: 331s { 331s # no output repository delta 331s }, 331s # validation_repo_expected_treewise_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/heads/importer/applied/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/applied/1-1', 331s ], 331s # reuse: 331s True, 331s ), 331s 331s # 2) An existing applied tag with a different Git tree 331s # - Create reimport tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[ 331s Commit.from_spec( 331s name='unapplied', 331s has_patches=True, 331s mutate='import tag contents', 331s ), 331s Commit.from_spec( 331s name='unapplied_reimport', 331s has_patches=True, 331s ), 331s Commit.from_spec( 331s name='applied', 331s patches_applied=True, 331s mutate='import tag contents', 331s ) 331s ], 331s branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, 331s tags={ 331s 'importer/import/1-1': 331s Placeholder('unapplied'), 331s 'importer/reimport/import/1-1/0': 331s Placeholder('unapplied'), 331s 'importer/reimport/import/1-1/1': 331s Placeholder('unapplied_reimport'), 331s 'importer/applied/1-1': 331s Placeholder('applied'), 331s }, 331s ), 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='applied_reimport', 331s patches_applied=True, 331s parents=[Placeholder('unapplied_reimport')], 331s ), 331s ], 331s 'update_tags': { 331s 'importer/reimport/applied/1-1/0': 331s Placeholder('applied'), 331s 'importer/reimport/applied/1-1/1': 331s Placeholder('applied_reimport'), 331s }, 331s 'update_branches': { 331s 'importer/applied/ubuntu/trusty': 331s Placeholder('applied_reimport'), 331s }, 331s }, 331s # validation_repo_expected_treewise_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/heads/importer/applied/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s 'refs/tags/importer/applied/1-1', 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s ], 331s # reuse: 331s False, 331s 331s marks=pytest.mark.xfail(reason='LP: #1755247'), 331s ), 331s 331s # 3) No applied tags 331s # - Create applied tag 331s pytest.param( 331s # input_repo: 331s repo_builder.Repo( 331s commits=[Commit.from_spec(name='unapplied', has_patches=True)], 331s branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, 331s tags={'importer/import/1-1': Placeholder('unapplied')}, 331s ), 331s # validation_repo_delta: 331s { 331s 'add_commits': [ 331s Commit.from_spec( 331s name='applied', 331s patches_applied=True, 331s parents=[Placeholder('unapplied')], 331s ), 331s ], 331s 'update_tags': { 331s 'importer/applied/1-1': Placeholder('applied') 331s }, 331s 'update_branches': { 331s 'importer/applied/ubuntu/trusty': Placeholder('applied'), 331s }, 331s }, 331s # validation_repo_expected_treewise_refs: 331s [ 331s 'refs/heads/importer/ubuntu/trusty', 331s 'refs/heads/importer/applied/ubuntu/trusty', 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/applied/1-1' 331s ], 331s # reuse: 331s False, 331s ), 331s ] 331s ) 331s @patch('gitubuntu.importer.get_import_tag_msg') 331s @patch('gitubuntu.importer.get_import_commit_msg') 331s def test_import_applied_spi_tags( 331s get_import_commit_msg_mock, 331s get_import_tag_msg_mock, 331s repo, 331s input_repo, 331s validation_repo_delta, 331s validation_repo_expected_treewise_refs, 331s reuse, 331s ): 331s """Test that applied tags are correctly created, adjusted and/or reused 331s 331s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 331s that determines the commit message to use for a given import 331s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 331s that determines the tag message to use for a given import 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param dict validation_repo_delta: how to transform the input repository 331s into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_treewise_refs: refs whose trees 331s must be identical between the validation repository and the output 331s repository 331s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 331s one supplied by the input repository (assumed to have a commit message 331s of "Test commit") and not one created by the importer in this run 331s (arranged by this test to have a different commit message) 331s 331s The input repository data is written into the output repository and then a 331s fake non-native source package publication of version 1-1 in the Trusty 331s release pocket is imported into it by calling import_applied_spi() 331s directly. reuse and validation_repo_expected_treewise_refs are then 331s asserted. 331s 331s This is similar to test_unapplied_spi_tags except that it calls 331s import_applied_spi() instead of import_unapplied_spi() and only treewise 331s ref comparisons are made. 331s """ 331s # Match the repo_builder objects 331s get_import_tag_msg_mock.return_value = 'Test tag' 331s # Importantly, the following commit message must not be the same as the 331s # commit messages used by the test input repository commits, so that we can 331s # later detect the difference between commits that were already there and 331s # new commits created by the importer for the purposes of asserting the 331s # reuse parameter correctly. 331s get_import_commit_msg_mock.return_value = b'Test commit (new)' 331s 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_tag_test.py:711: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmptywhh4g2/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: applying a 331s dpkg-source: info: applying b 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: applying a 331s dpkg-source: info: applying b 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: applying a 331s dpkg-source: info: applying b 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s __ test_get_existing_import_tags[input_repo1-PatchState.UNAPPLIED-expected1] ___ 331s 331s repo = 331s patch_state = 331s input_repo = 331s expected = ['refs/tags/importer/import/1-1'] 331s 331s @pytest.mark.parametrize( 331s 'input_repo, patch_state, expected', [ 331s ( 331s repo_builder.Repo(), 331s PatchState.UNAPPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s tags={'importer/import/1-1': repo_builder.Commit()}, 331s ), 331s PatchState.UNAPPLIED, 331s ['refs/tags/importer/import/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit(name='import'), 331s repo_builder.Commit(name='reimport1'), 331s ], 331s tags={ 331s 'importer/import/1-1': repo_builder.Commit(), 331s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 331s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 331s }, 331s ), 331s PatchState.UNAPPLIED, 331s [ 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo(), 331s PatchState.APPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s tags={'importer/applied/1-1': repo_builder.Commit()}, 331s ), 331s PatchState.APPLIED, 331s ['refs/tags/importer/applied/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit(name='applied'), 331s repo_builder.Commit(name='reimport1'), 331s ], 331s tags={ 331s 'importer/applied/1-1': repo_builder.Commit(), 331s 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 331s 'importer/reimport/applied/1-1/1': repo_builder.Commit(), 331s }, 331s ), 331s PatchState.APPLIED, 331s [ 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s ], 331s ), 331s ], 331s ) 331s def test_get_existing_import_tags(repo, patch_state, input_repo, expected): 331s """Test that get_existing_import_tags is generally correct 331s 331s This is the general parameterised test for the common case uses of 331s target.get_existing_import_tags. 331s 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param PatchState patch_state: passed through to get_existing_import_tags 331s :param repo_builder.Repo input_repo: input repository data 331s :param list(str) expected: the names of the references that are expected to 331s be returned, in order. 331s """ 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:214: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpglpasav5/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s __ test_get_existing_import_tags[input_repo2-PatchState.UNAPPLIED-expected2] ___ 331s 331s repo = 331s patch_state = 331s input_repo = 331s expected = ['refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1'] 331s 331s @pytest.mark.parametrize( 331s 'input_repo, patch_state, expected', [ 331s ( 331s repo_builder.Repo(), 331s PatchState.UNAPPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s tags={'importer/import/1-1': repo_builder.Commit()}, 331s ), 331s PatchState.UNAPPLIED, 331s ['refs/tags/importer/import/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit(name='import'), 331s repo_builder.Commit(name='reimport1'), 331s ], 331s tags={ 331s 'importer/import/1-1': repo_builder.Commit(), 331s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 331s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 331s }, 331s ), 331s PatchState.UNAPPLIED, 331s [ 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo(), 331s PatchState.APPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s tags={'importer/applied/1-1': repo_builder.Commit()}, 331s ), 331s PatchState.APPLIED, 331s ['refs/tags/importer/applied/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit(name='applied'), 331s repo_builder.Commit(name='reimport1'), 331s ], 331s tags={ 331s 'importer/applied/1-1': repo_builder.Commit(), 331s 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 331s 'importer/reimport/applied/1-1/1': repo_builder.Commit(), 331s }, 331s ), 331s PatchState.APPLIED, 331s [ 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s ], 331s ), 331s ], 331s ) 331s def test_get_existing_import_tags(repo, patch_state, input_repo, expected): 331s """Test that get_existing_import_tags is generally correct 331s 331s This is the general parameterised test for the common case uses of 331s target.get_existing_import_tags. 331s 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param PatchState patch_state: passed through to get_existing_import_tags 331s :param repo_builder.Repo input_repo: input repository data 331s :param list(str) expected: the names of the references that are expected to 331s be returned, in order. 331s """ 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:214: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmp70_k_zpc/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ___ test_get_existing_import_tags[input_repo4-PatchState.APPLIED-expected4] ____ 331s 331s repo = 331s patch_state = 331s input_repo = 331s expected = ['refs/tags/importer/applied/1-1'] 331s 331s @pytest.mark.parametrize( 331s 'input_repo, patch_state, expected', [ 331s ( 331s repo_builder.Repo(), 331s PatchState.UNAPPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s tags={'importer/import/1-1': repo_builder.Commit()}, 331s ), 331s PatchState.UNAPPLIED, 331s ['refs/tags/importer/import/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit(name='import'), 331s repo_builder.Commit(name='reimport1'), 331s ], 331s tags={ 331s 'importer/import/1-1': repo_builder.Commit(), 331s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 331s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 331s }, 331s ), 331s PatchState.UNAPPLIED, 331s [ 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo(), 331s PatchState.APPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s tags={'importer/applied/1-1': repo_builder.Commit()}, 331s ), 331s PatchState.APPLIED, 331s ['refs/tags/importer/applied/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit(name='applied'), 331s repo_builder.Commit(name='reimport1'), 331s ], 331s tags={ 331s 'importer/applied/1-1': repo_builder.Commit(), 331s 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 331s 'importer/reimport/applied/1-1/1': repo_builder.Commit(), 331s }, 331s ), 331s PatchState.APPLIED, 331s [ 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s ], 331s ), 331s ], 331s ) 331s def test_get_existing_import_tags(repo, patch_state, input_repo, expected): 331s """Test that get_existing_import_tags is generally correct 331s 331s This is the general parameterised test for the common case uses of 331s target.get_existing_import_tags. 331s 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param PatchState patch_state: passed through to get_existing_import_tags 331s :param repo_builder.Repo input_repo: input repository data 331s :param list(str) expected: the names of the references that are expected to 331s be returned, in order. 331s """ 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:214: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpecjleeqj/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ___ test_get_existing_import_tags[input_repo5-PatchState.APPLIED-expected5] ____ 331s 331s repo = 331s patch_state = 331s input_repo = 331s expected = ['refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1'] 331s 331s @pytest.mark.parametrize( 331s 'input_repo, patch_state, expected', [ 331s ( 331s repo_builder.Repo(), 331s PatchState.UNAPPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s tags={'importer/import/1-1': repo_builder.Commit()}, 331s ), 331s PatchState.UNAPPLIED, 331s ['refs/tags/importer/import/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit(name='import'), 331s repo_builder.Commit(name='reimport1'), 331s ], 331s tags={ 331s 'importer/import/1-1': repo_builder.Commit(), 331s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 331s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 331s }, 331s ), 331s PatchState.UNAPPLIED, 331s [ 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo(), 331s PatchState.APPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s tags={'importer/applied/1-1': repo_builder.Commit()}, 331s ), 331s PatchState.APPLIED, 331s ['refs/tags/importer/applied/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit(name='applied'), 331s repo_builder.Commit(name='reimport1'), 331s ], 331s tags={ 331s 'importer/applied/1-1': repo_builder.Commit(), 331s 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 331s 'importer/reimport/applied/1-1/1': repo_builder.Commit(), 331s }, 331s ), 331s PatchState.APPLIED, 331s [ 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s ], 331s ), 331s ], 331s ) 331s def test_get_existing_import_tags(repo, patch_state, input_repo, expected): 331s """Test that get_existing_import_tags is generally correct 331s 331s This is the general parameterised test for the common case uses of 331s target.get_existing_import_tags. 331s 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param PatchState patch_state: passed through to get_existing_import_tags 331s :param repo_builder.Repo input_repo: input repository data 331s :param list(str) expected: the names of the references that are expected to 331s be returned, in order. 331s """ 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:214: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmppw_psjsm/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ____________________ test_get_existing_import_tags_ordering ____________________ 331s 331s repo = 331s 331s def test_get_existing_import_tags_ordering(repo): 331s """Test that get_existing_import_tags returns results in the correct order 331s 331s To maintain hash stability, the spec defines that multiple changelog 331s parents must appear in the order that they were published. For this to 331s work, get_existing_import_tags must return the tags in the correct order 331s even if the underlying git repository tags appear in an arbitrary order. 331s 331s :param GitUbuntuRepository repo: fixture of a temporary repository to use 331s """ 331s 331s # Construct a synthetic git repository containing tags 331s repo_builder.Repo( 331s tags={ 331s 'importer/import/1-1': repo_builder.Commit(), 331s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 331s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 331s } 331s > ).write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:240: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpt0y6c008/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s _ test_create_import_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] _ 331s 331s repo = 331s input_repo = 331s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-1': }} 331s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1'] 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s ], 331s [ 331s ( 331s repo_builder.Repo(), 331s { 331s 'add_commits': [ 331s repo_builder.Commit(name='import'), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('import'), 331s }, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s { 331s 'add_commits': [ 331s repo_builder.Commit(name='reimport'), 331s ], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit(name='import'), 331s repo_builder.Commit(name='reimport1'), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport1'), 331s }, 331s ), 331s { 331s 'add_commits': [ 331s repo_builder.Commit(name='reimport2'), 331s ], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/2': Placeholder('reimport2'), 331s }, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s 'refs/tags/importer/reimport/import/1-1/2', 331s ], 331s ), 331s ], 331s ) 331s def test_create_import_tag( 331s repo, 331s input_repo, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s ): 331s """ 331s Unit test that create_import_tag creates the correct import tag 331s 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param dict validation_repo_delta: how to transform the input repository 331s into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s """ 331s publish_commit = repo.raw_repo.get( 331s repo_builder.Commit().write(repo.raw_repo) 331s ).peel(pygit2.Commit) 331s input_repo.write(repo.raw_repo) 331s 331s > target.create_import_tag(repo, publish_commit, '1-1', 'importer') 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:370: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:1379: in create_import_tag 331s repo.create_tag( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s commit_hash = '240dd844a69653244edb52c57c42d709512d64cd' 331s tag_name = 'importer/import/1-1', tag_msg = 'git-ubuntu import' 331s tagger = pygit2.Signature('git-ubuntu importer', 'ubuntu-devel-discuss@lists.ubuntu.com', 0, 0, None) 331s 331s def create_tag(self, 331s commit_hash, 331s tag_name, 331s tag_msg, 331s tagger=None, 331s ): 331s """Create a tag in the repository 331s 331s :param str commit_hash: the commit hash the tag will point to. 331s :param str tag_name: the name of the tag to be created. 331s :param str tag_msg: the text of the tag annotation. 331s :param pygit2.Signature tagger: if supplied, use this signature in the 331s created tag's "tagger" metadata. If not supplied, an arbitrary name 331s and email address is used with the current time. 331s :returns: None 331s """ 331s if not tagger: 331s tagger_time, tagger_offset = datetime_to_signature_spec( 331s datetime.datetime.now(), 331s ) 331s tagger = pygit2.Signature( 331s gitubuntu.spec.SYNTHESIZED_COMMITTER_NAME, 331s gitubuntu.spec.SYNTHESIZED_COMMITTER_EMAIL, 331s tagger_time, 331s tagger_offset, 331s ) 331s 331s logging.debug("Creating tag %s pointing to %s", tag_name, commit_hash) 331s self.raw_repo.create_tag( 331s tag_name, 331s pygit2.Oid(hex=commit_hash), 331s > pygit2.GIT_OBJ_COMMIT, 331s tagger, 331s tag_msg, 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:2114: AttributeError 331s _ test_create_import_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] _ 331s 331s repo = 331s input_repo = 331s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/import/...t at 0xe00ad9585880>, 'importer/reimport/import/1-1/1': }} 331s 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'] 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s ], 331s [ 331s ( 331s repo_builder.Repo(), 331s { 331s 'add_commits': [ 331s repo_builder.Commit(name='import'), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('import'), 331s }, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s { 331s 'add_commits': [ 331s repo_builder.Commit(name='reimport'), 331s ], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit(name='import'), 331s repo_builder.Commit(name='reimport1'), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport1'), 331s }, 331s ), 331s { 331s 'add_commits': [ 331s repo_builder.Commit(name='reimport2'), 331s ], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/2': Placeholder('reimport2'), 331s }, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s 'refs/tags/importer/reimport/import/1-1/2', 331s ], 331s ), 331s ], 331s ) 331s def test_create_import_tag( 331s repo, 331s input_repo, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s ): 331s """ 331s Unit test that create_import_tag creates the correct import tag 331s 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param dict validation_repo_delta: how to transform the input repository 331s into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s """ 331s publish_commit = repo.raw_repo.get( 331s repo_builder.Commit().write(repo.raw_repo) 331s ).peel(pygit2.Commit) 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:368: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpt5z_dt__/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s _ test_create_import_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] _ 331s 331s repo = 331s input_repo = 331s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/import/1-1/2': }} 331s 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'] 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s ], 331s [ 331s ( 331s repo_builder.Repo(), 331s { 331s 'add_commits': [ 331s repo_builder.Commit(name='import'), 331s ], 331s 'update_tags': { 331s 'importer/import/1-1': Placeholder('import'), 331s }, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s { 331s 'add_commits': [ 331s repo_builder.Commit(name='reimport'), 331s ], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit(name='import'), 331s repo_builder.Commit(name='reimport1'), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport1'), 331s }, 331s ), 331s { 331s 'add_commits': [ 331s repo_builder.Commit(name='reimport2'), 331s ], 331s 'update_tags': { 331s 'importer/reimport/import/1-1/2': Placeholder('reimport2'), 331s }, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s 'refs/tags/importer/reimport/import/1-1/2', 331s ], 331s ), 331s ], 331s ) 331s def test_create_import_tag( 331s repo, 331s input_repo, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s ): 331s """ 331s Unit test that create_import_tag creates the correct import tag 331s 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param dict validation_repo_delta: how to transform the input repository 331s into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s """ 331s publish_commit = repo.raw_repo.get( 331s repo_builder.Commit().write(repo.raw_repo) 331s ).peel(pygit2.Commit) 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:368: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpb0ye1g25/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ____________ test_create_import_tag_hash_stability_on_first_import _____________ 331s 331s repo = 331s 331s def test_create_import_tag_hash_stability_on_first_import(repo): 331s """Created import tags should be hash stable on first import 331s 331s :param GitUbuntuRepository repo: fixture providing a temporary 331s GitUbuntuRepository instance to use 331s """ 331s publish_commit = repo.raw_repo.get( 331s repo_builder.Commit( 331s author=pygit2.Signature( 331s 'Hash stability test author', 331s 'newauthor@example.com', 331s 1, 331s 2, 331s ), 331s committer=pygit2.Signature( 331s 'Hash stability test committer', 331s 'newcommitter@example.com', 331s 3, 331s 4, 331s ), 331s ).write(repo.raw_repo) 331s ).peel(pygit2.Commit) 331s > target.create_import_tag(repo, publish_commit, '1-1', 'importer') 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:402: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:1379: in create_import_tag 331s repo.create_tag( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s commit_hash = '65729a1dca101328820bf4f49fbca4e9571a772a' 331s tag_name = 'importer/import/1-1', tag_msg = 'git-ubuntu import' 331s tagger = pygit2.Signature('git-ubuntu importer', 'ubuntu-devel-discuss@lists.ubuntu.com', 3, 4, None) 331s 331s def create_tag(self, 331s commit_hash, 331s tag_name, 331s tag_msg, 331s tagger=None, 331s ): 331s """Create a tag in the repository 331s 331s :param str commit_hash: the commit hash the tag will point to. 331s :param str tag_name: the name of the tag to be created. 331s :param str tag_msg: the text of the tag annotation. 331s :param pygit2.Signature tagger: if supplied, use this signature in the 331s created tag's "tagger" metadata. If not supplied, an arbitrary name 331s and email address is used with the current time. 331s :returns: None 331s """ 331s if not tagger: 331s tagger_time, tagger_offset = datetime_to_signature_spec( 331s datetime.datetime.now(), 331s ) 331s tagger = pygit2.Signature( 331s gitubuntu.spec.SYNTHESIZED_COMMITTER_NAME, 331s gitubuntu.spec.SYNTHESIZED_COMMITTER_EMAIL, 331s tagger_time, 331s tagger_offset, 331s ) 331s 331s logging.debug("Creating tag %s pointing to %s", tag_name, commit_hash) 331s self.raw_repo.create_tag( 331s tag_name, 331s pygit2.Oid(hex=commit_hash), 331s > pygit2.GIT_OBJ_COMMIT, 331s tagger, 331s tag_msg, 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:2114: AttributeError 331s ______________ test_create_import_tag_hash_stability_on_reimport _______________ 331s 331s repo = 331s 331s def test_create_import_tag_hash_stability_on_reimport(repo): 331s """Created import tags should be hash stable on reimport 331s 331s This includes both the /0 duplicate reimport tag of the original import tag 331s as well as the /1 reimport tag being created. 331s 331s :param GitUbuntuRepository repo: fixture providing a temporary 331s GitUbuntuRepository instance to use 331s """ 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit( 331s name='root', 331s author=pygit2.Signature( 331s 'Hash stability test author', 331s 'author@example.com', 331s 1, 331s 2, 331s ), 331s committer=pygit2.Signature( 331s 'Hash stability test committer', 331s 'committer@example.com', 331s 3, 331s 4, 331s ), 331s ), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('root'), 331s }, 331s tagger=pygit2.Signature( 331s 'Hash stability test name', 331s 'stability@example.com', 331s 5, 331s 6, 331s ), 331s > ).write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:449: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpv4utw03_/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s _ test_create_applied_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] _ 331s 331s repo = 331s input_repo = 331s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/applied/1-1': }} 331s validation_repo_expected_identical_refs = ['refs/tags/importer/applied/1-1'] 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s ], 331s [ 331s ( 331s repo_builder.Repo(), 331s { 331s 'add_commits': [repo_builder.Commit(name='import')], 331s 'update_tags': {'importer/applied/1-1': Placeholder('import')}, 331s }, 331s [ 331s 'refs/tags/importer/applied/1-1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit(name='import')], 331s tags={'importer/applied/1-1': Placeholder('import')}, 331s ), 331s { 331s 'add_commits': [repo_builder.Commit(name='reimport')], 331s 'update_tags': { 331s 'importer/reimport/applied/1-1/0': Placeholder('import'), 331s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 331s }, 331s }, 331s [ 331s 'refs/tags/importer/applied/1-1', 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit(name='import'), 331s repo_builder.Commit(name='reimport1'), 331s ], 331s tags={ 331s 'importer/applied/1-1': Placeholder('import'), 331s 'importer/reimport/applied/1-1/0': Placeholder('import'), 331s 'importer/reimport/applied/1-1/1': Placeholder('reimport1'), 331s }, 331s ), 331s { 331s 'add_commits': [ 331s repo_builder.Commit(name='reimport2') 331s ], 331s 'update_tags': { 331s 'importer/reimport/applied/1-1/2': Placeholder('reimport2'), 331s }, 331s }, 331s [ 331s 'refs/tags/importer/applied/1-1', 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s 'refs/tags/importer/reimport/applied/1-1/2', 331s ], 331s ), 331s ], 331s ) 331s def test_create_applied_tag( 331s repo, 331s input_repo, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s ): 331s """ 331s Unit test that create_applied_tag creates the correct import tag 331s 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param dict validation_repo_delta: how to transform the input repository 331s into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s """ 331s publish_commit_str = str( 331s repo.raw_repo.get( 331s repo_builder.Commit().write(repo.raw_repo) 331s ).peel(pygit2.Commit).id 331s ) 331s 331s input_repo.write(repo.raw_repo) 331s 331s > target.create_applied_tag(repo, publish_commit_str, '1-1', 'importer') 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:577: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:1309: in create_applied_tag 331s repo.create_tag( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s commit_hash = '240dd844a69653244edb52c57c42d709512d64cd' 331s tag_name = 'importer/applied/1-1', tag_msg = 'git-ubuntu import' 331s tagger = pygit2.Signature('git-ubuntu importer', 'ubuntu-devel-discuss@lists.ubuntu.com', 1732613906, 0, None) 331s 331s def create_tag(self, 331s commit_hash, 331s tag_name, 331s tag_msg, 331s tagger=None, 331s ): 331s """Create a tag in the repository 331s 331s :param str commit_hash: the commit hash the tag will point to. 331s :param str tag_name: the name of the tag to be created. 331s :param str tag_msg: the text of the tag annotation. 331s :param pygit2.Signature tagger: if supplied, use this signature in the 331s created tag's "tagger" metadata. If not supplied, an arbitrary name 331s and email address is used with the current time. 331s :returns: None 331s """ 331s if not tagger: 331s tagger_time, tagger_offset = datetime_to_signature_spec( 331s datetime.datetime.now(), 331s ) 331s tagger = pygit2.Signature( 331s gitubuntu.spec.SYNTHESIZED_COMMITTER_NAME, 331s gitubuntu.spec.SYNTHESIZED_COMMITTER_EMAIL, 331s tagger_time, 331s tagger_offset, 331s ) 331s 331s logging.debug("Creating tag %s pointing to %s", tag_name, commit_hash) 331s self.raw_repo.create_tag( 331s tag_name, 331s pygit2.Oid(hex=commit_hash), 331s > pygit2.GIT_OBJ_COMMIT, 331s tagger, 331s tag_msg, 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:2114: AttributeError 331s _ test_create_applied_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] _ 331s 331s repo = 331s input_repo = 331s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/applied... at 0xe00ad950d9d0>, 'importer/reimport/applied/1-1/1': }} 331s 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'] 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s ], 331s [ 331s ( 331s repo_builder.Repo(), 331s { 331s 'add_commits': [repo_builder.Commit(name='import')], 331s 'update_tags': {'importer/applied/1-1': Placeholder('import')}, 331s }, 331s [ 331s 'refs/tags/importer/applied/1-1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit(name='import')], 331s tags={'importer/applied/1-1': Placeholder('import')}, 331s ), 331s { 331s 'add_commits': [repo_builder.Commit(name='reimport')], 331s 'update_tags': { 331s 'importer/reimport/applied/1-1/0': Placeholder('import'), 331s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 331s }, 331s }, 331s [ 331s 'refs/tags/importer/applied/1-1', 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit(name='import'), 331s repo_builder.Commit(name='reimport1'), 331s ], 331s tags={ 331s 'importer/applied/1-1': Placeholder('import'), 331s 'importer/reimport/applied/1-1/0': Placeholder('import'), 331s 'importer/reimport/applied/1-1/1': Placeholder('reimport1'), 331s }, 331s ), 331s { 331s 'add_commits': [ 331s repo_builder.Commit(name='reimport2') 331s ], 331s 'update_tags': { 331s 'importer/reimport/applied/1-1/2': Placeholder('reimport2'), 331s }, 331s }, 331s [ 331s 'refs/tags/importer/applied/1-1', 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s 'refs/tags/importer/reimport/applied/1-1/2', 331s ], 331s ), 331s ], 331s ) 331s def test_create_applied_tag( 331s repo, 331s input_repo, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s ): 331s """ 331s Unit test that create_applied_tag creates the correct import tag 331s 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param dict validation_repo_delta: how to transform the input repository 331s into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s """ 331s publish_commit_str = str( 331s repo.raw_repo.get( 331s repo_builder.Commit().write(repo.raw_repo) 331s ).peel(pygit2.Commit).id 331s ) 331s 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:575: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpuealwb32/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s _ test_create_applied_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] _ 331s 331s repo = 331s input_repo = 331s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/applied/1-1/2': }} 331s 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'] 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s ], 331s [ 331s ( 331s repo_builder.Repo(), 331s { 331s 'add_commits': [repo_builder.Commit(name='import')], 331s 'update_tags': {'importer/applied/1-1': Placeholder('import')}, 331s }, 331s [ 331s 'refs/tags/importer/applied/1-1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit(name='import')], 331s tags={'importer/applied/1-1': Placeholder('import')}, 331s ), 331s { 331s 'add_commits': [repo_builder.Commit(name='reimport')], 331s 'update_tags': { 331s 'importer/reimport/applied/1-1/0': Placeholder('import'), 331s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 331s }, 331s }, 331s [ 331s 'refs/tags/importer/applied/1-1', 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit(name='import'), 331s repo_builder.Commit(name='reimport1'), 331s ], 331s tags={ 331s 'importer/applied/1-1': Placeholder('import'), 331s 'importer/reimport/applied/1-1/0': Placeholder('import'), 331s 'importer/reimport/applied/1-1/1': Placeholder('reimport1'), 331s }, 331s ), 331s { 331s 'add_commits': [ 331s repo_builder.Commit(name='reimport2') 331s ], 331s 'update_tags': { 331s 'importer/reimport/applied/1-1/2': Placeholder('reimport2'), 331s }, 331s }, 331s [ 331s 'refs/tags/importer/applied/1-1', 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s 'refs/tags/importer/reimport/applied/1-1/2', 331s ], 331s ), 331s ], 331s ) 331s def test_create_applied_tag( 331s repo, 331s input_repo, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s ): 331s """ 331s Unit test that create_applied_tag creates the correct import tag 331s 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param dict validation_repo_delta: how to transform the input repository 331s into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s """ 331s publish_commit_str = str( 331s repo.raw_repo.get( 331s repo_builder.Commit().write(repo.raw_repo) 331s ).peel(pygit2.Commit).id 331s ) 331s 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:575: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpcfu0nux0/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s _ test_get_changelog_parent_commits[input_repo1-parent_overrides1-changelog_versions1-PatchState.UNAPPLIED-expected_refs1] _ 331s 331s repo = 331s input_repo = 331s parent_overrides = {}, changelog_versions = ['1-2', '1-1'] 331s patch_state = 331s expected_refs = ['refs/tags/importer/import/1-1'] 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'parent_overrides', 331s 'changelog_versions', 331s 'patch_state', 331s 'expected_refs', 331s ], 331s [ 331s ( 331s repo_builder.Repo(), 331s {}, 331s ['1-2', '1-1',], 331s PatchState.UNAPPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s ['refs/tags/importer/import/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec(name='reimport', mutate=1), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s [ 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s {}, 331s ['1-3', '1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s ['refs/tags/importer/import/1-1'], 331s ), 331s ( 331s repo_builder.Repo(), 331s {}, 331s ['1-2', '1-1',], 331s PatchState.APPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='applied')], 331s tags={'importer/applied/1-1': Placeholder('applied')}, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.APPLIED, 331s ['refs/tags/importer/applied/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec(name='reimport', mutate=1), 331s ], 331s tags={ 331s 'importer/applied/1-1': Placeholder('import'), 331s 'importer/reimport/applied/1-1/0': Placeholder('import'), 331s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.APPLIED, 331s [ 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='applied')], 331s tags={'importer/applied/1-1': Placeholder('applied')}, 331s ), 331s {}, 331s ['1-3', '1-2', '1-1'], 331s PatchState.APPLIED, 331s ['refs/tags/importer/applied/1-1'], 331s ), 331s ], 331s ) 331s def test_get_changelog_parent_commits( 331s repo, 331s input_repo, 331s parent_overrides, 331s changelog_versions, 331s patch_state, 331s expected_refs, 331s ): 331s """Test that get_changelog_parent_commits is generally correct 331s 331s This is the general parameterised test for the common case uses of 331s target.get_changelog_parent_commits. 331s 331s :param GitUbuntuRepository repo: fixture providing a temporary 331s GitUbuntuRepository instance to use 331s :param repo_builder.Repo input_repo: the input repository data to use that 331s will be populated into @repo before @repo is passed through to 331s get_changelog_parent_commits 331s :param dict parent_overrides: passed through to 331s get_changelog_parent_commits. 331s :param PatchState patch_state: passed through to 331s get_changelog_parent_commits 331s :param list(str) expected_refs: the expected return value of 331s get_changelog_parent_commits expressed using a list of reference names. 331s Since get_changelog_parent_commits returns a list of commit hash 331s strings, the reference names will need to be dereferenced before 331s comparison; this way the test parameters don't need to be opaque hash 331s strings. 331s """ 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:721: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpffp692mg/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_get_changelog_parent_commits[input_repo2-parent_overrides2-changelog_versions2-PatchState.UNAPPLIED-expected_refs2] _ 331s 331s repo = 331s input_repo = 331s parent_overrides = {}, changelog_versions = ['1-2', '1-1'] 331s patch_state = 331s expected_refs = ['refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1'] 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'parent_overrides', 331s 'changelog_versions', 331s 'patch_state', 331s 'expected_refs', 331s ], 331s [ 331s ( 331s repo_builder.Repo(), 331s {}, 331s ['1-2', '1-1',], 331s PatchState.UNAPPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s ['refs/tags/importer/import/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec(name='reimport', mutate=1), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s [ 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s {}, 331s ['1-3', '1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s ['refs/tags/importer/import/1-1'], 331s ), 331s ( 331s repo_builder.Repo(), 331s {}, 331s ['1-2', '1-1',], 331s PatchState.APPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='applied')], 331s tags={'importer/applied/1-1': Placeholder('applied')}, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.APPLIED, 331s ['refs/tags/importer/applied/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec(name='reimport', mutate=1), 331s ], 331s tags={ 331s 'importer/applied/1-1': Placeholder('import'), 331s 'importer/reimport/applied/1-1/0': Placeholder('import'), 331s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.APPLIED, 331s [ 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='applied')], 331s tags={'importer/applied/1-1': Placeholder('applied')}, 331s ), 331s {}, 331s ['1-3', '1-2', '1-1'], 331s PatchState.APPLIED, 331s ['refs/tags/importer/applied/1-1'], 331s ), 331s ], 331s ) 331s def test_get_changelog_parent_commits( 331s repo, 331s input_repo, 331s parent_overrides, 331s changelog_versions, 331s patch_state, 331s expected_refs, 331s ): 331s """Test that get_changelog_parent_commits is generally correct 331s 331s This is the general parameterised test for the common case uses of 331s target.get_changelog_parent_commits. 331s 331s :param GitUbuntuRepository repo: fixture providing a temporary 331s GitUbuntuRepository instance to use 331s :param repo_builder.Repo input_repo: the input repository data to use that 331s will be populated into @repo before @repo is passed through to 331s get_changelog_parent_commits 331s :param dict parent_overrides: passed through to 331s get_changelog_parent_commits. 331s :param PatchState patch_state: passed through to 331s get_changelog_parent_commits 331s :param list(str) expected_refs: the expected return value of 331s get_changelog_parent_commits expressed using a list of reference names. 331s Since get_changelog_parent_commits returns a list of commit hash 331s strings, the reference names will need to be dereferenced before 331s comparison; this way the test parameters don't need to be opaque hash 331s strings. 331s """ 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:721: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpp22cxs0e/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_get_changelog_parent_commits[input_repo3-parent_overrides3-changelog_versions3-PatchState.UNAPPLIED-expected_refs3] _ 331s 331s repo = 331s input_repo = 331s parent_overrides = {}, changelog_versions = ['1-3', '1-2', '1-1'] 331s patch_state = 331s expected_refs = ['refs/tags/importer/import/1-1'] 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'parent_overrides', 331s 'changelog_versions', 331s 'patch_state', 331s 'expected_refs', 331s ], 331s [ 331s ( 331s repo_builder.Repo(), 331s {}, 331s ['1-2', '1-1',], 331s PatchState.UNAPPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s ['refs/tags/importer/import/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec(name='reimport', mutate=1), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s [ 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s {}, 331s ['1-3', '1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s ['refs/tags/importer/import/1-1'], 331s ), 331s ( 331s repo_builder.Repo(), 331s {}, 331s ['1-2', '1-1',], 331s PatchState.APPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='applied')], 331s tags={'importer/applied/1-1': Placeholder('applied')}, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.APPLIED, 331s ['refs/tags/importer/applied/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec(name='reimport', mutate=1), 331s ], 331s tags={ 331s 'importer/applied/1-1': Placeholder('import'), 331s 'importer/reimport/applied/1-1/0': Placeholder('import'), 331s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.APPLIED, 331s [ 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='applied')], 331s tags={'importer/applied/1-1': Placeholder('applied')}, 331s ), 331s {}, 331s ['1-3', '1-2', '1-1'], 331s PatchState.APPLIED, 331s ['refs/tags/importer/applied/1-1'], 331s ), 331s ], 331s ) 331s def test_get_changelog_parent_commits( 331s repo, 331s input_repo, 331s parent_overrides, 331s changelog_versions, 331s patch_state, 331s expected_refs, 331s ): 331s """Test that get_changelog_parent_commits is generally correct 331s 331s This is the general parameterised test for the common case uses of 331s target.get_changelog_parent_commits. 331s 331s :param GitUbuntuRepository repo: fixture providing a temporary 331s GitUbuntuRepository instance to use 331s :param repo_builder.Repo input_repo: the input repository data to use that 331s will be populated into @repo before @repo is passed through to 331s get_changelog_parent_commits 331s :param dict parent_overrides: passed through to 331s get_changelog_parent_commits. 331s :param PatchState patch_state: passed through to 331s get_changelog_parent_commits 331s :param list(str) expected_refs: the expected return value of 331s get_changelog_parent_commits expressed using a list of reference names. 331s Since get_changelog_parent_commits returns a list of commit hash 331s strings, the reference names will need to be dereferenced before 331s comparison; this way the test parameters don't need to be opaque hash 331s strings. 331s """ 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:721: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpz19rvryr/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_get_changelog_parent_commits[input_repo5-parent_overrides5-changelog_versions5-PatchState.APPLIED-expected_refs5] _ 331s 331s repo = 331s input_repo = 331s parent_overrides = {}, changelog_versions = ['1-2', '1-1'] 331s patch_state = 331s expected_refs = ['refs/tags/importer/applied/1-1'] 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'parent_overrides', 331s 'changelog_versions', 331s 'patch_state', 331s 'expected_refs', 331s ], 331s [ 331s ( 331s repo_builder.Repo(), 331s {}, 331s ['1-2', '1-1',], 331s PatchState.UNAPPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s ['refs/tags/importer/import/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec(name='reimport', mutate=1), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s [ 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s {}, 331s ['1-3', '1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s ['refs/tags/importer/import/1-1'], 331s ), 331s ( 331s repo_builder.Repo(), 331s {}, 331s ['1-2', '1-1',], 331s PatchState.APPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='applied')], 331s tags={'importer/applied/1-1': Placeholder('applied')}, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.APPLIED, 331s ['refs/tags/importer/applied/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec(name='reimport', mutate=1), 331s ], 331s tags={ 331s 'importer/applied/1-1': Placeholder('import'), 331s 'importer/reimport/applied/1-1/0': Placeholder('import'), 331s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.APPLIED, 331s [ 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='applied')], 331s tags={'importer/applied/1-1': Placeholder('applied')}, 331s ), 331s {}, 331s ['1-3', '1-2', '1-1'], 331s PatchState.APPLIED, 331s ['refs/tags/importer/applied/1-1'], 331s ), 331s ], 331s ) 331s def test_get_changelog_parent_commits( 331s repo, 331s input_repo, 331s parent_overrides, 331s changelog_versions, 331s patch_state, 331s expected_refs, 331s ): 331s """Test that get_changelog_parent_commits is generally correct 331s 331s This is the general parameterised test for the common case uses of 331s target.get_changelog_parent_commits. 331s 331s :param GitUbuntuRepository repo: fixture providing a temporary 331s GitUbuntuRepository instance to use 331s :param repo_builder.Repo input_repo: the input repository data to use that 331s will be populated into @repo before @repo is passed through to 331s get_changelog_parent_commits 331s :param dict parent_overrides: passed through to 331s get_changelog_parent_commits. 331s :param PatchState patch_state: passed through to 331s get_changelog_parent_commits 331s :param list(str) expected_refs: the expected return value of 331s get_changelog_parent_commits expressed using a list of reference names. 331s Since get_changelog_parent_commits returns a list of commit hash 331s strings, the reference names will need to be dereferenced before 331s comparison; this way the test parameters don't need to be opaque hash 331s strings. 331s """ 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:721: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmp3s6j7h3e/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_get_changelog_parent_commits[input_repo6-parent_overrides6-changelog_versions6-PatchState.APPLIED-expected_refs6] _ 331s 331s repo = 331s input_repo = 331s parent_overrides = {}, changelog_versions = ['1-2', '1-1'] 331s patch_state = 331s expected_refs = ['refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1'] 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'parent_overrides', 331s 'changelog_versions', 331s 'patch_state', 331s 'expected_refs', 331s ], 331s [ 331s ( 331s repo_builder.Repo(), 331s {}, 331s ['1-2', '1-1',], 331s PatchState.UNAPPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s ['refs/tags/importer/import/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec(name='reimport', mutate=1), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s [ 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s {}, 331s ['1-3', '1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s ['refs/tags/importer/import/1-1'], 331s ), 331s ( 331s repo_builder.Repo(), 331s {}, 331s ['1-2', '1-1',], 331s PatchState.APPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='applied')], 331s tags={'importer/applied/1-1': Placeholder('applied')}, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.APPLIED, 331s ['refs/tags/importer/applied/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec(name='reimport', mutate=1), 331s ], 331s tags={ 331s 'importer/applied/1-1': Placeholder('import'), 331s 'importer/reimport/applied/1-1/0': Placeholder('import'), 331s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.APPLIED, 331s [ 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='applied')], 331s tags={'importer/applied/1-1': Placeholder('applied')}, 331s ), 331s {}, 331s ['1-3', '1-2', '1-1'], 331s PatchState.APPLIED, 331s ['refs/tags/importer/applied/1-1'], 331s ), 331s ], 331s ) 331s def test_get_changelog_parent_commits( 331s repo, 331s input_repo, 331s parent_overrides, 331s changelog_versions, 331s patch_state, 331s expected_refs, 331s ): 331s """Test that get_changelog_parent_commits is generally correct 331s 331s This is the general parameterised test for the common case uses of 331s target.get_changelog_parent_commits. 331s 331s :param GitUbuntuRepository repo: fixture providing a temporary 331s GitUbuntuRepository instance to use 331s :param repo_builder.Repo input_repo: the input repository data to use that 331s will be populated into @repo before @repo is passed through to 331s get_changelog_parent_commits 331s :param dict parent_overrides: passed through to 331s get_changelog_parent_commits. 331s :param PatchState patch_state: passed through to 331s get_changelog_parent_commits 331s :param list(str) expected_refs: the expected return value of 331s get_changelog_parent_commits expressed using a list of reference names. 331s Since get_changelog_parent_commits returns a list of commit hash 331s strings, the reference names will need to be dereferenced before 331s comparison; this way the test parameters don't need to be opaque hash 331s strings. 331s """ 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:721: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmprnv9a_4n/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_get_changelog_parent_commits[input_repo7-parent_overrides7-changelog_versions7-PatchState.APPLIED-expected_refs7] _ 331s 331s repo = 331s input_repo = 331s parent_overrides = {}, changelog_versions = ['1-3', '1-2', '1-1'] 331s patch_state = 331s expected_refs = ['refs/tags/importer/applied/1-1'] 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'parent_overrides', 331s 'changelog_versions', 331s 'patch_state', 331s 'expected_refs', 331s ], 331s [ 331s ( 331s repo_builder.Repo(), 331s {}, 331s ['1-2', '1-1',], 331s PatchState.UNAPPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s ['refs/tags/importer/import/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec(name='reimport', mutate=1), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s [ 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s {}, 331s ['1-3', '1-2', '1-1'], 331s PatchState.UNAPPLIED, 331s ['refs/tags/importer/import/1-1'], 331s ), 331s ( 331s repo_builder.Repo(), 331s {}, 331s ['1-2', '1-1',], 331s PatchState.APPLIED, 331s [], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='applied')], 331s tags={'importer/applied/1-1': Placeholder('applied')}, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.APPLIED, 331s ['refs/tags/importer/applied/1-1'], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec(name='reimport', mutate=1), 331s ], 331s tags={ 331s 'importer/applied/1-1': Placeholder('import'), 331s 'importer/reimport/applied/1-1/0': Placeholder('import'), 331s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s {}, 331s ['1-2', '1-1'], 331s PatchState.APPLIED, 331s [ 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='applied')], 331s tags={'importer/applied/1-1': Placeholder('applied')}, 331s ), 331s {}, 331s ['1-3', '1-2', '1-1'], 331s PatchState.APPLIED, 331s ['refs/tags/importer/applied/1-1'], 331s ), 331s ], 331s ) 331s def test_get_changelog_parent_commits( 331s repo, 331s input_repo, 331s parent_overrides, 331s changelog_versions, 331s patch_state, 331s expected_refs, 331s ): 331s """Test that get_changelog_parent_commits is generally correct 331s 331s This is the general parameterised test for the common case uses of 331s target.get_changelog_parent_commits. 331s 331s :param GitUbuntuRepository repo: fixture providing a temporary 331s GitUbuntuRepository instance to use 331s :param repo_builder.Repo input_repo: the input repository data to use that 331s will be populated into @repo before @repo is passed through to 331s get_changelog_parent_commits 331s :param dict parent_overrides: passed through to 331s get_changelog_parent_commits. 331s :param PatchState patch_state: passed through to 331s get_changelog_parent_commits 331s :param list(str) expected_refs: the expected return value of 331s get_changelog_parent_commits expressed using a list of reference names. 331s Since get_changelog_parent_commits returns a list of commit hash 331s strings, the reference names will need to be dereferenced before 331s comparison; this way the test parameters don't need to be opaque hash 331s strings. 331s """ 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:721: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmppb0g5idi/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _________ test_validate_rich_history[input_repo0-published_spec0-True] _________ 331s 331s repo = 331s input_repo = 331s published_spec = {'changelog_versions': ['1-2', '1-1']}, expected_result = True 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'published_spec', 331s 'expected_result', 331s ], 331s [ 331s ( 331s # Common case: upload tag has a changelog parent as an ancestor 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec( 331s name='upload', 331s changelog_versions=['1-2', '1-1'], 331s parents=[Placeholder('import')], 331s ), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-2': Placeholder('upload'), 331s }, 331s ), 331s {'changelog_versions': ['1-2', '1-1']}, 331s True, 331s ), 331s ( 331s # Upload tag is the first one, with no parents present 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec( 331s name='upload', 331s version='1-2', 331s ), 331s ], 331s tags={ 331s 'importer/upload/1-2': Placeholder('upload'), 331s }, 331s ), 331s {'changelog_versions': ['1-2']}, 331s True, 331s ), 331s ( 331s # Upload tag mismatches published tree but is otherwise correct 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec( 331s name='upload', 331s changelog_versions=['1-2', '1-1'], 331s parents=[Placeholder('import')], 331s mutate=True, 331s ), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-2': Placeholder('upload'), 331s }, 331s ), 331s {'changelog_versions': ['1-2', '1-1']}, 331s target.RichHistoryTreeMismatch, 331s ), 331s ( 331s # Upload tag doesn't have a changelog parent as an ancestor but is 331s # otherwise correct 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec( 331s name='upload', 331s changelog_versions=['1-2', '1-1'], 331s ), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-2': Placeholder('upload'), 331s }, 331s ), 331s {'changelog_versions': ['1-2', '1-1']}, 331s target.RichHistoryHasNoChangelogParentAncestor, 331s ), 331s ], 331s ) 331s def test_validate_rich_history( 331s repo, 331s input_repo, 331s published_spec, 331s expected_result, 331s ): 331s """ 331s General test for validate_rich_history(). 331s 331s This unit tests validate_rich_history() for various parameterized cases. 331s Given an input repository and the specification of a Launchpad publication 331s of a source package, we check that validate_rich_history() correctly 331s accepts or rejects the rich history corresponding to the upload tag named 331s 'importer/upload/1-2'. It is assumed that the package being imported is 331s always of version '1-2' for all parameter sets. 331s 331s Since the target function requires rich history, the case of there not 331s being rich history does not need to be tested here, as it wouldn't be 331s called in this case. 331s 331s validate_rich_history() is generic for all sourced rich history, not just 331s rich history sourced from an upload tag. But since it is independent of how 331s the rich history commit arrived, it is easiest to use upload tags to test 331s it; this results in coverage for all sources. 331s 331s :param GitUbuntuRepository repo: fixture providing a temporary 331s GitUbuntuRepository instance to use 331s :param repo_builder.Repo input_repo: input repository data 331s :param dict published_spec: the package simulated being imported from the 331s archive, specified as a dict to pass as **kwargs to 331s repo_builder.Commit.from_spec() 331s :param bool expected_result: the expected return value of, or exception 331s raised by, the call to validate_rich_history() 331s """ 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:910: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmp3bnwnour/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _________ test_validate_rich_history[input_repo1-published_spec1-True] _________ 331s 331s repo = 331s input_repo = 331s published_spec = {'changelog_versions': ['1-2']}, expected_result = True 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'published_spec', 331s 'expected_result', 331s ], 331s [ 331s ( 331s # Common case: upload tag has a changelog parent as an ancestor 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec( 331s name='upload', 331s changelog_versions=['1-2', '1-1'], 331s parents=[Placeholder('import')], 331s ), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-2': Placeholder('upload'), 331s }, 331s ), 331s {'changelog_versions': ['1-2', '1-1']}, 331s True, 331s ), 331s ( 331s # Upload tag is the first one, with no parents present 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec( 331s name='upload', 331s version='1-2', 331s ), 331s ], 331s tags={ 331s 'importer/upload/1-2': Placeholder('upload'), 331s }, 331s ), 331s {'changelog_versions': ['1-2']}, 331s True, 331s ), 331s ( 331s # Upload tag mismatches published tree but is otherwise correct 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec( 331s name='upload', 331s changelog_versions=['1-2', '1-1'], 331s parents=[Placeholder('import')], 331s mutate=True, 331s ), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-2': Placeholder('upload'), 331s }, 331s ), 331s {'changelog_versions': ['1-2', '1-1']}, 331s target.RichHistoryTreeMismatch, 331s ), 331s ( 331s # Upload tag doesn't have a changelog parent as an ancestor but is 331s # otherwise correct 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec( 331s name='upload', 331s changelog_versions=['1-2', '1-1'], 331s ), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-2': Placeholder('upload'), 331s }, 331s ), 331s {'changelog_versions': ['1-2', '1-1']}, 331s target.RichHistoryHasNoChangelogParentAncestor, 331s ), 331s ], 331s ) 331s def test_validate_rich_history( 331s repo, 331s input_repo, 331s published_spec, 331s expected_result, 331s ): 331s """ 331s General test for validate_rich_history(). 331s 331s This unit tests validate_rich_history() for various parameterized cases. 331s Given an input repository and the specification of a Launchpad publication 331s of a source package, we check that validate_rich_history() correctly 331s accepts or rejects the rich history corresponding to the upload tag named 331s 'importer/upload/1-2'. It is assumed that the package being imported is 331s always of version '1-2' for all parameter sets. 331s 331s Since the target function requires rich history, the case of there not 331s being rich history does not need to be tested here, as it wouldn't be 331s called in this case. 331s 331s validate_rich_history() is generic for all sourced rich history, not just 331s rich history sourced from an upload tag. But since it is independent of how 331s the rich history commit arrived, it is easiest to use upload tags to test 331s it; this results in coverage for all sources. 331s 331s :param GitUbuntuRepository repo: fixture providing a temporary 331s GitUbuntuRepository instance to use 331s :param repo_builder.Repo input_repo: input repository data 331s :param dict published_spec: the package simulated being imported from the 331s archive, specified as a dict to pass as **kwargs to 331s repo_builder.Commit.from_spec() 331s :param bool expected_result: the expected return value of, or exception 331s raised by, the call to validate_rich_history() 331s """ 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:910: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpug91xxg4/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_validate_rich_history[input_repo2-published_spec2-RichHistoryTreeMismatch] _ 331s 331s repo = 331s input_repo = 331s published_spec = {'changelog_versions': ['1-2', '1-1']} 331s expected_result = 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'published_spec', 331s 'expected_result', 331s ], 331s [ 331s ( 331s # Common case: upload tag has a changelog parent as an ancestor 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec( 331s name='upload', 331s changelog_versions=['1-2', '1-1'], 331s parents=[Placeholder('import')], 331s ), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-2': Placeholder('upload'), 331s }, 331s ), 331s {'changelog_versions': ['1-2', '1-1']}, 331s True, 331s ), 331s ( 331s # Upload tag is the first one, with no parents present 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec( 331s name='upload', 331s version='1-2', 331s ), 331s ], 331s tags={ 331s 'importer/upload/1-2': Placeholder('upload'), 331s }, 331s ), 331s {'changelog_versions': ['1-2']}, 331s True, 331s ), 331s ( 331s # Upload tag mismatches published tree but is otherwise correct 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec( 331s name='upload', 331s changelog_versions=['1-2', '1-1'], 331s parents=[Placeholder('import')], 331s mutate=True, 331s ), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-2': Placeholder('upload'), 331s }, 331s ), 331s {'changelog_versions': ['1-2', '1-1']}, 331s target.RichHistoryTreeMismatch, 331s ), 331s ( 331s # Upload tag doesn't have a changelog parent as an ancestor but is 331s # otherwise correct 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec( 331s name='upload', 331s changelog_versions=['1-2', '1-1'], 331s ), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-2': Placeholder('upload'), 331s }, 331s ), 331s {'changelog_versions': ['1-2', '1-1']}, 331s target.RichHistoryHasNoChangelogParentAncestor, 331s ), 331s ], 331s ) 331s def test_validate_rich_history( 331s repo, 331s input_repo, 331s published_spec, 331s expected_result, 331s ): 331s """ 331s General test for validate_rich_history(). 331s 331s This unit tests validate_rich_history() for various parameterized cases. 331s Given an input repository and the specification of a Launchpad publication 331s of a source package, we check that validate_rich_history() correctly 331s accepts or rejects the rich history corresponding to the upload tag named 331s 'importer/upload/1-2'. It is assumed that the package being imported is 331s always of version '1-2' for all parameter sets. 331s 331s Since the target function requires rich history, the case of there not 331s being rich history does not need to be tested here, as it wouldn't be 331s called in this case. 331s 331s validate_rich_history() is generic for all sourced rich history, not just 331s rich history sourced from an upload tag. But since it is independent of how 331s the rich history commit arrived, it is easiest to use upload tags to test 331s it; this results in coverage for all sources. 331s 331s :param GitUbuntuRepository repo: fixture providing a temporary 331s GitUbuntuRepository instance to use 331s :param repo_builder.Repo input_repo: input repository data 331s :param dict published_spec: the package simulated being imported from the 331s archive, specified as a dict to pass as **kwargs to 331s repo_builder.Commit.from_spec() 331s :param bool expected_result: the expected return value of, or exception 331s raised by, the call to validate_rich_history() 331s """ 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:910: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmps_5ebyyq/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_validate_rich_history[input_repo3-published_spec3-RichHistoryHasNoChangelogParentAncestor] _ 331s 331s repo = 331s input_repo = 331s published_spec = {'changelog_versions': ['1-2', '1-1']} 331s expected_result = 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'published_spec', 331s 'expected_result', 331s ], 331s [ 331s ( 331s # Common case: upload tag has a changelog parent as an ancestor 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec( 331s name='upload', 331s changelog_versions=['1-2', '1-1'], 331s parents=[Placeholder('import')], 331s ), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-2': Placeholder('upload'), 331s }, 331s ), 331s {'changelog_versions': ['1-2', '1-1']}, 331s True, 331s ), 331s ( 331s # Upload tag is the first one, with no parents present 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec( 331s name='upload', 331s version='1-2', 331s ), 331s ], 331s tags={ 331s 'importer/upload/1-2': Placeholder('upload'), 331s }, 331s ), 331s {'changelog_versions': ['1-2']}, 331s True, 331s ), 331s ( 331s # Upload tag mismatches published tree but is otherwise correct 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec( 331s name='upload', 331s changelog_versions=['1-2', '1-1'], 331s parents=[Placeholder('import')], 331s mutate=True, 331s ), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-2': Placeholder('upload'), 331s }, 331s ), 331s {'changelog_versions': ['1-2', '1-1']}, 331s target.RichHistoryTreeMismatch, 331s ), 331s ( 331s # Upload tag doesn't have a changelog parent as an ancestor but is 331s # otherwise correct 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec( 331s name='upload', 331s changelog_versions=['1-2', '1-1'], 331s ), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/upload/1-2': Placeholder('upload'), 331s }, 331s ), 331s {'changelog_versions': ['1-2', '1-1']}, 331s target.RichHistoryHasNoChangelogParentAncestor, 331s ), 331s ], 331s ) 331s def test_validate_rich_history( 331s repo, 331s input_repo, 331s published_spec, 331s expected_result, 331s ): 331s """ 331s General test for validate_rich_history(). 331s 331s This unit tests validate_rich_history() for various parameterized cases. 331s Given an input repository and the specification of a Launchpad publication 331s of a source package, we check that validate_rich_history() correctly 331s accepts or rejects the rich history corresponding to the upload tag named 331s 'importer/upload/1-2'. It is assumed that the package being imported is 331s always of version '1-2' for all parameter sets. 331s 331s Since the target function requires rich history, the case of there not 331s being rich history does not need to be tested here, as it wouldn't be 331s called in this case. 331s 331s validate_rich_history() is generic for all sourced rich history, not just 331s rich history sourced from an upload tag. But since it is independent of how 331s the rich history commit arrived, it is easiest to use upload tags to test 331s it; this results in coverage for all sources. 331s 331s :param GitUbuntuRepository repo: fixture providing a temporary 331s GitUbuntuRepository instance to use 331s :param repo_builder.Repo input_repo: input repository data 331s :param dict published_spec: the package simulated being imported from the 331s archive, specified as a dict to pass as **kwargs to 331s repo_builder.Commit.from_spec() 331s :param bool expected_result: the expected return value of, or exception 331s raised by, the call to validate_rich_history() 331s """ 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:910: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpmt2_eb59/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s ______________________ test_add_changelog_note_to_commit _______________________ 331s 331s repo = 331s 331s def test_add_changelog_note_to_commit(repo): 331s """add_changelog_note_to_commit should add the expected note""" 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='1-1'), 331s repo_builder.Commit.from_spec( 331s name='1-2', 331s changelog_versions=['1-1', '1-2'], 331s parents=[Placeholder('1-1')], 331s ), 331s ], 331s tags={'1-1': Placeholder('1-1'), '1-2': Placeholder('1-2')}, 331s > ).write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:953: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpupc1f6ub/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s ____________________ test_add_changelog_note_to_commit_utf8 ____________________ 331s 331s repo = 331s 331s def test_add_changelog_note_to_commit_utf8(repo): 331s """A changelog file with non-UTF8 should have such characters substituted 331s 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s """ 331s test_utf8_error_changelog_path = os.path.join( 331s pkg_resources.resource_filename('gitubuntu', 'changelog_tests'), 331s 'test_utf8_error', 331s ) 331s with open(test_utf8_error_changelog_path, 'rb') as f: 331s utf8_changelog_blob = f.read() 331s 331s # We only need an example child commit with a debian/changelog file since 331s # this is the only file accessed by add_changelog_note_to_commit(). 331s # Further, the parent need only exist and can be empty. 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit(name='parent'), 331s repo_builder.Commit( 331s tree=repo_builder.Tree({'debian': repo_builder.Tree( 331s {'changelog': repo_builder.Blob(utf8_changelog_blob)} 331s )}), 331s name='child', 331s ) 331s ], 331s tags={'parent': Placeholder('parent'), 'child': Placeholder('child')}, 331s > ).write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:1002: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpaiumyadi/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s _________________ test_double_changelog_note_add_does_not_fail _________________ 331s 331s repo = 331s 331s def test_double_changelog_note_add_does_not_fail(repo): 331s """add_changelog_note_to_commit shouldn't fail if a note already exists""" 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='1-1'), 331s repo_builder.Commit.from_spec( 331s name='1-2', 331s changelog_versions=['1-1', '1-2'], 331s parents=[Placeholder('1-1')], 331s ), 331s ], 331s tags={'1-1': Placeholder('1-1'), '1-2': Placeholder('1-2')}, 331s > ).write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:1035: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmp0t6gaeyt/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s ___________________________ test_create_import_note ____________________________ 331s 331s repo = 331s 331s def test_create_import_note(repo): 331s """create_import_note() should create a note in the correct ref""" 331s repo_builder.Repo( 331s commits=[repo_builder.Commit(name='root')], 331s tags={'root': repo_builder.Placeholder('root')}, 331s > ).write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:1066: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpwaa52jq4/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ______________________ test_create_import_note_timestamp _______________________ 331s 331s repo = 331s 331s def test_create_import_note_timestamp(repo): 331s """create_import_note() should include the timestamp in the note""" 331s repo_builder.Repo( 331s commits=[repo_builder.Commit(name='root')], 331s tags={'root': repo_builder.Placeholder('root')}, 331s > ).write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:1082: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmp0eomuc7g/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s _______________________ test_import_creates_import_note ________________________ 331s 331s repo = 331s 331s def test_import_creates_import_note(repo): 331s """When an import runs, the note should appear in the correct ref""" 331s with source_builder.Source() as dsc_pathname: 331s > target.import_unapplied_dsc( 331s repo=repo, 331s version='1-1', 331s namespace='importer', 331s dist='ubuntu', 331s dsc_pathname=dsc_pathname, 331s head_name='ubuntu/focal', 331s skip_orig=True, 331s parent_overrides={}, 331s ) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:1102: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 331s commit, tag = find_or_create_unapplied_commit( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 331s changelog_parents = get_unapplied_import_parents( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 331s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 331s changelog = self.get_changelog_from_treeish(treeish) 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 331s return Changelog.from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:569: in from_treeish 331s blob = follow_symlinks_to_blob( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpieu2br54/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s ___________________ test_import_unapplied_spi_quilt_patches ____________________ 331s 331s get_import_commit_msg_mock = 331s get_import_tag_msg_mock = 331s repo = 331s 331s @patch('gitubuntu.importer.get_import_tag_msg') 331s @patch('gitubuntu.importer.get_import_commit_msg') 331s def test_import_unapplied_spi_quilt_patches( 331s get_import_commit_msg_mock, 331s get_import_tag_msg_mock, 331s repo, 331s ): 331s """Test that a package with quilt patches is imported with correct 331s unapplied refs 331s 331s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 331s that determines the commit message to use for a given import 331s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 331s that determines the tag message to use for a given import 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s """ 331s # Match the repo_builder objects 331s get_import_tag_msg_mock.return_value = 'Test tag' 331s get_import_commit_msg_mock.return_value = b'Test commit' 331s 331s publish_spec = source_builder.SourceSpec(has_patches=True) 331s 331s input_repo = repo_builder.Repo() 331s input_repo.write(repo.raw_repo) 331s expected_result = repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit( 331s tree=repo_builder.SourceTree( 331s source_builder.Source(publish_spec) 331s ), 331s name='publish' 331s ), 331s ], 331s tags={'importer/import/1-1': Placeholder('publish')}, 331s branches={'importer/ubuntu/trusty': Placeholder('publish')}, 331s ) 331s 331s with source_builder.Source(publish_spec) as dsc_path: 331s # import_unapplied_spi currently assumes it is called from the 331s # repository directory (pristine-tar and other commands rely on 331s # this) 331s > target.import_unapplied_spi( 331s repo=repo, 331s spi=MockSPI(dsc_path, publish_spec.version), 331s namespace='importer', 331s skip_orig=False, 331s parent_overrides={}, 331s ) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:1222: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:2308: in import_unapplied_spi 331s import_unapplied_dsc( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 331s commit, tag = find_or_create_unapplied_commit( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 331s changelog_parents = get_unapplied_import_parents( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 331s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 331s changelog = self.get_changelog_from_treeish(treeish) 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 331s return Changelog.from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:569: in from_treeish 331s blob = follow_symlinks_to_blob( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpt5wm9fif/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: applying a 331s dpkg-source: info: applying b 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_import_unapplied_spi_parenting[input_repo0-changelog_versions0-validation_repo_delta0-validation_repo_expected_identical_refs0] _ 331s 331s get_import_commit_msg_mock = 331s get_import_tag_msg_mock = 331s repo = 331s input_repo = 331s changelog_versions = ['1-1'] 331s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-1': }} 331s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1'] 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'changelog_versions', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s ], 331s [ 331s pytest.param( 331s repo_builder.Repo(), 331s ['1-1'], 331s { 331s 'add_commits': [ 331s repo_builder.Commit.from_spec(name='publish'), 331s ], 331s 'update_tags': {'importer/import/1-1': Placeholder('publish')}, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s ] 331s ), 331s pytest.param( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s ['1-2', '1-1'], 331s { 331s 'add_commits': [ 331s repo_builder.Commit.from_spec( 331s name='publish', 331s parents=[Placeholder('import')], 331s changelog_versions=['1-2', '1-1'], 331s ), 331s ], 331s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/import/1-2', 331s ], 331s ), 331s pytest.param( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s ['1-3', '1-2', '1-1'], 331s { 331s 'add_commits': [ 331s repo_builder.Commit.from_spec( 331s parents=[Placeholder('import')], 331s name='publish', 331s changelog_versions=['1-3', '1-2', '1-1'], 331s ), 331s ], 331s 'update_tags': {'importer/import/1-3': Placeholder('publish')}, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/import/1-3', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec( 331s name='reimport', 331s mutate='Reimport tag contents', 331s ), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s ['1-2', '1-1'], 331s { 331s 'add_commits': [ 331s repo_builder.Commit.from_spec( 331s parents=[ 331s Placeholder('import'), 331s Placeholder('reimport'), 331s ], 331s name='publish', 331s changelog_versions=['1-2', '1-1'], 331s ), 331s ], 331s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s 'refs/tags/importer/import/1-2', 331s ], 331s ), 331s ] 331s ) 331s @patch('gitubuntu.importer.get_import_tag_msg') 331s @patch('gitubuntu.importer.get_import_commit_msg') 331s def test_import_unapplied_spi_parenting( 331s get_import_commit_msg_mock, 331s get_import_tag_msg_mock, 331s repo, 331s input_repo, 331s changelog_versions, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s ): 331s """Test that unapplied import commits have the correct parents 331s 331s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 331s that determines the commit message to use for a given import 331s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 331s that determines the tag message to use for a given import 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param list(str) changelog_versions: the versions in the changelog of a 331s fake package to test import 331s :param dict validation_repo_delta: how to transform the input 331s repository into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s 331s Verify that if an import of a package is made into input_repo where the 331s package being imported has the given changelog_versions, then the output 331s repository has commits with the parents we expect. This is tested by 331s comparing specific output references against the validation repository. 331s """ 331s 331s # Match the repo_builder objects 331s get_import_tag_msg_mock.return_value = 'Test tag' 331s get_import_commit_msg_mock.return_value = b'Test commit' 331s 331s input_repo.write(repo.raw_repo) 331s 331s publish_spec = source_builder.SourceSpec( 331s changelog_versions=changelog_versions, 331s ) 331s 331s with source_builder.Source(publish_spec) as dsc_path: 331s # import_unapplied_spi currently assumes it is called from the 331s # repository directory (pristine-tar and other commands rely on 331s # this) 331s > target.import_unapplied_spi( 331s repo=repo, 331s spi=MockSPI(dsc_path, publish_spec.version), 331s namespace='importer', 331s skip_orig=False, 331s parent_overrides={}, 331s ) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:1391: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:2308: in import_unapplied_spi 331s import_unapplied_dsc( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 331s commit, tag = find_or_create_unapplied_commit( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 331s changelog_parents = get_unapplied_import_parents( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 331s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 331s changelog = self.get_changelog_from_treeish(treeish) 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 331s return Changelog.from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:569: in from_treeish 331s blob = follow_symlinks_to_blob( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpnqerxbqg/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_import_unapplied_spi_parenting[input_repo1-changelog_versions1-validation_repo_delta1-validation_repo_expected_identical_refs1] _ 331s 331s get_import_commit_msg_mock = 331s get_import_tag_msg_mock = 331s repo = 331s input_repo = 331s changelog_versions = ['1-2', '1-1'] 331s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-2': }} 331s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-2'] 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'changelog_versions', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s ], 331s [ 331s pytest.param( 331s repo_builder.Repo(), 331s ['1-1'], 331s { 331s 'add_commits': [ 331s repo_builder.Commit.from_spec(name='publish'), 331s ], 331s 'update_tags': {'importer/import/1-1': Placeholder('publish')}, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s ] 331s ), 331s pytest.param( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s ['1-2', '1-1'], 331s { 331s 'add_commits': [ 331s repo_builder.Commit.from_spec( 331s name='publish', 331s parents=[Placeholder('import')], 331s changelog_versions=['1-2', '1-1'], 331s ), 331s ], 331s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/import/1-2', 331s ], 331s ), 331s pytest.param( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s ['1-3', '1-2', '1-1'], 331s { 331s 'add_commits': [ 331s repo_builder.Commit.from_spec( 331s parents=[Placeholder('import')], 331s name='publish', 331s changelog_versions=['1-3', '1-2', '1-1'], 331s ), 331s ], 331s 'update_tags': {'importer/import/1-3': Placeholder('publish')}, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/import/1-3', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec( 331s name='reimport', 331s mutate='Reimport tag contents', 331s ), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s ['1-2', '1-1'], 331s { 331s 'add_commits': [ 331s repo_builder.Commit.from_spec( 331s parents=[ 331s Placeholder('import'), 331s Placeholder('reimport'), 331s ], 331s name='publish', 331s changelog_versions=['1-2', '1-1'], 331s ), 331s ], 331s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s 'refs/tags/importer/import/1-2', 331s ], 331s ), 331s ] 331s ) 331s @patch('gitubuntu.importer.get_import_tag_msg') 331s @patch('gitubuntu.importer.get_import_commit_msg') 331s def test_import_unapplied_spi_parenting( 331s get_import_commit_msg_mock, 331s get_import_tag_msg_mock, 331s repo, 331s input_repo, 331s changelog_versions, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s ): 331s """Test that unapplied import commits have the correct parents 331s 331s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 331s that determines the commit message to use for a given import 331s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 331s that determines the tag message to use for a given import 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param list(str) changelog_versions: the versions in the changelog of a 331s fake package to test import 331s :param dict validation_repo_delta: how to transform the input 331s repository into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s 331s Verify that if an import of a package is made into input_repo where the 331s package being imported has the given changelog_versions, then the output 331s repository has commits with the parents we expect. This is tested by 331s comparing specific output references against the validation repository. 331s """ 331s 331s # Match the repo_builder objects 331s get_import_tag_msg_mock.return_value = 'Test tag' 331s get_import_commit_msg_mock.return_value = b'Test commit' 331s 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:1381: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmp9m_m79m_/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_import_unapplied_spi_parenting[input_repo2-changelog_versions2-validation_repo_delta2-validation_repo_expected_identical_refs2] _ 331s 331s get_import_commit_msg_mock = 331s get_import_tag_msg_mock = 331s repo = 331s input_repo = 331s changelog_versions = ['1-3', '1-2', '1-1'] 331s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-3': }} 331s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-3'] 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'changelog_versions', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s ], 331s [ 331s pytest.param( 331s repo_builder.Repo(), 331s ['1-1'], 331s { 331s 'add_commits': [ 331s repo_builder.Commit.from_spec(name='publish'), 331s ], 331s 'update_tags': {'importer/import/1-1': Placeholder('publish')}, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s ] 331s ), 331s pytest.param( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s ['1-2', '1-1'], 331s { 331s 'add_commits': [ 331s repo_builder.Commit.from_spec( 331s name='publish', 331s parents=[Placeholder('import')], 331s changelog_versions=['1-2', '1-1'], 331s ), 331s ], 331s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/import/1-2', 331s ], 331s ), 331s pytest.param( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s ['1-3', '1-2', '1-1'], 331s { 331s 'add_commits': [ 331s repo_builder.Commit.from_spec( 331s parents=[Placeholder('import')], 331s name='publish', 331s changelog_versions=['1-3', '1-2', '1-1'], 331s ), 331s ], 331s 'update_tags': {'importer/import/1-3': Placeholder('publish')}, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/import/1-3', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec( 331s name='reimport', 331s mutate='Reimport tag contents', 331s ), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s ['1-2', '1-1'], 331s { 331s 'add_commits': [ 331s repo_builder.Commit.from_spec( 331s parents=[ 331s Placeholder('import'), 331s Placeholder('reimport'), 331s ], 331s name='publish', 331s changelog_versions=['1-2', '1-1'], 331s ), 331s ], 331s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s 'refs/tags/importer/import/1-2', 331s ], 331s ), 331s ] 331s ) 331s @patch('gitubuntu.importer.get_import_tag_msg') 331s @patch('gitubuntu.importer.get_import_commit_msg') 331s def test_import_unapplied_spi_parenting( 331s get_import_commit_msg_mock, 331s get_import_tag_msg_mock, 331s repo, 331s input_repo, 331s changelog_versions, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s ): 331s """Test that unapplied import commits have the correct parents 331s 331s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 331s that determines the commit message to use for a given import 331s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 331s that determines the tag message to use for a given import 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param list(str) changelog_versions: the versions in the changelog of a 331s fake package to test import 331s :param dict validation_repo_delta: how to transform the input 331s repository into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s 331s Verify that if an import of a package is made into input_repo where the 331s package being imported has the given changelog_versions, then the output 331s repository has commits with the parents we expect. This is tested by 331s comparing specific output references against the validation repository. 331s """ 331s 331s # Match the repo_builder objects 331s get_import_tag_msg_mock.return_value = 'Test tag' 331s get_import_commit_msg_mock.return_value = b'Test commit' 331s 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:1381: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmp1o7fkynh/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_import_unapplied_spi_parenting[input_repo3-changelog_versions3-validation_repo_delta3-validation_repo_expected_identical_refs3] _ 331s 331s get_import_commit_msg_mock = 331s get_import_tag_msg_mock = 331s repo = 331s input_repo = 331s changelog_versions = ['1-2', '1-1'] 331s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-2': }} 331s 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'] 331s 331s @pytest.mark.parametrize( 331s [ 331s 'input_repo', 331s 'changelog_versions', 331s 'validation_repo_delta', 331s 'validation_repo_expected_identical_refs', 331s ], 331s [ 331s pytest.param( 331s repo_builder.Repo(), 331s ['1-1'], 331s { 331s 'add_commits': [ 331s repo_builder.Commit.from_spec(name='publish'), 331s ], 331s 'update_tags': {'importer/import/1-1': Placeholder('publish')}, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s ] 331s ), 331s pytest.param( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s ['1-2', '1-1'], 331s { 331s 'add_commits': [ 331s repo_builder.Commit.from_spec( 331s name='publish', 331s parents=[Placeholder('import')], 331s changelog_versions=['1-2', '1-1'], 331s ), 331s ], 331s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/import/1-2', 331s ], 331s ), 331s pytest.param( 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import')], 331s tags={'importer/import/1-1': Placeholder('import')}, 331s ), 331s ['1-3', '1-2', '1-1'], 331s { 331s 'add_commits': [ 331s repo_builder.Commit.from_spec( 331s parents=[Placeholder('import')], 331s name='publish', 331s changelog_versions=['1-3', '1-2', '1-1'], 331s ), 331s ], 331s 'update_tags': {'importer/import/1-3': Placeholder('publish')}, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/import/1-3', 331s ], 331s ), 331s ( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import'), 331s repo_builder.Commit.from_spec( 331s name='reimport', 331s mutate='Reimport tag contents', 331s ), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import'), 331s 'importer/reimport/import/1-1/0': Placeholder('import'), 331s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 331s }, 331s ), 331s ['1-2', '1-1'], 331s { 331s 'add_commits': [ 331s repo_builder.Commit.from_spec( 331s parents=[ 331s Placeholder('import'), 331s Placeholder('reimport'), 331s ], 331s name='publish', 331s changelog_versions=['1-2', '1-1'], 331s ), 331s ], 331s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 331s }, 331s [ 331s 'refs/tags/importer/import/1-1', 331s 'refs/tags/importer/reimport/import/1-1/0', 331s 'refs/tags/importer/reimport/import/1-1/1', 331s 'refs/tags/importer/import/1-2', 331s ], 331s ), 331s ] 331s ) 331s @patch('gitubuntu.importer.get_import_tag_msg') 331s @patch('gitubuntu.importer.get_import_commit_msg') 331s def test_import_unapplied_spi_parenting( 331s get_import_commit_msg_mock, 331s get_import_tag_msg_mock, 331s repo, 331s input_repo, 331s changelog_versions, 331s validation_repo_delta, 331s validation_repo_expected_identical_refs, 331s ): 331s """Test that unapplied import commits have the correct parents 331s 331s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 331s that determines the commit message to use for a given import 331s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 331s that determines the tag message to use for a given import 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param list(str) changelog_versions: the versions in the changelog of a 331s fake package to test import 331s :param dict validation_repo_delta: how to transform the input 331s repository into a "validation repository", expressed as a dict to 331s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 331s input repository. The validation repository is then used for the 331s purposes of comparison against the output repository. 331s :param list(str) validation_repo_expected_identical_refs: refs that must be 331s identical between the validation repository and the output repository 331s 331s Verify that if an import of a package is made into input_repo where the 331s package being imported has the given changelog_versions, then the output 331s repository has commits with the parents we expect. This is tested by 331s comparing specific output references against the validation repository. 331s """ 331s 331s # Match the repo_builder objects 331s get_import_tag_msg_mock.return_value = 'Test tag' 331s get_import_commit_msg_mock.return_value = b'Test commit' 331s 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:1381: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmp6unj7lhi/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s __________________ test_import_unapplied_spi_parent_override ___________________ 331s 331s get_import_commit_msg_mock = 331s get_import_tag_msg_mock = 331s repo = 331s 331s @patch('gitubuntu.importer.get_import_tag_msg') 331s @patch('gitubuntu.importer.get_import_commit_msg') 331s def test_import_unapplied_spi_parent_override( 331s get_import_commit_msg_mock, 331s get_import_tag_msg_mock, 331s repo, 331s ): 331s """Test import_unapplied_spi() parent_override functionality 331s 331s Test that if parent_overrides is used in the import_unapplied_spi call then 331s the resulting commit correctly uses the overridden parents specified. 331s 331s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 331s that determines the commit message to use for a given import 331s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 331s that determines the tag message to use for a given import 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s """ 331s # Match the repo_builder objects 331s get_import_tag_msg_mock.return_value = 'Test tag' 331s get_import_commit_msg_mock.return_value = b'Test commit' 331s 331s input_repo = repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec(name='import1-1', version='1-1'), 331s repo_builder.Commit.from_spec(name='import1-2', version='1-2'), 331s ], 331s tags={ 331s 'importer/import/1-1': Placeholder('import1-1'), 331s 'importer/import/1-2': Placeholder('import1-2'), 331s }, 331s ) 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:1444: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpxhk9v5nu/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s ______________ test_import_unapplied_spi_parent_override_failure _______________ 331s 331s repo = 331s 331s def test_import_unapplied_spi_parent_override_failure(repo): 331s """ 331s Test override_parents ParentOverrideError raise 331s 331s When a parent override is specified but the specified version doesn't have 331s an import tag, an exception should be raised. 331s 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s """ 331s repo_builder.Repo( 331s commits=[repo_builder.Commit.from_spec(name='import1-1')], 331s tags={'importer/import/1-1': Placeholder('import1-1')}, 331s > ).write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:1499: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpkb3hrvlh/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_import_applied_spi_parenting[input_repo0-expected_ancestor_commits0-expected_parent_commits0] _ 331s 331s get_import_commit_msg_mock = 331s get_import_tag_msg_mock = 331s repo = 331s input_repo = 331s expected_ancestor_commits = ['refs/tags/importer/import/1-2'] 331s expected_parent_commits = ['refs/tags/importer/applied/1-1'] 331s 331s @pytest.mark.parametrize( 331s 'input_repo, expected_ancestor_commits, expected_parent_commits', [ 331s # In general, these tests do not set applied commit parents in the 331s # input repository since we have no mechanism to do that correctly, but 331s # this doesn't matter for the purposes of these tests. 331s 331s # if only one import tag exists, then it is the parent 331s pytest.param( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec( 331s name='unapplied1', 331s has_patches=True, 331s ), 331s repo_builder.Commit.from_spec( 331s parents=[Placeholder('unapplied1')], 331s name='unapplied2', 331s changelog_versions=['1-2', '1-1'], 331s has_patches=True, 331s ), 331s repo_builder.Commit.from_spec( 331s name='applied1', 331s patches_applied=True, 331s ), 331s ], 331s # no branches: technically not possible but branches are not 331s # relevant to the test 331s branches={}, 331s tags={ 331s 'importer/import/1-1': Placeholder('unapplied1'), 331s 'importer/import/1-2': Placeholder('unapplied2'), 331s 'importer/applied/1-1': Placeholder('applied1'), 331s }, 331s ), 331s ['refs/tags/importer/import/1-2'], 331s ['refs/tags/importer/applied/1-1'], 331s ), 331s 331s # if multiple import tags exist, then do they all end up as parents? 331s pytest.param( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec( 331s name='unapplied1', 331s has_patches=True, 331s ), 331s repo_builder.Commit.from_spec( 331s parents=[Placeholder('unapplied1')], 331s name='unapplied2', 331s changelog_versions=['1-2', '1-1'], 331s has_patches=True, 331s ), 331s repo_builder.Commit.from_spec( 331s parents=[Placeholder('unapplied1')], 331s name='unapplied2reimport', 331s changelog_versions=['1-2', '1-1'], 331s has_patches=True, 331s mutate='reimport tag', 331s ), 331s repo_builder.Commit.from_spec( 331s name='applied1', 331s patches_applied=True, 331s ), 331s ], 331s # no branches: technically not possible but branches are not 331s # relevant to the test 331s branches={}, 331s tags={ 331s 'importer/import/1-1': 331s Placeholder('unapplied1'), 331s 'importer/import/1-2': 331s Placeholder('unapplied2'), 331s 'importer/reimport/import/1-2/0': 331s Placeholder('unapplied2'), 331s 'importer/reimport/import/1-2/1': 331s Placeholder('unapplied2reimport'), 331s 'importer/applied/1-1': 331s Placeholder('applied1'), 331s }, 331s ), 331s [ 331s 'refs/tags/importer/reimport/import/1-2/0', 331s 'refs/tags/importer/reimport/import/1-2/1', 331s ], 331s [ 331s 'refs/tags/importer/applied/1-1', 331s ], 331s marks=pytest.mark.xfail(reason='LP: #1755247'), 331s ), 331s 331s # do we correctly create a reimport tag because a different import 331s # already exists? 331s pytest.param( 331s repo_builder.Repo( 331s commits=[ 331s repo_builder.Commit.from_spec( 331s name='unapplied1', 331s has_patches=True, 331s ), 331s repo_builder.Commit.from_spec( 331s name='unapplied1_reimport', 331s has_patches=True, 331s mutate='reimport contents', 331s ), 331s repo_builder.Commit.from_spec( 331s parents=[Placeholder('unapplied1')], 331s name='unapplied2', 331s changelog_versions=['1-2', '1-1'], 331s has_patches=True, 331s ), 331s repo_builder.Commit.from_spec( 331s name='applied1', 331s patches_applied=True, 331s ), 331s repo_builder.Commit.from_spec( 331s name='applied1_reimport', 331s patches_applied=True, 331s mutate='reimport contents', 331s ), 331s ], 331s # no branches: technically not possible but branches are not 331s # relevant to the test 331s branches={}, 331s tags={ 331s 'importer/import/1-1': 331s Placeholder('unapplied1'), 331s 'importer/reimport/import/1-1/0': 331s Placeholder('unapplied1'), 331s 'importer/reimport/import/1-1/1': 331s Placeholder('unapplied1_reimport'), 331s 'importer/import/1-2': 331s Placeholder('unapplied2'), 331s 'importer/applied/1-1': 331s Placeholder('applied1'), 331s 'importer/reimport/applied/1-1/0': 331s Placeholder('applied1'), 331s 'importer/reimport/applied/1-1/1': 331s Placeholder('applied1_reimport'), 331s }, 331s ), 331s [ 331s 'refs/tags/importer/reimport/import/1-2/0', 331s 'refs/tags/importer/reimport/import/1-2/1', 331s ], 331s [ 331s 'refs/tags/importer/reimport/applied/1-1/0', 331s 'refs/tags/importer/reimport/applied/1-1/1', 331s ], 331s marks=pytest.mark.xfail(reason='LP: #1755247'), 331s ), 331s ], 331s ) 331s @patch('gitubuntu.importer.get_import_tag_msg') 331s @patch('gitubuntu.importer.get_import_commit_msg') 331s def test_import_applied_spi_parenting( 331s get_import_commit_msg_mock, 331s get_import_tag_msg_mock, 331s repo, 331s input_repo, 331s expected_ancestor_commits, 331s expected_parent_commits, 331s ): 331s """Test that applied import commits have the right parents 331s 331s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 331s that determines the commit message to use for a given import 331s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 331s that determines the tag message to use for a given import 331s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 331s temporary output repository 331s :param repo_builder.Repo input_repo: input repository data 331s :param list(str) expected_ancestor_commits: list of commit-ish strings that 331s must be ancestors of the 'applied/1-2' tag following the applied import 331s :param list(str) expected_parent_commits: list of commit-ish strings that 331s must be parents of the 'applied/1-2' tag following the applied import. 331s 331s A fake package with version '1-2' that has a changelog parent of '1-1' is 331s imported on top of the provided input_repo. The test fails if any 331s of the expected_ancestor_commits or expected_parent_commits are not 331s present. 331s 331s This test is ugly because we do not yet have a programmatic way 331s to get the interstitial commits of the patch applications. 331s """ 331s # Match the repo_builder objects 331s get_import_tag_msg_mock.return_value = 'Test tag' 331s get_import_commit_msg_mock.return_value = b'Test commit' 331s 331s > input_repo.write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:1698: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpt6b59tp3/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: applying a 331s dpkg-source: info: applying b 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: applying a 331s dpkg-source: info: applying b 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: applying a 331s dpkg-source: info: applying b 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: applying a 331s dpkg-source: info: applying b 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: applying a 331s dpkg-source: info: applying b 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_authorship_date[False-Fri, 2 Feb 1971 12:34:56 +0100-expected_result0] __ 331s 331s repo = 331s override = False, input_string = 'Fri, 2 Feb 1971 12:34:56 +0100' 331s expected_result = (1971, 2, 2, 11, 34, 56, ...) 331s 331s @pytest.mark.parametrize(['override', 'input_string', 'expected_result'], [ 331s # Standard date that should parse and be used 331s (False, 'Fri, 2 Feb 1971 12:34:56 +0100', (1971, 2, 2, 11, 34, 56, 60)), 331s # Deliberately illegal date that cannot be parsed 331s (True, 'Failday, 30 Feb 1971 99:99:99 +9999', (1972, 3, 3, 12, 45, 57, 0)), 331s ]) 331s def test_authorship_date(repo, override, input_string, expected_result): 331s """Synthesized commit should use changelog or override when provided 331s 331s A synthesized commit should use the date of the changelog entry in the 331s usual case, or commit_date when an override is requested. 331s 331s :param GitUbuntuRepository repo: fixture providing a temporary 331s GitUbuntuRepository instance to use 331s :param bool override: whether a changelog date override should be requested 331s from import_unapplied_dsc() 331s :param str input_string: the timestamp part of the changelog entry to use 331s :param tuple expected_result: the expected author date of the synthesized 331s commit, specified as six parameters to datetime.datetime() followed by 331s the expected tz offset in minutes. 331s """ 331s spec = source_builder.SourceSpec(changelog_date=input_string) 331s with source_builder.Source(spec) as dsc_pathname: 331s > target.import_unapplied_dsc( 331s repo=repo, 331s version='1-1', 331s namespace='importer', 331s dist='ubuntu', 331s dsc_pathname=dsc_pathname, 331s head_name='ubuntu/focal', 331s skip_orig=True, 331s parent_overrides={}, 331s commit_date=datetime.datetime( 331s 1972, 331s 3, 331s 3, 331s 12, 331s 45, 331s 57, 331s tzinfo=datetime.timezone.utc, 331s ), 331s changelog_date_overrides=( 331s frozenset({'1-1'}) if override else frozenset() 331s ), 331s ) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:1815: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 331s commit, tag = find_or_create_unapplied_commit( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 331s changelog_parents = get_unapplied_import_parents( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 331s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 331s changelog = self.get_changelog_from_treeish(treeish) 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 331s return Changelog.from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:569: in from_treeish 331s blob = follow_symlinks_to_blob( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpn_dh0lkx/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s _ test_authorship_date[True-Failday, 30 Feb 1971 99:99:99 +9999-expected_result1] _ 331s 331s repo = 331s override = True, input_string = 'Failday, 30 Feb 1971 99:99:99 +9999' 331s expected_result = (1972, 3, 3, 12, 45, 57, ...) 331s 331s @pytest.mark.parametrize(['override', 'input_string', 'expected_result'], [ 331s # Standard date that should parse and be used 331s (False, 'Fri, 2 Feb 1971 12:34:56 +0100', (1971, 2, 2, 11, 34, 56, 60)), 331s # Deliberately illegal date that cannot be parsed 331s (True, 'Failday, 30 Feb 1971 99:99:99 +9999', (1972, 3, 3, 12, 45, 57, 0)), 331s ]) 331s def test_authorship_date(repo, override, input_string, expected_result): 331s """Synthesized commit should use changelog or override when provided 331s 331s A synthesized commit should use the date of the changelog entry in the 331s usual case, or commit_date when an override is requested. 331s 331s :param GitUbuntuRepository repo: fixture providing a temporary 331s GitUbuntuRepository instance to use 331s :param bool override: whether a changelog date override should be requested 331s from import_unapplied_dsc() 331s :param str input_string: the timestamp part of the changelog entry to use 331s :param tuple expected_result: the expected author date of the synthesized 331s commit, specified as six parameters to datetime.datetime() followed by 331s the expected tz offset in minutes. 331s """ 331s spec = source_builder.SourceSpec(changelog_date=input_string) 331s with source_builder.Source(spec) as dsc_pathname: 331s > target.import_unapplied_dsc( 331s repo=repo, 331s version='1-1', 331s namespace='importer', 331s dist='ubuntu', 331s dsc_pathname=dsc_pathname, 331s head_name='ubuntu/focal', 331s skip_orig=True, 331s parent_overrides={}, 331s commit_date=datetime.datetime( 331s 1972, 331s 3, 331s 3, 331s 12, 331s 45, 331s 57, 331s tzinfo=datetime.timezone.utc, 331s ), 331s changelog_date_overrides=( 331s frozenset({'1-1'}) if override else frozenset() 331s ), 331s ) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:1815: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 331s commit, tag = find_or_create_unapplied_commit( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 331s changelog_parents = get_unapplied_import_parents( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 331s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 331s changelog = self.get_changelog_from_treeish(treeish) 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 331s return Changelog.from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:569: in from_treeish 331s blob = follow_symlinks_to_blob( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpaj3c9vr6/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: srcpkg/debian/changelog(l4): ignoring invalid week day 'Failday' 331s LINE: -- git ubuntu Failday, 30 Feb 1971 99:99:99 +9999 331s dpkg-source: warning: srcpkg/debian/changelog(l4): cannot parse non-conformant date '30 Feb 1971 99:99:99 +9999' 331s LINE: -- git ubuntu Failday, 30 Feb 1971 99:99:99 +9999 331s dpkg-source: warning: missing information for output field Standards-Version 331s __________________ test_fetch_rich_history_from_changes_file ___________________ 331s 331s repo = 331s pygit2_repo = pygit2.Repository('/tmp/tmpftvu14m3/.git/') 331s 331s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 331s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 331s def test_fetch_rich_history_from_changes_file(repo, pygit2_repo): 331s """Rich history specified in a changes file is found and validated""" 331s > rich_commit, parent_commit, import_tree = populate_rich_history( 331s import_repo=repo.raw_repo, 331s uploader_repo=pygit2_repo, 331s ) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:2111: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:2080: in populate_rich_history 331s ).write(import_repo) 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpi9j72ypc/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s ________ test_fetch_rich_history_from_changes_file_fetch_failure_retry _________ 331s 331s repo = 331s pygit2_repo = pygit2.Repository('/tmp/tmpxvp0vlmg/.git/') 331s 331s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 331s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 331s def test_fetch_rich_history_from_changes_file_fetch_failure_retry( 331s repo, 331s pygit2_repo, 331s ): 331s """If rich history cannot be fetched once, it is retried""" 331s > rich_commit, parent_commit, import_tree = populate_rich_history( 331s import_repo=repo.raw_repo, 331s uploader_repo=pygit2_repo, 331s ) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:2204: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:2080: in populate_rich_history 331s ).write(import_repo) 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmp3ioajkxx/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s ____________ test_fetch_rich_history_from_changes_file_missing_ref _____________ 331s 331s repo = 331s pygit2_repo = pygit2.Repository('/tmp/tmpxgqaj5hm/.git/') 331s 331s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 331s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 331s def test_fetch_rich_history_from_changes_file_missing_ref( 331s repo, 331s pygit2_repo, 331s ): 331s """If rich history is specified but the ref cannot be found, a hard 331s exception is raised 331s """ 331s > rich_commit, _, _ = populate_rich_history( 331s import_repo=repo.raw_repo, 331s uploader_repo=pygit2_repo, 331s ) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:2243: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:2080: in populate_rich_history 331s ).write(import_repo) 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmp9koezlra/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s ___________ test_fetch_rich_history_from_changes_file_missing_commit ___________ 331s 331s repo = 331s pygit2_repo = pygit2.Repository('/tmp/tmp_o3kttx_/.git/') 331s 331s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 331s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 331s def test_fetch_rich_history_from_changes_file_missing_commit( 331s repo, 331s pygit2_repo, 331s ): 331s """If rich history is specified but the commit cannot be found, an 331s exception is raised 331s """ 331s > rich_commit, _, _ = populate_rich_history( 331s import_repo=repo.raw_repo, 331s uploader_repo=pygit2_repo, 331s ) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:2271: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:2080: in populate_rich_history 331s ).write(import_repo) 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmphta4qorl/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s ____________ test_fetch_rich_history_from_changes_file_not_a_commit ____________ 331s 331s repo = 331s pygit2_repo = pygit2.Repository('/tmp/tmpmqfuvuc0/.git/') 331s 331s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 331s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 331s def test_fetch_rich_history_from_changes_file_not_a_commit(repo, pygit2_repo): 331s """If rich history is specified but the commit hash resolves to something 331s other than a commit, an exception is raised 331s """ 331s > rich_commit, _, _ = populate_rich_history( 331s import_repo=repo.raw_repo, 331s uploader_repo=pygit2_repo, 331s ) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:2297: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/importer_test.py:2080: in populate_rich_history 331s ).write(import_repo) 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpxysns0_e/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s __________________________ test_reconstruct_changelog __________________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmpk2xif7on/.git/') 331s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xe00ad819b5c0> 331s 331s @pytest.mark.skipif( 331s ENTRY_POINT_TYPE is None, 331s reason="Entry point testing not available", 331s ) 331s def test_reconstruct_changelog(pygit2_repo, monkeypatch): 331s '''The reconstruct-changelog endpoint should add the expected commit''' 331s monkeypatch.setenv('DEBFULLNAME', 'Test User') 331s monkeypatch.setenv('DEBEMAIL', 'test@example.com') 331s Repo( 331s commits=[ 331s Commit(tree=SourceTree(Source()), name='root'), 331s Commit( 331s tree=SourceTree(Source(spec=SourceSpec(mutate=1))), 331s message=' * Test changelog entry', 331s name='child', 331s parents=[Placeholder('root')], 331s ), 331s ], 331s tags={'root': Placeholder('root'), 'child': Placeholder('child')}, 331s > ).write(pygit2_repo) 331s 331s gitubuntu/integration_test.py:219: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpk2xif7on/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s gitubuntu/repo_builder.py:389: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s dpkg-source: warning: missing information for output field Standards-Version 331s ___________________ TestObjectCreation.testRepoBranchesTags ____________________ 331s 331s self = 331s 331s def testRepoBranchesTags(self): 331s graph = Repo( 331s commits=[ 331s Commit( 331s Tree({}), 331s parents=[Placeholder('parent')], 331s name='child', 331s ), 331s Commit(Tree({}), name='parent'), 331s ], 331s branches={ 331s 'branch1': Placeholder('parent'), 331s 'branch2': Commit(Tree({'foo': Blob(b'qux')})), 331s }, 331s tags={ 331s 'tag1': Placeholder('child'), 331s 'tag2': Commit(Tree({'foo': Blob(b'quz')})), 331s }, 331s ) 331s > child_ref = graph.write(self.repo) 331s 331s gitubuntu/repo_builder_test.py:154: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmprov23vp1/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s gitubuntu/repo_builder.py:389: AttributeError 331s ______________________ TestObjectCreation.testRepoTagger _______________________ 331s 331s self = 331s 331s def testRepoTagger(self): 331s """The tagger parameter should make it through to the tag""" 331s input_repo = Repo( 331s commits=[Commit(name='root')], 331s tags={'root': Placeholder('root')}, 331s tagger=pygit2.Signature( 331s 'Test Tagger', 331s 'test@example.com', 331s 1, 331s 2, 331s ), 331s ) 331s > input_repo.write(self.repo) 331s 331s gitubuntu/repo_builder_test.py:178: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmppfgpseob/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s gitubuntu/repo_builder.py:389: AttributeError 331s _______________________________ test_source_tree _______________________________ 331s 331s pygit2_repo = pygit2.Repository('/tmp/tmpyli901iu/.git/') 331s 331s def test_source_tree(pygit2_repo): 331s commit_str = Commit(SourceTree(Source())).write(pygit2_repo) 331s commit = pygit2_repo.get(commit_str) 331s > assert gitubuntu.git_repository.follow_symlinks_to_blob( 331s repo=pygit2_repo, 331s treeish_object=commit, 331s path='debian/changelog', 331s ) 331s 331s gitubuntu/repo_builder_test.py:190: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpyli901iu/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s ______________________________ test_preservation _______________________________ 331s 331s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_preservation0') 331s repo = 331s 331s def test_preservation(tmpdir, repo): 331s """An export followed by an import should preserve rich history 331s 331s Given a minimal repository that should be able to have upload tags be 331s exported, when we import the export result into a similar repository with a 331s subtly different upload tag in which the rich history should still apply, 331s the result should be a correctly reconstructed upload tag. 331s 331s :param py.path tmpdir: the pytest standard tmpdir fixture. 331s :param repo: our standard repo fixture. 331s """ 331s Repo( 331s commits=[ 331s Commit( 331s name='1', 331s tree=Tree({ 331s 'a': Blob(b'a'), 331s }), 331s ), 331s Commit( 331s name='2', 331s parents=[Placeholder('1')], 331s tree=Tree({ 331s 'a': Blob(b'ab'), 331s }), 331s ), 331s Commit( 331s name='3', 331s parents=[Placeholder('2')], 331s tree=Tree({ 331s 'a': Blob(b'abc'), 331s }), 331s ), 331s ], 331s tags={ 331s 'importer/import/1': Placeholder('1'), 331s 'importer/upload/2': Placeholder('3'), 331s } 331s > ).write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/rich_history_test.py:51: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpful__vb4/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s ______________________ test_preservation_multiple_parents ______________________ 331s 331s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_preservation_multiple_par0') 331s repo = 331s 331s def test_preservation_multiple_parents(tmpdir, repo): 331s """An export of rich history should omit multiple parent cases 331s 331s If an upload tag leads to multiple parents before we reach an import tag, 331s it should be excluded from the export as this type of upload tag is not 331s supported for rich history preservation. This test also serves to verify 331s code paths that handle the MultipleParentError exception in the export 331s code. 331s 331s :param py.path tmpdir: the pytest standard tmpdir fixture. 331s :param repo: our standard repo fixture. 331s """ 331s Repo( 331s commits=[ 331s Commit(name='1', message='a'), 331s Commit(name='2', message='b'), 331s Commit(name='child', parents=[Placeholder('1'), Placeholder('2')]), 331s ], 331s tags={ 331s 'importer/import/1': Placeholder('1'), 331s 'importer/upload/2': Placeholder('child'), 331s } 331s > ).write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/rich_history_test.py:102: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpz9kh1wn4/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s _________________________ test_preservation_no_parents _________________________ 331s 331s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_preservation_no_parents0') 331s repo = 331s 331s def test_preservation_no_parents(tmpdir, repo): 331s """An export of rich history should omit no parent cases 331s 331s If an upload tag leads to no parents before we reach an import tag, 331s it should be excluded from the export as this type of upload tag is not 331s supported for rich history preservation. This test also serves to verify 331s code paths that handle the NoParentError exception in the export 331s code. 331s 331s :param py.path tmpdir: the pytest standard tmpdir fixture. 331s :param repo: our standard repo fixture. 331s """ 331s Repo( 331s commits=[ 331s Commit(name='1', message='a'), 331s Commit(name='2', message='b'), 331s ], 331s tags={ 331s 'importer/import/1': Placeholder('1'), 331s 'importer/upload/2': Placeholder('2'), 331s } 331s > ).write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/rich_history_test.py:129: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpl5bnwfk6/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s _____________ test_input_edge_cases[before_export0-before_import0] _____________ 331s 331s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_input_edge_cases_before_e0') 331s repo = 331s before_export = {'commits': [, , 'importer/upload/2': }} 331s before_import = {'commits': [], 'tags': {'importer/import/1': }} 331s 331s @pytest.mark.parametrize(['before_export', 'before_import'], [ 331s ( 331s # Commit messages with patch-like contents should not fail 331s 331s # If a commit message in rich history contains text in a patch-like 331s # format (such as a diff of some file), it should not prevent correct 331s # round-tripping. "git format-patch" followed by "git am" fails this 331s # test, for example. 331s { 331s 'commits': [ 331s Commit(name='1', message='a', tree=Tree({'a': Blob(b'a')})), 331s Commit( 331s name='2', 331s message='''First line 331s 331s Inline patch that isn't part of the real patch starts here 331s 331s --- a/foo 331s +++ b/foo 331s @@ -1 +1,2 @@ 331s foo 331s +bar 331s ''', 331s tree=Tree({'a': Blob(b'ab')}), 331s parents=[Placeholder('1')], 331s ), 331s ], 331s 'tags': { 331s 'importer/import/1': Placeholder('1'), 331s 'importer/upload/2': Placeholder('2'), 331s } 331s }, 331s { 331s 'commits': [ 331s Commit(name='b1', message='c', tree=Tree({'a': Blob(b'a')})), 331s ], 331s 'tags': {'importer/import/1': Placeholder('b1')}, 331s }, 331s ), 331s ( 331s # Commits that have no changes should round trip 331s { 331s 'commits': [ 331s Commit( 331s name='1', 331s message='a', 331s ), 331s Commit( 331s name='2', 331s message='b', 331s parents=[Placeholder('1')], 331s ), 331s ], 331s 'tags': { 331s 'importer/import/1': Placeholder('1'), 331s 'importer/upload/2': Placeholder('2'), 331s }, 331s }, 331s { 331s 'commits': [Commit(name='b1', message='c')], 331s 'tags': {'importer/import/1': Placeholder('b1')}, 331s }, 331s ), 331s ( 331s # Commits that have no commit message should round trip 331s { 331s 'commits': [ 331s Commit( 331s name='1', 331s message='a', 331s ), 331s Commit( 331s name='2', 331s message='', 331s tree=Tree({'a': Blob(b'a')}), 331s parents=[Placeholder('1')], 331s ), 331s ], 331s 'tags': { 331s 'importer/import/1': Placeholder('1'), 331s 'importer/upload/2': Placeholder('2'), 331s } 331s }, 331s { 331s 'commits': [Commit(name='b1', message='c')], 331s 'tags': {'importer/import/1': Placeholder('b1')}, 331s }, 331s ), 331s ]) 331s def test_input_edge_cases(tmpdir, repo, before_export, before_import): 331s """ 331s Edge cases in input rich history should reimport without failure 331s 331s Check that rich history preservation completes without an exception in 331s various cases. Details of each case are described in comments in the test 331s parameters above. 331s 331s Since these tests generally cover the mutated case (where rich history has 331s to be ported forward because parent commits have mutated), we must remove 331s and recreate the 'importer/import/1' tag so that it is different before 331s attempting reimport. This is done by deleting all ('importer/*') tags and 331s then using the before_import parameter to recreate it again. 331s 331s :param py.path tmpdir: the pytest standard tmpdir fixture. 331s :param GitUbuntuRepository repo: our standard repo fixture. 331s :param dict before_export: the parameters to supply to Repo() to construct 331s the repository that will be exported. 331s :param dict before_import: the parametsrs to supply to Repo() to add to the 331s repository before attempting reimport. 331s """ 331s > Repo(**before_export).write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/rich_history_test.py:260: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmprp5fh4y1/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s _____________ test_input_edge_cases[before_export1-before_import1] _____________ 331s 331s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_input_edge_cases_before_e1') 331s repo = 331s before_export = {'commits': [, , 'importer/upload/2': }} 331s before_import = {'commits': [], 'tags': {'importer/import/1': }} 331s 331s @pytest.mark.parametrize(['before_export', 'before_import'], [ 331s ( 331s # Commit messages with patch-like contents should not fail 331s 331s # If a commit message in rich history contains text in a patch-like 331s # format (such as a diff of some file), it should not prevent correct 331s # round-tripping. "git format-patch" followed by "git am" fails this 331s # test, for example. 331s { 331s 'commits': [ 331s Commit(name='1', message='a', tree=Tree({'a': Blob(b'a')})), 331s Commit( 331s name='2', 331s message='''First line 331s 331s Inline patch that isn't part of the real patch starts here 331s 331s --- a/foo 331s +++ b/foo 331s @@ -1 +1,2 @@ 331s foo 331s +bar 331s ''', 331s tree=Tree({'a': Blob(b'ab')}), 331s parents=[Placeholder('1')], 331s ), 331s ], 331s 'tags': { 331s 'importer/import/1': Placeholder('1'), 331s 'importer/upload/2': Placeholder('2'), 331s } 331s }, 331s { 331s 'commits': [ 331s Commit(name='b1', message='c', tree=Tree({'a': Blob(b'a')})), 331s ], 331s 'tags': {'importer/import/1': Placeholder('b1')}, 331s }, 331s ), 331s ( 331s # Commits that have no changes should round trip 331s { 331s 'commits': [ 331s Commit( 331s name='1', 331s message='a', 331s ), 331s Commit( 331s name='2', 331s message='b', 331s parents=[Placeholder('1')], 331s ), 331s ], 331s 'tags': { 331s 'importer/import/1': Placeholder('1'), 331s 'importer/upload/2': Placeholder('2'), 331s }, 331s }, 331s { 331s 'commits': [Commit(name='b1', message='c')], 331s 'tags': {'importer/import/1': Placeholder('b1')}, 331s }, 331s ), 331s ( 331s # Commits that have no commit message should round trip 331s { 331s 'commits': [ 331s Commit( 331s name='1', 331s message='a', 331s ), 331s Commit( 331s name='2', 331s message='', 331s tree=Tree({'a': Blob(b'a')}), 331s parents=[Placeholder('1')], 331s ), 331s ], 331s 'tags': { 331s 'importer/import/1': Placeholder('1'), 331s 'importer/upload/2': Placeholder('2'), 331s } 331s }, 331s { 331s 'commits': [Commit(name='b1', message='c')], 331s 'tags': {'importer/import/1': Placeholder('b1')}, 331s }, 331s ), 331s ]) 331s def test_input_edge_cases(tmpdir, repo, before_export, before_import): 331s """ 331s Edge cases in input rich history should reimport without failure 331s 331s Check that rich history preservation completes without an exception in 331s various cases. Details of each case are described in comments in the test 331s parameters above. 331s 331s Since these tests generally cover the mutated case (where rich history has 331s to be ported forward because parent commits have mutated), we must remove 331s and recreate the 'importer/import/1' tag so that it is different before 331s attempting reimport. This is done by deleting all ('importer/*') tags and 331s then using the before_import parameter to recreate it again. 331s 331s :param py.path tmpdir: the pytest standard tmpdir fixture. 331s :param GitUbuntuRepository repo: our standard repo fixture. 331s :param dict before_export: the parameters to supply to Repo() to construct 331s the repository that will be exported. 331s :param dict before_import: the parametsrs to supply to Repo() to add to the 331s repository before attempting reimport. 331s """ 331s > Repo(**before_export).write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/rich_history_test.py:260: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmp905kjcy6/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s _____________ test_input_edge_cases[before_export2-before_import2] _____________ 331s 331s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_input_edge_cases_before_e2') 331s repo = 331s before_export = {'commits': [, , 'importer/upload/2': }} 331s before_import = {'commits': [], 'tags': {'importer/import/1': }} 331s 331s @pytest.mark.parametrize(['before_export', 'before_import'], [ 331s ( 331s # Commit messages with patch-like contents should not fail 331s 331s # If a commit message in rich history contains text in a patch-like 331s # format (such as a diff of some file), it should not prevent correct 331s # round-tripping. "git format-patch" followed by "git am" fails this 331s # test, for example. 331s { 331s 'commits': [ 331s Commit(name='1', message='a', tree=Tree({'a': Blob(b'a')})), 331s Commit( 331s name='2', 331s message='''First line 331s 331s Inline patch that isn't part of the real patch starts here 331s 331s --- a/foo 331s +++ b/foo 331s @@ -1 +1,2 @@ 331s foo 331s +bar 331s ''', 331s tree=Tree({'a': Blob(b'ab')}), 331s parents=[Placeholder('1')], 331s ), 331s ], 331s 'tags': { 331s 'importer/import/1': Placeholder('1'), 331s 'importer/upload/2': Placeholder('2'), 331s } 331s }, 331s { 331s 'commits': [ 331s Commit(name='b1', message='c', tree=Tree({'a': Blob(b'a')})), 331s ], 331s 'tags': {'importer/import/1': Placeholder('b1')}, 331s }, 331s ), 331s ( 331s # Commits that have no changes should round trip 331s { 331s 'commits': [ 331s Commit( 331s name='1', 331s message='a', 331s ), 331s Commit( 331s name='2', 331s message='b', 331s parents=[Placeholder('1')], 331s ), 331s ], 331s 'tags': { 331s 'importer/import/1': Placeholder('1'), 331s 'importer/upload/2': Placeholder('2'), 331s }, 331s }, 331s { 331s 'commits': [Commit(name='b1', message='c')], 331s 'tags': {'importer/import/1': Placeholder('b1')}, 331s }, 331s ), 331s ( 331s # Commits that have no commit message should round trip 331s { 331s 'commits': [ 331s Commit( 331s name='1', 331s message='a', 331s ), 331s Commit( 331s name='2', 331s message='', 331s tree=Tree({'a': Blob(b'a')}), 331s parents=[Placeholder('1')], 331s ), 331s ], 331s 'tags': { 331s 'importer/import/1': Placeholder('1'), 331s 'importer/upload/2': Placeholder('2'), 331s } 331s }, 331s { 331s 'commits': [Commit(name='b1', message='c')], 331s 'tags': {'importer/import/1': Placeholder('b1')}, 331s }, 331s ), 331s ]) 331s def test_input_edge_cases(tmpdir, repo, before_export, before_import): 331s """ 331s Edge cases in input rich history should reimport without failure 331s 331s Check that rich history preservation completes without an exception in 331s various cases. Details of each case are described in comments in the test 331s parameters above. 331s 331s Since these tests generally cover the mutated case (where rich history has 331s to be ported forward because parent commits have mutated), we must remove 331s and recreate the 'importer/import/1' tag so that it is different before 331s attempting reimport. This is done by deleting all ('importer/*') tags and 331s then using the before_import parameter to recreate it again. 331s 331s :param py.path tmpdir: the pytest standard tmpdir fixture. 331s :param GitUbuntuRepository repo: our standard repo fixture. 331s :param dict before_export: the parameters to supply to Repo() to construct 331s the repository that will be exported. 331s :param dict before_import: the parametsrs to supply to Repo() to add to the 331s repository before attempting reimport. 331s """ 331s > Repo(**before_export).write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/rich_history_test.py:260: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpuxvglkri/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s _______________________ test_preservation_fast_forwards ________________________ 331s 331s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_preservation_fast_forward0') 331s repo = 331s 331s def test_preservation_fast_forwards(tmpdir, repo): 331s """Rich history that can be fast forwarded should not mutate 331s 331s :param py.path tmpdir: the pytest standard tmpdir fixture. 331s :param GitUbuntuRepository repo: our standard repo fixture. 331s """ 331s Repo( 331s commits=[ 331s Commit( 331s name='1', 331s message='a', 331s ), 331s Commit( 331s name='2', 331s message='', 331s tree=Tree({'a': Blob(b'a')}), 331s parents=[Placeholder('1')], 331s ), 331s ], 331s tags={ 331s 'importer/import/1': Placeholder('1'), 331s 'importer/upload/2': Placeholder('2'), 331s } 331s > ).write(repo.raw_repo) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/rich_history_test.py:294: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s self = 331s repo = pygit2.Repository('/tmp/tmpim9_085t/.git/'), record = {} 331s 331s def write(self, repo, record=None): 331s replace_placeholders(self) 331s record = record or dict() 331s written_commits = [ 331s commit.write(repo=repo, record=record) 331s for commit 331s in self.commit_list 331s ] 331s for name, target in self.branches.items(): 331s repo.create_branch( 331s name, 331s repo.get(target.write(repo)).peel(pygit2.Commit), 331s ) 331s for name, target in self.tags.items(): 331s repo.create_tag( 331s name, 331s target.write(repo), 331s > pygit2.GIT_OBJ_COMMIT, 331s self.tagger.signature, 331s 'Tag message', 331s ) 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/repo_builder.py:389: AttributeError 331s _______________________ test_source_create_with_version ________________________ 331s 331s repo = 331s 331s def test_source_create_with_version(repo): 331s > version = get_spec_changelog_version(repo, version='3', native=True) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/source_builder_test.py:57: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 331s changelog = repo.get_changelog_from_treeish(tree_hash) 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 331s return Changelog.from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:569: in from_treeish 331s blob = follow_symlinks_to_blob( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpfci261wz/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (native)' 331s dpkg-source: info: building source-builder-package in source-builder-package_3.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_3.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s _______________________ test_source_create_with_versions _______________________ 331s 331s repo = 331s 331s def test_source_create_with_versions(repo): 331s source_spec = target.SourceSpec(changelog_versions=['3', '4'], native=True) 331s with target.Source(source_spec) as f: 331s tree_hash = importer.dsc_to_tree_hash(repo.raw_repo, f) 331s > changelog = repo.get_changelog_from_treeish(tree_hash) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/source_builder_test.py:65: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 331s return Changelog.from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:569: in from_treeish 331s blob = follow_symlinks_to_blob( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmps4rs5qfo/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (native)' 331s dpkg-source: info: building source-builder-package in source-builder-package_3.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_3.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s ____________ test_source_native_source_format[True-3.0 (native)\n] _____________ 331s 331s repo = 331s native = True, expected = b'3.0 (native)\n' 331s 331s @pytest.mark.parametrize('native,expected', [ 331s (True, b"3.0 (native)\n"), 331s (False, b"3.0 (quilt)\n"), 331s ]) 331s def test_source_native_source_format(repo, native, expected): 331s with target.Source(target.SourceSpec(native=native)) as dsc_path: 331s > blob = git_repository.follow_symlinks_to_blob( 331s repo.raw_repo, 331s dsc_path_to_tree(repo, dsc_path), 331s 'debian/source/format', 331s ) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/source_builder_test.py:133: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpqzu2qh3n/.git/') 331s top_tree_object = 331s search_path = 'debian/source/format' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (native)' 331s dpkg-source: info: building source-builder-package in source-builder-package_1.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s ____________ test_source_native_source_format[False-3.0 (quilt)\n] _____________ 331s 331s repo = 331s native = False, expected = b'3.0 (quilt)\n' 331s 331s @pytest.mark.parametrize('native,expected', [ 331s (True, b"3.0 (native)\n"), 331s (False, b"3.0 (quilt)\n"), 331s ]) 331s def test_source_native_source_format(repo, native, expected): 331s with target.Source(target.SourceSpec(native=native)) as dsc_path: 331s > blob = git_repository.follow_symlinks_to_blob( 331s repo.raw_repo, 331s dsc_path_to_tree(repo, dsc_path), 331s 'debian/source/format', 331s ) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/source_builder_test.py:133: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpwj8ffho6/.git/') 331s top_tree_object = 331s search_path = 'debian/source/format' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s _________________________ test_source_quilt_no_patches _________________________ 331s 331s repo = 331s 331s def test_source_quilt_no_patches(repo): 331s with target.Source(target.SourceSpec()) as dsc_path: 331s top = dsc_path_to_tree(repo, dsc_path) 331s debian_entry = top['debian'] 331s > assert debian_entry.type in [pygit2.GIT_OBJ_TREE, 'tree'] 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/source_builder_test.py:144: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s ________________________ test_source_quilt_with_patches ________________________ 331s 331s repo = 331s 331s def test_source_quilt_with_patches(repo): 331s spec = target.SourceSpec(has_patches=True) 331s with target.Source(spec) as dsc_path: 331s top = dsc_path_to_tree(repo, dsc_path) 331s expected_files = ['series', 'a', 'b'] 331s for basename in expected_files: 331s > assert git_repository.follow_symlinks_to_blob( 331s repo.raw_repo, 331s top, 331s 'debian/patches/%s' % basename, 331s ) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/source_builder_test.py:156: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpb01efp05/.git/') 331s top_tree_object = 331s search_path = 'debian/patches/series' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: applying a 331s dpkg-source: info: applying b 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s ____________________ test_source_quilt_with_patches_applied ____________________ 331s 331s repo = 331s 331s def test_source_quilt_with_patches_applied(repo): 331s spec = target.SourceSpec(has_patches=True) 331s with target.Source(spec) as dsc_path: 331s top = dsc_path_to_tree(repo, dsc_path, patches_applied=True) 331s expected_files = [ 331s 'debian/patches/series', 331s 'debian/patches/a', 331s 'debian/patches/b', 331s 'a', 331s 'b', 331s ] 331s for filename in expected_files: 331s > assert git_repository.follow_symlinks_to_blob( 331s repo.raw_repo, 331s top, 331s filename, 331s ) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/source_builder_test.py:183: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpyvq29zh1/.git/') 331s top_tree_object = 331s search_path = 'debian/patches/series' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: applying a 331s dpkg-source: info: applying b 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: using patch list from debian/patches/series 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s ______________________ test_source_version_native_default ______________________ 331s 331s repo = 331s 331s def test_source_version_native_default(repo): 331s """The default version string for a native package should not have a 331s '-' in it. 331s """ 331s > version = get_spec_changelog_version(repo, native=True) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/source_builder_test.py:194: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 331s changelog = repo.get_changelog_from_treeish(tree_hash) 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 331s return Changelog.from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:569: in from_treeish 331s blob = follow_symlinks_to_blob( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpvcgp2a87/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (native)' 331s dpkg-source: info: building source-builder-package in source-builder-package_1.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s ____________________ test_source_version_non_native_default ____________________ 331s 331s repo = 331s 331s def test_source_version_non_native_default(repo): 331s """The default version string for a non-native package should have a 331s '-' in it. 331s """ 331s > version = get_spec_changelog_version(repo, native=False) 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/source_builder_test.py:202: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 331s changelog = repo.get_changelog_from_treeish(tree_hash) 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 331s return Changelog.from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:569: in from_treeish 331s blob = follow_symlinks_to_blob( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmp10m3uju5/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s _____________________ test_source_version_native_specific ______________________ 331s 331s repo = 331s 331s def test_source_version_native_specific(repo): 331s """We should be able to create a native package with a 331s native-looking version string. 331s """ 331s > version = get_spec_changelog_version(repo, native=True, version='1.0') 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/source_builder_test.py:210: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 331s changelog = repo.get_changelog_from_treeish(tree_hash) 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 331s return Changelog.from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:569: in from_treeish 331s blob = follow_symlinks_to_blob( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpdfaqsw9w/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (native)' 331s dpkg-source: info: building source-builder-package in source-builder-package_1.0.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1.0.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s ___________________ test_source_version_non_native_specific ____________________ 331s 331s repo = 331s 331s def test_source_version_non_native_specific(repo): 331s """We should be able to create a non-native package with a 331s non-native-looking version string. 331s """ 331s > version = get_spec_changelog_version(repo, native=False, version='1.0-1') 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/source_builder_test.py:218: 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 331s changelog = repo.get_changelog_from_treeish(tree_hash) 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 331s return Changelog.from_treeish( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:569: in from_treeish 331s blob = follow_symlinks_to_blob( 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 331s return _follow_symlinks_to_blob( 331s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 331s 331s repo = pygit2.Repository('/tmp/tmpkbtoqe4h/.git/') 331s top_tree_object = 331s search_path = 'debian/changelog' 331s _rel_tree = 331s _rel_path = '' 331s 331s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 331s _rel_tree=None, _rel_path='' 331s ): 331s '''Recursively follow a path down a tree, following symlinks, to find blob 331s 331s repo: pygit2.Repository object 331s top_tree: pygit2.Tree object of the top of the tree structure 331s search_path: '/'-separated path string of blob to find 331s _rel_tree: (internal) which tree to look further into 331s _rel_path: (internal) the path we are in so far 331s ''' 331s 331s NORMAL_BLOB_MODES = set([ 331s pygit2.GIT_FILEMODE_BLOB, 331s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 331s ]) 331s 331s _rel_tree = _rel_tree or top_tree_object 331s head, tail = posixpath.split(search_path) 331s 331s # A traditional functional split would put a single entry in head with tail 331s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 331s # to make it appear to have traditional semantics. 331s if not head: 331s head = tail 331s tail = None 331s 331s entry = _rel_tree[head] 331s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 331s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 331s 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/git_repository.py:68: AttributeError 331s ----------------------------- Captured stdout call ----------------------------- 331s dpkg-source: info: using source format '3.0 (quilt)' 331s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.0.orig.tar.gz 331s dpkg-source: info: building source-builder-package in source-builder-package_1.0-1.debian.tar.xz 331s dpkg-source: info: building source-builder-package in source-builder-package_1.0-1.dsc 331s ----------------------------- Captured stderr call ----------------------------- 331s dpkg-source: warning: missing information for output field Standards-Version 331s =============================== warnings summary =============================== 331s gitubuntu/__main__.py:7 331s /tmp/autopkgtest.TiWmv1/build.FF8/src/gitubuntu/__main__.py:7: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html 331s import pkg_resources 331s 331s ../../../../usr/lib/python3/dist-packages/pkg_resources/__init__.py:3154 331s /usr/lib/python3/dist-packages/pkg_resources/__init__.py:3154: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('logilab')`. 331s 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 331s declare_namespace(pkg) 331s 331s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 331s 331s ---------- coverage: platform linux, python 3.12.7-final-0 ----------- 331s Name Stmts Miss Cover 331s --------------------------------------------------------------- 331s gitubuntu/__init__.py 0 0 100% 331s gitubuntu/__main__.py 103 94 9% 331s gitubuntu/build.py 185 131 29% 331s gitubuntu/cache.py 1 0 100% 331s gitubuntu/clone.py 70 54 23% 331s gitubuntu/dsc.py 65 16 75% 331s gitubuntu/exportorig.py 48 37 23% 331s gitubuntu/git_repository.py 1103 521 53% 331s gitubuntu/git_repository_test.py 316 40 87% 331s gitubuntu/importer.py 707 446 37% 331s gitubuntu/importer_service.py 215 22 90% 331s gitubuntu/importer_service_broker.py 60 49 18% 331s gitubuntu/importer_service_ipc.py 12 2 83% 331s gitubuntu/importer_service_poller.py 37 25 32% 331s gitubuntu/importer_service_test.py 147 0 100% 331s gitubuntu/importer_service_worker.py 87 64 26% 331s gitubuntu/importer_service_worker_test.py 18 0 100% 331s gitubuntu/importer_tag_test.py 47 20 57% 331s gitubuntu/importer_test.py 388 133 66% 331s gitubuntu/integration_test.py 67 26 61% 331s gitubuntu/logging.py 8 4 50% 331s gitubuntu/merge.py 219 192 12% 331s gitubuntu/patch_state.py 2 0 100% 331s gitubuntu/prepare_upload.py 86 3 97% 331s gitubuntu/prepare_upload_test.py 152 0 100% 331s gitubuntu/queue.py 174 148 15% 331s gitubuntu/remote.py 100 85 15% 331s gitubuntu/repo_builder.py 162 0 100% 331s gitubuntu/repo_builder_test.py 159 12 92% 331s gitubuntu/repo_comparator.py 32 25 22% 331s gitubuntu/rich_history.py 67 45 33% 331s gitubuntu/rich_history_test.py 53 31 42% 331s gitubuntu/run.py 72 12 83% 331s gitubuntu/scriptutils.py 11 0 100% 331s gitubuntu/source_builder.py 119 0 100% 331s gitubuntu/source_builder_test.py 105 18 83% 331s gitubuntu/source_information.py 339 133 61% 331s gitubuntu/source_information_test.py 78 3 96% 331s gitubuntu/spec.py 3 0 100% 331s gitubuntu/submit.py 103 86 17% 331s gitubuntu/tag.py 78 69 12% 331s gitubuntu/test_fixtures.py 29 5 83% 331s gitubuntu/test_util.py 5 0 100% 331s gitubuntu/version.py 1 0 100% 331s gitubuntu/versioning.py 124 16 87% 331s --------------------------------------------------------------- 331s TOTAL 5957 2567 57% 331s 331s =========================== short test summary info ============================ 331s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[0] 331s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[1] 331s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[2] 331s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[3] 331s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[4] 331s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob_not_found[tree1] 331s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob_not_found[tree2] 331s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob_not_found[tree3] 331s FAILED gitubuntu/git_repository_test.py::test_git_escape_dir_to_tree - Attrib... 331s FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data1-debian/patches/series] 331s FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data2-debian/patches/series] 331s FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data3-debian/patches/debian.series] 331s FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data4-debian/patches/debian.series] 331s FAILED gitubuntu/git_repository_test.py::test_quilt_env - AttributeError: mod... 331s FAILED gitubuntu/git_repository_test.py::test_repo_quilt_env - AttributeError... 331s FAILED gitubuntu/git_repository_test.py::test_repo_quilt_env_from_treeish_str 331s 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] 331s 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] 331s 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] 331s FAILED gitubuntu/git_repository_test.py::test_commit_tree - AttributeError: m... 331s FAILED gitubuntu/git_repository_test.py::test_descendant_of[root-root-False] 331s FAILED gitubuntu/git_repository_test.py::test_descendant_of[child1-root-True] 331s FAILED gitubuntu/git_repository_test.py::test_descendant_of[root-child1-False] 331s FAILED gitubuntu/git_repository_test.py::test_descendant_of[grandchild1-root-True] 331s FAILED gitubuntu/git_repository_test.py::test_descendant_of[child1-child2-False] 331s FAILED gitubuntu/git_repository_test.py::test_descendant_of[root-disjoint-False] 331s FAILED gitubuntu/git_repository_test.py::test_create_tag - AttributeError: mo... 331s FAILED gitubuntu/git_repository_test.py::test_get_all_reimport_tags - Attribu... 331s FAILED gitubuntu/git_repository_test.py::test_get_head_info - AttributeError:... 331s 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] 331s 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] 331s 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] 331s 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] 331s 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] 331s 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] 331s 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] 331s 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] 331s FAILED gitubuntu/importer_tag_test.py::test_import_applied_spi_tags[input_repo0-validation_repo_delta0-validation_repo_expected_treewise_refs0-True] 331s FAILED gitubuntu/importer_tag_test.py::test_import_applied_spi_tags[input_repo2-validation_repo_delta2-validation_repo_expected_treewise_refs2-False] 331s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo1-PatchState.UNAPPLIED-expected1] 331s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo2-PatchState.UNAPPLIED-expected2] 331s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo4-PatchState.APPLIED-expected4] 331s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo5-PatchState.APPLIED-expected5] 331s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags_ordering - A... 331s FAILED gitubuntu/importer_test.py::test_create_import_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] 331s FAILED gitubuntu/importer_test.py::test_create_import_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] 331s FAILED gitubuntu/importer_test.py::test_create_import_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] 331s FAILED gitubuntu/importer_test.py::test_create_import_tag_hash_stability_on_first_import 331s FAILED gitubuntu/importer_test.py::test_create_import_tag_hash_stability_on_reimport 331s FAILED gitubuntu/importer_test.py::test_create_applied_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] 331s FAILED gitubuntu/importer_test.py::test_create_applied_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] 331s FAILED gitubuntu/importer_test.py::test_create_applied_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] 331s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo1-parent_overrides1-changelog_versions1-PatchState.UNAPPLIED-expected_refs1] 331s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo2-parent_overrides2-changelog_versions2-PatchState.UNAPPLIED-expected_refs2] 331s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo3-parent_overrides3-changelog_versions3-PatchState.UNAPPLIED-expected_refs3] 331s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo5-parent_overrides5-changelog_versions5-PatchState.APPLIED-expected_refs5] 331s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo6-parent_overrides6-changelog_versions6-PatchState.APPLIED-expected_refs6] 331s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo7-parent_overrides7-changelog_versions7-PatchState.APPLIED-expected_refs7] 331s FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo0-published_spec0-True] 331s FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo1-published_spec1-True] 331s FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo2-published_spec2-RichHistoryTreeMismatch] 331s FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo3-published_spec3-RichHistoryHasNoChangelogParentAncestor] 331s FAILED gitubuntu/importer_test.py::test_add_changelog_note_to_commit - Attrib... 331s FAILED gitubuntu/importer_test.py::test_add_changelog_note_to_commit_utf8 - A... 331s FAILED gitubuntu/importer_test.py::test_double_changelog_note_add_does_not_fail 331s FAILED gitubuntu/importer_test.py::test_create_import_note - AttributeError: ... 331s FAILED gitubuntu/importer_test.py::test_create_import_note_timestamp - Attrib... 331s FAILED gitubuntu/importer_test.py::test_import_creates_import_note - Attribut... 331s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_quilt_patches - ... 331s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo0-changelog_versions0-validation_repo_delta0-validation_repo_expected_identical_refs0] 331s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo1-changelog_versions1-validation_repo_delta1-validation_repo_expected_identical_refs1] 331s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo2-changelog_versions2-validation_repo_delta2-validation_repo_expected_identical_refs2] 331s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo3-changelog_versions3-validation_repo_delta3-validation_repo_expected_identical_refs3] 331s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parent_override 331s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parent_override_failure 331s FAILED gitubuntu/importer_test.py::test_import_applied_spi_parenting[input_repo0-expected_ancestor_commits0-expected_parent_commits0] 331s FAILED gitubuntu/importer_test.py::test_authorship_date[False-Fri, 2 Feb 1971 12:34:56 +0100-expected_result0] 331s FAILED gitubuntu/importer_test.py::test_authorship_date[True-Failday, 30 Feb 1971 99:99:99 +9999-expected_result1] 331s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file 331s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_fetch_failure_retry 331s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_missing_ref 331s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_missing_commit 331s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_not_a_commit 331s FAILED gitubuntu/integration_test.py::test_reconstruct_changelog - AttributeE... 331s FAILED gitubuntu/repo_builder_test.py::TestObjectCreation::testRepoBranchesTags 331s FAILED gitubuntu/repo_builder_test.py::TestObjectCreation::testRepoTagger - A... 331s FAILED gitubuntu/repo_builder_test.py::test_source_tree - AttributeError: mod... 331s FAILED gitubuntu/rich_history_test.py::test_preservation - AttributeError: mo... 331s FAILED gitubuntu/rich_history_test.py::test_preservation_multiple_parents - A... 331s FAILED gitubuntu/rich_history_test.py::test_preservation_no_parents - Attribu... 331s FAILED gitubuntu/rich_history_test.py::test_input_edge_cases[before_export0-before_import0] 331s FAILED gitubuntu/rich_history_test.py::test_input_edge_cases[before_export1-before_import1] 331s FAILED gitubuntu/rich_history_test.py::test_input_edge_cases[before_export2-before_import2] 331s FAILED gitubuntu/rich_history_test.py::test_preservation_fast_forwards - Attr... 331s FAILED gitubuntu/source_builder_test.py::test_source_create_with_version - At... 331s FAILED gitubuntu/source_builder_test.py::test_source_create_with_versions - A... 331s FAILED gitubuntu/source_builder_test.py::test_source_native_source_format[True-3.0 (native)\n] 331s FAILED gitubuntu/source_builder_test.py::test_source_native_source_format[False-3.0 (quilt)\n] 331s FAILED gitubuntu/source_builder_test.py::test_source_quilt_no_patches - Attri... 331s FAILED gitubuntu/source_builder_test.py::test_source_quilt_with_patches - Att... 331s FAILED gitubuntu/source_builder_test.py::test_source_quilt_with_patches_applied 331s FAILED gitubuntu/source_builder_test.py::test_source_version_native_default 331s FAILED gitubuntu/source_builder_test.py::test_source_version_non_native_default 331s FAILED gitubuntu/source_builder_test.py::test_source_version_native_specific 331s FAILED gitubuntu/source_builder_test.py::test_source_version_non_native_specific 331s = 105 failed, 348 passed, 3 skipped, 3 xfailed, 2 warnings in 81.00s (0:01:20) = 331s pytest failed; self test will fail 331s autopkgtest [09:39:10]: test self-test: -----------------------] 332s self-test FAIL non-zero exit status 1 332s autopkgtest [09:39:11]: test self-test: - - - - - - - - - - results - - - - - - - - - - 332s autopkgtest [09:39:11]: @@@@@@@@@@@@@@@@@@@@ summary 332s self-test FAIL non-zero exit status 1 344s nova [W] Skipping flock in bos03-arm64 344s Creating nova instance adt-plucky-arm64-git-ubuntu-20241126-093339-juju-7f2275-prod-proposed-migration-environment-20-916f025c-9def-45fe-b711-db247adf9003 from image adt/ubuntu-plucky-arm64-server-20241119.img (UUID 254dc414-4366-404b-b85c-a4e26b3194ad)...