0s autopkgtest [09:33:40]: starting date and time: 2024-11-26 09:33:40+0000 0s autopkgtest [09:33:40]: git checkout: 6f3be7a8 Fix armhf LXD image generation for plucky 0s autopkgtest [09:33:40]: host juju-7f2275-prod-proposed-migration-environment-20; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.fr9_kj__/out --timeout-copy=6000 -a i386 --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 builder-cpu2-ram4-disk20 --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-20@bos03-25.secgroup --name adt-plucky-i386-git-ubuntu-20241126-093339-juju-7f2275-prod-proposed-migration-environment-20-5c13d378-2bb2-472f-8b62-cc08f050dd31 --image adt/ubuntu-plucky-amd64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-20 --net-id=net_prod-proposed-migration-amd64 -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/ 53s autopkgtest [09:34:33]: testbed dpkg architecture: amd64 53s autopkgtest [09:34:33]: testbed apt version: 2.9.8 54s autopkgtest [09:34:34]: test architecture: i386 54s autopkgtest [09:34:34]: @@@@@@@@@@@@@@@@@@@@ test bed setup 54s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [73.9 kB] 55s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/restricted Sources [9708 B] 55s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [14.2 kB] 55s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [58.7 kB] 55s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [811 kB] 55s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main i386 Packages [50.7 kB] 55s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 Packages [93.2 kB] 55s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/restricted i386 Packages [2572 B] 55s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/restricted amd64 Packages [40.6 kB] 55s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/universe amd64 Packages [670 kB] 55s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe i386 Packages [253 kB] 55s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse i386 Packages [5684 B] 55s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse amd64 Packages [20.4 kB] 55s Fetched 2104 kB in 1s (2402 kB/s) 55s Reading package lists... 57s Reading package lists... 58s Building dependency tree... 58s Reading state information... 58s Calculating upgrade... 58s The following package was automatically installed and is no longer required: 58s libsgutils2-1.46-2 58s Use 'sudo apt autoremove' to remove it. 58s The following NEW packages will be installed: 58s libsgutils2-1.48 58s The following packages will be upgraded: 58s amd64-microcode apt apt-utils bash bpftrace curl debconf debconf-i18n 58s distro-info dracut-install fwupd-signed gir1.2-girepository-2.0 58s gir1.2-glib-2.0 hostname init init-system-helpers intel-microcode 58s libapt-pkg6.0t64 libaudit-common libaudit1 libcurl3t64-gnutls libcurl4t64 58s libgirepository-1.0-1 libglib2.0-0t64 libglib2.0-data liblzma5 58s libpam-modules libpam-modules-bin libpam-runtime libpam0g libplymouth5 58s libpolkit-agent-1-0 libpolkit-gobject-1-0 libselinux1 libsemanage-common 58s libsemanage2 linux-base lto-disabled-list lxd-installer openssh-client 58s openssh-server openssh-sftp-server pinentry-curses plymouth 58s plymouth-theme-ubuntu-text python-apt-common python3-apt python3-blinker 58s python3-dbus python3-debconf python3-gi python3-jsonschema-specifications 58s python3-rpds-py python3-yaml sg3-utils sg3-utils-udev vim-common vim-tiny 58s xxd xz-utils 58s 60 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 58s Need to get 23.4 MB of archives. 58s After this operation, 4681 kB of additional disk space will be used. 58s Get:1 http://ftpmaster.internal/ubuntu plucky/main amd64 bash amd64 5.2.32-1ubuntu2 [918 kB] 59s Get:2 http://ftpmaster.internal/ubuntu plucky/main amd64 hostname amd64 3.25 [11.1 kB] 59s Get:3 http://ftpmaster.internal/ubuntu plucky/main amd64 init-system-helpers all 1.67ubuntu1 [39.1 kB] 59s Get:4 http://ftpmaster.internal/ubuntu plucky/main amd64 liblzma5 amd64 5.6.3-1 [156 kB] 59s Get:5 http://ftpmaster.internal/ubuntu plucky/main amd64 libapt-pkg6.0t64 amd64 2.9.14ubuntu1 [1122 kB] 59s Get:6 http://ftpmaster.internal/ubuntu plucky/main amd64 apt amd64 2.9.14ubuntu1 [1385 kB] 59s Get:7 http://ftpmaster.internal/ubuntu plucky/main amd64 apt-utils amd64 2.9.14ubuntu1 [224 kB] 59s Get:8 http://ftpmaster.internal/ubuntu plucky/main amd64 libaudit-common all 1:4.0.2-2ubuntu1 [6578 B] 59s Get:9 http://ftpmaster.internal/ubuntu plucky/main amd64 libaudit1 amd64 1:4.0.2-2ubuntu1 [53.9 kB] 59s Get:10 http://ftpmaster.internal/ubuntu plucky/main amd64 debconf-i18n all 1.5.87ubuntu1 [204 kB] 59s Get:11 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-debconf all 1.5.87ubuntu1 [4156 B] 59s Get:12 http://ftpmaster.internal/ubuntu plucky/main amd64 debconf all 1.5.87ubuntu1 [124 kB] 59s Get:13 http://ftpmaster.internal/ubuntu plucky/main amd64 libpam0g amd64 1.5.3-7ubuntu4 [69.6 kB] 59s Get:14 http://ftpmaster.internal/ubuntu plucky/main amd64 libselinux1 amd64 3.7-3ubuntu1 [86.9 kB] 59s Get:15 http://ftpmaster.internal/ubuntu plucky/main amd64 libpam-modules-bin amd64 1.5.3-7ubuntu4 [53.7 kB] 59s Get:16 http://ftpmaster.internal/ubuntu plucky/main amd64 libpam-modules amd64 1.5.3-7ubuntu4 [294 kB] 59s Get:17 http://ftpmaster.internal/ubuntu plucky/main amd64 init amd64 1.67ubuntu1 [6428 B] 59s Get:18 http://ftpmaster.internal/ubuntu plucky/main amd64 openssh-sftp-server amd64 1:9.9p1-3ubuntu2 [41.2 kB] 59s Get:19 http://ftpmaster.internal/ubuntu plucky/main amd64 openssh-server amd64 1:9.9p1-3ubuntu2 [625 kB] 59s Get:20 http://ftpmaster.internal/ubuntu plucky/main amd64 openssh-client amd64 1:9.9p1-3ubuntu2 [1080 kB] 59s Get:21 http://ftpmaster.internal/ubuntu plucky/main amd64 libpam-runtime all 1.5.3-7ubuntu4 [40.8 kB] 59s Get:22 http://ftpmaster.internal/ubuntu plucky/main amd64 libsemanage-common all 3.7-2build1 [7186 B] 59s Get:23 http://ftpmaster.internal/ubuntu plucky/main amd64 libsemanage2 amd64 3.7-2build1 [105 kB] 59s Get:24 http://ftpmaster.internal/ubuntu plucky/main amd64 distro-info amd64 1.12 [20.0 kB] 59s Get:25 http://ftpmaster.internal/ubuntu plucky/main amd64 gir1.2-girepository-2.0 amd64 1.82.0-2 [25.3 kB] 59s Get:26 http://ftpmaster.internal/ubuntu plucky/main amd64 gir1.2-glib-2.0 amd64 2.82.2-3 [182 kB] 59s Get:27 http://ftpmaster.internal/ubuntu plucky/main amd64 libglib2.0-0t64 amd64 2.82.2-3 [1655 kB] 59s Get:28 http://ftpmaster.internal/ubuntu plucky/main amd64 libgirepository-1.0-1 amd64 1.82.0-2 [88.7 kB] 59s Get:29 http://ftpmaster.internal/ubuntu plucky/main amd64 libglib2.0-data all 2.82.2-3 [51.7 kB] 59s Get:30 http://ftpmaster.internal/ubuntu plucky/main amd64 python-apt-common all 2.9.0ubuntu2 [20.3 kB] 59s Get:31 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-apt amd64 2.9.0ubuntu2 [182 kB] 59s Get:32 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-dbus amd64 1.3.2-5build4 [110 kB] 59s Get:33 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-gi amd64 3.50.0-3build1 [293 kB] 59s Get:34 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-yaml amd64 6.0.2-1build1 [187 kB] 59s Get:35 http://ftpmaster.internal/ubuntu plucky/main amd64 vim-tiny amd64 2:9.1.0861-1ubuntu1 [1037 kB] 59s Get:36 http://ftpmaster.internal/ubuntu plucky/main amd64 vim-common all 2:9.1.0861-1ubuntu1 [395 kB] 59s Get:37 http://ftpmaster.internal/ubuntu plucky/main amd64 xxd amd64 2:9.1.0861-1ubuntu1 [67.8 kB] 59s Get:38 http://ftpmaster.internal/ubuntu plucky/main amd64 libplymouth5 amd64 24.004.60-2ubuntu4 [145 kB] 59s Get:39 http://ftpmaster.internal/ubuntu plucky/main amd64 plymouth-theme-ubuntu-text amd64 24.004.60-2ubuntu4 [10.2 kB] 59s Get:40 http://ftpmaster.internal/ubuntu plucky/main amd64 plymouth amd64 24.004.60-2ubuntu4 [139 kB] 59s Get:41 http://ftpmaster.internal/ubuntu plucky/main amd64 xz-utils amd64 5.6.3-1 [276 kB] 59s Get:42 http://ftpmaster.internal/ubuntu plucky/main amd64 bpftrace amd64 0.21.2-2ubuntu3 [1787 kB] 59s Get:43 http://ftpmaster.internal/ubuntu plucky/main amd64 curl amd64 8.11.0-1ubuntu2 [250 kB] 59s Get:44 http://ftpmaster.internal/ubuntu plucky/main amd64 libcurl4t64 amd64 8.11.0-1ubuntu2 [429 kB] 59s Get:45 http://ftpmaster.internal/ubuntu plucky/main amd64 dracut-install amd64 105-2ubuntu2 [35.9 kB] 59s Get:46 http://ftpmaster.internal/ubuntu plucky/main amd64 fwupd-signed amd64 1.55+1.7-1 [30.6 kB] 59s Get:47 http://ftpmaster.internal/ubuntu plucky/main amd64 libcurl3t64-gnutls amd64 8.11.0-1ubuntu2 [423 kB] 59s Get:48 http://ftpmaster.internal/ubuntu plucky/main amd64 libpolkit-agent-1-0 amd64 125-2ubuntu1 [18.2 kB] 59s Get:49 http://ftpmaster.internal/ubuntu plucky/main amd64 libpolkit-gobject-1-0 amd64 125-2ubuntu1 [49.8 kB] 59s Get:50 http://ftpmaster.internal/ubuntu plucky/main amd64 libsgutils2-1.48 amd64 1.48-0ubuntu1 [124 kB] 59s Get:51 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-base all 4.10.1ubuntu1 [34.8 kB] 59s Get:52 http://ftpmaster.internal/ubuntu plucky/main amd64 lto-disabled-list all 54 [12.2 kB] 59s Get:53 http://ftpmaster.internal/ubuntu plucky/main amd64 lxd-installer all 10 [5264 B] 59s Get:54 http://ftpmaster.internal/ubuntu plucky/main amd64 pinentry-curses amd64 1.3.1-0ubuntu2 [41.6 kB] 59s Get:55 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-blinker all 1.9.0-1 [10.7 kB] 59s Get:56 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-rpds-py amd64 0.21.0-2ubuntu1 [323 kB] 59s Get:57 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-jsonschema-specifications all 2023.12.1-2 [9116 B] 59s Get:58 http://ftpmaster.internal/ubuntu plucky/main amd64 sg3-utils amd64 1.48-0ubuntu1 [1042 kB] 60s Get:59 http://ftpmaster.internal/ubuntu plucky/main amd64 sg3-utils-udev all 1.48-0ubuntu1 [6608 B] 60s Get:60 http://ftpmaster.internal/ubuntu plucky/main amd64 amd64-microcode amd64 3.20240820.1ubuntu1 [187 kB] 60s Get:61 http://ftpmaster.internal/ubuntu plucky/main amd64 intel-microcode amd64 3.20241112.1ubuntu2 [7055 kB] 60s Preconfiguring packages ... 60s Fetched 23.4 MB in 2s (13.9 MB/s) 60s (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 ... 75620 files and directories currently installed.) 60s Preparing to unpack .../bash_5.2.32-1ubuntu2_amd64.deb ... 60s Unpacking bash (5.2.32-1ubuntu2) over (5.2.32-1ubuntu1) ... 60s Setting up bash (5.2.32-1ubuntu2) ... 60s 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 60s (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 ... 75620 files and directories currently installed.) 60s Preparing to unpack .../hostname_3.25_amd64.deb ... 60s Unpacking hostname (3.25) over (3.23+nmu2ubuntu2) ... 60s Setting up hostname (3.25) ... 61s (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 ... 75620 files and directories currently installed.) 61s Preparing to unpack .../init-system-helpers_1.67ubuntu1_all.deb ... 61s Unpacking init-system-helpers (1.67ubuntu1) over (1.66ubuntu1) ... 61s Setting up init-system-helpers (1.67ubuntu1) ... 61s (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 ... 75620 files and directories currently installed.) 61s Preparing to unpack .../liblzma5_5.6.3-1_amd64.deb ... 61s Unpacking liblzma5:amd64 (5.6.3-1) over (5.6.2-2) ... 61s Setting up liblzma5:amd64 (5.6.3-1) ... 61s (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 ... 75620 files and directories currently installed.) 61s Preparing to unpack .../libapt-pkg6.0t64_2.9.14ubuntu1_amd64.deb ... 61s Unpacking libapt-pkg6.0t64:amd64 (2.9.14ubuntu1) over (2.9.8) ... 61s Setting up libapt-pkg6.0t64:amd64 (2.9.14ubuntu1) ... 61s (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 ... 75620 files and directories currently installed.) 61s Preparing to unpack .../apt_2.9.14ubuntu1_amd64.deb ... 61s Unpacking apt (2.9.14ubuntu1) over (2.9.8) ... 61s Setting up apt (2.9.14ubuntu1) ... 61s (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 ... 75612 files and directories currently installed.) 61s Preparing to unpack .../apt-utils_2.9.14ubuntu1_amd64.deb ... 61s Unpacking apt-utils (2.9.14ubuntu1) over (2.9.8) ... 61s Preparing to unpack .../libaudit-common_1%3a4.0.2-2ubuntu1_all.deb ... 61s Unpacking libaudit-common (1:4.0.2-2ubuntu1) over (1:4.0.1-1ubuntu2) ... 62s Setting up libaudit-common (1:4.0.2-2ubuntu1) ... 62s (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 ... 75612 files and directories currently installed.) 62s Preparing to unpack .../libaudit1_1%3a4.0.2-2ubuntu1_amd64.deb ... 62s Unpacking libaudit1:amd64 (1:4.0.2-2ubuntu1) over (1:4.0.1-1ubuntu2) ... 62s Setting up libaudit1:amd64 (1:4.0.2-2ubuntu1) ... 62s (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 ... 75612 files and directories currently installed.) 62s Preparing to unpack .../debconf-i18n_1.5.87ubuntu1_all.deb ... 62s Unpacking debconf-i18n (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 62s Preparing to unpack .../python3-debconf_1.5.87ubuntu1_all.deb ... 62s Unpacking python3-debconf (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 62s Preparing to unpack .../debconf_1.5.87ubuntu1_all.deb ... 62s Unpacking debconf (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 62s Setting up debconf (1.5.87ubuntu1) ... 62s (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 ... 75612 files and directories currently installed.) 62s Preparing to unpack .../libpam0g_1.5.3-7ubuntu4_amd64.deb ... 62s Unpacking libpam0g:amd64 (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 62s Setting up libpam0g:amd64 (1.5.3-7ubuntu4) ... 62s (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 ... 75612 files and directories currently installed.) 62s Preparing to unpack .../libselinux1_3.7-3ubuntu1_amd64.deb ... 62s Unpacking libselinux1:amd64 (3.7-3ubuntu1) over (3.5-2ubuntu5) ... 62s Setting up libselinux1:amd64 (3.7-3ubuntu1) ... 62s (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 ... 75612 files and directories currently installed.) 62s Preparing to unpack .../libpam-modules-bin_1.5.3-7ubuntu4_amd64.deb ... 62s Unpacking libpam-modules-bin (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 62s Setting up libpam-modules-bin (1.5.3-7ubuntu4) ... 62s pam_namespace.service is a disabled or a static unit not running, not starting it. 63s (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 ... 75612 files and directories currently installed.) 63s Preparing to unpack .../libpam-modules_1.5.3-7ubuntu4_amd64.deb ... 63s Unpacking libpam-modules:amd64 (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 63s Setting up libpam-modules:amd64 (1.5.3-7ubuntu4) ... 63s (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 ... 75612 files and directories currently installed.) 63s Preparing to unpack .../init_1.67ubuntu1_amd64.deb ... 63s Unpacking init (1.67ubuntu1) over (1.66ubuntu1) ... 63s Preparing to unpack .../openssh-sftp-server_1%3a9.9p1-3ubuntu2_amd64.deb ... 63s Unpacking openssh-sftp-server (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 63s Preparing to unpack .../openssh-server_1%3a9.9p1-3ubuntu2_amd64.deb ... 63s Unpacking openssh-server (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 63s Preparing to unpack .../openssh-client_1%3a9.9p1-3ubuntu2_amd64.deb ... 63s Unpacking openssh-client (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 63s Preparing to unpack .../libpam-runtime_1.5.3-7ubuntu4_all.deb ... 63s Unpacking libpam-runtime (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 63s Setting up libpam-runtime (1.5.3-7ubuntu4) ... 63s (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 ... 75614 files and directories currently installed.) 63s Preparing to unpack .../libsemanage-common_3.7-2build1_all.deb ... 63s Unpacking libsemanage-common (3.7-2build1) over (3.5-1build6) ... 63s Setting up libsemanage-common (3.7-2build1) ... 63s (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 ... 75613 files and directories currently installed.) 63s Preparing to unpack .../libsemanage2_3.7-2build1_amd64.deb ... 63s Unpacking libsemanage2:amd64 (3.7-2build1) over (3.5-1build6) ... 63s Setting up libsemanage2:amd64 (3.7-2build1) ... 63s (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 ... 75613 files and directories currently installed.) 63s Preparing to unpack .../00-distro-info_1.12_amd64.deb ... 63s Unpacking distro-info (1.12) over (1.9) ... 63s Preparing to unpack .../01-gir1.2-girepository-2.0_1.82.0-2_amd64.deb ... 63s Unpacking gir1.2-girepository-2.0:amd64 (1.82.0-2) over (1.80.1-4) ... 63s Preparing to unpack .../02-gir1.2-glib-2.0_2.82.2-3_amd64.deb ... 63s Unpacking gir1.2-glib-2.0:amd64 (2.82.2-3) over (2.82.1-0ubuntu1) ... 63s Preparing to unpack .../03-libglib2.0-0t64_2.82.2-3_amd64.deb ... 63s Unpacking libglib2.0-0t64:amd64 (2.82.2-3) over (2.82.1-0ubuntu1) ... 63s Preparing to unpack .../04-libgirepository-1.0-1_1.82.0-2_amd64.deb ... 63s Unpacking libgirepository-1.0-1:amd64 (1.82.0-2) over (1.80.1-4) ... 63s Preparing to unpack .../05-libglib2.0-data_2.82.2-3_all.deb ... 63s Unpacking libglib2.0-data (2.82.2-3) over (2.82.1-0ubuntu1) ... 63s Preparing to unpack .../06-python-apt-common_2.9.0ubuntu2_all.deb ... 64s Unpacking python-apt-common (2.9.0ubuntu2) over (2.9.0ubuntu1) ... 64s Preparing to unpack .../07-python3-apt_2.9.0ubuntu2_amd64.deb ... 64s Unpacking python3-apt (2.9.0ubuntu2) over (2.9.0ubuntu1) ... 64s Preparing to unpack .../08-python3-dbus_1.3.2-5build4_amd64.deb ... 64s Unpacking python3-dbus (1.3.2-5build4) over (1.3.2-5build3) ... 64s Preparing to unpack .../09-python3-gi_3.50.0-3build1_amd64.deb ... 64s Unpacking python3-gi (3.50.0-3build1) over (3.50.0-3) ... 64s Preparing to unpack .../10-python3-yaml_6.0.2-1build1_amd64.deb ... 64s Unpacking python3-yaml (6.0.2-1build1) over (6.0.2-1) ... 64s Preparing to unpack .../11-vim-tiny_2%3a9.1.0861-1ubuntu1_amd64.deb ... 64s Unpacking vim-tiny (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 64s Preparing to unpack .../12-vim-common_2%3a9.1.0861-1ubuntu1_all.deb ... 64s Unpacking vim-common (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 64s Preparing to unpack .../13-xxd_2%3a9.1.0861-1ubuntu1_amd64.deb ... 64s Unpacking xxd (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 64s Preparing to unpack .../14-libplymouth5_24.004.60-2ubuntu4_amd64.deb ... 64s Unpacking libplymouth5:amd64 (24.004.60-2ubuntu4) over (24.004.60-1ubuntu11) ... 64s Preparing to unpack .../15-plymouth-theme-ubuntu-text_24.004.60-2ubuntu4_amd64.deb ... 64s Unpacking plymouth-theme-ubuntu-text (24.004.60-2ubuntu4) over (24.004.60-1ubuntu11) ... 64s Preparing to unpack .../16-plymouth_24.004.60-2ubuntu4_amd64.deb ... 64s Unpacking plymouth (24.004.60-2ubuntu4) over (24.004.60-1ubuntu11) ... 64s Preparing to unpack .../17-xz-utils_5.6.3-1_amd64.deb ... 64s Unpacking xz-utils (5.6.3-1) over (5.6.2-2) ... 64s Preparing to unpack .../18-bpftrace_0.21.2-2ubuntu3_amd64.deb ... 64s Unpacking bpftrace (0.21.2-2ubuntu3) over (0.21.2-2ubuntu2) ... 64s Preparing to unpack .../19-curl_8.11.0-1ubuntu2_amd64.deb ... 64s Unpacking curl (8.11.0-1ubuntu2) over (8.9.1-2ubuntu2) ... 64s Preparing to unpack .../20-libcurl4t64_8.11.0-1ubuntu2_amd64.deb ... 64s Unpacking libcurl4t64:amd64 (8.11.0-1ubuntu2) over (8.9.1-2ubuntu2) ... 64s Preparing to unpack .../21-dracut-install_105-2ubuntu2_amd64.deb ... 64s Unpacking dracut-install (105-2ubuntu2) over (105-1ubuntu1) ... 64s Preparing to unpack .../22-fwupd-signed_1.55+1.7-1_amd64.deb ... 64s Unpacking fwupd-signed (1.55+1.7-1) over (1.54+1.6-1build1) ... 64s Preparing to unpack .../23-libcurl3t64-gnutls_8.11.0-1ubuntu2_amd64.deb ... 64s Unpacking libcurl3t64-gnutls:amd64 (8.11.0-1ubuntu2) over (8.9.1-2ubuntu2) ... 64s Preparing to unpack .../24-libpolkit-agent-1-0_125-2ubuntu1_amd64.deb ... 64s Unpacking libpolkit-agent-1-0:amd64 (125-2ubuntu1) over (124-2ubuntu1) ... 64s Preparing to unpack .../25-libpolkit-gobject-1-0_125-2ubuntu1_amd64.deb ... 64s Unpacking libpolkit-gobject-1-0:amd64 (125-2ubuntu1) over (124-2ubuntu1) ... 64s Selecting previously unselected package libsgutils2-1.48:amd64. 64s Preparing to unpack .../26-libsgutils2-1.48_1.48-0ubuntu1_amd64.deb ... 64s Unpacking libsgutils2-1.48:amd64 (1.48-0ubuntu1) ... 64s Preparing to unpack .../27-linux-base_4.10.1ubuntu1_all.deb ... 64s Unpacking linux-base (4.10.1ubuntu1) over (4.5ubuntu9) ... 65s Preparing to unpack .../28-lto-disabled-list_54_all.deb ... 65s Unpacking lto-disabled-list (54) over (53) ... 65s Preparing to unpack .../29-lxd-installer_10_all.deb ... 65s Unpacking lxd-installer (10) over (9) ... 65s Preparing to unpack .../30-pinentry-curses_1.3.1-0ubuntu2_amd64.deb ... 65s Unpacking pinentry-curses (1.3.1-0ubuntu2) over (1.2.1-3ubuntu5) ... 65s Preparing to unpack .../31-python3-blinker_1.9.0-1_all.deb ... 65s Unpacking python3-blinker (1.9.0-1) over (1.8.2-1) ... 65s Preparing to unpack .../32-python3-rpds-py_0.21.0-2ubuntu1_amd64.deb ... 65s Unpacking python3-rpds-py (0.21.0-2ubuntu1) over (0.20.0-0ubuntu3) ... 65s Preparing to unpack .../33-python3-jsonschema-specifications_2023.12.1-2_all.deb ... 65s Unpacking python3-jsonschema-specifications (2023.12.1-2) over (2023.12.1-1ubuntu1) ... 65s Preparing to unpack .../34-sg3-utils_1.48-0ubuntu1_amd64.deb ... 65s Unpacking sg3-utils (1.48-0ubuntu1) over (1.46-3ubuntu5) ... 65s Preparing to unpack .../35-sg3-utils-udev_1.48-0ubuntu1_all.deb ... 65s Unpacking sg3-utils-udev (1.48-0ubuntu1) over (1.46-3ubuntu5) ... 65s Preparing to unpack .../36-amd64-microcode_3.20240820.1ubuntu1_amd64.deb ... 65s Unpacking amd64-microcode (3.20240820.1ubuntu1) over (3.20240116.2+nmu1ubuntu1.1) ... 65s Preparing to unpack .../37-intel-microcode_3.20241112.1ubuntu2_amd64.deb ... 65s Unpacking intel-microcode (3.20241112.1ubuntu2) over (3.20240910.0ubuntu1) ... 65s Setting up pinentry-curses (1.3.1-0ubuntu2) ... 65s Setting up distro-info (1.12) ... 65s Setting up lto-disabled-list (54) ... 65s Setting up apt-utils (2.9.14ubuntu1) ... 65s Setting up linux-base (4.10.1ubuntu1) ... 65s Setting up init (1.67ubuntu1) ... 65s Setting up libcurl4t64:amd64 (8.11.0-1ubuntu2) ... 65s Setting up bpftrace (0.21.2-2ubuntu3) ... 65s Setting up openssh-client (1:9.9p1-3ubuntu2) ... 65s Setting up intel-microcode (3.20241112.1ubuntu2) ... 65s intel-microcode: microcode will be updated at next boot 65s Setting up python3-debconf (1.5.87ubuntu1) ... 65s Setting up libcurl3t64-gnutls:amd64 (8.11.0-1ubuntu2) ... 65s Setting up fwupd-signed (1.55+1.7-1) ... 65s Setting up libsgutils2-1.48:amd64 (1.48-0ubuntu1) ... 65s Setting up python3-yaml (6.0.2-1build1) ... 65s Setting up debconf-i18n (1.5.87ubuntu1) ... 65s Setting up amd64-microcode (3.20240820.1ubuntu1) ... 65s amd64-microcode: microcode will be updated at next boot 65s Setting up xxd (2:9.1.0861-1ubuntu1) ... 65s Setting up libglib2.0-0t64:amd64 (2.82.2-3) ... 65s No schema files found: doing nothing. 65s Setting up libglib2.0-data (2.82.2-3) ... 65s Setting up vim-common (2:9.1.0861-1ubuntu1) ... 65s Setting up xz-utils (5.6.3-1) ... 65s Setting up gir1.2-glib-2.0:amd64 (2.82.2-3) ... 65s Setting up lxd-installer (10) ... 66s Setting up python3-rpds-py (0.21.0-2ubuntu1) ... 66s Setting up python-apt-common (2.9.0ubuntu2) ... 66s Setting up dracut-install (105-2ubuntu2) ... 66s Setting up libplymouth5:amd64 (24.004.60-2ubuntu4) ... 66s Setting up libgirepository-1.0-1:amd64 (1.82.0-2) ... 66s Setting up curl (8.11.0-1ubuntu2) ... 66s Setting up python3-jsonschema-specifications (2023.12.1-2) ... 66s Setting up libpolkit-gobject-1-0:amd64 (125-2ubuntu1) ... 66s Setting up sg3-utils (1.48-0ubuntu1) ... 66s Setting up python3-blinker (1.9.0-1) ... 66s Setting up openssh-sftp-server (1:9.9p1-3ubuntu2) ... 66s Setting up python3-dbus (1.3.2-5build4) ... 66s Setting up openssh-server (1:9.9p1-3ubuntu2) ... 66s Installing new version of config file /etc/ssh/moduli ... 66s Replacing config file /etc/ssh/sshd_config with new version 67s Setting up plymouth (24.004.60-2ubuntu4) ... 67s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 67s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 67s Setting up python3-apt (2.9.0ubuntu2) ... 68s Setting up vim-tiny (2:9.1.0861-1ubuntu1) ... 68s Setting up sg3-utils-udev (1.48-0ubuntu1) ... 68s update-initramfs: deferring update (trigger activated) 68s Setting up gir1.2-girepository-2.0:amd64 (1.82.0-2) ... 68s Setting up python3-gi (3.50.0-3build1) ... 68s Setting up libpolkit-agent-1-0:amd64 (125-2ubuntu1) ... 68s Processing triggers for debianutils (5.21) ... 68s Processing triggers for install-info (7.1.1-1) ... 68s Processing triggers for initramfs-tools (0.142ubuntu35) ... 68s update-initramfs: Generating /boot/initrd.img-6.11.0-8-generic 68s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 75s Processing triggers for libc-bin (2.40-1ubuntu3) ... 75s Processing triggers for ufw (0.36.2-8) ... 75s Processing triggers for man-db (2.13.0-1) ... 76s Setting up plymouth-theme-ubuntu-text (24.004.60-2ubuntu4) ... 77s Processing triggers for initramfs-tools (0.142ubuntu35) ... 77s update-initramfs: Generating /boot/initrd.img-6.11.0-8-generic 77s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 84s Reading package lists... 84s Building dependency tree... 84s Reading state information... 84s The following packages will be REMOVED: 84s libsgutils2-1.46-2* 85s 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 85s After this operation, 294 kB disk space will be freed. 85s (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 ... 75649 files and directories currently installed.) 85s Removing libsgutils2-1.46-2:amd64 (1.46-3ubuntu5) ... 85s Processing triggers for libc-bin (2.40-1ubuntu3) ... 85s Hit:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease 85s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 85s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 85s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 86s Reading package lists... 86s Reading package lists... 86s Building dependency tree... 86s Reading state information... 87s Calculating upgrade... 87s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 87s Reading package lists... 87s Building dependency tree... 87s Reading state information... 87s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 87s autopkgtest [09:35:07]: rebooting testbed after setup commands that affected boot 91s autopkgtest-virt-ssh: WARNING: ssh connection failed. Retrying in 3 seconds... 105s autopkgtest [09:35:25]: testbed running kernel: Linux 6.11.0-8-generic #8-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep 16 13:41:20 UTC 2024 107s autopkgtest [09:35:27]: @@@@@@@@@@@@@@@@@@@@ apt-source git-ubuntu 109s Get:1 http://ftpmaster.internal/ubuntu plucky/universe git-ubuntu 1.1-1 (dsc) [2280 B] 109s Get:2 http://ftpmaster.internal/ubuntu plucky/universe git-ubuntu 1.1-1 (tar) [179 kB] 109s Get:3 http://ftpmaster.internal/ubuntu plucky/universe git-ubuntu 1.1-1 (diff) [5776 B] 109s gpgv: Signature made Wed Jul 3 16:18:24 2024 UTC 109s gpgv: using RSA key A62D2CFBD50B9B5BF360D54B159EB5C4EFC8774C 109s gpgv: Can't check signature: No public key 109s dpkg-source: warning: cannot verify inline signature for ./git-ubuntu_1.1-1.dsc: no acceptable signature found 109s autopkgtest [09:35:29]: testing package git-ubuntu version 1.1-1 109s autopkgtest [09:35:29]: build not needed 110s autopkgtest [09:35:30]: test self-test: preparing testbed 112s Note, using file '/tmp/autopkgtest.1k2RJG/1-autopkgtest-satdep.dsc' to get the build dependencies 113s Reading package lists... 113s Building dependency tree... 113s Reading state information... 113s Starting pkgProblemResolver with broken count: 0 113s Starting 2 pkgProblemResolver with broken count: 0 113s Done 113s The following NEW packages will be installed: 113s build-essential cpp cpp-14 cpp-14-x86-64-linux-gnu cpp-x86-64-linux-gnu 113s dctrl-tools debian-archive-keyring devscripts diffstat dput g++ g++-14 113s g++-14-x86-64-linux-gnu g++-x86-64-linux-gnu gcc gcc-14 113s gcc-14-x86-64-linux-gnu gcc-x86-64-linux-gnu gettext git git-buildpackage 113s git-man git-ubuntu libasan8 libb-hooks-op-check-perl libcc1-0 113s libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-perl 113s libdevel-callchecker-perl libdynaloader-functions-perl libencode-locale-perl 113s liberror-perl libfile-dirlist-perl libfile-homedir-perl libfile-listing-perl 113s libfile-touch-perl libfile-which-perl libgcc-14-dev libgit2-1.8 libgomp1 113s libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl 113s libhttp-cookies-perl libhttp-date-perl libhttp-message-perl 113s libhttp-negotiate-perl libhttp-parser2.9 libhwasan0 libimport-into-perl 113s libio-html-perl libio-pty-perl libio-socket-ssl-perl libipc-run-perl 113s libisl23 libitm1 libjs-jquery libjs-jquery-hotkeys libjs-jquery-isonscreen 113s libjs-jquery-metadata libjs-jquery-tablesorter 113s libjs-jquery-throttle-debounce libjs-sphinxdoc libjs-underscore liblsan0 113s liblwp-mediatypes-perl liblwp-protocol-https-perl libmodule-runtime-perl 113s libmoo-perl libmpc3 libnet-http-perl libnet-ssleay-perl libnorm1t64 113s libparams-classify-perl libpgm-5.3-0t64 libpython3.13-minimal 113s libpython3.13-stdlib libquadmath0 librole-tiny-perl libsodium23 113s libstdc++-14-dev libsub-quote-perl libsys-cpuaffinity-perl libtimedate-perl 113s libtry-tiny-perl libtsan2 libubsan1 liburi-perl libwww-perl 113s libwww-robotrules-perl libxdelta2t64 libzmq5 patchutils pbzip2 113s perl-openssl-defaults pixz pristine-tar pylint python3-argcomplete 113s python3-astroid python3-cachetools python3-coverage python3-dateutil 113s python3-debian python3-debianbts python3-dill python3-distro-info 113s python3-gpg python3-importlib-metadata python3-iniconfig python3-isort 113s python3-jaraco.classes python3-jeepney python3-keyring python3-keyrings.alt 113s python3-launchpadlib-desktop python3-logilab-common python3-mccabe 113s python3-mypy-extensions python3-packaging python3-platformdirs 113s python3-pluggy python3-py python3-pycryptodome python3-pygit2 python3-pytest 113s python3-pytest-cov python3-secretstorage python3-tenacity python3-tomlkit 113s python3-ubuntutools python3-xdg python3-zmq python3.13 python3.13-minimal 113s quilt ubuntu-dev-tools wdiff xdelta xdelta3 113s 0 upgraded, 141 newly installed, 0 to remove and 0 not upgraded. 113s Need to get 89.4 MB of archives. 113s After this operation, 322 MB of additional disk space will be used. 113s Get:1 http://ftpmaster.internal/ubuntu plucky/main amd64 libpython3.13-minimal amd64 3.13.0-2 [879 kB] 114s Get:2 http://ftpmaster.internal/ubuntu plucky/main amd64 python3.13-minimal amd64 3.13.0-2 [2188 kB] 114s Get:3 http://ftpmaster.internal/ubuntu plucky/main amd64 libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 114s Get:4 http://ftpmaster.internal/ubuntu plucky/universe amd64 libjs-jquery-hotkeys all 0~20130707+git2d51e3a9+dfsg-2.1 [11.5 kB] 114s Get:5 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-distro-info all 1.12 [7754 B] 114s Get:6 http://ftpmaster.internal/ubuntu plucky/main amd64 libisl23 amd64 0.27-1 [685 kB] 114s Get:7 http://ftpmaster.internal/ubuntu plucky/main amd64 libmpc3 amd64 1.3.1-1build2 [55.3 kB] 114s Get:8 http://ftpmaster.internal/ubuntu plucky/main amd64 cpp-14-x86-64-linux-gnu amd64 14.2.0-8ubuntu1 [11.9 MB] 114s Get:9 http://ftpmaster.internal/ubuntu plucky/main amd64 cpp-14 amd64 14.2.0-8ubuntu1 [1030 B] 114s Get:10 http://ftpmaster.internal/ubuntu plucky/main amd64 cpp-x86-64-linux-gnu amd64 4:14.1.0-2ubuntu1 [5452 B] 114s Get:11 http://ftpmaster.internal/ubuntu plucky/main amd64 cpp amd64 4:14.1.0-2ubuntu1 [22.4 kB] 114s Get:12 http://ftpmaster.internal/ubuntu plucky/main amd64 libcc1-0 amd64 14.2.0-8ubuntu1 [47.6 kB] 114s Get:13 http://ftpmaster.internal/ubuntu plucky/main amd64 libgomp1 amd64 14.2.0-8ubuntu1 [148 kB] 114s Get:14 http://ftpmaster.internal/ubuntu plucky/main amd64 libitm1 amd64 14.2.0-8ubuntu1 [29.1 kB] 114s Get:15 http://ftpmaster.internal/ubuntu plucky/main amd64 libasan8 amd64 14.2.0-8ubuntu1 [2998 kB] 114s Get:16 http://ftpmaster.internal/ubuntu plucky/main amd64 liblsan0 amd64 14.2.0-8ubuntu1 [1317 kB] 114s Get:17 http://ftpmaster.internal/ubuntu plucky/main amd64 libtsan2 amd64 14.2.0-8ubuntu1 [2732 kB] 115s Get:18 http://ftpmaster.internal/ubuntu plucky/main amd64 libubsan1 amd64 14.2.0-8ubuntu1 [1177 kB] 115s Get:19 http://ftpmaster.internal/ubuntu plucky/main amd64 libhwasan0 amd64 14.2.0-8ubuntu1 [1634 kB] 115s Get:20 http://ftpmaster.internal/ubuntu plucky/main amd64 libquadmath0 amd64 14.2.0-8ubuntu1 [153 kB] 115s Get:21 http://ftpmaster.internal/ubuntu plucky/main amd64 libgcc-14-dev amd64 14.2.0-8ubuntu1 [2814 kB] 115s Get:22 http://ftpmaster.internal/ubuntu plucky/main amd64 gcc-14-x86-64-linux-gnu amd64 14.2.0-8ubuntu1 [23.3 MB] 116s Get:23 http://ftpmaster.internal/ubuntu plucky/main amd64 gcc-14 amd64 14.2.0-8ubuntu1 [528 kB] 116s Get:24 http://ftpmaster.internal/ubuntu plucky/main amd64 gcc-x86-64-linux-gnu amd64 4:14.1.0-2ubuntu1 [1214 B] 116s Get:25 http://ftpmaster.internal/ubuntu plucky/main amd64 gcc amd64 4:14.1.0-2ubuntu1 [5000 B] 116s Get:26 http://ftpmaster.internal/ubuntu plucky/main amd64 libstdc++-14-dev amd64 14.2.0-8ubuntu1 [2504 kB] 116s Get:27 http://ftpmaster.internal/ubuntu plucky/main amd64 g++-14-x86-64-linux-gnu amd64 14.2.0-8ubuntu1 [13.3 MB] 117s Get:28 http://ftpmaster.internal/ubuntu plucky/main amd64 g++-14 amd64 14.2.0-8ubuntu1 [19.9 kB] 117s Get:29 http://ftpmaster.internal/ubuntu plucky/main amd64 g++-x86-64-linux-gnu amd64 4:14.1.0-2ubuntu1 [966 B] 117s Get:30 http://ftpmaster.internal/ubuntu plucky/main amd64 g++ amd64 4:14.1.0-2ubuntu1 [1100 B] 117s Get:31 http://ftpmaster.internal/ubuntu plucky/main amd64 build-essential amd64 12.10ubuntu1 [4928 B] 117s Get:32 http://ftpmaster.internal/ubuntu plucky/main amd64 dctrl-tools amd64 2.24-3build3 [106 kB] 117s Get:33 http://ftpmaster.internal/ubuntu plucky/universe amd64 debian-archive-keyring all 2023.4ubuntu1 [168 kB] 117s Get:34 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-dirlist-perl all 0.05-3 [7286 B] 117s Get:35 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-which-perl all 1.27-2 [12.5 kB] 117s Get:36 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-homedir-perl all 1.006-2 [37.0 kB] 117s Get:37 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-touch-perl all 0.12-2 [7498 B] 117s Get:38 http://ftpmaster.internal/ubuntu plucky/main amd64 libio-pty-perl amd64 1:1.20-1build3 [31.4 kB] 117s Get:39 http://ftpmaster.internal/ubuntu plucky/main amd64 libipc-run-perl all 20231003.0-2 [91.5 kB] 117s Get:40 http://ftpmaster.internal/ubuntu plucky/main amd64 libclass-method-modifiers-perl all 2.15-1 [16.1 kB] 117s Get:41 http://ftpmaster.internal/ubuntu plucky/main amd64 libclass-xsaccessor-perl amd64 1.19-4build5 [33.0 kB] 117s Get:42 http://ftpmaster.internal/ubuntu plucky/main amd64 libb-hooks-op-check-perl amd64 0.22-3build2 [9624 B] 117s Get:43 http://ftpmaster.internal/ubuntu plucky/main amd64 libdynaloader-functions-perl all 0.004-1 [11.4 kB] 117s Get:44 http://ftpmaster.internal/ubuntu plucky/main amd64 libdevel-callchecker-perl amd64 0.009-1build1 [14.2 kB] 117s Get:45 http://ftpmaster.internal/ubuntu plucky/main amd64 libparams-classify-perl amd64 0.015-2build6 [20.1 kB] 117s Get:46 http://ftpmaster.internal/ubuntu plucky/main amd64 libmodule-runtime-perl all 0.016-2 [16.4 kB] 117s Get:47 http://ftpmaster.internal/ubuntu plucky/main amd64 libimport-into-perl all 1.002005-2 [10.7 kB] 117s Get:48 http://ftpmaster.internal/ubuntu plucky/main amd64 librole-tiny-perl all 2.002004-1 [16.3 kB] 117s Get:49 http://ftpmaster.internal/ubuntu plucky/main amd64 libsub-quote-perl all 2.006008-1ubuntu1 [20.7 kB] 117s Get:50 http://ftpmaster.internal/ubuntu plucky/main amd64 libmoo-perl all 2.005005-1 [47.4 kB] 117s Get:51 http://ftpmaster.internal/ubuntu plucky/main amd64 libencode-locale-perl all 1.05-3 [11.6 kB] 117s Get:52 http://ftpmaster.internal/ubuntu plucky/main amd64 libtimedate-perl all 2.3300-2 [34.0 kB] 117s Get:53 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-date-perl all 6.06-1 [10.2 kB] 117s Get:54 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-listing-perl all 6.16-1 [11.3 kB] 117s Get:55 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-tagset-perl all 3.24-1 [14.1 kB] 117s Get:56 http://ftpmaster.internal/ubuntu plucky/main amd64 liburi-perl all 5.30-1 [94.4 kB] 117s Get:57 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-parser-perl amd64 3.83-1build1 [86.2 kB] 117s Get:58 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-tree-perl all 5.07-3 [200 kB] 117s Get:59 http://ftpmaster.internal/ubuntu plucky/main amd64 libclone-perl amd64 0.47-1 [10.7 kB] 117s Get:60 http://ftpmaster.internal/ubuntu plucky/main amd64 libio-html-perl all 1.004-3 [15.9 kB] 117s Get:61 http://ftpmaster.internal/ubuntu plucky/main amd64 liblwp-mediatypes-perl all 6.04-2 [20.1 kB] 117s Get:62 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-message-perl all 7.00-2ubuntu1 [75.9 kB] 117s Get:63 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-cookies-perl all 6.11-1 [18.2 kB] 117s Get:64 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-negotiate-perl all 6.01-2 [12.4 kB] 117s Get:65 http://ftpmaster.internal/ubuntu plucky/main amd64 perl-openssl-defaults amd64 7build3 [6626 B] 117s Get:66 http://ftpmaster.internal/ubuntu plucky/main amd64 libnet-ssleay-perl amd64 1.94-2 [317 kB] 117s Get:67 http://ftpmaster.internal/ubuntu plucky/main amd64 libio-socket-ssl-perl all 2.089-1 [200 kB] 117s Get:68 http://ftpmaster.internal/ubuntu plucky/main amd64 libnet-http-perl all 6.23-1 [22.3 kB] 117s Get:69 http://ftpmaster.internal/ubuntu plucky/main amd64 liblwp-protocol-https-perl all 6.14-1 [9040 B] 117s Get:70 http://ftpmaster.internal/ubuntu plucky/main amd64 libtry-tiny-perl all 0.32-1 [21.2 kB] 117s Get:71 http://ftpmaster.internal/ubuntu plucky/main amd64 libwww-robotrules-perl all 6.02-1 [12.6 kB] 117s Get:72 http://ftpmaster.internal/ubuntu plucky/main amd64 libwww-perl all 6.77-1 [138 kB] 117s Get:73 http://ftpmaster.internal/ubuntu plucky/main amd64 patchutils amd64 0.4.2-1build3 [77.0 kB] 117s Get:74 http://ftpmaster.internal/ubuntu plucky/main amd64 wdiff amd64 1.2.2-6build1 [29.1 kB] 117s Get:75 http://ftpmaster.internal/ubuntu plucky/main amd64 devscripts all 2.24.3 [1080 kB] 117s Get:76 http://ftpmaster.internal/ubuntu plucky/main amd64 diffstat amd64 1.67-1 [33.1 kB] 117s Get:77 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-debian all 0.1.49ubuntu3 [116 kB] 117s Get:78 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-gpg amd64 1.24.0-2ubuntu1 [275 kB] 117s Get:79 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-xdg all 0.28-2 [38.3 kB] 117s Get:80 http://ftpmaster.internal/ubuntu plucky/main amd64 dput all 1.2.4ubuntu1 [49.1 kB] 117s Get:81 http://ftpmaster.internal/ubuntu plucky/main amd64 gettext amd64 0.22.5-2 [948 kB] 117s Get:82 http://ftpmaster.internal/ubuntu plucky/main amd64 liberror-perl all 0.17029-2 [25.6 kB] 117s Get:83 http://ftpmaster.internal/ubuntu plucky/main amd64 git-man all 1:2.45.2-1.2ubuntu1 [1122 kB] 118s Get:84 http://ftpmaster.internal/ubuntu plucky/main amd64 git amd64 1:2.45.2-1.2ubuntu1 [4634 kB] 118s Get:85 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-dateutil all 2.9.0-3 [80.2 kB] 118s Get:86 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-importlib-metadata all 8.5.0-1 [20.7 kB] 118s Get:87 http://ftpmaster.internal/ubuntu plucky/universe amd64 git-buildpackage all 0.9.35 [677 kB] 118s Get:88 http://ftpmaster.internal/ubuntu plucky/universe amd64 libsys-cpuaffinity-perl amd64 1.13~03-2build4 [31.9 kB] 118s Get:89 http://ftpmaster.internal/ubuntu plucky/universe amd64 pbzip2 amd64 1.1.13-1build1 [40.0 kB] 118s Get:90 http://ftpmaster.internal/ubuntu plucky/universe amd64 pixz amd64 1.0.7-3 [21.8 kB] 118s Get:91 http://ftpmaster.internal/ubuntu plucky/universe amd64 libxdelta2t64 amd64 1.1.3-10.7 [50.9 kB] 118s Get:92 http://ftpmaster.internal/ubuntu plucky/universe amd64 xdelta amd64 1.1.3-10.7 [25.2 kB] 118s Get:93 http://ftpmaster.internal/ubuntu plucky/universe amd64 xdelta3 amd64 3.0.11-dfsg-1.2 [73.9 kB] 118s Get:94 http://ftpmaster.internal/ubuntu plucky/universe amd64 pristine-tar amd64 1.50+nmu2build1 [117 kB] 118s Get:95 http://ftpmaster.internal/ubuntu plucky/universe amd64 quilt all 0.68-1 [439 kB] 118s Get:96 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-debianbts all 4.1.1 [12.8 kB] 118s Get:97 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-jeepney all 0.8.0-4 [33.1 kB] 118s Get:98 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-secretstorage all 3.3.3-3 [13.7 kB] 118s Get:99 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-jaraco.classes all 3.4.0-1 [7664 B] 118s Get:100 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-keyring all 25.4.1-1 [40.5 kB] 118s Get:101 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-launchpadlib-desktop all 2.0.0-1 [1778 B] 118s Get:102 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-ubuntutools all 0.203 [67.4 kB] 118s Get:103 http://ftpmaster.internal/ubuntu plucky/universe amd64 ubuntu-dev-tools all 0.203 [93.2 kB] 118s Get:104 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-astroid all 3.3.5-1 [174 kB] 118s Get:105 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-isort all 5.13.2-2 [59.3 kB] 118s Get:106 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-mypy-extensions all 1.0.0-1 [6148 B] 118s Get:107 http://ftpmaster.internal/ubuntu plucky/main amd64 libjs-underscore all 1.13.4~dfsg+~1.11.4-3 [118 kB] 118s Get:108 http://ftpmaster.internal/ubuntu plucky/main amd64 libjs-sphinxdoc all 7.4.7-4 [158 kB] 118s Get:109 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-logilab-common all 2.0.0-1 [281 kB] 119s Get:110 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-dill all 0.3.9-1 [84.5 kB] 119s Get:111 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-mccabe all 0.7.0-1 [8678 B] 119s Get:112 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-platformdirs all 4.3.6-1 [16.8 kB] 119s Get:113 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-tomlkit all 0.13.2-1 [37.6 kB] 119s Get:114 http://ftpmaster.internal/ubuntu plucky/universe amd64 pylint all 3.3.1-2 [345 kB] 119s Get:115 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-argcomplete all 3.5.1-1ubuntu1 [35.6 kB] 119s Get:116 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-cachetools all 5.3.3-1 [10.3 kB] 119s Get:117 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-pycryptodome amd64 3.20.0+dfsg-3build1 [1113 kB] 119s Get:118 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-keyrings.alt all 5.0.2-1 [16.6 kB] 119s Get:119 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-parser2.9 amd64 2.9.4-6build1 [22.3 kB] 119s Get:120 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 libgit2-1.8 amd64 1.8.4+ds-1ubuntu1 [654 kB] 119s Get:121 http://ftpmaster.internal/ubuntu plucky-proposed/universe amd64 python3-pygit2 amd64 1.16.0-2 [183 kB] 119s Get:122 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-iniconfig all 1.1.1-2 [6024 B] 119s Get:123 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-packaging all 24.2-1 [51.5 kB] 119s Get:124 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-pluggy all 1.5.0-1 [21.0 kB] 119s Get:125 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-pytest all 8.3.3-1 [251 kB] 119s Get:126 http://ftpmaster.internal/ubuntu plucky/main amd64 libpython3.13-stdlib amd64 3.13.0-2 [2107 kB] 119s Get:127 http://ftpmaster.internal/ubuntu plucky/main amd64 python3.13 amd64 3.13.0-2 [719 kB] 119s Get:128 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-coverage amd64 7.4.4+dfsg1-0ubuntu3 [150 kB] 119s Get:129 http://ftpmaster.internal/ubuntu plucky/universe amd64 libjs-jquery-isonscreen all 1.2.0-1.1 [3244 B] 119s Get:130 http://ftpmaster.internal/ubuntu plucky/universe amd64 libjs-jquery-metadata all 12-4 [6582 B] 119s Get:131 http://ftpmaster.internal/ubuntu plucky/universe amd64 libjs-jquery-tablesorter all 1:2.31.3+dfsg1-4 [192 kB] 119s Get:132 http://ftpmaster.internal/ubuntu plucky/universe amd64 libjs-jquery-throttle-debounce all 1.1+dfsg.1-2 [12.5 kB] 119s Get:133 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-pytest-cov all 5.0.0-1 [21.3 kB] 119s Get:134 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-tenacity all 8.5.0-0ubuntu1 [17.0 kB] 119s Get:135 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-py all 1.11.0-2 [72.7 kB] 119s Get:136 http://ftpmaster.internal/ubuntu plucky/universe amd64 libnorm1t64 amd64 1.5.9+dfsg-3.1build1 [154 kB] 119s Get:137 http://ftpmaster.internal/ubuntu plucky/universe amd64 libpgm-5.3-0t64 amd64 5.3.128~dfsg-2.1build1 [167 kB] 119s Get:138 http://ftpmaster.internal/ubuntu plucky/main amd64 libsodium23 amd64 1.0.18-1build3 [161 kB] 119s Get:139 http://ftpmaster.internal/ubuntu plucky/universe amd64 libzmq5 amd64 4.3.5-1build2 [260 kB] 119s Get:140 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-zmq amd64 24.0.1-5build2 [406 kB] 119s Get:141 http://ftpmaster.internal/ubuntu plucky/universe amd64 git-ubuntu all 1.1-1 [152 kB] 119s Fetched 89.4 MB in 6s (15.5 MB/s) 119s Selecting previously unselected package libpython3.13-minimal:amd64. 120s (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 ... 75644 files and directories currently installed.) 120s Preparing to unpack .../000-libpython3.13-minimal_3.13.0-2_amd64.deb ... 120s Unpacking libpython3.13-minimal:amd64 (3.13.0-2) ... 120s Selecting previously unselected package python3.13-minimal. 120s Preparing to unpack .../001-python3.13-minimal_3.13.0-2_amd64.deb ... 120s Unpacking python3.13-minimal (3.13.0-2) ... 120s Selecting previously unselected package libjs-jquery. 120s Preparing to unpack .../002-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 120s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 120s Selecting previously unselected package libjs-jquery-hotkeys. 120s Preparing to unpack .../003-libjs-jquery-hotkeys_0~20130707+git2d51e3a9+dfsg-2.1_all.deb ... 120s Unpacking libjs-jquery-hotkeys (0~20130707+git2d51e3a9+dfsg-2.1) ... 120s Selecting previously unselected package python3-distro-info. 120s Preparing to unpack .../004-python3-distro-info_1.12_all.deb ... 120s Unpacking python3-distro-info (1.12) ... 120s Selecting previously unselected package libisl23:amd64. 120s Preparing to unpack .../005-libisl23_0.27-1_amd64.deb ... 120s Unpacking libisl23:amd64 (0.27-1) ... 120s Selecting previously unselected package libmpc3:amd64. 120s Preparing to unpack .../006-libmpc3_1.3.1-1build2_amd64.deb ... 120s Unpacking libmpc3:amd64 (1.3.1-1build2) ... 120s Selecting previously unselected package cpp-14-x86-64-linux-gnu. 120s Preparing to unpack .../007-cpp-14-x86-64-linux-gnu_14.2.0-8ubuntu1_amd64.deb ... 120s Unpacking cpp-14-x86-64-linux-gnu (14.2.0-8ubuntu1) ... 120s Selecting previously unselected package cpp-14. 120s Preparing to unpack .../008-cpp-14_14.2.0-8ubuntu1_amd64.deb ... 120s Unpacking cpp-14 (14.2.0-8ubuntu1) ... 120s Selecting previously unselected package cpp-x86-64-linux-gnu. 120s Preparing to unpack .../009-cpp-x86-64-linux-gnu_4%3a14.1.0-2ubuntu1_amd64.deb ... 120s Unpacking cpp-x86-64-linux-gnu (4:14.1.0-2ubuntu1) ... 120s Selecting previously unselected package cpp. 120s Preparing to unpack .../010-cpp_4%3a14.1.0-2ubuntu1_amd64.deb ... 120s Unpacking cpp (4:14.1.0-2ubuntu1) ... 120s Selecting previously unselected package libcc1-0:amd64. 120s Preparing to unpack .../011-libcc1-0_14.2.0-8ubuntu1_amd64.deb ... 120s Unpacking libcc1-0:amd64 (14.2.0-8ubuntu1) ... 120s Selecting previously unselected package libgomp1:amd64. 120s Preparing to unpack .../012-libgomp1_14.2.0-8ubuntu1_amd64.deb ... 120s Unpacking libgomp1:amd64 (14.2.0-8ubuntu1) ... 120s Selecting previously unselected package libitm1:amd64. 120s Preparing to unpack .../013-libitm1_14.2.0-8ubuntu1_amd64.deb ... 120s Unpacking libitm1:amd64 (14.2.0-8ubuntu1) ... 120s Selecting previously unselected package libasan8:amd64. 120s Preparing to unpack .../014-libasan8_14.2.0-8ubuntu1_amd64.deb ... 120s Unpacking libasan8:amd64 (14.2.0-8ubuntu1) ... 120s Selecting previously unselected package liblsan0:amd64. 120s Preparing to unpack .../015-liblsan0_14.2.0-8ubuntu1_amd64.deb ... 120s Unpacking liblsan0:amd64 (14.2.0-8ubuntu1) ... 120s Selecting previously unselected package libtsan2:amd64. 120s Preparing to unpack .../016-libtsan2_14.2.0-8ubuntu1_amd64.deb ... 120s Unpacking libtsan2:amd64 (14.2.0-8ubuntu1) ... 120s Selecting previously unselected package libubsan1:amd64. 120s Preparing to unpack .../017-libubsan1_14.2.0-8ubuntu1_amd64.deb ... 120s Unpacking libubsan1:amd64 (14.2.0-8ubuntu1) ... 120s Selecting previously unselected package libhwasan0:amd64. 120s Preparing to unpack .../018-libhwasan0_14.2.0-8ubuntu1_amd64.deb ... 120s Unpacking libhwasan0:amd64 (14.2.0-8ubuntu1) ... 120s Selecting previously unselected package libquadmath0:amd64. 120s Preparing to unpack .../019-libquadmath0_14.2.0-8ubuntu1_amd64.deb ... 120s Unpacking libquadmath0:amd64 (14.2.0-8ubuntu1) ... 120s Selecting previously unselected package libgcc-14-dev:amd64. 120s Preparing to unpack .../020-libgcc-14-dev_14.2.0-8ubuntu1_amd64.deb ... 120s Unpacking libgcc-14-dev:amd64 (14.2.0-8ubuntu1) ... 121s Selecting previously unselected package gcc-14-x86-64-linux-gnu. 121s Preparing to unpack .../021-gcc-14-x86-64-linux-gnu_14.2.0-8ubuntu1_amd64.deb ... 121s Unpacking gcc-14-x86-64-linux-gnu (14.2.0-8ubuntu1) ... 121s Selecting previously unselected package gcc-14. 121s Preparing to unpack .../022-gcc-14_14.2.0-8ubuntu1_amd64.deb ... 121s Unpacking gcc-14 (14.2.0-8ubuntu1) ... 121s Selecting previously unselected package gcc-x86-64-linux-gnu. 121s Preparing to unpack .../023-gcc-x86-64-linux-gnu_4%3a14.1.0-2ubuntu1_amd64.deb ... 121s Unpacking gcc-x86-64-linux-gnu (4:14.1.0-2ubuntu1) ... 121s Selecting previously unselected package gcc. 121s Preparing to unpack .../024-gcc_4%3a14.1.0-2ubuntu1_amd64.deb ... 121s Unpacking gcc (4:14.1.0-2ubuntu1) ... 121s Selecting previously unselected package libstdc++-14-dev:amd64. 121s Preparing to unpack .../025-libstdc++-14-dev_14.2.0-8ubuntu1_amd64.deb ... 121s Unpacking libstdc++-14-dev:amd64 (14.2.0-8ubuntu1) ... 121s Selecting previously unselected package g++-14-x86-64-linux-gnu. 121s Preparing to unpack .../026-g++-14-x86-64-linux-gnu_14.2.0-8ubuntu1_amd64.deb ... 121s Unpacking g++-14-x86-64-linux-gnu (14.2.0-8ubuntu1) ... 121s Selecting previously unselected package g++-14. 121s Preparing to unpack .../027-g++-14_14.2.0-8ubuntu1_amd64.deb ... 121s Unpacking g++-14 (14.2.0-8ubuntu1) ... 121s Selecting previously unselected package g++-x86-64-linux-gnu. 121s Preparing to unpack .../028-g++-x86-64-linux-gnu_4%3a14.1.0-2ubuntu1_amd64.deb ... 121s Unpacking g++-x86-64-linux-gnu (4:14.1.0-2ubuntu1) ... 121s Selecting previously unselected package g++. 121s Preparing to unpack .../029-g++_4%3a14.1.0-2ubuntu1_amd64.deb ... 121s Unpacking g++ (4:14.1.0-2ubuntu1) ... 121s Selecting previously unselected package build-essential. 121s Preparing to unpack .../030-build-essential_12.10ubuntu1_amd64.deb ... 121s Unpacking build-essential (12.10ubuntu1) ... 121s Selecting previously unselected package dctrl-tools. 121s Preparing to unpack .../031-dctrl-tools_2.24-3build3_amd64.deb ... 121s Unpacking dctrl-tools (2.24-3build3) ... 121s Selecting previously unselected package debian-archive-keyring. 121s Preparing to unpack .../032-debian-archive-keyring_2023.4ubuntu1_all.deb ... 121s Unpacking debian-archive-keyring (2023.4ubuntu1) ... 121s Selecting previously unselected package libfile-dirlist-perl. 121s Preparing to unpack .../033-libfile-dirlist-perl_0.05-3_all.deb ... 121s Unpacking libfile-dirlist-perl (0.05-3) ... 121s Selecting previously unselected package libfile-which-perl. 121s Preparing to unpack .../034-libfile-which-perl_1.27-2_all.deb ... 121s Unpacking libfile-which-perl (1.27-2) ... 121s Selecting previously unselected package libfile-homedir-perl. 121s Preparing to unpack .../035-libfile-homedir-perl_1.006-2_all.deb ... 121s Unpacking libfile-homedir-perl (1.006-2) ... 121s Selecting previously unselected package libfile-touch-perl. 121s Preparing to unpack .../036-libfile-touch-perl_0.12-2_all.deb ... 121s Unpacking libfile-touch-perl (0.12-2) ... 122s Selecting previously unselected package libio-pty-perl. 122s Preparing to unpack .../037-libio-pty-perl_1%3a1.20-1build3_amd64.deb ... 122s Unpacking libio-pty-perl (1:1.20-1build3) ... 122s Selecting previously unselected package libipc-run-perl. 122s Preparing to unpack .../038-libipc-run-perl_20231003.0-2_all.deb ... 122s Unpacking libipc-run-perl (20231003.0-2) ... 122s Selecting previously unselected package libclass-method-modifiers-perl. 122s Preparing to unpack .../039-libclass-method-modifiers-perl_2.15-1_all.deb ... 122s Unpacking libclass-method-modifiers-perl (2.15-1) ... 122s Selecting previously unselected package libclass-xsaccessor-perl. 122s Preparing to unpack .../040-libclass-xsaccessor-perl_1.19-4build5_amd64.deb ... 122s Unpacking libclass-xsaccessor-perl (1.19-4build5) ... 122s Selecting previously unselected package libb-hooks-op-check-perl:amd64. 122s Preparing to unpack .../041-libb-hooks-op-check-perl_0.22-3build2_amd64.deb ... 122s Unpacking libb-hooks-op-check-perl:amd64 (0.22-3build2) ... 122s Selecting previously unselected package libdynaloader-functions-perl. 122s Preparing to unpack .../042-libdynaloader-functions-perl_0.004-1_all.deb ... 122s Unpacking libdynaloader-functions-perl (0.004-1) ... 122s Selecting previously unselected package libdevel-callchecker-perl:amd64. 122s Preparing to unpack .../043-libdevel-callchecker-perl_0.009-1build1_amd64.deb ... 122s Unpacking libdevel-callchecker-perl:amd64 (0.009-1build1) ... 122s Selecting previously unselected package libparams-classify-perl:amd64. 122s Preparing to unpack .../044-libparams-classify-perl_0.015-2build6_amd64.deb ... 122s Unpacking libparams-classify-perl:amd64 (0.015-2build6) ... 122s Selecting previously unselected package libmodule-runtime-perl. 122s Preparing to unpack .../045-libmodule-runtime-perl_0.016-2_all.deb ... 122s Unpacking libmodule-runtime-perl (0.016-2) ... 122s Selecting previously unselected package libimport-into-perl. 122s Preparing to unpack .../046-libimport-into-perl_1.002005-2_all.deb ... 122s Unpacking libimport-into-perl (1.002005-2) ... 122s Selecting previously unselected package librole-tiny-perl. 122s Preparing to unpack .../047-librole-tiny-perl_2.002004-1_all.deb ... 122s Unpacking librole-tiny-perl (2.002004-1) ... 122s Selecting previously unselected package libsub-quote-perl. 122s Preparing to unpack .../048-libsub-quote-perl_2.006008-1ubuntu1_all.deb ... 122s Unpacking libsub-quote-perl (2.006008-1ubuntu1) ... 122s Selecting previously unselected package libmoo-perl. 122s Preparing to unpack .../049-libmoo-perl_2.005005-1_all.deb ... 122s Unpacking libmoo-perl (2.005005-1) ... 122s Selecting previously unselected package libencode-locale-perl. 122s Preparing to unpack .../050-libencode-locale-perl_1.05-3_all.deb ... 122s Unpacking libencode-locale-perl (1.05-3) ... 122s Selecting previously unselected package libtimedate-perl. 122s Preparing to unpack .../051-libtimedate-perl_2.3300-2_all.deb ... 122s Unpacking libtimedate-perl (2.3300-2) ... 122s Selecting previously unselected package libhttp-date-perl. 122s Preparing to unpack .../052-libhttp-date-perl_6.06-1_all.deb ... 122s Unpacking libhttp-date-perl (6.06-1) ... 122s Selecting previously unselected package libfile-listing-perl. 122s Preparing to unpack .../053-libfile-listing-perl_6.16-1_all.deb ... 122s Unpacking libfile-listing-perl (6.16-1) ... 122s Selecting previously unselected package libhtml-tagset-perl. 122s Preparing to unpack .../054-libhtml-tagset-perl_3.24-1_all.deb ... 122s Unpacking libhtml-tagset-perl (3.24-1) ... 122s Selecting previously unselected package liburi-perl. 122s Preparing to unpack .../055-liburi-perl_5.30-1_all.deb ... 122s Unpacking liburi-perl (5.30-1) ... 122s Selecting previously unselected package libhtml-parser-perl:amd64. 122s Preparing to unpack .../056-libhtml-parser-perl_3.83-1build1_amd64.deb ... 122s Unpacking libhtml-parser-perl:amd64 (3.83-1build1) ... 122s Selecting previously unselected package libhtml-tree-perl. 122s Preparing to unpack .../057-libhtml-tree-perl_5.07-3_all.deb ... 122s Unpacking libhtml-tree-perl (5.07-3) ... 122s Selecting previously unselected package libclone-perl:amd64. 122s Preparing to unpack .../058-libclone-perl_0.47-1_amd64.deb ... 122s Unpacking libclone-perl:amd64 (0.47-1) ... 122s Selecting previously unselected package libio-html-perl. 122s Preparing to unpack .../059-libio-html-perl_1.004-3_all.deb ... 122s Unpacking libio-html-perl (1.004-3) ... 122s Selecting previously unselected package liblwp-mediatypes-perl. 122s Preparing to unpack .../060-liblwp-mediatypes-perl_6.04-2_all.deb ... 122s Unpacking liblwp-mediatypes-perl (6.04-2) ... 122s Selecting previously unselected package libhttp-message-perl. 122s Preparing to unpack .../061-libhttp-message-perl_7.00-2ubuntu1_all.deb ... 122s Unpacking libhttp-message-perl (7.00-2ubuntu1) ... 122s Selecting previously unselected package libhttp-cookies-perl. 122s Preparing to unpack .../062-libhttp-cookies-perl_6.11-1_all.deb ... 122s Unpacking libhttp-cookies-perl (6.11-1) ... 122s Selecting previously unselected package libhttp-negotiate-perl. 122s Preparing to unpack .../063-libhttp-negotiate-perl_6.01-2_all.deb ... 122s Unpacking libhttp-negotiate-perl (6.01-2) ... 122s Selecting previously unselected package perl-openssl-defaults:amd64. 122s Preparing to unpack .../064-perl-openssl-defaults_7build3_amd64.deb ... 122s Unpacking perl-openssl-defaults:amd64 (7build3) ... 122s Selecting previously unselected package libnet-ssleay-perl:amd64. 122s Preparing to unpack .../065-libnet-ssleay-perl_1.94-2_amd64.deb ... 122s Unpacking libnet-ssleay-perl:amd64 (1.94-2) ... 122s Selecting previously unselected package libio-socket-ssl-perl. 122s Preparing to unpack .../066-libio-socket-ssl-perl_2.089-1_all.deb ... 122s Unpacking libio-socket-ssl-perl (2.089-1) ... 122s Selecting previously unselected package libnet-http-perl. 122s Preparing to unpack .../067-libnet-http-perl_6.23-1_all.deb ... 122s Unpacking libnet-http-perl (6.23-1) ... 122s Selecting previously unselected package liblwp-protocol-https-perl. 122s Preparing to unpack .../068-liblwp-protocol-https-perl_6.14-1_all.deb ... 122s Unpacking liblwp-protocol-https-perl (6.14-1) ... 122s Selecting previously unselected package libtry-tiny-perl. 122s Preparing to unpack .../069-libtry-tiny-perl_0.32-1_all.deb ... 122s Unpacking libtry-tiny-perl (0.32-1) ... 122s Selecting previously unselected package libwww-robotrules-perl. 122s Preparing to unpack .../070-libwww-robotrules-perl_6.02-1_all.deb ... 122s Unpacking libwww-robotrules-perl (6.02-1) ... 122s Selecting previously unselected package libwww-perl. 122s Preparing to unpack .../071-libwww-perl_6.77-1_all.deb ... 122s Unpacking libwww-perl (6.77-1) ... 122s Selecting previously unselected package patchutils. 122s Preparing to unpack .../072-patchutils_0.4.2-1build3_amd64.deb ... 122s Unpacking patchutils (0.4.2-1build3) ... 122s Selecting previously unselected package wdiff. 122s Preparing to unpack .../073-wdiff_1.2.2-6build1_amd64.deb ... 122s Unpacking wdiff (1.2.2-6build1) ... 122s Selecting previously unselected package devscripts. 122s Preparing to unpack .../074-devscripts_2.24.3_all.deb ... 122s Unpacking devscripts (2.24.3) ... 122s Selecting previously unselected package diffstat. 122s Preparing to unpack .../075-diffstat_1.67-1_amd64.deb ... 122s Unpacking diffstat (1.67-1) ... 122s Selecting previously unselected package python3-debian. 122s Preparing to unpack .../076-python3-debian_0.1.49ubuntu3_all.deb ... 122s Unpacking python3-debian (0.1.49ubuntu3) ... 122s Selecting previously unselected package python3-gpg. 122s Preparing to unpack .../077-python3-gpg_1.24.0-2ubuntu1_amd64.deb ... 122s Unpacking python3-gpg (1.24.0-2ubuntu1) ... 122s Selecting previously unselected package python3-xdg. 122s Preparing to unpack .../078-python3-xdg_0.28-2_all.deb ... 122s Unpacking python3-xdg (0.28-2) ... 122s Selecting previously unselected package dput. 122s Preparing to unpack .../079-dput_1.2.4ubuntu1_all.deb ... 122s Unpacking dput (1.2.4ubuntu1) ... 122s Selecting previously unselected package gettext. 122s Preparing to unpack .../080-gettext_0.22.5-2_amd64.deb ... 122s Unpacking gettext (0.22.5-2) ... 123s Selecting previously unselected package liberror-perl. 123s Preparing to unpack .../081-liberror-perl_0.17029-2_all.deb ... 123s Unpacking liberror-perl (0.17029-2) ... 123s Selecting previously unselected package git-man. 123s Preparing to unpack .../082-git-man_1%3a2.45.2-1.2ubuntu1_all.deb ... 123s Unpacking git-man (1:2.45.2-1.2ubuntu1) ... 123s Selecting previously unselected package git. 123s Preparing to unpack .../083-git_1%3a2.45.2-1.2ubuntu1_amd64.deb ... 123s Unpacking git (1:2.45.2-1.2ubuntu1) ... 123s Selecting previously unselected package python3-dateutil. 123s Preparing to unpack .../084-python3-dateutil_2.9.0-3_all.deb ... 123s Unpacking python3-dateutil (2.9.0-3) ... 123s Selecting previously unselected package python3-importlib-metadata. 123s Preparing to unpack .../085-python3-importlib-metadata_8.5.0-1_all.deb ... 123s Unpacking python3-importlib-metadata (8.5.0-1) ... 123s Selecting previously unselected package git-buildpackage. 123s Preparing to unpack .../086-git-buildpackage_0.9.35_all.deb ... 123s Unpacking git-buildpackage (0.9.35) ... 123s Selecting previously unselected package libsys-cpuaffinity-perl. 123s Preparing to unpack .../087-libsys-cpuaffinity-perl_1.13~03-2build4_amd64.deb ... 123s Unpacking libsys-cpuaffinity-perl (1.13~03-2build4) ... 123s Selecting previously unselected package pbzip2. 123s Preparing to unpack .../088-pbzip2_1.1.13-1build1_amd64.deb ... 123s Unpacking pbzip2 (1.1.13-1build1) ... 123s Selecting previously unselected package pixz. 123s Preparing to unpack .../089-pixz_1.0.7-3_amd64.deb ... 123s Unpacking pixz (1.0.7-3) ... 123s Selecting previously unselected package libxdelta2t64:amd64. 123s Preparing to unpack .../090-libxdelta2t64_1.1.3-10.7_amd64.deb ... 123s Unpacking libxdelta2t64:amd64 (1.1.3-10.7) ... 123s Selecting previously unselected package xdelta. 123s Preparing to unpack .../091-xdelta_1.1.3-10.7_amd64.deb ... 123s Unpacking xdelta (1.1.3-10.7) ... 123s Selecting previously unselected package xdelta3. 123s Preparing to unpack .../092-xdelta3_3.0.11-dfsg-1.2_amd64.deb ... 123s Unpacking xdelta3 (3.0.11-dfsg-1.2) ... 123s Selecting previously unselected package pristine-tar. 123s Preparing to unpack .../093-pristine-tar_1.50+nmu2build1_amd64.deb ... 123s Unpacking pristine-tar (1.50+nmu2build1) ... 123s Selecting previously unselected package quilt. 123s Preparing to unpack .../094-quilt_0.68-1_all.deb ... 123s Unpacking quilt (0.68-1) ... 123s Selecting previously unselected package python3-debianbts. 123s Preparing to unpack .../095-python3-debianbts_4.1.1_all.deb ... 123s Unpacking python3-debianbts (4.1.1) ... 123s Selecting previously unselected package python3-jeepney. 123s Preparing to unpack .../096-python3-jeepney_0.8.0-4_all.deb ... 123s Unpacking python3-jeepney (0.8.0-4) ... 123s Selecting previously unselected package python3-secretstorage. 123s Preparing to unpack .../097-python3-secretstorage_3.3.3-3_all.deb ... 123s Unpacking python3-secretstorage (3.3.3-3) ... 123s Selecting previously unselected package python3-jaraco.classes. 123s Preparing to unpack .../098-python3-jaraco.classes_3.4.0-1_all.deb ... 123s Unpacking python3-jaraco.classes (3.4.0-1) ... 123s Selecting previously unselected package python3-keyring. 123s Preparing to unpack .../099-python3-keyring_25.4.1-1_all.deb ... 123s Unpacking python3-keyring (25.4.1-1) ... 123s Selecting previously unselected package python3-launchpadlib-desktop. 123s Preparing to unpack .../100-python3-launchpadlib-desktop_2.0.0-1_all.deb ... 123s Unpacking python3-launchpadlib-desktop (2.0.0-1) ... 123s Selecting previously unselected package python3-ubuntutools. 123s Preparing to unpack .../101-python3-ubuntutools_0.203_all.deb ... 123s Unpacking python3-ubuntutools (0.203) ... 123s Selecting previously unselected package ubuntu-dev-tools. 123s Preparing to unpack .../102-ubuntu-dev-tools_0.203_all.deb ... 123s Unpacking ubuntu-dev-tools (0.203) ... 123s Selecting previously unselected package python3-astroid. 123s Preparing to unpack .../103-python3-astroid_3.3.5-1_all.deb ... 123s Unpacking python3-astroid (3.3.5-1) ... 123s Selecting previously unselected package python3-isort. 123s Preparing to unpack .../104-python3-isort_5.13.2-2_all.deb ... 123s Unpacking python3-isort (5.13.2-2) ... 123s Selecting previously unselected package python3-mypy-extensions. 123s Preparing to unpack .../105-python3-mypy-extensions_1.0.0-1_all.deb ... 123s Unpacking python3-mypy-extensions (1.0.0-1) ... 123s Selecting previously unselected package libjs-underscore. 123s Preparing to unpack .../106-libjs-underscore_1.13.4~dfsg+~1.11.4-3_all.deb ... 123s Unpacking libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 123s Selecting previously unselected package libjs-sphinxdoc. 123s Preparing to unpack .../107-libjs-sphinxdoc_7.4.7-4_all.deb ... 123s Unpacking libjs-sphinxdoc (7.4.7-4) ... 123s Selecting previously unselected package python3-logilab-common. 123s Preparing to unpack .../108-python3-logilab-common_2.0.0-1_all.deb ... 123s Unpacking python3-logilab-common (2.0.0-1) ... 123s Selecting previously unselected package python3-dill. 123s Preparing to unpack .../109-python3-dill_0.3.9-1_all.deb ... 123s Unpacking python3-dill (0.3.9-1) ... 123s Selecting previously unselected package python3-mccabe. 123s Preparing to unpack .../110-python3-mccabe_0.7.0-1_all.deb ... 123s Unpacking python3-mccabe (0.7.0-1) ... 123s Selecting previously unselected package python3-platformdirs. 123s Preparing to unpack .../111-python3-platformdirs_4.3.6-1_all.deb ... 123s Unpacking python3-platformdirs (4.3.6-1) ... 123s Selecting previously unselected package python3-tomlkit. 123s Preparing to unpack .../112-python3-tomlkit_0.13.2-1_all.deb ... 123s Unpacking python3-tomlkit (0.13.2-1) ... 123s Selecting previously unselected package pylint. 123s Preparing to unpack .../113-pylint_3.3.1-2_all.deb ... 123s Unpacking pylint (3.3.1-2) ... 124s Selecting previously unselected package python3-argcomplete. 124s Preparing to unpack .../114-python3-argcomplete_3.5.1-1ubuntu1_all.deb ... 124s Unpacking python3-argcomplete (3.5.1-1ubuntu1) ... 124s Selecting previously unselected package python3-cachetools. 124s Preparing to unpack .../115-python3-cachetools_5.3.3-1_all.deb ... 124s Unpacking python3-cachetools (5.3.3-1) ... 124s Selecting previously unselected package python3-pycryptodome. 124s Preparing to unpack .../116-python3-pycryptodome_3.20.0+dfsg-3build1_amd64.deb ... 124s Unpacking python3-pycryptodome (3.20.0+dfsg-3build1) ... 124s Selecting previously unselected package python3-keyrings.alt. 124s Preparing to unpack .../117-python3-keyrings.alt_5.0.2-1_all.deb ... 124s Unpacking python3-keyrings.alt (5.0.2-1) ... 124s Selecting previously unselected package libhttp-parser2.9:amd64. 124s Preparing to unpack .../118-libhttp-parser2.9_2.9.4-6build1_amd64.deb ... 124s Unpacking libhttp-parser2.9:amd64 (2.9.4-6build1) ... 124s Selecting previously unselected package libgit2-1.8:amd64. 124s Preparing to unpack .../119-libgit2-1.8_1.8.4+ds-1ubuntu1_amd64.deb ... 124s Unpacking libgit2-1.8:amd64 (1.8.4+ds-1ubuntu1) ... 124s Selecting previously unselected package python3-pygit2. 124s Preparing to unpack .../120-python3-pygit2_1.16.0-2_amd64.deb ... 124s Unpacking python3-pygit2 (1.16.0-2) ... 124s Selecting previously unselected package python3-iniconfig. 124s Preparing to unpack .../121-python3-iniconfig_1.1.1-2_all.deb ... 124s Unpacking python3-iniconfig (1.1.1-2) ... 124s Selecting previously unselected package python3-packaging. 124s Preparing to unpack .../122-python3-packaging_24.2-1_all.deb ... 124s Unpacking python3-packaging (24.2-1) ... 124s Selecting previously unselected package python3-pluggy. 124s Preparing to unpack .../123-python3-pluggy_1.5.0-1_all.deb ... 124s Unpacking python3-pluggy (1.5.0-1) ... 124s Selecting previously unselected package python3-pytest. 124s Preparing to unpack .../124-python3-pytest_8.3.3-1_all.deb ... 124s Unpacking python3-pytest (8.3.3-1) ... 124s Selecting previously unselected package libpython3.13-stdlib:amd64. 124s Preparing to unpack .../125-libpython3.13-stdlib_3.13.0-2_amd64.deb ... 124s Unpacking libpython3.13-stdlib:amd64 (3.13.0-2) ... 124s Selecting previously unselected package python3.13. 124s Preparing to unpack .../126-python3.13_3.13.0-2_amd64.deb ... 124s Unpacking python3.13 (3.13.0-2) ... 124s Selecting previously unselected package python3-coverage. 124s Preparing to unpack .../127-python3-coverage_7.4.4+dfsg1-0ubuntu3_amd64.deb ... 124s Unpacking python3-coverage (7.4.4+dfsg1-0ubuntu3) ... 124s Selecting previously unselected package libjs-jquery-isonscreen. 124s Preparing to unpack .../128-libjs-jquery-isonscreen_1.2.0-1.1_all.deb ... 124s Unpacking libjs-jquery-isonscreen (1.2.0-1.1) ... 124s Selecting previously unselected package libjs-jquery-metadata. 124s Preparing to unpack .../129-libjs-jquery-metadata_12-4_all.deb ... 124s Unpacking libjs-jquery-metadata (12-4) ... 124s Selecting previously unselected package libjs-jquery-tablesorter. 124s Preparing to unpack .../130-libjs-jquery-tablesorter_1%3a2.31.3+dfsg1-4_all.deb ... 124s Unpacking libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 124s Selecting previously unselected package libjs-jquery-throttle-debounce. 124s Preparing to unpack .../131-libjs-jquery-throttle-debounce_1.1+dfsg.1-2_all.deb ... 124s Unpacking libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 124s Selecting previously unselected package python3-pytest-cov. 124s Preparing to unpack .../132-python3-pytest-cov_5.0.0-1_all.deb ... 124s Unpacking python3-pytest-cov (5.0.0-1) ... 124s Selecting previously unselected package python3-tenacity. 124s Preparing to unpack .../133-python3-tenacity_8.5.0-0ubuntu1_all.deb ... 124s Unpacking python3-tenacity (8.5.0-0ubuntu1) ... 124s Selecting previously unselected package python3-py. 124s Preparing to unpack .../134-python3-py_1.11.0-2_all.deb ... 124s Unpacking python3-py (1.11.0-2) ... 124s Selecting previously unselected package libnorm1t64:amd64. 124s Preparing to unpack .../135-libnorm1t64_1.5.9+dfsg-3.1build1_amd64.deb ... 124s Unpacking libnorm1t64:amd64 (1.5.9+dfsg-3.1build1) ... 124s Selecting previously unselected package libpgm-5.3-0t64:amd64. 124s Preparing to unpack .../136-libpgm-5.3-0t64_5.3.128~dfsg-2.1build1_amd64.deb ... 124s Unpacking libpgm-5.3-0t64:amd64 (5.3.128~dfsg-2.1build1) ... 124s Selecting previously unselected package libsodium23:amd64. 124s Preparing to unpack .../137-libsodium23_1.0.18-1build3_amd64.deb ... 124s Unpacking libsodium23:amd64 (1.0.18-1build3) ... 124s Selecting previously unselected package libzmq5:amd64. 124s Preparing to unpack .../138-libzmq5_4.3.5-1build2_amd64.deb ... 124s Unpacking libzmq5:amd64 (4.3.5-1build2) ... 124s Selecting previously unselected package python3-zmq. 124s Preparing to unpack .../139-python3-zmq_24.0.1-5build2_amd64.deb ... 124s Unpacking python3-zmq (24.0.1-5build2) ... 124s Selecting previously unselected package git-ubuntu. 124s Preparing to unpack .../140-git-ubuntu_1.1-1_all.deb ... 124s Unpacking git-ubuntu (1.1-1) ... 124s Setting up python3-iniconfig (1.1.1-2) ... 124s Setting up libnorm1t64:amd64 (1.5.9+dfsg-3.1build1) ... 124s Setting up wdiff (1.2.2-6build1) ... 124s Setting up libfile-which-perl (1.27-2) ... 124s Setting up libsodium23:amd64 (1.0.18-1build3) ... 124s Setting up python3-jaraco.classes (3.4.0-1) ... 125s Setting up libxdelta2t64:amd64 (1.1.3-10.7) ... 125s Setting up python3-importlib-metadata (8.5.0-1) ... 125s Setting up xdelta (1.1.3-10.7) ... 125s Setting up libsys-cpuaffinity-perl (1.13~03-2build4) ... 125s Setting up python3-py (1.11.0-2) ... 125s Setting up libdynaloader-functions-perl (0.004-1) ... 125s Setting up libclass-method-modifiers-perl (2.15-1) ... 125s Setting up libio-pty-perl (1:1.20-1build3) ... 125s Setting up python3-cachetools (5.3.3-1) ... 125s Setting up python3-debianbts (4.1.1) ... 125s Setting up libclone-perl:amd64 (0.47-1) ... 125s Setting up libhtml-tagset-perl (3.24-1) ... 125s Setting up python3-mypy-extensions (1.0.0-1) ... 125s Setting up python3-pycryptodome (3.20.0+dfsg-3build1) ... 125s Setting up python3-tenacity (8.5.0-0ubuntu1) ... 126s Setting up liblwp-mediatypes-perl (6.04-2) ... 126s Setting up debian-archive-keyring (2023.4ubuntu1) ... 126s Setting up libtry-tiny-perl (0.32-1) ... 126s Setting up perl-openssl-defaults:amd64 (7build3) ... 126s Setting up libencode-locale-perl (1.05-3) ... 126s Setting up libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 126s Setting up libgomp1:amd64 (14.2.0-8ubuntu1) ... 126s Setting up python3-xdg (0.28-2) ... 126s Setting up pbzip2 (1.1.13-1build1) ... 126s Setting up python3-platformdirs (4.3.6-1) ... 126s Setting up liberror-perl (0.17029-2) ... 126s Setting up libpython3.13-minimal:amd64 (3.13.0-2) ... 126s Setting up patchutils (0.4.2-1build3) ... 126s Setting up libpgm-5.3-0t64:amd64 (5.3.128~dfsg-2.1build1) ... 126s Setting up python3-packaging (24.2-1) ... 126s Setting up python3-gpg (1.24.0-2ubuntu1) ... 126s Setting up python3-dill (0.3.9-1) ... 126s Setting up python3-debian (0.1.49ubuntu3) ... 126s Setting up libquadmath0:amd64 (14.2.0-8ubuntu1) ... 126s Setting up diffstat (1.67-1) ... 126s Setting up libmpc3:amd64 (1.3.1-1build2) ... 126s Setting up libio-html-perl (1.004-3) ... 126s Setting up libb-hooks-op-check-perl:amd64 (0.22-3build2) ... 126s Setting up libipc-run-perl (20231003.0-2) ... 126s Setting up python3-jeepney (0.8.0-4) ... 127s Setting up python3-isort (5.13.2-2) ... 127s Setting up python3-pluggy (1.5.0-1) ... 127s Setting up libtimedate-perl (2.3300-2) ... 127s Setting up libubsan1:amd64 (14.2.0-8ubuntu1) ... 127s Setting up python3-astroid (3.3.5-1) ... 127s Setting up libhwasan0:amd64 (14.2.0-8ubuntu1) ... 127s Setting up xdelta3 (3.0.11-dfsg-1.2) ... 127s Setting up libasan8:amd64 (14.2.0-8ubuntu1) ... 127s Setting up pixz (1.0.7-3) ... 127s Setting up librole-tiny-perl (2.002004-1) ... 127s Setting up python3.13-minimal (3.13.0-2) ... 128s Setting up git-man (1:2.45.2-1.2ubuntu1) ... 128s Setting up python3-dateutil (2.9.0-3) ... 128s Setting up python3-mccabe (0.7.0-1) ... 128s Setting up libsub-quote-perl (2.006008-1ubuntu1) ... 128s Setting up libclass-xsaccessor-perl (1.19-4build5) ... 128s Setting up libtsan2:amd64 (14.2.0-8ubuntu1) ... 128s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 128s Setting up libfile-dirlist-perl (0.05-3) ... 128s Setting up libjs-jquery-hotkeys (0~20130707+git2d51e3a9+dfsg-2.1) ... 128s Setting up libisl23:amd64 (0.27-1) ... 128s Setting up python3-argcomplete (3.5.1-1ubuntu1) ... 128s Setting up libfile-homedir-perl (1.006-2) ... 128s Setting up python3-tomlkit (0.13.2-1) ... 128s Setting up python3-distro-info (1.12) ... 128s Setting up libpython3.13-stdlib:amd64 (3.13.0-2) ... 128s Setting up libcc1-0:amd64 (14.2.0-8ubuntu1) ... 128s Setting up liburi-perl (5.30-1) ... 128s Setting up pristine-tar (1.50+nmu2build1) ... 128s Setting up libfile-touch-perl (0.12-2) ... 128s Setting up liblsan0:amd64 (14.2.0-8ubuntu1) ... 128s Setting up dctrl-tools (2.24-3build3) ... 128s Setting up libitm1:amd64 (14.2.0-8ubuntu1) ... 128s Setting up libhttp-parser2.9:amd64 (2.9.4-6build1) ... 128s Setting up libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 128s Setting up libnet-ssleay-perl:amd64 (1.94-2) ... 128s Setting up libhttp-date-perl (6.06-1) ... 128s Setting up gettext (0.22.5-2) ... 128s Setting up libfile-listing-perl (6.16-1) ... 128s Setting up libzmq5:amd64 (4.3.5-1build2) ... 128s Setting up python3.13 (3.13.0-2) ... 129s Setting up python3-pytest (8.3.3-1) ... 129s Setting up libnet-http-perl (6.23-1) ... 129s Setting up python3-coverage (7.4.4+dfsg1-0ubuntu3) ... 129s Setting up quilt (0.68-1) ... 129s Setting up libdevel-callchecker-perl:amd64 (0.009-1build1) ... 129s Setting up dput (1.2.4ubuntu1) ... 130s Setting up python3-secretstorage (3.3.3-3) ... 130s Setting up python3-zmq (24.0.1-5build2) ... 130s Setting up libjs-jquery-metadata (12-4) ... 130s Setting up libgit2-1.8:amd64 (1.8.4+ds-1ubuntu1) ... 130s Setting up libjs-jquery-isonscreen (1.2.0-1.1) ... 130s Setting up cpp-14-x86-64-linux-gnu (14.2.0-8ubuntu1) ... 130s Setting up git (1:2.45.2-1.2ubuntu1) ... 130s Setting up libjs-sphinxdoc (7.4.7-4) ... 130s Setting up cpp-14 (14.2.0-8ubuntu1) ... 130s Setting up libwww-robotrules-perl (6.02-1) ... 130s Setting up libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 130s Setting up libhtml-parser-perl:amd64 (3.83-1build1) ... 130s Setting up python3-keyring (25.4.1-1) ... 130s Setting up libgcc-14-dev:amd64 (14.2.0-8ubuntu1) ... 130s Setting up libstdc++-14-dev:amd64 (14.2.0-8ubuntu1) ... 130s Setting up libio-socket-ssl-perl (2.089-1) ... 130s Setting up libhttp-message-perl (7.00-2ubuntu1) ... 130s Setting up cpp-x86-64-linux-gnu (4:14.1.0-2ubuntu1) ... 130s Setting up libhttp-negotiate-perl (6.01-2) ... 130s Setting up libhttp-cookies-perl (6.11-1) ... 130s Setting up python3-logilab-common (2.0.0-1) ... 130s Setting up python3-pygit2 (1.16.0-2) ... 130s Setting up libhtml-tree-perl (5.07-3) ... 130s Setting up libparams-classify-perl:amd64 (0.015-2build6) ... 130s Setting up python3-pytest-cov (5.0.0-1) ... 130s Setting up libmodule-runtime-perl (0.016-2) ... 130s Setting up python3-launchpadlib-desktop (2.0.0-1) ... 130s Setting up cpp (4:14.1.0-2ubuntu1) ... 130s Setting up python3-keyrings.alt (5.0.2-1) ... 130s Setting up gcc-14-x86-64-linux-gnu (14.2.0-8ubuntu1) ... 130s Setting up pylint (3.3.1-2) ... 131s Setting up gcc-x86-64-linux-gnu (4:14.1.0-2ubuntu1) ... 131s Setting up libimport-into-perl (1.002005-2) ... 131s Setting up libmoo-perl (2.005005-1) ... 131s Setting up gcc-14 (14.2.0-8ubuntu1) ... 131s Setting up python3-ubuntutools (0.203) ... 131s Setting up g++-14-x86-64-linux-gnu (14.2.0-8ubuntu1) ... 131s Setting up g++-x86-64-linux-gnu (4:14.1.0-2ubuntu1) ... 131s Setting up g++-14 (14.2.0-8ubuntu1) ... 131s Setting up gcc (4:14.1.0-2ubuntu1) ... 131s Setting up g++ (4:14.1.0-2ubuntu1) ... 131s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 131s Setting up build-essential (12.10ubuntu1) ... 131s Setting up liblwp-protocol-https-perl (6.14-1) ... 131s Setting up libwww-perl (6.77-1) ... 131s Setting up devscripts (2.24.3) ... 132s Setting up git-buildpackage (0.9.35) ... 132s Setting up ubuntu-dev-tools (0.203) ... 132s Setting up git-ubuntu (1.1-1) ... 132s Processing triggers for libc-bin (2.40-1ubuntu3) ... 132s Processing triggers for systemd (256.5-2ubuntu4) ... 132s Processing triggers for man-db (2.13.0-1) ... 134s Processing triggers for install-info (7.1.1-1) ... 137s Reading package lists... 138s Building dependency tree... 138s Reading state information... 138s Starting pkgProblemResolver with broken count: 0 138s Starting 2 pkgProblemResolver with broken count: 0 138s Done 138s The following NEW packages will be installed: 138s autopkgtest-satdep 138s 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 138s Need to get 0 B/696 B of archives. 138s After this operation, 0 B of additional disk space will be used. 138s Get:1 /tmp/autopkgtest.1k2RJG/2-autopkgtest-satdep.deb autopkgtest-satdep amd64 0 [696 B] 138s Selecting previously unselected package autopkgtest-satdep. 138s (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 ... 83131 files and directories currently installed.) 138s Preparing to unpack .../2-autopkgtest-satdep.deb ... 138s Unpacking autopkgtest-satdep (0) ... 138s Setting up autopkgtest-satdep (0) ... 140s (Reading database ... 83131 files and directories currently installed.) 140s Removing autopkgtest-satdep (0) ... 141s autopkgtest [09:36:01]: test self-test: TEST_SYSTEM_TREE=1 /usr/share/git-ubuntu/self-test 141s autopkgtest [09:36:01]: test self-test: [----------------------- 141s Testing git-ubuntu system installation. 141s Testing tree in /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu 141s Working dir /tmp/autopkgtest.1k2RJG/build.6jh/src 152s pylint passed! 158s ============================= test session starts ============================== 158s platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0 158s rootdir: /tmp/autopkgtest.1k2RJG/build.6jh/src 158s configfile: pytest.ini 158s plugins: typeguard-4.4.1, cov-5.0.0 158s collected 459 items 158s 158s gitubuntu/build.py ..... [ 1%] 159s gitubuntu/git_repository_test.py ....................................... [ 9%] 169s ...FFFFF.FFF...........................F.FFFFFFF.FFF.......FFFFFFFFFF [ 24%] 169s gitubuntu/importer_service_test.py ..................................... [ 32%] 169s ..... [ 33%] 169s gitubuntu/importer_service_worker_test.py ... [ 34%] 180s gitubuntu/importer_tag_test.py FFFFFFFFFxF [ 36%] 195s gitubuntu/importer_test.py .......FF.FFFFFFFFFFF.FFF.FFF..FFFFFFFFFFFFFF [ 46%] 207s FFFFxx..FF.................................................F....FFFF. [ 61%] 209s gitubuntu/integration_test.py ...............Fsss [ 65%] 209s gitubuntu/prepare_upload_test.py .............. [ 68%] 209s gitubuntu/repo_builder_test.py .........FF.F................ [ 75%] 210s gitubuntu/rich_history_test.py FFF.FFFF [ 76%] 214s gitubuntu/source_builder_test.py .FF.......FFFFFFFFF.. [ 81%] 214s gitubuntu/source_information_test.py ................................... [ 89%] 214s ... [ 89%] 215s gitubuntu/versioning.py ............................................... [100%] 215s 215s =================================== FAILURES =================================== 215s ___________________ test_follow_symlinks_to_blob[0] ____________________ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmpj9hggbv4/.git/') 215s tree_func = at 0x746239e811c0> 215s 215s @pytest.mark.parametrize('tree_func', [ 215s # The tree_func parameter is a function that accepts a mock Blob that is to 215s # represent the changelog blob itself and returns a mock Tree with the mock 215s # Blob embedded somewhere within it. The test function can then ensure that 215s # follow_symlinks_to_blob can correctly find the changelog Blob given the 215s # Tree. 215s 215s # Of course this is only expected to work if, after checking out the Tree, 215s # "cat debian/changelog" would work. But this allows us to test the various 215s # permutations of symlink following in Trees that _are_ valid. 215s 215s # Simple case 215s lambda b: Tree({ 215s 'debian': Tree({'changelog': b}), 215s }), 215s 215s # Symlink in debian/ 215s lambda b: Tree({ 215s 'debian': Tree({ 215s 'changelog.real': b, 215s 'changelog': Symlink('changelog.real'), 215s }), 215s }), 215s 215s # Symlink to parent directory 215s lambda b: Tree({ 215s 'changelog': b, 215s 'debian': Tree({ 215s 'changelog': Symlink('../changelog'), 215s }) 215s }), 215s 215s # Symlink to subdirectory 215s lambda b: Tree({ 215s 'debian': Tree({ 215s 'changelog': Symlink('subdirectory/changelog'), 215s 'subdirectory': Tree({'changelog': b}), 215s }) 215s }), 215s 215s # debian/ itself is a symlink to a different directory 215s lambda b: Tree({ 215s 'pkg': Tree({'changelog': b}), 215s 'debian': Symlink('pkg'), 215s }) 215s ]) 215s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 215s blob = Blob(b'') 215s blob_id = blob.write(pygit2_repo) 215s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 215s > result_blob = target.follow_symlinks_to_blob( 215s pygit2_repo, 215s tree, 215s 'debian/changelog', 215s ) 215s 215s gitubuntu/git_repository_test.py:342: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 215s return _follow_symlinks_to_blob( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s repo = pygit2.Repository('/tmp/tmpj9hggbv4/.git/') 215s top_tree_object = 215s search_path = 'debian/changelog' 215s _rel_tree = 215s _rel_path = '' 215s 215s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 215s _rel_tree=None, _rel_path='' 215s ): 215s '''Recursively follow a path down a tree, following symlinks, to find blob 215s 215s repo: pygit2.Repository object 215s top_tree: pygit2.Tree object of the top of the tree structure 215s search_path: '/'-separated path string of blob to find 215s _rel_tree: (internal) which tree to look further into 215s _rel_path: (internal) the path we are in so far 215s ''' 215s 215s NORMAL_BLOB_MODES = set([ 215s pygit2.GIT_FILEMODE_BLOB, 215s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 215s ]) 215s 215s _rel_tree = _rel_tree or top_tree_object 215s head, tail = posixpath.split(search_path) 215s 215s # A traditional functional split would put a single entry in head with tail 215s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 215s # to make it appear to have traditional semantics. 215s if not head: 215s head = tail 215s tail = None 215s 215s entry = _rel_tree[head] 215s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s gitubuntu/git_repository.py:68: AttributeError 215s ___________________ test_follow_symlinks_to_blob[1] ____________________ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmpn6ddh9bm/.git/') 215s tree_func = at 0x746239e81260> 215s 215s @pytest.mark.parametrize('tree_func', [ 215s # The tree_func parameter is a function that accepts a mock Blob that is to 215s # represent the changelog blob itself and returns a mock Tree with the mock 215s # Blob embedded somewhere within it. The test function can then ensure that 215s # follow_symlinks_to_blob can correctly find the changelog Blob given the 215s # Tree. 215s 215s # Of course this is only expected to work if, after checking out the Tree, 215s # "cat debian/changelog" would work. But this allows us to test the various 215s # permutations of symlink following in Trees that _are_ valid. 215s 215s # Simple case 215s lambda b: Tree({ 215s 'debian': Tree({'changelog': b}), 215s }), 215s 215s # Symlink in debian/ 215s lambda b: Tree({ 215s 'debian': Tree({ 215s 'changelog.real': b, 215s 'changelog': Symlink('changelog.real'), 215s }), 215s }), 215s 215s # Symlink to parent directory 215s lambda b: Tree({ 215s 'changelog': b, 215s 'debian': Tree({ 215s 'changelog': Symlink('../changelog'), 215s }) 215s }), 215s 215s # Symlink to subdirectory 215s lambda b: Tree({ 215s 'debian': Tree({ 215s 'changelog': Symlink('subdirectory/changelog'), 215s 'subdirectory': Tree({'changelog': b}), 215s }) 215s }), 215s 215s # debian/ itself is a symlink to a different directory 215s lambda b: Tree({ 215s 'pkg': Tree({'changelog': b}), 215s 'debian': Symlink('pkg'), 215s }) 215s ]) 215s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 215s blob = Blob(b'') 215s blob_id = blob.write(pygit2_repo) 215s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 215s > result_blob = target.follow_symlinks_to_blob( 215s pygit2_repo, 215s tree, 215s 'debian/changelog', 215s ) 215s 215s gitubuntu/git_repository_test.py:342: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 215s return _follow_symlinks_to_blob( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s repo = pygit2.Repository('/tmp/tmpn6ddh9bm/.git/') 215s top_tree_object = 215s search_path = 'debian/changelog' 215s _rel_tree = 215s _rel_path = '' 215s 215s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 215s _rel_tree=None, _rel_path='' 215s ): 215s '''Recursively follow a path down a tree, following symlinks, to find blob 215s 215s repo: pygit2.Repository object 215s top_tree: pygit2.Tree object of the top of the tree structure 215s search_path: '/'-separated path string of blob to find 215s _rel_tree: (internal) which tree to look further into 215s _rel_path: (internal) the path we are in so far 215s ''' 215s 215s NORMAL_BLOB_MODES = set([ 215s pygit2.GIT_FILEMODE_BLOB, 215s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 215s ]) 215s 215s _rel_tree = _rel_tree or top_tree_object 215s head, tail = posixpath.split(search_path) 215s 215s # A traditional functional split would put a single entry in head with tail 215s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 215s # to make it appear to have traditional semantics. 215s if not head: 215s head = tail 215s tail = None 215s 215s entry = _rel_tree[head] 215s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s gitubuntu/git_repository.py:68: AttributeError 215s ___________________ test_follow_symlinks_to_blob[2] ____________________ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmpprg_e6wi/.git/') 215s tree_func = at 0x746239e81300> 215s 215s @pytest.mark.parametrize('tree_func', [ 215s # The tree_func parameter is a function that accepts a mock Blob that is to 215s # represent the changelog blob itself and returns a mock Tree with the mock 215s # Blob embedded somewhere within it. The test function can then ensure that 215s # follow_symlinks_to_blob can correctly find the changelog Blob given the 215s # Tree. 215s 215s # Of course this is only expected to work if, after checking out the Tree, 215s # "cat debian/changelog" would work. But this allows us to test the various 215s # permutations of symlink following in Trees that _are_ valid. 215s 215s # Simple case 215s lambda b: Tree({ 215s 'debian': Tree({'changelog': b}), 215s }), 215s 215s # Symlink in debian/ 215s lambda b: Tree({ 215s 'debian': Tree({ 215s 'changelog.real': b, 215s 'changelog': Symlink('changelog.real'), 215s }), 215s }), 215s 215s # Symlink to parent directory 215s lambda b: Tree({ 215s 'changelog': b, 215s 'debian': Tree({ 215s 'changelog': Symlink('../changelog'), 215s }) 215s }), 215s 215s # Symlink to subdirectory 215s lambda b: Tree({ 215s 'debian': Tree({ 215s 'changelog': Symlink('subdirectory/changelog'), 215s 'subdirectory': Tree({'changelog': b}), 215s }) 215s }), 215s 215s # debian/ itself is a symlink to a different directory 215s lambda b: Tree({ 215s 'pkg': Tree({'changelog': b}), 215s 'debian': Symlink('pkg'), 215s }) 215s ]) 215s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 215s blob = Blob(b'') 215s blob_id = blob.write(pygit2_repo) 215s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 215s > result_blob = target.follow_symlinks_to_blob( 215s pygit2_repo, 215s tree, 215s 'debian/changelog', 215s ) 215s 215s gitubuntu/git_repository_test.py:342: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 215s return _follow_symlinks_to_blob( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s repo = pygit2.Repository('/tmp/tmpprg_e6wi/.git/') 215s top_tree_object = 215s search_path = 'debian/changelog' 215s _rel_tree = 215s _rel_path = '' 215s 215s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 215s _rel_tree=None, _rel_path='' 215s ): 215s '''Recursively follow a path down a tree, following symlinks, to find blob 215s 215s repo: pygit2.Repository object 215s top_tree: pygit2.Tree object of the top of the tree structure 215s search_path: '/'-separated path string of blob to find 215s _rel_tree: (internal) which tree to look further into 215s _rel_path: (internal) the path we are in so far 215s ''' 215s 215s NORMAL_BLOB_MODES = set([ 215s pygit2.GIT_FILEMODE_BLOB, 215s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 215s ]) 215s 215s _rel_tree = _rel_tree or top_tree_object 215s head, tail = posixpath.split(search_path) 215s 215s # A traditional functional split would put a single entry in head with tail 215s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 215s # to make it appear to have traditional semantics. 215s if not head: 215s head = tail 215s tail = None 215s 215s entry = _rel_tree[head] 215s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s gitubuntu/git_repository.py:68: AttributeError 215s ___________________ test_follow_symlinks_to_blob[3] ____________________ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmpdxny6u9h/.git/') 215s tree_func = at 0x746239e813a0> 215s 215s @pytest.mark.parametrize('tree_func', [ 215s # The tree_func parameter is a function that accepts a mock Blob that is to 215s # represent the changelog blob itself and returns a mock Tree with the mock 215s # Blob embedded somewhere within it. The test function can then ensure that 215s # follow_symlinks_to_blob can correctly find the changelog Blob given the 215s # Tree. 215s 215s # Of course this is only expected to work if, after checking out the Tree, 215s # "cat debian/changelog" would work. But this allows us to test the various 215s # permutations of symlink following in Trees that _are_ valid. 215s 215s # Simple case 215s lambda b: Tree({ 215s 'debian': Tree({'changelog': b}), 215s }), 215s 215s # Symlink in debian/ 215s lambda b: Tree({ 215s 'debian': Tree({ 215s 'changelog.real': b, 215s 'changelog': Symlink('changelog.real'), 215s }), 215s }), 215s 215s # Symlink to parent directory 215s lambda b: Tree({ 215s 'changelog': b, 215s 'debian': Tree({ 215s 'changelog': Symlink('../changelog'), 215s }) 215s }), 215s 215s # Symlink to subdirectory 215s lambda b: Tree({ 215s 'debian': Tree({ 215s 'changelog': Symlink('subdirectory/changelog'), 215s 'subdirectory': Tree({'changelog': b}), 215s }) 215s }), 215s 215s # debian/ itself is a symlink to a different directory 215s lambda b: Tree({ 215s 'pkg': Tree({'changelog': b}), 215s 'debian': Symlink('pkg'), 215s }) 215s ]) 215s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 215s blob = Blob(b'') 215s blob_id = blob.write(pygit2_repo) 215s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 215s > result_blob = target.follow_symlinks_to_blob( 215s pygit2_repo, 215s tree, 215s 'debian/changelog', 215s ) 215s 215s gitubuntu/git_repository_test.py:342: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 215s return _follow_symlinks_to_blob( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s repo = pygit2.Repository('/tmp/tmpdxny6u9h/.git/') 215s top_tree_object = 215s search_path = 'debian/changelog' 215s _rel_tree = 215s _rel_path = '' 215s 215s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 215s _rel_tree=None, _rel_path='' 215s ): 215s '''Recursively follow a path down a tree, following symlinks, to find blob 215s 215s repo: pygit2.Repository object 215s top_tree: pygit2.Tree object of the top of the tree structure 215s search_path: '/'-separated path string of blob to find 215s _rel_tree: (internal) which tree to look further into 215s _rel_path: (internal) the path we are in so far 215s ''' 215s 215s NORMAL_BLOB_MODES = set([ 215s pygit2.GIT_FILEMODE_BLOB, 215s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 215s ]) 215s 215s _rel_tree = _rel_tree or top_tree_object 215s head, tail = posixpath.split(search_path) 215s 215s # A traditional functional split would put a single entry in head with tail 215s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 215s # to make it appear to have traditional semantics. 215s if not head: 215s head = tail 215s tail = None 215s 215s entry = _rel_tree[head] 215s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s gitubuntu/git_repository.py:68: AttributeError 215s ___________________ test_follow_symlinks_to_blob[4] ____________________ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmpwttzu5uh/.git/') 215s tree_func = at 0x746239e81440> 215s 215s @pytest.mark.parametrize('tree_func', [ 215s # The tree_func parameter is a function that accepts a mock Blob that is to 215s # represent the changelog blob itself and returns a mock Tree with the mock 215s # Blob embedded somewhere within it. The test function can then ensure that 215s # follow_symlinks_to_blob can correctly find the changelog Blob given the 215s # Tree. 215s 215s # Of course this is only expected to work if, after checking out the Tree, 215s # "cat debian/changelog" would work. But this allows us to test the various 215s # permutations of symlink following in Trees that _are_ valid. 215s 215s # Simple case 215s lambda b: Tree({ 215s 'debian': Tree({'changelog': b}), 215s }), 215s 215s # Symlink in debian/ 215s lambda b: Tree({ 215s 'debian': Tree({ 215s 'changelog.real': b, 215s 'changelog': Symlink('changelog.real'), 215s }), 215s }), 215s 215s # Symlink to parent directory 215s lambda b: Tree({ 215s 'changelog': b, 215s 'debian': Tree({ 215s 'changelog': Symlink('../changelog'), 215s }) 215s }), 215s 215s # Symlink to subdirectory 215s lambda b: Tree({ 215s 'debian': Tree({ 215s 'changelog': Symlink('subdirectory/changelog'), 215s 'subdirectory': Tree({'changelog': b}), 215s }) 215s }), 215s 215s # debian/ itself is a symlink to a different directory 215s lambda b: Tree({ 215s 'pkg': Tree({'changelog': b}), 215s 'debian': Symlink('pkg'), 215s }) 215s ]) 215s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 215s blob = Blob(b'') 215s blob_id = blob.write(pygit2_repo) 215s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 215s > result_blob = target.follow_symlinks_to_blob( 215s pygit2_repo, 215s tree, 215s 'debian/changelog', 215s ) 215s 215s gitubuntu/git_repository_test.py:342: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 215s return _follow_symlinks_to_blob( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s repo = pygit2.Repository('/tmp/tmpwttzu5uh/.git/') 215s top_tree_object = 215s search_path = 'debian/changelog' 215s _rel_tree = 215s _rel_path = '' 215s 215s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 215s _rel_tree=None, _rel_path='' 215s ): 215s '''Recursively follow a path down a tree, following symlinks, to find blob 215s 215s repo: pygit2.Repository object 215s top_tree: pygit2.Tree object of the top of the tree structure 215s search_path: '/'-separated path string of blob to find 215s _rel_tree: (internal) which tree to look further into 215s _rel_path: (internal) the path we are in so far 215s ''' 215s 215s NORMAL_BLOB_MODES = set([ 215s pygit2.GIT_FILEMODE_BLOB, 215s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 215s ]) 215s 215s _rel_tree = _rel_tree or top_tree_object 215s head, tail = posixpath.split(search_path) 215s 215s # A traditional functional split would put a single entry in head with tail 215s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 215s # to make it appear to have traditional semantics. 215s if not head: 215s head = tail 215s tail = None 215s 215s entry = _rel_tree[head] 215s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s gitubuntu/git_repository.py:68: AttributeError 215s ________________ test_follow_symlinks_to_blob_not_found[tree1] _________________ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmptl7se83a/.git/') 215s tree = 215s 215s @pytest.mark.parametrize('tree', [ 215s Tree({}), 215s Tree({'debian': Tree({})}), 215s Tree({'debian': Tree({'changelog': Symlink('other')})}), 215s Tree({'debian': Tree({'changelog': Symlink('../other')})}), 215s ]) 215s def test_follow_symlinks_to_blob_not_found(pygit2_repo, tree): 215s pygit2_tree = pygit2_repo.get(tree.write(pygit2_repo)) 215s with pytest.raises(KeyError): 215s > target.follow_symlinks_to_blob( 215s pygit2_repo, 215s pygit2_tree, 215s 'debian/changelog', 215s ) 215s 215s gitubuntu/git_repository_test.py:359: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 215s return _follow_symlinks_to_blob( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s repo = pygit2.Repository('/tmp/tmptl7se83a/.git/') 215s top_tree_object = 215s search_path = 'debian/changelog' 215s _rel_tree = 215s _rel_path = '' 215s 215s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 215s _rel_tree=None, _rel_path='' 215s ): 215s '''Recursively follow a path down a tree, following symlinks, to find blob 215s 215s repo: pygit2.Repository object 215s top_tree: pygit2.Tree object of the top of the tree structure 215s search_path: '/'-separated path string of blob to find 215s _rel_tree: (internal) which tree to look further into 215s _rel_path: (internal) the path we are in so far 215s ''' 215s 215s NORMAL_BLOB_MODES = set([ 215s pygit2.GIT_FILEMODE_BLOB, 215s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 215s ]) 215s 215s _rel_tree = _rel_tree or top_tree_object 215s head, tail = posixpath.split(search_path) 215s 215s # A traditional functional split would put a single entry in head with tail 215s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 215s # to make it appear to have traditional semantics. 215s if not head: 215s head = tail 215s tail = None 215s 215s entry = _rel_tree[head] 215s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s gitubuntu/git_repository.py:68: AttributeError 215s ________________ test_follow_symlinks_to_blob_not_found[tree2] _________________ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmpvccg_vbx/.git/') 215s tree = 215s 215s @pytest.mark.parametrize('tree', [ 215s Tree({}), 215s Tree({'debian': Tree({})}), 215s Tree({'debian': Tree({'changelog': Symlink('other')})}), 215s Tree({'debian': Tree({'changelog': Symlink('../other')})}), 215s ]) 215s def test_follow_symlinks_to_blob_not_found(pygit2_repo, tree): 215s pygit2_tree = pygit2_repo.get(tree.write(pygit2_repo)) 215s with pytest.raises(KeyError): 215s > target.follow_symlinks_to_blob( 215s pygit2_repo, 215s pygit2_tree, 215s 'debian/changelog', 215s ) 215s 215s gitubuntu/git_repository_test.py:359: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 215s return _follow_symlinks_to_blob( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s repo = pygit2.Repository('/tmp/tmpvccg_vbx/.git/') 215s top_tree_object = 215s search_path = 'debian/changelog' 215s _rel_tree = 215s _rel_path = '' 215s 215s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 215s _rel_tree=None, _rel_path='' 215s ): 215s '''Recursively follow a path down a tree, following symlinks, to find blob 215s 215s repo: pygit2.Repository object 215s top_tree: pygit2.Tree object of the top of the tree structure 215s search_path: '/'-separated path string of blob to find 215s _rel_tree: (internal) which tree to look further into 215s _rel_path: (internal) the path we are in so far 215s ''' 215s 215s NORMAL_BLOB_MODES = set([ 215s pygit2.GIT_FILEMODE_BLOB, 215s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 215s ]) 215s 215s _rel_tree = _rel_tree or top_tree_object 215s head, tail = posixpath.split(search_path) 215s 215s # A traditional functional split would put a single entry in head with tail 215s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 215s # to make it appear to have traditional semantics. 215s if not head: 215s head = tail 215s tail = None 215s 215s entry = _rel_tree[head] 215s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s gitubuntu/git_repository.py:68: AttributeError 215s ________________ test_follow_symlinks_to_blob_not_found[tree3] _________________ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmpwrz96y2l/.git/') 215s tree = 215s 215s @pytest.mark.parametrize('tree', [ 215s Tree({}), 215s Tree({'debian': Tree({})}), 215s Tree({'debian': Tree({'changelog': Symlink('other')})}), 215s Tree({'debian': Tree({'changelog': Symlink('../other')})}), 215s ]) 215s def test_follow_symlinks_to_blob_not_found(pygit2_repo, tree): 215s pygit2_tree = pygit2_repo.get(tree.write(pygit2_repo)) 215s with pytest.raises(KeyError): 215s > target.follow_symlinks_to_blob( 215s pygit2_repo, 215s pygit2_tree, 215s 'debian/changelog', 215s ) 215s 215s gitubuntu/git_repository_test.py:359: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 215s return _follow_symlinks_to_blob( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s repo = pygit2.Repository('/tmp/tmpwrz96y2l/.git/') 215s top_tree_object = 215s search_path = 'debian/changelog' 215s _rel_tree = 215s _rel_path = '' 215s 215s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 215s _rel_tree=None, _rel_path='' 215s ): 215s '''Recursively follow a path down a tree, following symlinks, to find blob 215s 215s repo: pygit2.Repository object 215s top_tree: pygit2.Tree object of the top of the tree structure 215s search_path: '/'-separated path string of blob to find 215s _rel_tree: (internal) which tree to look further into 215s _rel_path: (internal) the path we are in so far 215s ''' 215s 215s NORMAL_BLOB_MODES = set([ 215s pygit2.GIT_FILEMODE_BLOB, 215s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 215s ]) 215s 215s _rel_tree = _rel_tree or top_tree_object 215s head, tail = posixpath.split(search_path) 215s 215s # A traditional functional split would put a single entry in head with tail 215s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 215s # to make it appear to have traditional semantics. 215s if not head: 215s head = tail 215s tail = None 215s 215s entry = _rel_tree[head] 215s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s gitubuntu/git_repository.py:68: AttributeError 215s _________________________ test_git_escape_dir_to_tree __________________________ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmpkffxhkvc/.git/') 215s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_git_escape_dir_to_tree0') 215s 215s def test_git_escape_dir_to_tree(pygit2_repo, tmpdir): 215s tmpdir.mkdir('.git') 215s > tree_hash = target.GitUbuntuRepository.dir_to_tree( 215s pygit2_repo, 215s str(tmpdir), 215s escape=True, 215s ) 215s 215s gitubuntu/git_repository_test.py:668: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s gitubuntu/git_repository.py:2463: in dir_to_tree 215s replacement_oid = cls._add_missing_tree_dirs( 215s gitubuntu/git_repository.py:2397: in _add_missing_tree_dirs 215s tree_builder = cls._create_replacement_tree_builder( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s cls = 215s repo = pygit2.Repository('/tmp/tmpkffxhkvc/.git/') 215s treeish = 215s sub_path = '' 215s 215s @classmethod 215s def _create_replacement_tree_builder(cls, repo, treeish, sub_path): 215s '''Create a replacement TreeBuilder 215s 215s Create a TreeBuilder based on an existing repository, top-level 215s tree-ish and path inside that tree. 215s 215s A sub_path of '' is taken to mean a request for a replacement 215s TreeBuilder for the top level tree. 215s 215s Returns a TreeBuilder object pre-populated with the previous contents. 215s If the path did not previously exist in the tree-ish, then return an 215s empty TreeBuilder instead. 215s ''' 215s 215s > tree = treeish.peel(pygit2.GIT_OBJ_TREE) 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s gitubuntu/git_repository.py:2331: AttributeError 215s ______ test_determine_quilt_series_path[tree_data1-debian/patches/series] ______ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmppssag4hs/.git/') 215s tree_data = 215s expected_path = 'debian/patches/series' 215s 215s @pytest.mark.parametrize('tree_data,expected_path', [ 215s # Empty tree -> default 215s (Tree({}), 'debian/patches/series'), 215s 215s # Empty debian/patches directory -> default 215s (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), 215s 215s # Only debian/patches/series -> that one 215s ( 215s Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 215s 'debian/patches/series', 215s ), 215s 215s # Only debian/patches/debian.series -> that one 215s ( 215s Tree({'debian': Tree({'patches': Tree({ 215s 'debian.series': Blob(b'') 215s })})}), 215s 'debian/patches/debian.series', 215s ), 215s 215s # Both -> debian.series 215s ( 215s Tree({'debian': Tree({'patches': Tree({ 215s 'debian.series': Blob(b''), 215s 'series': Blob(b''), 215s })})}), 215s 'debian/patches/debian.series', 215s ), 215s ]) 215s def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): 215s tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) 215s > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) 215s 215s gitubuntu/git_repository_test.py:708: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s gitubuntu/git_repository.py:991: in determine_quilt_series_path 215s blob = follow_symlinks_to_blob( 215s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 215s return _follow_symlinks_to_blob( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s repo = pygit2.Repository('/tmp/tmppssag4hs/.git/') 215s top_tree_object = 215s search_path = 'debian/patches/debian.series' 215s _rel_tree = 215s _rel_path = '' 215s 215s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 215s _rel_tree=None, _rel_path='' 215s ): 215s '''Recursively follow a path down a tree, following symlinks, to find blob 215s 215s repo: pygit2.Repository object 215s top_tree: pygit2.Tree object of the top of the tree structure 215s search_path: '/'-separated path string of blob to find 215s _rel_tree: (internal) which tree to look further into 215s _rel_path: (internal) the path we are in so far 215s ''' 215s 215s NORMAL_BLOB_MODES = set([ 215s pygit2.GIT_FILEMODE_BLOB, 215s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 215s ]) 215s 215s _rel_tree = _rel_tree or top_tree_object 215s head, tail = posixpath.split(search_path) 215s 215s # A traditional functional split would put a single entry in head with tail 215s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 215s # to make it appear to have traditional semantics. 215s if not head: 215s head = tail 215s tail = None 215s 215s entry = _rel_tree[head] 215s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s gitubuntu/git_repository.py:68: AttributeError 215s ______ test_determine_quilt_series_path[tree_data2-debian/patches/series] ______ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmpsxxt1pop/.git/') 215s tree_data = 215s expected_path = 'debian/patches/series' 215s 215s @pytest.mark.parametrize('tree_data,expected_path', [ 215s # Empty tree -> default 215s (Tree({}), 'debian/patches/series'), 215s 215s # Empty debian/patches directory -> default 215s (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), 215s 215s # Only debian/patches/series -> that one 215s ( 215s Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 215s 'debian/patches/series', 215s ), 215s 215s # Only debian/patches/debian.series -> that one 215s ( 215s Tree({'debian': Tree({'patches': Tree({ 215s 'debian.series': Blob(b'') 215s })})}), 215s 'debian/patches/debian.series', 215s ), 215s 215s # Both -> debian.series 215s ( 215s Tree({'debian': Tree({'patches': Tree({ 215s 'debian.series': Blob(b''), 215s 'series': Blob(b''), 215s })})}), 215s 'debian/patches/debian.series', 215s ), 215s ]) 215s def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): 215s tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) 215s > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) 215s 215s gitubuntu/git_repository_test.py:708: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s gitubuntu/git_repository.py:991: in determine_quilt_series_path 215s blob = follow_symlinks_to_blob( 215s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 215s return _follow_symlinks_to_blob( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s repo = pygit2.Repository('/tmp/tmpsxxt1pop/.git/') 215s top_tree_object = 215s search_path = 'debian/patches/debian.series' 215s _rel_tree = 215s _rel_path = '' 215s 215s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 215s _rel_tree=None, _rel_path='' 215s ): 215s '''Recursively follow a path down a tree, following symlinks, to find blob 215s 215s repo: pygit2.Repository object 215s top_tree: pygit2.Tree object of the top of the tree structure 215s search_path: '/'-separated path string of blob to find 215s _rel_tree: (internal) which tree to look further into 215s _rel_path: (internal) the path we are in so far 215s ''' 215s 215s NORMAL_BLOB_MODES = set([ 215s pygit2.GIT_FILEMODE_BLOB, 215s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 215s ]) 215s 215s _rel_tree = _rel_tree or top_tree_object 215s head, tail = posixpath.split(search_path) 215s 215s # A traditional functional split would put a single entry in head with tail 215s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 215s # to make it appear to have traditional semantics. 215s if not head: 215s head = tail 215s tail = None 215s 215s entry = _rel_tree[head] 215s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s gitubuntu/git_repository.py:68: AttributeError 215s __ test_determine_quilt_series_path[tree_data3-debian/patches/debian.series] ___ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmp0r7xhlal/.git/') 215s tree_data = 215s expected_path = 'debian/patches/debian.series' 215s 215s @pytest.mark.parametrize('tree_data,expected_path', [ 215s # Empty tree -> default 215s (Tree({}), 'debian/patches/series'), 215s 215s # Empty debian/patches directory -> default 215s (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), 215s 215s # Only debian/patches/series -> that one 215s ( 215s Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 215s 'debian/patches/series', 215s ), 215s 215s # Only debian/patches/debian.series -> that one 215s ( 215s Tree({'debian': Tree({'patches': Tree({ 215s 'debian.series': Blob(b'') 215s })})}), 215s 'debian/patches/debian.series', 215s ), 215s 215s # Both -> debian.series 215s ( 215s Tree({'debian': Tree({'patches': Tree({ 215s 'debian.series': Blob(b''), 215s 'series': Blob(b''), 215s })})}), 215s 'debian/patches/debian.series', 215s ), 215s ]) 215s def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): 215s tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) 215s > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) 215s 215s gitubuntu/git_repository_test.py:708: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s gitubuntu/git_repository.py:991: in determine_quilt_series_path 215s blob = follow_symlinks_to_blob( 215s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 215s return _follow_symlinks_to_blob( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s repo = pygit2.Repository('/tmp/tmp0r7xhlal/.git/') 215s top_tree_object = 215s search_path = 'debian/patches/debian.series' 215s _rel_tree = 215s _rel_path = '' 215s 215s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 215s _rel_tree=None, _rel_path='' 215s ): 215s '''Recursively follow a path down a tree, following symlinks, to find blob 215s 215s repo: pygit2.Repository object 215s top_tree: pygit2.Tree object of the top of the tree structure 215s search_path: '/'-separated path string of blob to find 215s _rel_tree: (internal) which tree to look further into 215s _rel_path: (internal) the path we are in so far 215s ''' 215s 215s NORMAL_BLOB_MODES = set([ 215s pygit2.GIT_FILEMODE_BLOB, 215s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 215s ]) 215s 215s _rel_tree = _rel_tree or top_tree_object 215s head, tail = posixpath.split(search_path) 215s 215s # A traditional functional split would put a single entry in head with tail 215s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 215s # to make it appear to have traditional semantics. 215s if not head: 215s head = tail 215s tail = None 215s 215s entry = _rel_tree[head] 215s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s gitubuntu/git_repository.py:68: AttributeError 215s __ test_determine_quilt_series_path[tree_data4-debian/patches/debian.series] ___ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmpuvo4s938/.git/') 215s tree_data = 215s expected_path = 'debian/patches/debian.series' 215s 215s @pytest.mark.parametrize('tree_data,expected_path', [ 215s # Empty tree -> default 215s (Tree({}), 'debian/patches/series'), 215s 215s # Empty debian/patches directory -> default 215s (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), 215s 215s # Only debian/patches/series -> that one 215s ( 215s Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 215s 'debian/patches/series', 215s ), 215s 215s # Only debian/patches/debian.series -> that one 215s ( 215s Tree({'debian': Tree({'patches': Tree({ 215s 'debian.series': Blob(b'') 215s })})}), 215s 'debian/patches/debian.series', 215s ), 215s 215s # Both -> debian.series 215s ( 215s Tree({'debian': Tree({'patches': Tree({ 215s 'debian.series': Blob(b''), 215s 'series': Blob(b''), 215s })})}), 215s 'debian/patches/debian.series', 215s ), 215s ]) 215s def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): 215s tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) 215s > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) 215s 215s gitubuntu/git_repository_test.py:708: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s gitubuntu/git_repository.py:991: in determine_quilt_series_path 215s blob = follow_symlinks_to_blob( 215s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 215s return _follow_symlinks_to_blob( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s repo = pygit2.Repository('/tmp/tmpuvo4s938/.git/') 215s top_tree_object = 215s search_path = 'debian/patches/debian.series' 215s _rel_tree = 215s _rel_path = '' 215s 215s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 215s _rel_tree=None, _rel_path='' 215s ): 215s '''Recursively follow a path down a tree, following symlinks, to find blob 215s 215s repo: pygit2.Repository object 215s top_tree: pygit2.Tree object of the top of the tree structure 215s search_path: '/'-separated path string of blob to find 215s _rel_tree: (internal) which tree to look further into 215s _rel_path: (internal) the path we are in so far 215s ''' 215s 215s NORMAL_BLOB_MODES = set([ 215s pygit2.GIT_FILEMODE_BLOB, 215s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 215s ]) 215s 215s _rel_tree = _rel_tree or top_tree_object 215s head, tail = posixpath.split(search_path) 215s 215s # A traditional functional split would put a single entry in head with tail 215s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 215s # to make it appear to have traditional semantics. 215s if not head: 215s head = tail 215s tail = None 215s 215s entry = _rel_tree[head] 215s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s gitubuntu/git_repository.py:68: AttributeError 215s ________________________________ test_quilt_env ________________________________ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmpalzh6u6a/.git/') 215s 215s def test_quilt_env(pygit2_repo): 215s tree_builder = Tree({'debian': 215s Tree({'patches': Tree({'debian.series': Blob(b'')})}) 215s }) 215s tree_obj = pygit2_repo.get(tree_builder.write(pygit2_repo)) 215s > env = target.quilt_env(pygit2_repo, tree_obj) 215s 215s gitubuntu/git_repository_test.py:717: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s gitubuntu/git_repository.py:1022: in quilt_env 215s 'QUILT_SERIES': determine_quilt_series_path(pygit2_repo, treeish), 215s gitubuntu/git_repository.py:991: in determine_quilt_series_path 215s blob = follow_symlinks_to_blob( 215s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 215s return _follow_symlinks_to_blob( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s repo = pygit2.Repository('/tmp/tmpalzh6u6a/.git/') 215s top_tree_object = 215s search_path = 'debian/patches/debian.series' 215s _rel_tree = 215s _rel_path = '' 215s 215s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 215s _rel_tree=None, _rel_path='' 215s ): 215s '''Recursively follow a path down a tree, following symlinks, to find blob 215s 215s repo: pygit2.Repository object 215s top_tree: pygit2.Tree object of the top of the tree structure 215s search_path: '/'-separated path string of blob to find 215s _rel_tree: (internal) which tree to look further into 215s _rel_path: (internal) the path we are in so far 215s ''' 215s 215s NORMAL_BLOB_MODES = set([ 215s pygit2.GIT_FILEMODE_BLOB, 215s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 215s ]) 215s 215s _rel_tree = _rel_tree or top_tree_object 215s head, tail = posixpath.split(search_path) 215s 215s # A traditional functional split would put a single entry in head with tail 215s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 215s # to make it appear to have traditional semantics. 215s if not head: 215s head = tail 215s tail = None 215s 215s entry = _rel_tree[head] 215s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s gitubuntu/git_repository.py:68: AttributeError 215s _____________________________ test_repo_quilt_env ______________________________ 215s 215s repo = 215s 215s def test_repo_quilt_env(repo): 215s tree_builder = Tree({'debian': 215s Tree({'patches': Tree({'debian.series': Blob(b'')})}) 215s }) 215s tree_obj = repo.raw_repo.get(tree_builder.write(repo.raw_repo)) 215s > env = repo.quilt_env(tree_obj) 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository_test.py:732: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:2575: in quilt_env 215s env.update(quilt_env(self.raw_repo, treeish)) 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1022: in quilt_env 215s 'QUILT_SERIES': determine_quilt_series_path(pygit2_repo, treeish), 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:991: in determine_quilt_series_path 215s blob = follow_symlinks_to_blob( 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 215s return _follow_symlinks_to_blob( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s repo = pygit2.Repository('/tmp/tmpcdtewbom/.git/') 215s top_tree_object = 215s search_path = 'debian/patches/debian.series' 215s _rel_tree = 215s _rel_path = '' 215s 215s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 215s _rel_tree=None, _rel_path='' 215s ): 215s '''Recursively follow a path down a tree, following symlinks, to find blob 215s 215s repo: pygit2.Repository object 215s top_tree: pygit2.Tree object of the top of the tree structure 215s search_path: '/'-separated path string of blob to find 215s _rel_tree: (internal) which tree to look further into 215s _rel_path: (internal) the path we are in so far 215s ''' 215s 215s NORMAL_BLOB_MODES = set([ 215s pygit2.GIT_FILEMODE_BLOB, 215s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 215s ]) 215s 215s _rel_tree = _rel_tree or top_tree_object 215s head, tail = posixpath.split(search_path) 215s 215s # A traditional functional split would put a single entry in head with tail 215s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 215s # to make it appear to have traditional semantics. 215s if not head: 215s head = tail 215s tail = None 215s 215s entry = _rel_tree[head] 215s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 215s _____________________ test_repo_quilt_env_from_treeish_str _____________________ 215s 215s repo = 215s 215s def test_repo_quilt_env_from_treeish_str(repo): 215s tree_builder = Tree({'debian': 215s Tree({'patches': Tree({'debian.series': Blob(b'')})}) 215s }) 215s tree_obj = repo.raw_repo.get(tree_builder.write(repo.raw_repo)) 215s > env = repo.quilt_env_from_treeish_str(str(tree_obj.id)) 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository_test.py:757: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:2589: in quilt_env_from_treeish_str 215s return self.quilt_env(self.raw_repo.get(treeish_str)) 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:2575: in quilt_env 215s env.update(quilt_env(self.raw_repo, treeish)) 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1022: in quilt_env 215s 'QUILT_SERIES': determine_quilt_series_path(pygit2_repo, treeish), 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:991: in determine_quilt_series_path 215s blob = follow_symlinks_to_blob( 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 215s return _follow_symlinks_to_blob( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s repo = pygit2.Repository('/tmp/tmpjsazigdb/.git/') 215s top_tree_object = 215s search_path = 'debian/patches/debian.series' 215s _rel_tree = 215s _rel_path = '' 215s 215s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 215s _rel_tree=None, _rel_path='' 215s ): 215s '''Recursively follow a path down a tree, following symlinks, to find blob 215s 215s repo: pygit2.Repository object 215s top_tree: pygit2.Tree object of the top of the tree structure 215s search_path: '/'-separated path string of blob to find 215s _rel_tree: (internal) which tree to look further into 215s _rel_path: (internal) the path we are in so far 215s ''' 215s 215s NORMAL_BLOB_MODES = set([ 215s pygit2.GIT_FILEMODE_BLOB, 215s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 215s ]) 215s 215s _rel_tree = _rel_tree or top_tree_object 215s head, tail = posixpath.split(search_path) 215s 215s # A traditional functional split would put a single entry in head with tail 215s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 215s # to make it appear to have traditional semantics. 215s if not head: 215s head = tail 215s tail = None 215s 215s entry = _rel_tree[head] 215s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 215s _ test_repo_find_ubuntu_merge[Common case-input_data0-pkg/import/1-1ubuntu1-pkg/import/2-1-pkg/import/1-1] _ 215s 215s description = 'Common case' 215s repo = 215s input_data = 215s old_ubuntu = 'pkg/import/1-1ubuntu1', new_debian = 'pkg/import/2-1' 215s expected = 'pkg/import/1-1' 215s 215s @pytest.mark.parametrize( 215s 'description, input_data, old_ubuntu, new_debian, expected', 215s [ 215s ( 215s 'Common case', 215s Repo( 215s commits=[ 215s Commit.from_spec( 215s name='old/debian' 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('old/debian')], 215s name='old/ubuntu', 215s changelog_versions=['1-1ubuntu1', '1-1'], 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('old/debian')], 215s name='new/debian', 215s changelog_versions=['2-1', '1-1'], 215s ), 215s ], 215s tags={ 215s 'pkg/import/1-1': Placeholder('old/debian'), 215s 'pkg/import/1-1ubuntu1': Placeholder('old/ubuntu'), 215s 'pkg/import/2-1': Placeholder('new/debian'), 215s }, 215s ), 215s 'pkg/import/1-1ubuntu1', 215s 'pkg/import/2-1', 215s 'pkg/import/1-1', 215s ), 215s ( 215s 'Ubuntu delta based on a NMU', 215s Repo( 215s commits=[ 215s Commit.from_spec( 215s name='fork_point' 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('fork_point')], 215s name='old/debian', 215s changelog_versions=['1-1.1', '1-1'], 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('old/debian')], 215s name='old/ubuntu', 215s changelog_versions=['1-1.1ubuntu1', '1-1.1', '1-1'], 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('fork_point')], 215s name='new/debian', 215s changelog_versions=['2-1', '1-1'], 215s ), 215s ], 215s tags={ 215s 'pkg/import/1-1': Placeholder('fork_point'), 215s 'pkg/import/1-1.1': Placeholder('old/debian'), 215s 'pkg/import/1-1.1ubuntu1': Placeholder('old/ubuntu'), 215s 'pkg/import/2-1': Placeholder('new/debian'), 215s }, 215s ), 215s 'pkg/import/1-1.1ubuntu1', 215s 'pkg/import/2-1', 215s 'pkg/import/1-1.1', 215s ), 215s ( 215s 'Ubuntu upstream version head of Debian', 215s Repo( 215s commits=[ 215s Commit.from_spec( 215s name='old/debian' 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('old/debian')], 215s name='mid_ubuntu', 215s changelog_versions=['1-1ubuntu1', '1-1'], 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('mid_ubuntu')], 215s name='old/ubuntu', 215s changelog_versions=['2-0ubuntu1', '1-1ubuntu1', '1-1'], 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('old/debian')], 215s name='new/debian', 215s changelog_versions=['3-1', '1-1'], 215s ), 215s ], 215s tags={ 215s 'pkg/import/1-1': Placeholder('old/debian'), 215s 'pkg/import/1-1ubuntu1': Placeholder('mid_ubuntu'), 215s 'pkg/import/2-0ubuntu1': Placeholder('old/ubuntu'), 215s 'pkg/import/3-1': Placeholder('new/debian'), 215s }, 215s ), 215s 'pkg/import/2-0ubuntu1', 215s 'pkg/import/3-1', 215s 'pkg/import/1-1', 215s ), 215s ], 215s ) 215s def test_repo_find_ubuntu_merge( 215s description, 215s repo, 215s input_data, 215s old_ubuntu, 215s new_debian, 215s expected, 215s ): 215s > input_data.write(repo.raw_repo) 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository_test.py:889: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s self = 215s repo = pygit2.Repository('/tmp/tmpalknfcof/.git/'), record = {} 215s 215s def write(self, repo, record=None): 215s replace_placeholders(self) 215s record = record or dict() 215s written_commits = [ 215s commit.write(repo=repo, record=record) 215s for commit 215s in self.commit_list 215s ] 215s for name, target in self.branches.items(): 215s repo.create_branch( 215s name, 215s repo.get(target.write(repo)).peel(pygit2.Commit), 215s ) 215s for name, target in self.tags.items(): 215s repo.create_tag( 215s name, 215s target.write(repo), 215s > pygit2.GIT_OBJ_COMMIT, 215s self.tagger.signature, 215s 'Tag message', 215s ) 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 215s ----------------------------- Captured stdout call ----------------------------- 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_2.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_2-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_2-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s ----------------------------- Captured stderr call ----------------------------- 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s _ 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] _ 215s 215s description = 'Ubuntu delta based on a NMU' 215s repo = 215s input_data = 215s old_ubuntu = 'pkg/import/1-1.1ubuntu1', new_debian = 'pkg/import/2-1' 215s expected = 'pkg/import/1-1.1' 215s 215s @pytest.mark.parametrize( 215s 'description, input_data, old_ubuntu, new_debian, expected', 215s [ 215s ( 215s 'Common case', 215s Repo( 215s commits=[ 215s Commit.from_spec( 215s name='old/debian' 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('old/debian')], 215s name='old/ubuntu', 215s changelog_versions=['1-1ubuntu1', '1-1'], 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('old/debian')], 215s name='new/debian', 215s changelog_versions=['2-1', '1-1'], 215s ), 215s ], 215s tags={ 215s 'pkg/import/1-1': Placeholder('old/debian'), 215s 'pkg/import/1-1ubuntu1': Placeholder('old/ubuntu'), 215s 'pkg/import/2-1': Placeholder('new/debian'), 215s }, 215s ), 215s 'pkg/import/1-1ubuntu1', 215s 'pkg/import/2-1', 215s 'pkg/import/1-1', 215s ), 215s ( 215s 'Ubuntu delta based on a NMU', 215s Repo( 215s commits=[ 215s Commit.from_spec( 215s name='fork_point' 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('fork_point')], 215s name='old/debian', 215s changelog_versions=['1-1.1', '1-1'], 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('old/debian')], 215s name='old/ubuntu', 215s changelog_versions=['1-1.1ubuntu1', '1-1.1', '1-1'], 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('fork_point')], 215s name='new/debian', 215s changelog_versions=['2-1', '1-1'], 215s ), 215s ], 215s tags={ 215s 'pkg/import/1-1': Placeholder('fork_point'), 215s 'pkg/import/1-1.1': Placeholder('old/debian'), 215s 'pkg/import/1-1.1ubuntu1': Placeholder('old/ubuntu'), 215s 'pkg/import/2-1': Placeholder('new/debian'), 215s }, 215s ), 215s 'pkg/import/1-1.1ubuntu1', 215s 'pkg/import/2-1', 215s 'pkg/import/1-1.1', 215s ), 215s ( 215s 'Ubuntu upstream version head of Debian', 215s Repo( 215s commits=[ 215s Commit.from_spec( 215s name='old/debian' 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('old/debian')], 215s name='mid_ubuntu', 215s changelog_versions=['1-1ubuntu1', '1-1'], 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('mid_ubuntu')], 215s name='old/ubuntu', 215s changelog_versions=['2-0ubuntu1', '1-1ubuntu1', '1-1'], 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('old/debian')], 215s name='new/debian', 215s changelog_versions=['3-1', '1-1'], 215s ), 215s ], 215s tags={ 215s 'pkg/import/1-1': Placeholder('old/debian'), 215s 'pkg/import/1-1ubuntu1': Placeholder('mid_ubuntu'), 215s 'pkg/import/2-0ubuntu1': Placeholder('old/ubuntu'), 215s 'pkg/import/3-1': Placeholder('new/debian'), 215s }, 215s ), 215s 'pkg/import/2-0ubuntu1', 215s 'pkg/import/3-1', 215s 'pkg/import/1-1', 215s ), 215s ], 215s ) 215s def test_repo_find_ubuntu_merge( 215s description, 215s repo, 215s input_data, 215s old_ubuntu, 215s new_debian, 215s expected, 215s ): 215s > input_data.write(repo.raw_repo) 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository_test.py:889: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s self = 215s repo = pygit2.Repository('/tmp/tmphyfow5gt/.git/'), record = {} 215s 215s def write(self, repo, record=None): 215s replace_placeholders(self) 215s record = record or dict() 215s written_commits = [ 215s commit.write(repo=repo, record=record) 215s for commit 215s in self.commit_list 215s ] 215s for name, target in self.branches.items(): 215s repo.create_branch( 215s name, 215s repo.get(target.write(repo)).peel(pygit2.Commit), 215s ) 215s for name, target in self.tags.items(): 215s repo.create_tag( 215s name, 215s target.write(repo), 215s > pygit2.GIT_OBJ_COMMIT, 215s self.tagger.signature, 215s 'Tag message', 215s ) 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 215s ----------------------------- Captured stdout call ----------------------------- 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1ubuntu1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1ubuntu1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_2.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_2-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_2-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s ----------------------------- Captured stderr call ----------------------------- 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s _ 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] _ 215s 215s description = 'Ubuntu upstream version head of Debian' 215s repo = 215s input_data = 215s old_ubuntu = 'pkg/import/2-0ubuntu1', new_debian = 'pkg/import/3-1' 215s expected = 'pkg/import/1-1' 215s 215s @pytest.mark.parametrize( 215s 'description, input_data, old_ubuntu, new_debian, expected', 215s [ 215s ( 215s 'Common case', 215s Repo( 215s commits=[ 215s Commit.from_spec( 215s name='old/debian' 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('old/debian')], 215s name='old/ubuntu', 215s changelog_versions=['1-1ubuntu1', '1-1'], 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('old/debian')], 215s name='new/debian', 215s changelog_versions=['2-1', '1-1'], 215s ), 215s ], 215s tags={ 215s 'pkg/import/1-1': Placeholder('old/debian'), 215s 'pkg/import/1-1ubuntu1': Placeholder('old/ubuntu'), 215s 'pkg/import/2-1': Placeholder('new/debian'), 215s }, 215s ), 215s 'pkg/import/1-1ubuntu1', 215s 'pkg/import/2-1', 215s 'pkg/import/1-1', 215s ), 215s ( 215s 'Ubuntu delta based on a NMU', 215s Repo( 215s commits=[ 215s Commit.from_spec( 215s name='fork_point' 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('fork_point')], 215s name='old/debian', 215s changelog_versions=['1-1.1', '1-1'], 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('old/debian')], 215s name='old/ubuntu', 215s changelog_versions=['1-1.1ubuntu1', '1-1.1', '1-1'], 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('fork_point')], 215s name='new/debian', 215s changelog_versions=['2-1', '1-1'], 215s ), 215s ], 215s tags={ 215s 'pkg/import/1-1': Placeholder('fork_point'), 215s 'pkg/import/1-1.1': Placeholder('old/debian'), 215s 'pkg/import/1-1.1ubuntu1': Placeholder('old/ubuntu'), 215s 'pkg/import/2-1': Placeholder('new/debian'), 215s }, 215s ), 215s 'pkg/import/1-1.1ubuntu1', 215s 'pkg/import/2-1', 215s 'pkg/import/1-1.1', 215s ), 215s ( 215s 'Ubuntu upstream version head of Debian', 215s Repo( 215s commits=[ 215s Commit.from_spec( 215s name='old/debian' 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('old/debian')], 215s name='mid_ubuntu', 215s changelog_versions=['1-1ubuntu1', '1-1'], 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('mid_ubuntu')], 215s name='old/ubuntu', 215s changelog_versions=['2-0ubuntu1', '1-1ubuntu1', '1-1'], 215s ), 215s Commit.from_spec( 215s parents=[Placeholder('old/debian')], 215s name='new/debian', 215s changelog_versions=['3-1', '1-1'], 215s ), 215s ], 215s tags={ 215s 'pkg/import/1-1': Placeholder('old/debian'), 215s 'pkg/import/1-1ubuntu1': Placeholder('mid_ubuntu'), 215s 'pkg/import/2-0ubuntu1': Placeholder('old/ubuntu'), 215s 'pkg/import/3-1': Placeholder('new/debian'), 215s }, 215s ), 215s 'pkg/import/2-0ubuntu1', 215s 'pkg/import/3-1', 215s 'pkg/import/1-1', 215s ), 215s ], 215s ) 215s def test_repo_find_ubuntu_merge( 215s description, 215s repo, 215s input_data, 215s old_ubuntu, 215s new_debian, 215s expected, 215s ): 215s > input_data.write(repo.raw_repo) 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository_test.py:889: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s self = 215s repo = pygit2.Repository('/tmp/tmpah1j9a7p/.git/'), record = {} 215s 215s def write(self, repo, record=None): 215s replace_placeholders(self) 215s record = record or dict() 215s written_commits = [ 215s commit.write(repo=repo, record=record) 215s for commit 215s in self.commit_list 215s ] 215s for name, target in self.branches.items(): 215s repo.create_branch( 215s name, 215s repo.get(target.write(repo)).peel(pygit2.Commit), 215s ) 215s for name, target in self.tags.items(): 215s repo.create_tag( 215s name, 215s target.write(repo), 215s > pygit2.GIT_OBJ_COMMIT, 215s self.tagger.signature, 215s 'Tag message', 215s ) 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 215s ----------------------------- Captured stdout call ----------------------------- 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_2.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_2-0ubuntu1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_2-0ubuntu1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_3.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_3-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_3-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s ----------------------------- Captured stderr call ----------------------------- 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s _______________________________ test_commit_tree _______________________________ 215s 215s repo = 215s 215s def test_commit_tree(repo): 215s # Construct a repository with an initial commit on the master branch so 215s # that we can verify later parentage and lack of branch movement 215s parent_commit_oid = Repo( 215s commits=[Commit(name='master')], 215s branches={'master': Placeholder('master')} 215s ).write(repo.raw_repo) 215s repo.raw_repo.lookup_reference('HEAD').set_target('refs/heads/master') 215s 215s # Construct a tree inside the repository with a debian/changelog in it to 215s # feed to the method under test 215s test_changelog_path = os.path.join( 215s pkg_resources.resource_filename('gitubuntu', 'changelog_tests'), 215s 'test_date_1', 215s ) 215s with open(test_changelog_path, 'rb') as f: 215s test_changelog_bytes = f.read() 215s test_changelog_blob = Blob(test_changelog_bytes) 215s source_tree = Tree({'debian': Tree({'changelog': test_changelog_blob})}) 215s source_tree_oid = source_tree.write(repo.raw_repo) 215s 215s # Call the method under test 215s > commit_oid = repo.commit_source_tree( 215s tree=source_tree_oid, 215s parents=[parent_commit_oid], 215s log_message='test_commit_msg', 215s commit_date=datetime.datetime( 215s 1971, # year 215s 2, # month 215s 3, # day 215s 4, # hours 215s 5, # minutes 215s 6, # seconds 215s 7, # milliseconds (this should get truncated down to 0) 215s datetime.timezone(datetime.timedelta(hours=-8)) 215s ), 215s ) 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository_test.py:993: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:2299: in commit_source_tree 215s changelog = self.get_changelog_from_treeish(str(tree)) 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 215s return Changelog.from_treeish( 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:569: in from_treeish 215s blob = follow_symlinks_to_blob( 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 215s return _follow_symlinks_to_blob( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s repo = pygit2.Repository('/tmp/tmpyr_57pad/.git/') 215s top_tree_object = 215s search_path = 'debian/changelog' 215s _rel_tree = 215s _rel_path = '' 215s 215s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 215s _rel_tree=None, _rel_path='' 215s ): 215s '''Recursively follow a path down a tree, following symlinks, to find blob 215s 215s repo: pygit2.Repository object 215s top_tree: pygit2.Tree object of the top of the tree structure 215s search_path: '/'-separated path string of blob to find 215s _rel_tree: (internal) which tree to look further into 215s _rel_path: (internal) the path we are in so far 215s ''' 215s 215s NORMAL_BLOB_MODES = set([ 215s pygit2.GIT_FILEMODE_BLOB, 215s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 215s ]) 215s 215s _rel_tree = _rel_tree or top_tree_object 215s head, tail = posixpath.split(search_path) 215s 215s # A traditional functional split would put a single entry in head with tail 215s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 215s # to make it appear to have traditional semantics. 215s if not head: 215s head = tail 215s tail = None 215s 215s entry = _rel_tree[head] 215s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 215s _____________________ test_descendant_of[root-root-False] ______________________ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmpwj6_nhrq/.git/'), a = 'root' 215s b = 'root', expected = False 215s 215s @pytest.mark.parametrize(['a', 'b', 'expected'], 215s [ 215s ('root', 'root', False), 215s ('child1', 'root', True), 215s ('root', 'child1', False), 215s ('grandchild1', 'root', True), 215s ('child1', 'child2', False), 215s ('root', 'disjoint', False), 215s ] 215s ) 215s def test_descendant_of(pygit2_repo, a, b, expected): 215s """ 215s General test for pygit2.Repository.descendant_of(). 215s 215s This test was formerly for a temporary alternative implementation of 215s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 215s use until we updated our pinning to use a newer version of pygit2 that 215s included the pygit2.Repository.descendant_of() method. After the pinning 215s was removed and this implementation replacement took place, we kept the 215s test to ensure that actual behaviour did not change. 215s 215s This unit tests validate_upload_tag() for various parameterized cases. The 215s paramater sets assume the repository structure encoded in the Repo() call 215s below. 215s 215s :param pygit2.Repository pygit2_repo: fixture providing a temporary 215s pygit2.Repository instance to use 215s :param str a: tag name of the first commit to pass to descendant_of() 215s :param str b: tag name of the second commit to pass to descendant_of() 215s :param bool expected: the expected result of descendant_of() 215s """ 215s Repo( 215s # Unique message parameters are used in each entry here in order to 215s # ensure that otherwise-identical commits do not end up being the same 215s # commit (with the same hash, etc). 215s commits=[ 215s Commit(name='root', message='1'), 215s Commit(name='child1', parents=[Placeholder('root')], message='2'), 215s Commit(name='child2', parents=[Placeholder('root')], message='3'), 215s Commit( 215s name='grandchild1', 215s parents=[Placeholder('child1')], 215s message='4' 215s ), 215s Commit(name='disjoint', message='5'), 215s ], 215s tags={ 215s 'root': Placeholder('root'), 215s 'child1': Placeholder('child1'), 215s 'child2': Placeholder('child2'), 215s 'grandchild1': Placeholder('grandchild1'), 215s 'disjoint': Placeholder('disjoint'), 215s } 215s > ).write(pygit2_repo) 215s 215s gitubuntu/git_repository_test.py:1099: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s self = 215s repo = pygit2.Repository('/tmp/tmpwj6_nhrq/.git/'), record = {} 215s 215s def write(self, repo, record=None): 215s replace_placeholders(self) 215s record = record or dict() 215s written_commits = [ 215s commit.write(repo=repo, record=record) 215s for commit 215s in self.commit_list 215s ] 215s for name, target in self.branches.items(): 215s repo.create_branch( 215s name, 215s repo.get(target.write(repo)).peel(pygit2.Commit), 215s ) 215s for name, target in self.tags.items(): 215s repo.create_tag( 215s name, 215s target.write(repo), 215s > pygit2.GIT_OBJ_COMMIT, 215s self.tagger.signature, 215s 'Tag message', 215s ) 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 215s 215s gitubuntu/repo_builder.py:389: AttributeError 215s _____________________ test_descendant_of[child1-root-True] _____________________ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmp7fje54qw/.git/'), a = 'child1' 215s b = 'root', expected = True 215s 215s @pytest.mark.parametrize(['a', 'b', 'expected'], 215s [ 215s ('root', 'root', False), 215s ('child1', 'root', True), 215s ('root', 'child1', False), 215s ('grandchild1', 'root', True), 215s ('child1', 'child2', False), 215s ('root', 'disjoint', False), 215s ] 215s ) 215s def test_descendant_of(pygit2_repo, a, b, expected): 215s """ 215s General test for pygit2.Repository.descendant_of(). 215s 215s This test was formerly for a temporary alternative implementation of 215s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 215s use until we updated our pinning to use a newer version of pygit2 that 215s included the pygit2.Repository.descendant_of() method. After the pinning 215s was removed and this implementation replacement took place, we kept the 215s test to ensure that actual behaviour did not change. 215s 215s This unit tests validate_upload_tag() for various parameterized cases. The 215s paramater sets assume the repository structure encoded in the Repo() call 215s below. 215s 215s :param pygit2.Repository pygit2_repo: fixture providing a temporary 215s pygit2.Repository instance to use 215s :param str a: tag name of the first commit to pass to descendant_of() 215s :param str b: tag name of the second commit to pass to descendant_of() 215s :param bool expected: the expected result of descendant_of() 215s """ 215s Repo( 215s # Unique message parameters are used in each entry here in order to 215s # ensure that otherwise-identical commits do not end up being the same 215s # commit (with the same hash, etc). 215s commits=[ 215s Commit(name='root', message='1'), 215s Commit(name='child1', parents=[Placeholder('root')], message='2'), 215s Commit(name='child2', parents=[Placeholder('root')], message='3'), 215s Commit( 215s name='grandchild1', 215s parents=[Placeholder('child1')], 215s message='4' 215s ), 215s Commit(name='disjoint', message='5'), 215s ], 215s tags={ 215s 'root': Placeholder('root'), 215s 'child1': Placeholder('child1'), 215s 'child2': Placeholder('child2'), 215s 'grandchild1': Placeholder('grandchild1'), 215s 'disjoint': Placeholder('disjoint'), 215s } 215s > ).write(pygit2_repo) 215s 215s gitubuntu/git_repository_test.py:1099: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s self = 215s repo = pygit2.Repository('/tmp/tmp7fje54qw/.git/'), record = {} 215s 215s def write(self, repo, record=None): 215s replace_placeholders(self) 215s record = record or dict() 215s written_commits = [ 215s commit.write(repo=repo, record=record) 215s for commit 215s in self.commit_list 215s ] 215s for name, target in self.branches.items(): 215s repo.create_branch( 215s name, 215s repo.get(target.write(repo)).peel(pygit2.Commit), 215s ) 215s for name, target in self.tags.items(): 215s repo.create_tag( 215s name, 215s target.write(repo), 215s > pygit2.GIT_OBJ_COMMIT, 215s self.tagger.signature, 215s 'Tag message', 215s ) 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 215s 215s gitubuntu/repo_builder.py:389: AttributeError 215s ____________________ test_descendant_of[root-child1-False] _____________________ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmpv8tqthxq/.git/'), a = 'root' 215s b = 'child1', expected = False 215s 215s @pytest.mark.parametrize(['a', 'b', 'expected'], 215s [ 215s ('root', 'root', False), 215s ('child1', 'root', True), 215s ('root', 'child1', False), 215s ('grandchild1', 'root', True), 215s ('child1', 'child2', False), 215s ('root', 'disjoint', False), 215s ] 215s ) 215s def test_descendant_of(pygit2_repo, a, b, expected): 215s """ 215s General test for pygit2.Repository.descendant_of(). 215s 215s This test was formerly for a temporary alternative implementation of 215s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 215s use until we updated our pinning to use a newer version of pygit2 that 215s included the pygit2.Repository.descendant_of() method. After the pinning 215s was removed and this implementation replacement took place, we kept the 215s test to ensure that actual behaviour did not change. 215s 215s This unit tests validate_upload_tag() for various parameterized cases. The 215s paramater sets assume the repository structure encoded in the Repo() call 215s below. 215s 215s :param pygit2.Repository pygit2_repo: fixture providing a temporary 215s pygit2.Repository instance to use 215s :param str a: tag name of the first commit to pass to descendant_of() 215s :param str b: tag name of the second commit to pass to descendant_of() 215s :param bool expected: the expected result of descendant_of() 215s """ 215s Repo( 215s # Unique message parameters are used in each entry here in order to 215s # ensure that otherwise-identical commits do not end up being the same 215s # commit (with the same hash, etc). 215s commits=[ 215s Commit(name='root', message='1'), 215s Commit(name='child1', parents=[Placeholder('root')], message='2'), 215s Commit(name='child2', parents=[Placeholder('root')], message='3'), 215s Commit( 215s name='grandchild1', 215s parents=[Placeholder('child1')], 215s message='4' 215s ), 215s Commit(name='disjoint', message='5'), 215s ], 215s tags={ 215s 'root': Placeholder('root'), 215s 'child1': Placeholder('child1'), 215s 'child2': Placeholder('child2'), 215s 'grandchild1': Placeholder('grandchild1'), 215s 'disjoint': Placeholder('disjoint'), 215s } 215s > ).write(pygit2_repo) 215s 215s gitubuntu/git_repository_test.py:1099: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s self = 215s repo = pygit2.Repository('/tmp/tmpv8tqthxq/.git/'), record = {} 215s 215s def write(self, repo, record=None): 215s replace_placeholders(self) 215s record = record or dict() 215s written_commits = [ 215s commit.write(repo=repo, record=record) 215s for commit 215s in self.commit_list 215s ] 215s for name, target in self.branches.items(): 215s repo.create_branch( 215s name, 215s repo.get(target.write(repo)).peel(pygit2.Commit), 215s ) 215s for name, target in self.tags.items(): 215s repo.create_tag( 215s name, 215s target.write(repo), 215s > pygit2.GIT_OBJ_COMMIT, 215s self.tagger.signature, 215s 'Tag message', 215s ) 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 215s 215s gitubuntu/repo_builder.py:389: AttributeError 215s __________________ test_descendant_of[grandchild1-root-True] ___________________ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmpcx2ylsr5/.git/'), a = 'grandchild1' 215s b = 'root', expected = True 215s 215s @pytest.mark.parametrize(['a', 'b', 'expected'], 215s [ 215s ('root', 'root', False), 215s ('child1', 'root', True), 215s ('root', 'child1', False), 215s ('grandchild1', 'root', True), 215s ('child1', 'child2', False), 215s ('root', 'disjoint', False), 215s ] 215s ) 215s def test_descendant_of(pygit2_repo, a, b, expected): 215s """ 215s General test for pygit2.Repository.descendant_of(). 215s 215s This test was formerly for a temporary alternative implementation of 215s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 215s use until we updated our pinning to use a newer version of pygit2 that 215s included the pygit2.Repository.descendant_of() method. After the pinning 215s was removed and this implementation replacement took place, we kept the 215s test to ensure that actual behaviour did not change. 215s 215s This unit tests validate_upload_tag() for various parameterized cases. The 215s paramater sets assume the repository structure encoded in the Repo() call 215s below. 215s 215s :param pygit2.Repository pygit2_repo: fixture providing a temporary 215s pygit2.Repository instance to use 215s :param str a: tag name of the first commit to pass to descendant_of() 215s :param str b: tag name of the second commit to pass to descendant_of() 215s :param bool expected: the expected result of descendant_of() 215s """ 215s Repo( 215s # Unique message parameters are used in each entry here in order to 215s # ensure that otherwise-identical commits do not end up being the same 215s # commit (with the same hash, etc). 215s commits=[ 215s Commit(name='root', message='1'), 215s Commit(name='child1', parents=[Placeholder('root')], message='2'), 215s Commit(name='child2', parents=[Placeholder('root')], message='3'), 215s Commit( 215s name='grandchild1', 215s parents=[Placeholder('child1')], 215s message='4' 215s ), 215s Commit(name='disjoint', message='5'), 215s ], 215s tags={ 215s 'root': Placeholder('root'), 215s 'child1': Placeholder('child1'), 215s 'child2': Placeholder('child2'), 215s 'grandchild1': Placeholder('grandchild1'), 215s 'disjoint': Placeholder('disjoint'), 215s } 215s > ).write(pygit2_repo) 215s 215s gitubuntu/git_repository_test.py:1099: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s self = 215s repo = pygit2.Repository('/tmp/tmpcx2ylsr5/.git/'), record = {} 215s 215s def write(self, repo, record=None): 215s replace_placeholders(self) 215s record = record or dict() 215s written_commits = [ 215s commit.write(repo=repo, record=record) 215s for commit 215s in self.commit_list 215s ] 215s for name, target in self.branches.items(): 215s repo.create_branch( 215s name, 215s repo.get(target.write(repo)).peel(pygit2.Commit), 215s ) 215s for name, target in self.tags.items(): 215s repo.create_tag( 215s name, 215s target.write(repo), 215s > pygit2.GIT_OBJ_COMMIT, 215s self.tagger.signature, 215s 'Tag message', 215s ) 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 215s 215s gitubuntu/repo_builder.py:389: AttributeError 215s ___________________ test_descendant_of[child1-child2-False] ____________________ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmpftjv4eo5/.git/'), a = 'child1' 215s b = 'child2', expected = False 215s 215s @pytest.mark.parametrize(['a', 'b', 'expected'], 215s [ 215s ('root', 'root', False), 215s ('child1', 'root', True), 215s ('root', 'child1', False), 215s ('grandchild1', 'root', True), 215s ('child1', 'child2', False), 215s ('root', 'disjoint', False), 215s ] 215s ) 215s def test_descendant_of(pygit2_repo, a, b, expected): 215s """ 215s General test for pygit2.Repository.descendant_of(). 215s 215s This test was formerly for a temporary alternative implementation of 215s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 215s use until we updated our pinning to use a newer version of pygit2 that 215s included the pygit2.Repository.descendant_of() method. After the pinning 215s was removed and this implementation replacement took place, we kept the 215s test to ensure that actual behaviour did not change. 215s 215s This unit tests validate_upload_tag() for various parameterized cases. The 215s paramater sets assume the repository structure encoded in the Repo() call 215s below. 215s 215s :param pygit2.Repository pygit2_repo: fixture providing a temporary 215s pygit2.Repository instance to use 215s :param str a: tag name of the first commit to pass to descendant_of() 215s :param str b: tag name of the second commit to pass to descendant_of() 215s :param bool expected: the expected result of descendant_of() 215s """ 215s Repo( 215s # Unique message parameters are used in each entry here in order to 215s # ensure that otherwise-identical commits do not end up being the same 215s # commit (with the same hash, etc). 215s commits=[ 215s Commit(name='root', message='1'), 215s Commit(name='child1', parents=[Placeholder('root')], message='2'), 215s Commit(name='child2', parents=[Placeholder('root')], message='3'), 215s Commit( 215s name='grandchild1', 215s parents=[Placeholder('child1')], 215s message='4' 215s ), 215s Commit(name='disjoint', message='5'), 215s ], 215s tags={ 215s 'root': Placeholder('root'), 215s 'child1': Placeholder('child1'), 215s 'child2': Placeholder('child2'), 215s 'grandchild1': Placeholder('grandchild1'), 215s 'disjoint': Placeholder('disjoint'), 215s } 215s > ).write(pygit2_repo) 215s 215s gitubuntu/git_repository_test.py:1099: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s self = 215s repo = pygit2.Repository('/tmp/tmpftjv4eo5/.git/'), record = {} 215s 215s def write(self, repo, record=None): 215s replace_placeholders(self) 215s record = record or dict() 215s written_commits = [ 215s commit.write(repo=repo, record=record) 215s for commit 215s in self.commit_list 215s ] 215s for name, target in self.branches.items(): 215s repo.create_branch( 215s name, 215s repo.get(target.write(repo)).peel(pygit2.Commit), 215s ) 215s for name, target in self.tags.items(): 215s repo.create_tag( 215s name, 215s target.write(repo), 215s > pygit2.GIT_OBJ_COMMIT, 215s self.tagger.signature, 215s 'Tag message', 215s ) 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 215s 215s gitubuntu/repo_builder.py:389: AttributeError 215s ___________________ test_descendant_of[root-disjoint-False] ____________________ 215s 215s pygit2_repo = pygit2.Repository('/tmp/tmpb0delvy9/.git/'), a = 'root' 215s b = 'disjoint', expected = False 215s 215s @pytest.mark.parametrize(['a', 'b', 'expected'], 215s [ 215s ('root', 'root', False), 215s ('child1', 'root', True), 215s ('root', 'child1', False), 215s ('grandchild1', 'root', True), 215s ('child1', 'child2', False), 215s ('root', 'disjoint', False), 215s ] 215s ) 215s def test_descendant_of(pygit2_repo, a, b, expected): 215s """ 215s General test for pygit2.Repository.descendant_of(). 215s 215s This test was formerly for a temporary alternative implementation of 215s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 215s use until we updated our pinning to use a newer version of pygit2 that 215s included the pygit2.Repository.descendant_of() method. After the pinning 215s was removed and this implementation replacement took place, we kept the 215s test to ensure that actual behaviour did not change. 215s 215s This unit tests validate_upload_tag() for various parameterized cases. The 215s paramater sets assume the repository structure encoded in the Repo() call 215s below. 215s 215s :param pygit2.Repository pygit2_repo: fixture providing a temporary 215s pygit2.Repository instance to use 215s :param str a: tag name of the first commit to pass to descendant_of() 215s :param str b: tag name of the second commit to pass to descendant_of() 215s :param bool expected: the expected result of descendant_of() 215s """ 215s Repo( 215s # Unique message parameters are used in each entry here in order to 215s # ensure that otherwise-identical commits do not end up being the same 215s # commit (with the same hash, etc). 215s commits=[ 215s Commit(name='root', message='1'), 215s Commit(name='child1', parents=[Placeholder('root')], message='2'), 215s Commit(name='child2', parents=[Placeholder('root')], message='3'), 215s Commit( 215s name='grandchild1', 215s parents=[Placeholder('child1')], 215s message='4' 215s ), 215s Commit(name='disjoint', message='5'), 215s ], 215s tags={ 215s 'root': Placeholder('root'), 215s 'child1': Placeholder('child1'), 215s 'child2': Placeholder('child2'), 215s 'grandchild1': Placeholder('grandchild1'), 215s 'disjoint': Placeholder('disjoint'), 215s } 215s > ).write(pygit2_repo) 215s 215s gitubuntu/git_repository_test.py:1099: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s self = 215s repo = pygit2.Repository('/tmp/tmpb0delvy9/.git/'), record = {} 215s 215s def write(self, repo, record=None): 215s replace_placeholders(self) 215s record = record or dict() 215s written_commits = [ 215s commit.write(repo=repo, record=record) 215s for commit 215s in self.commit_list 215s ] 215s for name, target in self.branches.items(): 215s repo.create_branch( 215s name, 215s repo.get(target.write(repo)).peel(pygit2.Commit), 215s ) 215s for name, target in self.tags.items(): 215s repo.create_tag( 215s name, 215s target.write(repo), 215s > pygit2.GIT_OBJ_COMMIT, 215s self.tagger.signature, 215s 'Tag message', 215s ) 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 215s 215s gitubuntu/repo_builder.py:389: AttributeError 215s _______________________________ test_create_tag ________________________________ 215s 215s repo = 215s 215s def test_create_tag(repo): 215s """create_tag() should create a tag 215s 215s :param GitUbuntuRepository repo: fixture providing a temporary 215s GitUbuntuRepository instance to use 215s """ 215s Repo( 215s commits=[Commit(name='root')], 215s tags={'root': Placeholder('root')}, 215s > ).write(repo.raw_repo) 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository_test.py:1127: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s self = 215s repo = pygit2.Repository('/tmp/tmp98ikuios/.git/'), record = {} 215s 215s def write(self, repo, record=None): 215s replace_placeholders(self) 215s record = record or dict() 215s written_commits = [ 215s commit.write(repo=repo, record=record) 215s for commit 215s in self.commit_list 215s ] 215s for name, target in self.branches.items(): 215s repo.create_branch( 215s name, 215s repo.get(target.write(repo)).peel(pygit2.Commit), 215s ) 215s for name, target in self.tags.items(): 215s repo.create_tag( 215s name, 215s target.write(repo), 215s > pygit2.GIT_OBJ_COMMIT, 215s self.tagger.signature, 215s 'Tag message', 215s ) 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 215s __________________________ test_get_all_reimport_tags __________________________ 215s 215s repo = 215s 215s def test_get_all_reimport_tags(repo): 215s """get_all_reimport_tags() should return only matching reimport tags 215s 215s :param GitUbuntuRepository repo: fixture providing a temporary 215s GitUbuntuRepository instance to use 215s """ 215s Repo( 215s commits=[Commit(name='root')], 215s tags={ 215s 'importer/reimport/import/1/0': Placeholder('root'), 215s 'importer/reimport/import/1/1': Placeholder('root'), 215s 215s # This entry must not be identified as one of version 1's reimport 215s # tags, even though it shares the same base prefix. 215s 'importer/reimport/import/11/0': Placeholder('root'), 215s }, 215s > ).write(repo.raw_repo) 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository_test.py:1165: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s self = 215s repo = pygit2.Repository('/tmp/tmpoxskakt3/.git/'), record = {} 215s 215s def write(self, repo, record=None): 215s replace_placeholders(self) 215s record = record or dict() 215s written_commits = [ 215s commit.write(repo=repo, record=record) 215s for commit 215s in self.commit_list 215s ] 215s for name, target in self.branches.items(): 215s repo.create_branch( 215s name, 215s repo.get(target.write(repo)).peel(pygit2.Commit), 215s ) 215s for name, target in self.tags.items(): 215s repo.create_tag( 215s name, 215s target.write(repo), 215s > pygit2.GIT_OBJ_COMMIT, 215s self.tagger.signature, 215s 'Tag message', 215s ) 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 215s ______________________________ test_get_head_info ______________________________ 215s 215s repo = 215s 215s def test_get_head_info(repo): 215s """get_head_info() extracts expected commit and version info from the head 215s commit 215s """ 215s Repo( 215s commits=[ 215s Commit(name='foo', tree=SourceTree(source=Source())), 215s ], 215s branches={ 215s 'importer/ubuntu/foo': Placeholder('foo'), 215s 'importer/debian/bar': Placeholder('foo'), 215s 'other/ubuntu/baz': Placeholder('foo'), 215s }, 215s ).write(repo.raw_repo) 215s foo_commit_id = ( 215s repo.raw_repo 215s .lookup_reference('refs/heads/importer/ubuntu/foo') 215s .peel(pygit2.Commit).id 215s ) 215s > assert repo.get_head_info('ubuntu', 'importer') == { 215s 'importer/ubuntu/foo': HeadInfoItem( 215s version='1-1', 215s commit_time=0, 215s commit_id=foo_commit_id, 215s ), 215s } 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository_test.py:1193: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1952: in get_head_info 215s self.get_changelog_versions_from_treeish(str(head.peel().id)) 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1888: in get_changelog_versions_from_treeish 215s changelog = self.get_changelog_from_treeish(treeish_string) 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 215s return Changelog.from_treeish( 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:569: in from_treeish 215s blob = follow_symlinks_to_blob( 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 215s return _follow_symlinks_to_blob( 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s repo = pygit2.Repository('/tmp/tmpbcne47ft/.git/') 215s top_tree_object = 215s search_path = 'debian/changelog' 215s _rel_tree = 215s _rel_path = '' 215s 215s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 215s _rel_tree=None, _rel_path='' 215s ): 215s '''Recursively follow a path down a tree, following symlinks, to find blob 215s 215s repo: pygit2.Repository object 215s top_tree: pygit2.Tree object of the top of the tree structure 215s search_path: '/'-separated path string of blob to find 215s _rel_tree: (internal) which tree to look further into 215s _rel_path: (internal) the path we are in so far 215s ''' 215s 215s NORMAL_BLOB_MODES = set([ 215s pygit2.GIT_FILEMODE_BLOB, 215s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 215s ]) 215s 215s _rel_tree = _rel_tree or top_tree_object 215s head, tail = posixpath.split(search_path) 215s 215s # A traditional functional split would put a single entry in head with tail 215s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 215s # to make it appear to have traditional semantics. 215s if not head: 215s head = tail 215s tail = None 215s 215s entry = _rel_tree[head] 215s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 215s ----------------------------- Captured stdout call ----------------------------- 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s ----------------------------- Captured stderr call ----------------------------- 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s _ test_import_unapplied_spi_tags[input_repo0-expected_output_refs0-validation_repo_delta0-validation_repo_expected_identical_refs0-True] _ 215s 215s get_import_commit_msg_mock = 215s get_import_tag_msg_mock = 215s repo = 215s input_repo = 215s 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'] 215s validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }} 215s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty-proposed', 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1'] 215s reuse = True 215s 215s @pytest.mark.parametrize( 215s [ 215s 'input_repo', 215s 'expected_output_refs', 215s 'validation_repo_delta', 215s 'validation_repo_expected_identical_refs', 215s 'reuse', 215s ], 215s [ 215s # 1) An existing import tag (or reimport tag) with the same Git tree 215s # - Reuse import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[Commit.from_spec(name='import')], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={'importer/import/1-1': Placeholder('import')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('import'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s ], 215s # reuse: 215s True, 215s ), 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='import tag contents', 215s ), 215s Commit.from_spec(name='reimport'), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={ 215s 'importer/import/1-1': Placeholder('import'), 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 215s }, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('reimport'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s True, 215s ), 215s 215s # 2) An existing import tag with a different Git tree and an existing 215s # upload tag with the same Git tree 215s # - Reuse upload tag, create reimport tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='The import tag contents', 215s ), 215s Commit.from_spec(name='upload'), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={ 215s 'importer/import/1-1': Placeholder('import'), 215s 'importer/upload/1-1': Placeholder('upload'), 215s }, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_tags': { 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('upload'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('upload'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s True, 215s ), 215s 215s # 3) An existing import tag with a different Git tree and an existing 215s # upload tag with a different Git tree 215s # - Create reimport tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='The import tag contents', 215s ), 215s Commit.from_spec( 215s name='upload', 215s mutate='The upload tag contents', 215s ), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={ 215s 'importer/import/1-1': Placeholder('import'), 215s 'importer/upload/1-1': Placeholder('upload'), 215s }, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [Commit.from_spec( 215s name='reimport', 215s message='Test commit (new)', 215s )], 215s 'update_tags': { 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('reimport'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s False, 215s ), 215s 215s # 4) An existing import tag with a different Git tree and no upload tag 215s # - Create reimport tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='The import tag contents', 215s ), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={'importer/import/1-1': Placeholder('import')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [Commit.from_spec( 215s name='reimport', 215s message='Test commit (new)', 215s )], 215s 'update_tags': { 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('reimport'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s False, 215s ), 215s 215s # 5) No import tag and an existing upload tag with the same Git tree 215s # - Reuse upload tag, create import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[Commit.from_spec(name='upload')], 215s tags={'importer/upload/1-1': Placeholder('upload')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_tags': { 215s 'importer/import/1-1': Placeholder('upload'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('upload'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s ], 215s # reuse: 215s True, 215s ), 215s 215s # 6) No import tag and an existing upload tag with a different Git tree 215s # - Create import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='upload', 215s mutate='The upload tag contents', 215s ), 215s ], 215s tags={'importer/upload/1-1': Placeholder('upload')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [ 215s Commit.from_spec( 215s name='publish', 215s message='Test commit (new)', 215s ), 215s ], 215s 'update_tags': { 215s 'importer/import/1-1': Placeholder('publish'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('publish'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s ], 215s # reuse: 215s False, 215s ), 215s 215s # 7) No import tags or upload tags 215s # - Create import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo(), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [ 215s Commit.from_spec( 215s name='publish', 215s message='Test commit (new)', 215s ), 215s ], 215s 'update_tags': { 215s 'importer/import/1-1': Placeholder('publish'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('publish'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1' 215s ], 215s # reuse: 215s False, 215s ), 215s ] 215s ) 215s @patch('gitubuntu.importer.get_import_tag_msg') 215s @patch('gitubuntu.importer.get_import_commit_msg') 215s def test_import_unapplied_spi_tags( 215s get_import_commit_msg_mock, 215s get_import_tag_msg_mock, 215s repo, 215s input_repo, 215s expected_output_refs, 215s validation_repo_delta, 215s validation_repo_expected_identical_refs, 215s reuse, 215s ): 215s """Test that unapplied tags are correctly created, adjusted and/or reused 215s 215s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 215s that determines the commit message to use for a given import 215s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 215s that determines the tag message to use for a given import 215s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 215s temporary output repository 215s :param repo_builder.Repo input_repo: input repository data 215s :param list(str) expected_output_refs: refs that must exist in the output 215s repository 215s :param dict validation_repo_delta: how to transform the input 215s repository into a "validation repository", expressed as a dict to 215s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 215s input repository. The validation repository is then used for the 215s purposes of comparison against the output repository. 215s :param list(str) validation_repo_expected_identical_refs: refs that must be 215s identical between the validation repository and the output repository 215s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 215s one supplied by the input repository (assumed to have a commit message 215s of "Test commit") and not one created by the importer in this run 215s (arranged by this test to have a different commit message) 215s 215s The input repository data is written into the output repository and then a 215s fake non-native source package publication of version 1-1 in the Trusty 215s release pocket is imported into it by calling import_unapplied_spi() 215s directly. expected_output_refs, validation_repo_expected_identical_refs and 215s reuse are then asserted. It is further asserted that no other refs exist in 215s the output repository except for those listed in expected_output_refs and 215s validation_repo_expected_identical_refs. 215s """ 215s # Match the repo_builder objects 215s get_import_tag_msg_mock.return_value = 'Test tag' 215s # Importantly, the following commit message must not be the same as the 215s # commit messages used by the test input repository commits, so that we can 215s # later detect the difference between commits that were already there and 215s # new commits created by the importer for the purposes of asserting the 215s # reuse parameter correctly. 215s get_import_commit_msg_mock.return_value = b'Test commit (new)' 215s 215s > input_repo.write(repo.raw_repo) 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_tag_test.py:463: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s self = 215s repo = pygit2.Repository('/tmp/tmp_z3ex95k/.git/'), record = {} 215s 215s def write(self, repo, record=None): 215s replace_placeholders(self) 215s record = record or dict() 215s written_commits = [ 215s commit.write(repo=repo, record=record) 215s for commit 215s in self.commit_list 215s ] 215s for name, target in self.branches.items(): 215s repo.create_branch( 215s name, 215s repo.get(target.write(repo)).peel(pygit2.Commit), 215s ) 215s for name, target in self.tags.items(): 215s repo.create_tag( 215s name, 215s target.write(repo), 215s > pygit2.GIT_OBJ_COMMIT, 215s self.tagger.signature, 215s 'Tag message', 215s ) 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 215s ----------------------------- Captured stdout call ----------------------------- 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s ----------------------------- Captured stderr call ----------------------------- 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s _ test_import_unapplied_spi_tags[input_repo1-expected_output_refs1-validation_repo_delta1-validation_repo_expected_identical_refs1-True] _ 215s 215s get_import_commit_msg_mock = 215s get_import_tag_msg_mock = 215s repo = 215s input_repo = 215s 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'] 215s validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }} 215s 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'] 215s reuse = True 215s 215s @pytest.mark.parametrize( 215s [ 215s 'input_repo', 215s 'expected_output_refs', 215s 'validation_repo_delta', 215s 'validation_repo_expected_identical_refs', 215s 'reuse', 215s ], 215s [ 215s # 1) An existing import tag (or reimport tag) with the same Git tree 215s # - Reuse import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[Commit.from_spec(name='import')], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={'importer/import/1-1': Placeholder('import')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('import'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s ], 215s # reuse: 215s True, 215s ), 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='import tag contents', 215s ), 215s Commit.from_spec(name='reimport'), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={ 215s 'importer/import/1-1': Placeholder('import'), 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 215s }, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('reimport'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s True, 215s ), 215s 215s # 2) An existing import tag with a different Git tree and an existing 215s # upload tag with the same Git tree 215s # - Reuse upload tag, create reimport tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='The import tag contents', 215s ), 215s Commit.from_spec(name='upload'), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={ 215s 'importer/import/1-1': Placeholder('import'), 215s 'importer/upload/1-1': Placeholder('upload'), 215s }, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_tags': { 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('upload'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('upload'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s True, 215s ), 215s 215s # 3) An existing import tag with a different Git tree and an existing 215s # upload tag with a different Git tree 215s # - Create reimport tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='The import tag contents', 215s ), 215s Commit.from_spec( 215s name='upload', 215s mutate='The upload tag contents', 215s ), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={ 215s 'importer/import/1-1': Placeholder('import'), 215s 'importer/upload/1-1': Placeholder('upload'), 215s }, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [Commit.from_spec( 215s name='reimport', 215s message='Test commit (new)', 215s )], 215s 'update_tags': { 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('reimport'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s False, 215s ), 215s 215s # 4) An existing import tag with a different Git tree and no upload tag 215s # - Create reimport tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='The import tag contents', 215s ), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={'importer/import/1-1': Placeholder('import')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [Commit.from_spec( 215s name='reimport', 215s message='Test commit (new)', 215s )], 215s 'update_tags': { 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('reimport'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s False, 215s ), 215s 215s # 5) No import tag and an existing upload tag with the same Git tree 215s # - Reuse upload tag, create import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[Commit.from_spec(name='upload')], 215s tags={'importer/upload/1-1': Placeholder('upload')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_tags': { 215s 'importer/import/1-1': Placeholder('upload'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('upload'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s ], 215s # reuse: 215s True, 215s ), 215s 215s # 6) No import tag and an existing upload tag with a different Git tree 215s # - Create import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='upload', 215s mutate='The upload tag contents', 215s ), 215s ], 215s tags={'importer/upload/1-1': Placeholder('upload')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [ 215s Commit.from_spec( 215s name='publish', 215s message='Test commit (new)', 215s ), 215s ], 215s 'update_tags': { 215s 'importer/import/1-1': Placeholder('publish'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('publish'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s ], 215s # reuse: 215s False, 215s ), 215s 215s # 7) No import tags or upload tags 215s # - Create import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo(), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [ 215s Commit.from_spec( 215s name='publish', 215s message='Test commit (new)', 215s ), 215s ], 215s 'update_tags': { 215s 'importer/import/1-1': Placeholder('publish'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('publish'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1' 215s ], 215s # reuse: 215s False, 215s ), 215s ] 215s ) 215s @patch('gitubuntu.importer.get_import_tag_msg') 215s @patch('gitubuntu.importer.get_import_commit_msg') 215s def test_import_unapplied_spi_tags( 215s get_import_commit_msg_mock, 215s get_import_tag_msg_mock, 215s repo, 215s input_repo, 215s expected_output_refs, 215s validation_repo_delta, 215s validation_repo_expected_identical_refs, 215s reuse, 215s ): 215s """Test that unapplied tags are correctly created, adjusted and/or reused 215s 215s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 215s that determines the commit message to use for a given import 215s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 215s that determines the tag message to use for a given import 215s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 215s temporary output repository 215s :param repo_builder.Repo input_repo: input repository data 215s :param list(str) expected_output_refs: refs that must exist in the output 215s repository 215s :param dict validation_repo_delta: how to transform the input 215s repository into a "validation repository", expressed as a dict to 215s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 215s input repository. The validation repository is then used for the 215s purposes of comparison against the output repository. 215s :param list(str) validation_repo_expected_identical_refs: refs that must be 215s identical between the validation repository and the output repository 215s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 215s one supplied by the input repository (assumed to have a commit message 215s of "Test commit") and not one created by the importer in this run 215s (arranged by this test to have a different commit message) 215s 215s The input repository data is written into the output repository and then a 215s fake non-native source package publication of version 1-1 in the Trusty 215s release pocket is imported into it by calling import_unapplied_spi() 215s directly. expected_output_refs, validation_repo_expected_identical_refs and 215s reuse are then asserted. It is further asserted that no other refs exist in 215s the output repository except for those listed in expected_output_refs and 215s validation_repo_expected_identical_refs. 215s """ 215s # Match the repo_builder objects 215s get_import_tag_msg_mock.return_value = 'Test tag' 215s # Importantly, the following commit message must not be the same as the 215s # commit messages used by the test input repository commits, so that we can 215s # later detect the difference between commits that were already there and 215s # new commits created by the importer for the purposes of asserting the 215s # reuse parameter correctly. 215s get_import_commit_msg_mock.return_value = b'Test commit (new)' 215s 215s > input_repo.write(repo.raw_repo) 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_tag_test.py:463: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s self = 215s repo = pygit2.Repository('/tmp/tmpyxjobk15/.git/'), record = {} 215s 215s def write(self, repo, record=None): 215s replace_placeholders(self) 215s record = record or dict() 215s written_commits = [ 215s commit.write(repo=repo, record=record) 215s for commit 215s in self.commit_list 215s ] 215s for name, target in self.branches.items(): 215s repo.create_branch( 215s name, 215s repo.get(target.write(repo)).peel(pygit2.Commit), 215s ) 215s for name, target in self.tags.items(): 215s repo.create_tag( 215s name, 215s target.write(repo), 215s > pygit2.GIT_OBJ_COMMIT, 215s self.tagger.signature, 215s 'Tag message', 215s ) 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 215s ----------------------------- Captured stdout call ----------------------------- 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s ----------------------------- Captured stderr call ----------------------------- 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s _ test_import_unapplied_spi_tags[input_repo2-expected_output_refs2-validation_repo_delta2-validation_repo_expected_identical_refs2-True] _ 215s 215s get_import_commit_msg_mock = 215s get_import_tag_msg_mock = 215s repo = 215s input_repo = 215s 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'] 215s validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }, 'update...t at 0x74623a657b90>, 'importer/reimport/import/1-1/1': }} 215s 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'] 215s reuse = True 215s 215s @pytest.mark.parametrize( 215s [ 215s 'input_repo', 215s 'expected_output_refs', 215s 'validation_repo_delta', 215s 'validation_repo_expected_identical_refs', 215s 'reuse', 215s ], 215s [ 215s # 1) An existing import tag (or reimport tag) with the same Git tree 215s # - Reuse import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[Commit.from_spec(name='import')], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={'importer/import/1-1': Placeholder('import')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('import'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s ], 215s # reuse: 215s True, 215s ), 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='import tag contents', 215s ), 215s Commit.from_spec(name='reimport'), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={ 215s 'importer/import/1-1': Placeholder('import'), 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 215s }, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('reimport'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s True, 215s ), 215s 215s # 2) An existing import tag with a different Git tree and an existing 215s # upload tag with the same Git tree 215s # - Reuse upload tag, create reimport tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='The import tag contents', 215s ), 215s Commit.from_spec(name='upload'), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={ 215s 'importer/import/1-1': Placeholder('import'), 215s 'importer/upload/1-1': Placeholder('upload'), 215s }, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_tags': { 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('upload'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('upload'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s True, 215s ), 215s 215s # 3) An existing import tag with a different Git tree and an existing 215s # upload tag with a different Git tree 215s # - Create reimport tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='The import tag contents', 215s ), 215s Commit.from_spec( 215s name='upload', 215s mutate='The upload tag contents', 215s ), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={ 215s 'importer/import/1-1': Placeholder('import'), 215s 'importer/upload/1-1': Placeholder('upload'), 215s }, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [Commit.from_spec( 215s name='reimport', 215s message='Test commit (new)', 215s )], 215s 'update_tags': { 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('reimport'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s False, 215s ), 215s 215s # 4) An existing import tag with a different Git tree and no upload tag 215s # - Create reimport tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='The import tag contents', 215s ), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={'importer/import/1-1': Placeholder('import')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [Commit.from_spec( 215s name='reimport', 215s message='Test commit (new)', 215s )], 215s 'update_tags': { 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('reimport'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s False, 215s ), 215s 215s # 5) No import tag and an existing upload tag with the same Git tree 215s # - Reuse upload tag, create import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[Commit.from_spec(name='upload')], 215s tags={'importer/upload/1-1': Placeholder('upload')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_tags': { 215s 'importer/import/1-1': Placeholder('upload'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('upload'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s ], 215s # reuse: 215s True, 215s ), 215s 215s # 6) No import tag and an existing upload tag with a different Git tree 215s # - Create import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='upload', 215s mutate='The upload tag contents', 215s ), 215s ], 215s tags={'importer/upload/1-1': Placeholder('upload')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [ 215s Commit.from_spec( 215s name='publish', 215s message='Test commit (new)', 215s ), 215s ], 215s 'update_tags': { 215s 'importer/import/1-1': Placeholder('publish'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('publish'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s ], 215s # reuse: 215s False, 215s ), 215s 215s # 7) No import tags or upload tags 215s # - Create import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo(), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [ 215s Commit.from_spec( 215s name='publish', 215s message='Test commit (new)', 215s ), 215s ], 215s 'update_tags': { 215s 'importer/import/1-1': Placeholder('publish'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('publish'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1' 215s ], 215s # reuse: 215s False, 215s ), 215s ] 215s ) 215s @patch('gitubuntu.importer.get_import_tag_msg') 215s @patch('gitubuntu.importer.get_import_commit_msg') 215s def test_import_unapplied_spi_tags( 215s get_import_commit_msg_mock, 215s get_import_tag_msg_mock, 215s repo, 215s input_repo, 215s expected_output_refs, 215s validation_repo_delta, 215s validation_repo_expected_identical_refs, 215s reuse, 215s ): 215s """Test that unapplied tags are correctly created, adjusted and/or reused 215s 215s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 215s that determines the commit message to use for a given import 215s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 215s that determines the tag message to use for a given import 215s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 215s temporary output repository 215s :param repo_builder.Repo input_repo: input repository data 215s :param list(str) expected_output_refs: refs that must exist in the output 215s repository 215s :param dict validation_repo_delta: how to transform the input 215s repository into a "validation repository", expressed as a dict to 215s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 215s input repository. The validation repository is then used for the 215s purposes of comparison against the output repository. 215s :param list(str) validation_repo_expected_identical_refs: refs that must be 215s identical between the validation repository and the output repository 215s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 215s one supplied by the input repository (assumed to have a commit message 215s of "Test commit") and not one created by the importer in this run 215s (arranged by this test to have a different commit message) 215s 215s The input repository data is written into the output repository and then a 215s fake non-native source package publication of version 1-1 in the Trusty 215s release pocket is imported into it by calling import_unapplied_spi() 215s directly. expected_output_refs, validation_repo_expected_identical_refs and 215s reuse are then asserted. It is further asserted that no other refs exist in 215s the output repository except for those listed in expected_output_refs and 215s validation_repo_expected_identical_refs. 215s """ 215s # Match the repo_builder objects 215s get_import_tag_msg_mock.return_value = 'Test tag' 215s # Importantly, the following commit message must not be the same as the 215s # commit messages used by the test input repository commits, so that we can 215s # later detect the difference between commits that were already there and 215s # new commits created by the importer for the purposes of asserting the 215s # reuse parameter correctly. 215s get_import_commit_msg_mock.return_value = b'Test commit (new)' 215s 215s > input_repo.write(repo.raw_repo) 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_tag_test.py:463: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s self = 215s repo = pygit2.Repository('/tmp/tmpp4kb5b6r/.git/'), record = {} 215s 215s def write(self, repo, record=None): 215s replace_placeholders(self) 215s record = record or dict() 215s written_commits = [ 215s commit.write(repo=repo, record=record) 215s for commit 215s in self.commit_list 215s ] 215s for name, target in self.branches.items(): 215s repo.create_branch( 215s name, 215s repo.get(target.write(repo)).peel(pygit2.Commit), 215s ) 215s for name, target in self.tags.items(): 215s repo.create_tag( 215s name, 215s target.write(repo), 215s > pygit2.GIT_OBJ_COMMIT, 215s self.tagger.signature, 215s 'Tag message', 215s ) 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 215s ----------------------------- Captured stdout call ----------------------------- 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s ----------------------------- Captured stderr call ----------------------------- 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s _ test_import_unapplied_spi_tags[input_repo3-expected_output_refs3-validation_repo_delta3-validation_repo_expected_identical_refs3-False] _ 215s 215s get_import_commit_msg_mock = 215s get_import_tag_msg_mock = 215s repo = 215s input_repo = 215s 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'] 215s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trust...t at 0x746239d92630>, 'importer/reimport/import/1-1/1': }} 215s 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'] 215s reuse = False 215s 215s @pytest.mark.parametrize( 215s [ 215s 'input_repo', 215s 'expected_output_refs', 215s 'validation_repo_delta', 215s 'validation_repo_expected_identical_refs', 215s 'reuse', 215s ], 215s [ 215s # 1) An existing import tag (or reimport tag) with the same Git tree 215s # - Reuse import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[Commit.from_spec(name='import')], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={'importer/import/1-1': Placeholder('import')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('import'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s ], 215s # reuse: 215s True, 215s ), 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='import tag contents', 215s ), 215s Commit.from_spec(name='reimport'), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={ 215s 'importer/import/1-1': Placeholder('import'), 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 215s }, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('reimport'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s True, 215s ), 215s 215s # 2) An existing import tag with a different Git tree and an existing 215s # upload tag with the same Git tree 215s # - Reuse upload tag, create reimport tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='The import tag contents', 215s ), 215s Commit.from_spec(name='upload'), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={ 215s 'importer/import/1-1': Placeholder('import'), 215s 'importer/upload/1-1': Placeholder('upload'), 215s }, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_tags': { 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('upload'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('upload'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s True, 215s ), 215s 215s # 3) An existing import tag with a different Git tree and an existing 215s # upload tag with a different Git tree 215s # - Create reimport tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='The import tag contents', 215s ), 215s Commit.from_spec( 215s name='upload', 215s mutate='The upload tag contents', 215s ), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={ 215s 'importer/import/1-1': Placeholder('import'), 215s 'importer/upload/1-1': Placeholder('upload'), 215s }, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [Commit.from_spec( 215s name='reimport', 215s message='Test commit (new)', 215s )], 215s 'update_tags': { 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('reimport'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s False, 215s ), 215s 215s # 4) An existing import tag with a different Git tree and no upload tag 215s # - Create reimport tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='The import tag contents', 215s ), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={'importer/import/1-1': Placeholder('import')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [Commit.from_spec( 215s name='reimport', 215s message='Test commit (new)', 215s )], 215s 'update_tags': { 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('reimport'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s False, 215s ), 215s 215s # 5) No import tag and an existing upload tag with the same Git tree 215s # - Reuse upload tag, create import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[Commit.from_spec(name='upload')], 215s tags={'importer/upload/1-1': Placeholder('upload')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_tags': { 215s 'importer/import/1-1': Placeholder('upload'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('upload'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s ], 215s # reuse: 215s True, 215s ), 215s 215s # 6) No import tag and an existing upload tag with a different Git tree 215s # - Create import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='upload', 215s mutate='The upload tag contents', 215s ), 215s ], 215s tags={'importer/upload/1-1': Placeholder('upload')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [ 215s Commit.from_spec( 215s name='publish', 215s message='Test commit (new)', 215s ), 215s ], 215s 'update_tags': { 215s 'importer/import/1-1': Placeholder('publish'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('publish'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s ], 215s # reuse: 215s False, 215s ), 215s 215s # 7) No import tags or upload tags 215s # - Create import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo(), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [ 215s Commit.from_spec( 215s name='publish', 215s message='Test commit (new)', 215s ), 215s ], 215s 'update_tags': { 215s 'importer/import/1-1': Placeholder('publish'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('publish'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1' 215s ], 215s # reuse: 215s False, 215s ), 215s ] 215s ) 215s @patch('gitubuntu.importer.get_import_tag_msg') 215s @patch('gitubuntu.importer.get_import_commit_msg') 215s def test_import_unapplied_spi_tags( 215s get_import_commit_msg_mock, 215s get_import_tag_msg_mock, 215s repo, 215s input_repo, 215s expected_output_refs, 215s validation_repo_delta, 215s validation_repo_expected_identical_refs, 215s reuse, 215s ): 215s """Test that unapplied tags are correctly created, adjusted and/or reused 215s 215s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 215s that determines the commit message to use for a given import 215s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 215s that determines the tag message to use for a given import 215s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 215s temporary output repository 215s :param repo_builder.Repo input_repo: input repository data 215s :param list(str) expected_output_refs: refs that must exist in the output 215s repository 215s :param dict validation_repo_delta: how to transform the input 215s repository into a "validation repository", expressed as a dict to 215s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 215s input repository. The validation repository is then used for the 215s purposes of comparison against the output repository. 215s :param list(str) validation_repo_expected_identical_refs: refs that must be 215s identical between the validation repository and the output repository 215s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 215s one supplied by the input repository (assumed to have a commit message 215s of "Test commit") and not one created by the importer in this run 215s (arranged by this test to have a different commit message) 215s 215s The input repository data is written into the output repository and then a 215s fake non-native source package publication of version 1-1 in the Trusty 215s release pocket is imported into it by calling import_unapplied_spi() 215s directly. expected_output_refs, validation_repo_expected_identical_refs and 215s reuse are then asserted. It is further asserted that no other refs exist in 215s the output repository except for those listed in expected_output_refs and 215s validation_repo_expected_identical_refs. 215s """ 215s # Match the repo_builder objects 215s get_import_tag_msg_mock.return_value = 'Test tag' 215s # Importantly, the following commit message must not be the same as the 215s # commit messages used by the test input repository commits, so that we can 215s # later detect the difference between commits that were already there and 215s # new commits created by the importer for the purposes of asserting the 215s # reuse parameter correctly. 215s get_import_commit_msg_mock.return_value = b'Test commit (new)' 215s 215s > input_repo.write(repo.raw_repo) 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_tag_test.py:463: 215s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 215s 215s self = 215s repo = pygit2.Repository('/tmp/tmp4e6b7f4x/.git/'), record = {} 215s 215s def write(self, repo, record=None): 215s replace_placeholders(self) 215s record = record or dict() 215s written_commits = [ 215s commit.write(repo=repo, record=record) 215s for commit 215s in self.commit_list 215s ] 215s for name, target in self.branches.items(): 215s repo.create_branch( 215s name, 215s repo.get(target.write(repo)).peel(pygit2.Commit), 215s ) 215s for name, target in self.tags.items(): 215s repo.create_tag( 215s name, 215s target.write(repo), 215s > pygit2.GIT_OBJ_COMMIT, 215s self.tagger.signature, 215s 'Tag message', 215s ) 215s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 215s 215s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 215s ----------------------------- Captured stdout call ----------------------------- 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s dpkg-source: info: using source format '3.0 (quilt)' 215s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 215s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 215s ----------------------------- Captured stderr call ----------------------------- 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s dpkg-source: warning: missing information for output field Standards-Version 215s _ test_import_unapplied_spi_tags[input_repo4-expected_output_refs4-validation_repo_delta4-validation_repo_expected_identical_refs4-False] _ 215s 215s get_import_commit_msg_mock = 215s get_import_tag_msg_mock = 215s repo = 215s input_repo = 215s 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'] 215s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trust...t at 0x746239d93a70>, 'importer/reimport/import/1-1/1': }} 215s 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'] 215s reuse = False 215s 215s @pytest.mark.parametrize( 215s [ 215s 'input_repo', 215s 'expected_output_refs', 215s 'validation_repo_delta', 215s 'validation_repo_expected_identical_refs', 215s 'reuse', 215s ], 215s [ 215s # 1) An existing import tag (or reimport tag) with the same Git tree 215s # - Reuse import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[Commit.from_spec(name='import')], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={'importer/import/1-1': Placeholder('import')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('import'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s ], 215s # reuse: 215s True, 215s ), 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='import tag contents', 215s ), 215s Commit.from_spec(name='reimport'), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={ 215s 'importer/import/1-1': Placeholder('import'), 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 215s }, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('reimport'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s True, 215s ), 215s 215s # 2) An existing import tag with a different Git tree and an existing 215s # upload tag with the same Git tree 215s # - Reuse upload tag, create reimport tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='The import tag contents', 215s ), 215s Commit.from_spec(name='upload'), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={ 215s 'importer/import/1-1': Placeholder('import'), 215s 'importer/upload/1-1': Placeholder('upload'), 215s }, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_tags': { 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('upload'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('upload'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s True, 215s ), 215s 215s # 3) An existing import tag with a different Git tree and an existing 215s # upload tag with a different Git tree 215s # - Create reimport tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='The import tag contents', 215s ), 215s Commit.from_spec( 215s name='upload', 215s mutate='The upload tag contents', 215s ), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={ 215s 'importer/import/1-1': Placeholder('import'), 215s 'importer/upload/1-1': Placeholder('upload'), 215s }, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [Commit.from_spec( 215s name='reimport', 215s message='Test commit (new)', 215s )], 215s 'update_tags': { 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('reimport'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s False, 215s ), 215s 215s # 4) An existing import tag with a different Git tree and no upload tag 215s # - Create reimport tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='import', 215s mutate='The import tag contents', 215s ), 215s ], 215s branches={ 215s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 215s }, 215s tags={'importer/import/1-1': Placeholder('import')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [Commit.from_spec( 215s name='reimport', 215s message='Test commit (new)', 215s )], 215s 'update_tags': { 215s 'importer/reimport/import/1-1/0': Placeholder('import'), 215s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('reimport'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty-proposed', 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/reimport/import/1-1/0', 215s 'refs/tags/importer/reimport/import/1-1/1', 215s ], 215s # reuse: 215s False, 215s ), 215s 215s # 5) No import tag and an existing upload tag with the same Git tree 215s # - Reuse upload tag, create import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[Commit.from_spec(name='upload')], 215s tags={'importer/upload/1-1': Placeholder('upload')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'update_tags': { 215s 'importer/import/1-1': Placeholder('upload'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('upload'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s ], 215s # reuse: 215s True, 215s ), 215s 215s # 6) No import tag and an existing upload tag with a different Git tree 215s # - Create import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo( 215s commits=[ 215s Commit.from_spec( 215s name='upload', 215s mutate='The upload tag contents', 215s ), 215s ], 215s tags={'importer/upload/1-1': Placeholder('upload')}, 215s ), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [ 215s Commit.from_spec( 215s name='publish', 215s message='Test commit (new)', 215s ), 215s ], 215s 'update_tags': { 215s 'importer/import/1-1': Placeholder('publish'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('publish'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1', 215s 'refs/tags/importer/upload/1-1', 215s ], 215s # reuse: 215s False, 215s ), 215s 215s # 7) No import tags or upload tags 215s # - Create import tag 215s pytest.param( 215s # input_repo: 215s repo_builder.Repo(), 215s # expected_output_refs: 215s [ 215s 'refs/heads/do-not-push', 215s 'refs/tags/importer/upstream/ubuntu/1.gz', 215s 'refs/heads/importer/importer/ubuntu/dsc', 215s 'refs/heads/importer/importer/ubuntu/pristine-tar', 215s 'refs/notes/importer/changelog', 215s 'refs/notes/importer/importer', 215s ], 215s # validation_repo_delta: 215s { 215s 'add_commits': [ 215s Commit.from_spec( 215s name='publish', 215s message='Test commit (new)', 215s ), 215s ], 215s 'update_tags': { 215s 'importer/import/1-1': Placeholder('publish'), 215s }, 215s 'update_branches': { 215s 'importer/ubuntu/trusty': Placeholder('publish'), 215s }, 215s }, 215s # validation_repo_expected_identical_refs: 215s [ 215s 'refs/heads/importer/ubuntu/trusty', 215s 'refs/tags/importer/import/1-1' 215s ], 215s # reuse: 215s False, 215s ), 215s ] 215s ) 215s @patch('gitubuntu.importer.get_import_tag_msg') 215s @patch('gitubuntu.importer.get_import_commit_msg') 215s def test_import_unapplied_spi_tags( 215s get_import_commit_msg_mock, 215s get_import_tag_msg_mock, 215s repo, 215s input_repo, 215s expected_output_refs, 215s validation_repo_delta, 215s validation_repo_expected_identical_refs, 215s reuse, 215s ): 215s """Test that unapplied tags are correctly created, adjusted and/or reused 215s 215s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 215s that determines the commit message to use for a given import 215s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 215s that determines the tag message to use for a given import 215s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 215s temporary output repository 215s :param repo_builder.Repo input_repo: input repository data 215s :param list(str) expected_output_refs: refs that must exist in the output 215s repository 215s :param dict validation_repo_delta: how to transform the input 215s repository into a "validation repository", expressed as a dict to 215s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 215s input repository. The validation repository is then used for the 215s purposes of comparison against the output repository. 215s :param list(str) validation_repo_expected_identical_refs: refs that must be 215s identical between the validation repository and the output repository 215s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 216s one supplied by the input repository (assumed to have a commit message 216s of "Test commit") and not one created by the importer in this run 216s (arranged by this test to have a different commit message) 216s 216s The input repository data is written into the output repository and then a 216s fake non-native source package publication of version 1-1 in the Trusty 216s release pocket is imported into it by calling import_unapplied_spi() 216s directly. expected_output_refs, validation_repo_expected_identical_refs and 216s reuse are then asserted. It is further asserted that no other refs exist in 216s the output repository except for those listed in expected_output_refs and 216s validation_repo_expected_identical_refs. 216s """ 216s # Match the repo_builder objects 216s get_import_tag_msg_mock.return_value = 'Test tag' 216s # Importantly, the following commit message must not be the same as the 216s # commit messages used by the test input repository commits, so that we can 216s # later detect the difference between commits that were already there and 216s # new commits created by the importer for the purposes of asserting the 216s # reuse parameter correctly. 216s get_import_commit_msg_mock.return_value = b'Test commit (new)' 216s 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_tag_test.py:463: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpxc1neg92/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_import_unapplied_spi_tags[input_repo5-expected_output_refs5-validation_repo_delta5-validation_repo_expected_identical_refs5-True] _ 216s 216s get_import_commit_msg_mock = 216s get_import_tag_msg_mock = 216s repo = 216s input_repo = 216s 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'] 216s validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }, 'update_tags': {'importer/import/1-1': }} 216s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1'] 216s reuse = True 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'expected_output_refs', 216s 'validation_repo_delta', 216s 'validation_repo_expected_identical_refs', 216s 'reuse', 216s ], 216s [ 216s # 1) An existing import tag (or reimport tag) with the same Git tree 216s # - Reuse import tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[Commit.from_spec(name='import')], 216s branches={ 216s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 216s }, 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s ], 216s # validation_repo_delta: 216s { 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('import'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty-proposed', 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s ], 216s # reuse: 216s True, 216s ), 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec( 216s name='import', 216s mutate='import tag contents', 216s ), 216s Commit.from_spec(name='reimport'), 216s ], 216s branches={ 216s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 216s }, 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s ], 216s # validation_repo_delta: 216s { 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('reimport'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty-proposed', 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s # reuse: 216s True, 216s ), 216s 216s # 2) An existing import tag with a different Git tree and an existing 216s # upload tag with the same Git tree 216s # - Reuse upload tag, create reimport tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec( 216s name='import', 216s mutate='The import tag contents', 216s ), 216s Commit.from_spec(name='upload'), 216s ], 216s branches={ 216s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 216s }, 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-1': Placeholder('upload'), 216s }, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'update_tags': { 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('upload'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('upload'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty-proposed', 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/upload/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s # reuse: 216s True, 216s ), 216s 216s # 3) An existing import tag with a different Git tree and an existing 216s # upload tag with a different Git tree 216s # - Create reimport tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec( 216s name='import', 216s mutate='The import tag contents', 216s ), 216s Commit.from_spec( 216s name='upload', 216s mutate='The upload tag contents', 216s ), 216s ], 216s branches={ 216s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 216s }, 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-1': Placeholder('upload'), 216s }, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/changelog', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'add_commits': [Commit.from_spec( 216s name='reimport', 216s message='Test commit (new)', 216s )], 216s 'update_tags': { 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('reimport'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty-proposed', 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/upload/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s # reuse: 216s False, 216s ), 216s 216s # 4) An existing import tag with a different Git tree and no upload tag 216s # - Create reimport tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec( 216s name='import', 216s mutate='The import tag contents', 216s ), 216s ], 216s branches={ 216s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 216s }, 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/changelog', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'add_commits': [Commit.from_spec( 216s name='reimport', 216s message='Test commit (new)', 216s )], 216s 'update_tags': { 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('reimport'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty-proposed', 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s # reuse: 216s False, 216s ), 216s 216s # 5) No import tag and an existing upload tag with the same Git tree 216s # - Reuse upload tag, create import tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[Commit.from_spec(name='upload')], 216s tags={'importer/upload/1-1': Placeholder('upload')}, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'update_tags': { 216s 'importer/import/1-1': Placeholder('upload'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('upload'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/upload/1-1', 216s ], 216s # reuse: 216s True, 216s ), 216s 216s # 6) No import tag and an existing upload tag with a different Git tree 216s # - Create import tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec( 216s name='upload', 216s mutate='The upload tag contents', 216s ), 216s ], 216s tags={'importer/upload/1-1': Placeholder('upload')}, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/changelog', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'add_commits': [ 216s Commit.from_spec( 216s name='publish', 216s message='Test commit (new)', 216s ), 216s ], 216s 'update_tags': { 216s 'importer/import/1-1': Placeholder('publish'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('publish'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/upload/1-1', 216s ], 216s # reuse: 216s False, 216s ), 216s 216s # 7) No import tags or upload tags 216s # - Create import tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo(), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/changelog', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'add_commits': [ 216s Commit.from_spec( 216s name='publish', 216s message='Test commit (new)', 216s ), 216s ], 216s 'update_tags': { 216s 'importer/import/1-1': Placeholder('publish'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('publish'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1' 216s ], 216s # reuse: 216s False, 216s ), 216s ] 216s ) 216s @patch('gitubuntu.importer.get_import_tag_msg') 216s @patch('gitubuntu.importer.get_import_commit_msg') 216s def test_import_unapplied_spi_tags( 216s get_import_commit_msg_mock, 216s get_import_tag_msg_mock, 216s repo, 216s input_repo, 216s expected_output_refs, 216s validation_repo_delta, 216s validation_repo_expected_identical_refs, 216s reuse, 216s ): 216s """Test that unapplied tags are correctly created, adjusted and/or reused 216s 216s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 216s that determines the commit message to use for a given import 216s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 216s that determines the tag message to use for a given import 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param repo_builder.Repo input_repo: input repository data 216s :param list(str) expected_output_refs: refs that must exist in the output 216s repository 216s :param dict validation_repo_delta: how to transform the input 216s repository into a "validation repository", expressed as a dict to 216s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 216s input repository. The validation repository is then used for the 216s purposes of comparison against the output repository. 216s :param list(str) validation_repo_expected_identical_refs: refs that must be 216s identical between the validation repository and the output repository 216s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 216s one supplied by the input repository (assumed to have a commit message 216s of "Test commit") and not one created by the importer in this run 216s (arranged by this test to have a different commit message) 216s 216s The input repository data is written into the output repository and then a 216s fake non-native source package publication of version 1-1 in the Trusty 216s release pocket is imported into it by calling import_unapplied_spi() 216s directly. expected_output_refs, validation_repo_expected_identical_refs and 216s reuse are then asserted. It is further asserted that no other refs exist in 216s the output repository except for those listed in expected_output_refs and 216s validation_repo_expected_identical_refs. 216s """ 216s # Match the repo_builder objects 216s get_import_tag_msg_mock.return_value = 'Test tag' 216s # Importantly, the following commit message must not be the same as the 216s # commit messages used by the test input repository commits, so that we can 216s # later detect the difference between commits that were already there and 216s # new commits created by the importer for the purposes of asserting the 216s # reuse parameter correctly. 216s get_import_commit_msg_mock.return_value = b'Test commit (new)' 216s 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_tag_test.py:463: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpwmt4wwfa/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_import_unapplied_spi_tags[input_repo6-expected_output_refs6-validation_repo_delta6-validation_repo_expected_identical_refs6-False] _ 216s 216s get_import_commit_msg_mock = 216s get_import_tag_msg_mock = 216s repo = 216s input_repo = 216s 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'] 216s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trust...x746239d90800>}, 'update_tags': {'importer/import/1-1': }} 216s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1'] 216s reuse = False 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'expected_output_refs', 216s 'validation_repo_delta', 216s 'validation_repo_expected_identical_refs', 216s 'reuse', 216s ], 216s [ 216s # 1) An existing import tag (or reimport tag) with the same Git tree 216s # - Reuse import tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[Commit.from_spec(name='import')], 216s branches={ 216s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 216s }, 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s ], 216s # validation_repo_delta: 216s { 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('import'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty-proposed', 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s ], 216s # reuse: 216s True, 216s ), 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec( 216s name='import', 216s mutate='import tag contents', 216s ), 216s Commit.from_spec(name='reimport'), 216s ], 216s branches={ 216s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 216s }, 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s ], 216s # validation_repo_delta: 216s { 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('reimport'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty-proposed', 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s # reuse: 216s True, 216s ), 216s 216s # 2) An existing import tag with a different Git tree and an existing 216s # upload tag with the same Git tree 216s # - Reuse upload tag, create reimport tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec( 216s name='import', 216s mutate='The import tag contents', 216s ), 216s Commit.from_spec(name='upload'), 216s ], 216s branches={ 216s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 216s }, 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-1': Placeholder('upload'), 216s }, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'update_tags': { 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('upload'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('upload'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty-proposed', 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/upload/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s # reuse: 216s True, 216s ), 216s 216s # 3) An existing import tag with a different Git tree and an existing 216s # upload tag with a different Git tree 216s # - Create reimport tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec( 216s name='import', 216s mutate='The import tag contents', 216s ), 216s Commit.from_spec( 216s name='upload', 216s mutate='The upload tag contents', 216s ), 216s ], 216s branches={ 216s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 216s }, 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-1': Placeholder('upload'), 216s }, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/changelog', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'add_commits': [Commit.from_spec( 216s name='reimport', 216s message='Test commit (new)', 216s )], 216s 'update_tags': { 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('reimport'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty-proposed', 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/upload/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s # reuse: 216s False, 216s ), 216s 216s # 4) An existing import tag with a different Git tree and no upload tag 216s # - Create reimport tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec( 216s name='import', 216s mutate='The import tag contents', 216s ), 216s ], 216s branches={ 216s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 216s }, 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/changelog', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'add_commits': [Commit.from_spec( 216s name='reimport', 216s message='Test commit (new)', 216s )], 216s 'update_tags': { 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('reimport'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty-proposed', 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s # reuse: 216s False, 216s ), 216s 216s # 5) No import tag and an existing upload tag with the same Git tree 216s # - Reuse upload tag, create import tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[Commit.from_spec(name='upload')], 216s tags={'importer/upload/1-1': Placeholder('upload')}, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'update_tags': { 216s 'importer/import/1-1': Placeholder('upload'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('upload'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/upload/1-1', 216s ], 216s # reuse: 216s True, 216s ), 216s 216s # 6) No import tag and an existing upload tag with a different Git tree 216s # - Create import tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec( 216s name='upload', 216s mutate='The upload tag contents', 216s ), 216s ], 216s tags={'importer/upload/1-1': Placeholder('upload')}, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/changelog', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'add_commits': [ 216s Commit.from_spec( 216s name='publish', 216s message='Test commit (new)', 216s ), 216s ], 216s 'update_tags': { 216s 'importer/import/1-1': Placeholder('publish'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('publish'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/upload/1-1', 216s ], 216s # reuse: 216s False, 216s ), 216s 216s # 7) No import tags or upload tags 216s # - Create import tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo(), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/changelog', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'add_commits': [ 216s Commit.from_spec( 216s name='publish', 216s message='Test commit (new)', 216s ), 216s ], 216s 'update_tags': { 216s 'importer/import/1-1': Placeholder('publish'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('publish'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1' 216s ], 216s # reuse: 216s False, 216s ), 216s ] 216s ) 216s @patch('gitubuntu.importer.get_import_tag_msg') 216s @patch('gitubuntu.importer.get_import_commit_msg') 216s def test_import_unapplied_spi_tags( 216s get_import_commit_msg_mock, 216s get_import_tag_msg_mock, 216s repo, 216s input_repo, 216s expected_output_refs, 216s validation_repo_delta, 216s validation_repo_expected_identical_refs, 216s reuse, 216s ): 216s """Test that unapplied tags are correctly created, adjusted and/or reused 216s 216s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 216s that determines the commit message to use for a given import 216s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 216s that determines the tag message to use for a given import 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param repo_builder.Repo input_repo: input repository data 216s :param list(str) expected_output_refs: refs that must exist in the output 216s repository 216s :param dict validation_repo_delta: how to transform the input 216s repository into a "validation repository", expressed as a dict to 216s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 216s input repository. The validation repository is then used for the 216s purposes of comparison against the output repository. 216s :param list(str) validation_repo_expected_identical_refs: refs that must be 216s identical between the validation repository and the output repository 216s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 216s one supplied by the input repository (assumed to have a commit message 216s of "Test commit") and not one created by the importer in this run 216s (arranged by this test to have a different commit message) 216s 216s The input repository data is written into the output repository and then a 216s fake non-native source package publication of version 1-1 in the Trusty 216s release pocket is imported into it by calling import_unapplied_spi() 216s directly. expected_output_refs, validation_repo_expected_identical_refs and 216s reuse are then asserted. It is further asserted that no other refs exist in 216s the output repository except for those listed in expected_output_refs and 216s validation_repo_expected_identical_refs. 216s """ 216s # Match the repo_builder objects 216s get_import_tag_msg_mock.return_value = 'Test tag' 216s # Importantly, the following commit message must not be the same as the 216s # commit messages used by the test input repository commits, so that we can 216s # later detect the difference between commits that were already there and 216s # new commits created by the importer for the purposes of asserting the 216s # reuse parameter correctly. 216s get_import_commit_msg_mock.return_value = b'Test commit (new)' 216s 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_tag_test.py:463: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpp7tfn958/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_import_unapplied_spi_tags[input_repo7-expected_output_refs7-validation_repo_delta7-validation_repo_expected_identical_refs7-False] _ 216s 216s get_import_commit_msg_mock = 216s get_import_tag_msg_mock = 216s repo = 216s input_repo = 216s 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'] 216s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trust...x746239d90aa0>}, 'update_tags': {'importer/import/1-1': }} 216s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1'] 216s reuse = False 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'expected_output_refs', 216s 'validation_repo_delta', 216s 'validation_repo_expected_identical_refs', 216s 'reuse', 216s ], 216s [ 216s # 1) An existing import tag (or reimport tag) with the same Git tree 216s # - Reuse import tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[Commit.from_spec(name='import')], 216s branches={ 216s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 216s }, 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s ], 216s # validation_repo_delta: 216s { 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('import'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty-proposed', 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s ], 216s # reuse: 216s True, 216s ), 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec( 216s name='import', 216s mutate='import tag contents', 216s ), 216s Commit.from_spec(name='reimport'), 216s ], 216s branches={ 216s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 216s }, 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s ], 216s # validation_repo_delta: 216s { 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('reimport'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty-proposed', 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s # reuse: 216s True, 216s ), 216s 216s # 2) An existing import tag with a different Git tree and an existing 216s # upload tag with the same Git tree 216s # - Reuse upload tag, create reimport tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec( 216s name='import', 216s mutate='The import tag contents', 216s ), 216s Commit.from_spec(name='upload'), 216s ], 216s branches={ 216s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 216s }, 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-1': Placeholder('upload'), 216s }, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'update_tags': { 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('upload'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('upload'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty-proposed', 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/upload/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s # reuse: 216s True, 216s ), 216s 216s # 3) An existing import tag with a different Git tree and an existing 216s # upload tag with a different Git tree 216s # - Create reimport tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec( 216s name='import', 216s mutate='The import tag contents', 216s ), 216s Commit.from_spec( 216s name='upload', 216s mutate='The upload tag contents', 216s ), 216s ], 216s branches={ 216s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 216s }, 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-1': Placeholder('upload'), 216s }, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/changelog', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'add_commits': [Commit.from_spec( 216s name='reimport', 216s message='Test commit (new)', 216s )], 216s 'update_tags': { 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('reimport'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty-proposed', 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/upload/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s # reuse: 216s False, 216s ), 216s 216s # 4) An existing import tag with a different Git tree and no upload tag 216s # - Create reimport tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec( 216s name='import', 216s mutate='The import tag contents', 216s ), 216s ], 216s branches={ 216s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 216s }, 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/changelog', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'add_commits': [Commit.from_spec( 216s name='reimport', 216s message='Test commit (new)', 216s )], 216s 'update_tags': { 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('reimport'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty-proposed', 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s # reuse: 216s False, 216s ), 216s 216s # 5) No import tag and an existing upload tag with the same Git tree 216s # - Reuse upload tag, create import tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[Commit.from_spec(name='upload')], 216s tags={'importer/upload/1-1': Placeholder('upload')}, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'update_tags': { 216s 'importer/import/1-1': Placeholder('upload'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('upload'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/upload/1-1', 216s ], 216s # reuse: 216s True, 216s ), 216s 216s # 6) No import tag and an existing upload tag with a different Git tree 216s # - Create import tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec( 216s name='upload', 216s mutate='The upload tag contents', 216s ), 216s ], 216s tags={'importer/upload/1-1': Placeholder('upload')}, 216s ), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/changelog', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'add_commits': [ 216s Commit.from_spec( 216s name='publish', 216s message='Test commit (new)', 216s ), 216s ], 216s 'update_tags': { 216s 'importer/import/1-1': Placeholder('publish'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('publish'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/upload/1-1', 216s ], 216s # reuse: 216s False, 216s ), 216s 216s # 7) No import tags or upload tags 216s # - Create import tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo(), 216s # expected_output_refs: 216s [ 216s 'refs/heads/do-not-push', 216s 'refs/tags/importer/upstream/ubuntu/1.gz', 216s 'refs/heads/importer/importer/ubuntu/dsc', 216s 'refs/heads/importer/importer/ubuntu/pristine-tar', 216s 'refs/notes/importer/changelog', 216s 'refs/notes/importer/importer', 216s ], 216s # validation_repo_delta: 216s { 216s 'add_commits': [ 216s Commit.from_spec( 216s name='publish', 216s message='Test commit (new)', 216s ), 216s ], 216s 'update_tags': { 216s 'importer/import/1-1': Placeholder('publish'), 216s }, 216s 'update_branches': { 216s 'importer/ubuntu/trusty': Placeholder('publish'), 216s }, 216s }, 216s # validation_repo_expected_identical_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1' 216s ], 216s # reuse: 216s False, 216s ), 216s ] 216s ) 216s @patch('gitubuntu.importer.get_import_tag_msg') 216s @patch('gitubuntu.importer.get_import_commit_msg') 216s def test_import_unapplied_spi_tags( 216s get_import_commit_msg_mock, 216s get_import_tag_msg_mock, 216s repo, 216s input_repo, 216s expected_output_refs, 216s validation_repo_delta, 216s validation_repo_expected_identical_refs, 216s reuse, 216s ): 216s """Test that unapplied tags are correctly created, adjusted and/or reused 216s 216s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 216s that determines the commit message to use for a given import 216s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 216s that determines the tag message to use for a given import 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param repo_builder.Repo input_repo: input repository data 216s :param list(str) expected_output_refs: refs that must exist in the output 216s repository 216s :param dict validation_repo_delta: how to transform the input 216s repository into a "validation repository", expressed as a dict to 216s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 216s input repository. The validation repository is then used for the 216s purposes of comparison against the output repository. 216s :param list(str) validation_repo_expected_identical_refs: refs that must be 216s identical between the validation repository and the output repository 216s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 216s one supplied by the input repository (assumed to have a commit message 216s of "Test commit") and not one created by the importer in this run 216s (arranged by this test to have a different commit message) 216s 216s The input repository data is written into the output repository and then a 216s fake non-native source package publication of version 1-1 in the Trusty 216s release pocket is imported into it by calling import_unapplied_spi() 216s directly. expected_output_refs, validation_repo_expected_identical_refs and 216s reuse are then asserted. It is further asserted that no other refs exist in 216s the output repository except for those listed in expected_output_refs and 216s validation_repo_expected_identical_refs. 216s """ 216s # Match the repo_builder objects 216s get_import_tag_msg_mock.return_value = 'Test tag' 216s # Importantly, the following commit message must not be the same as the 216s # commit messages used by the test input repository commits, so that we can 216s # later detect the difference between commits that were already there and 216s # new commits created by the importer for the purposes of asserting the 216s # reuse parameter correctly. 216s get_import_commit_msg_mock.return_value = b'Test commit (new)' 216s 216s input_repo.write(repo.raw_repo) 216s 216s publish_spec = source_builder.SourceSpec( 216s version='1-1', 216s native=False, 216s ) 216s 216s with source_builder.Source(publish_spec) as dsc_path: 216s > target.import_unapplied_spi( 216s repo=repo, 216s spi=MockSPI(dsc_path, publish_spec.version), 216s namespace='importer', 216s skip_orig=False, 216s parent_overrides={}, 216s ) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_tag_test.py:471: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:2308: in import_unapplied_spi 216s import_unapplied_dsc( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 216s commit, tag = find_or_create_unapplied_commit( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 216s changelog_parents = get_unapplied_import_parents( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 216s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 216s changelog = self.get_changelog_from_treeish(treeish) 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 216s return Changelog.from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:569: in from_treeish 216s blob = follow_symlinks_to_blob( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 216s return _follow_symlinks_to_blob( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s repo = pygit2.Repository('/tmp/tmp8wecyapu/.git/') 216s top_tree_object = 216s search_path = 'debian/changelog' 216s _rel_tree = 216s _rel_path = '' 216s 216s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 216s _rel_tree=None, _rel_path='' 216s ): 216s '''Recursively follow a path down a tree, following symlinks, to find blob 216s 216s repo: pygit2.Repository object 216s top_tree: pygit2.Tree object of the top of the tree structure 216s search_path: '/'-separated path string of blob to find 216s _rel_tree: (internal) which tree to look further into 216s _rel_path: (internal) the path we are in so far 216s ''' 216s 216s NORMAL_BLOB_MODES = set([ 216s pygit2.GIT_FILEMODE_BLOB, 216s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 216s ]) 216s 216s _rel_tree = _rel_tree or top_tree_object 216s head, tail = posixpath.split(search_path) 216s 216s # A traditional functional split would put a single entry in head with tail 216s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 216s # to make it appear to have traditional semantics. 216s if not head: 216s head = tail 216s tail = None 216s 216s entry = _rel_tree[head] 216s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_import_applied_spi_tags[input_repo0-validation_repo_delta0-validation_repo_expected_treewise_refs0-True] _ 216s 216s get_import_commit_msg_mock = 216s get_import_tag_msg_mock = 216s repo = 216s input_repo = 216s validation_repo_delta = {} 216s 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'] 216s reuse = True 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'validation_repo_delta', 216s 'validation_repo_expected_treewise_refs', 216s 'reuse', 216s ], 216s [ 216s # 1) An existing applied tag (or reimport tag) with the same Git tree 216s # - Reuse applied tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec(name='unapplied', has_patches=True), 216s Commit.from_spec(name='applied', patches_applied=True), 216s ], 216s branches={ 216s 'importer/ubuntu/trusty': Placeholder('unapplied'), 216s 'importer/applied/ubuntu/trusty': Placeholder('applied'), 216s }, 216s tags={ 216s 'importer/import/1-1': Placeholder('unapplied'), 216s 'importer/applied/1-1': Placeholder('applied'), 216s }, 216s ), 216s # validation_repo_delta: 216s { 216s # no output repository delta 216s }, 216s # validation_repo_expected_treewise_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/heads/importer/applied/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/applied/1-1', 216s ], 216s # reuse: 216s True, 216s ), 216s 216s # 2) An existing applied tag with a different Git tree 216s # - Create reimport tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec( 216s name='unapplied', 216s has_patches=True, 216s mutate='import tag contents', 216s ), 216s Commit.from_spec( 216s name='unapplied_reimport', 216s has_patches=True, 216s ), 216s Commit.from_spec( 216s name='applied', 216s patches_applied=True, 216s mutate='import tag contents', 216s ) 216s ], 216s branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, 216s tags={ 216s 'importer/import/1-1': 216s Placeholder('unapplied'), 216s 'importer/reimport/import/1-1/0': 216s Placeholder('unapplied'), 216s 'importer/reimport/import/1-1/1': 216s Placeholder('unapplied_reimport'), 216s 'importer/applied/1-1': 216s Placeholder('applied'), 216s }, 216s ), 216s # validation_repo_delta: 216s { 216s 'add_commits': [ 216s Commit.from_spec( 216s name='applied_reimport', 216s patches_applied=True, 216s parents=[Placeholder('unapplied_reimport')], 216s ), 216s ], 216s 'update_tags': { 216s 'importer/reimport/applied/1-1/0': 216s Placeholder('applied'), 216s 'importer/reimport/applied/1-1/1': 216s Placeholder('applied_reimport'), 216s }, 216s 'update_branches': { 216s 'importer/applied/ubuntu/trusty': 216s Placeholder('applied_reimport'), 216s }, 216s }, 216s # validation_repo_expected_treewise_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/heads/importer/applied/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s 'refs/tags/importer/applied/1-1', 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s ], 216s # reuse: 216s False, 216s 216s marks=pytest.mark.xfail(reason='LP: #1755247'), 216s ), 216s 216s # 3) No applied tags 216s # - Create applied tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[Commit.from_spec(name='unapplied', has_patches=True)], 216s branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, 216s tags={'importer/import/1-1': Placeholder('unapplied')}, 216s ), 216s # validation_repo_delta: 216s { 216s 'add_commits': [ 216s Commit.from_spec( 216s name='applied', 216s patches_applied=True, 216s parents=[Placeholder('unapplied')], 216s ), 216s ], 216s 'update_tags': { 216s 'importer/applied/1-1': Placeholder('applied') 216s }, 216s 'update_branches': { 216s 'importer/applied/ubuntu/trusty': Placeholder('applied'), 216s }, 216s }, 216s # validation_repo_expected_treewise_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/heads/importer/applied/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/applied/1-1' 216s ], 216s # reuse: 216s False, 216s ), 216s ] 216s ) 216s @patch('gitubuntu.importer.get_import_tag_msg') 216s @patch('gitubuntu.importer.get_import_commit_msg') 216s def test_import_applied_spi_tags( 216s get_import_commit_msg_mock, 216s get_import_tag_msg_mock, 216s repo, 216s input_repo, 216s validation_repo_delta, 216s validation_repo_expected_treewise_refs, 216s reuse, 216s ): 216s """Test that applied tags are correctly created, adjusted and/or reused 216s 216s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 216s that determines the commit message to use for a given import 216s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 216s that determines the tag message to use for a given import 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param repo_builder.Repo input_repo: input repository data 216s :param dict validation_repo_delta: how to transform the input repository 216s into a "validation repository", expressed as a dict to 216s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 216s input repository. The validation repository is then used for the 216s purposes of comparison against the output repository. 216s :param list(str) validation_repo_expected_treewise_refs: refs whose trees 216s must be identical between the validation repository and the output 216s repository 216s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 216s one supplied by the input repository (assumed to have a commit message 216s of "Test commit") and not one created by the importer in this run 216s (arranged by this test to have a different commit message) 216s 216s The input repository data is written into the output repository and then a 216s fake non-native source package publication of version 1-1 in the Trusty 216s release pocket is imported into it by calling import_applied_spi() 216s directly. reuse and validation_repo_expected_treewise_refs are then 216s asserted. 216s 216s This is similar to test_unapplied_spi_tags except that it calls 216s import_applied_spi() instead of import_unapplied_spi() and only treewise 216s ref comparisons are made. 216s """ 216s # Match the repo_builder objects 216s get_import_tag_msg_mock.return_value = 'Test tag' 216s # Importantly, the following commit message must not be the same as the 216s # commit messages used by the test input repository commits, so that we can 216s # later detect the difference between commits that were already there and 216s # new commits created by the importer for the purposes of asserting the 216s # reuse parameter correctly. 216s get_import_commit_msg_mock.return_value = b'Test commit (new)' 216s 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_tag_test.py:711: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpdtr2rssn/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: applying a 216s dpkg-source: info: applying b 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: applying a 216s dpkg-source: info: applying b 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: applying a 216s dpkg-source: info: applying b 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: applying a 216s dpkg-source: info: applying b 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: applying a 216s dpkg-source: info: applying b 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_import_applied_spi_tags[input_repo2-validation_repo_delta2-validation_repo_expected_treewise_refs2-False] _ 216s 216s get_import_commit_msg_mock = 216s get_import_tag_msg_mock = 216s repo = 216s input_repo = 216s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/applied/ubun...746239d91e20>}, 'update_tags': {'importer/applied/1-1': }} 216s 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'] 216s reuse = False 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'validation_repo_delta', 216s 'validation_repo_expected_treewise_refs', 216s 'reuse', 216s ], 216s [ 216s # 1) An existing applied tag (or reimport tag) with the same Git tree 216s # - Reuse applied tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec(name='unapplied', has_patches=True), 216s Commit.from_spec(name='applied', patches_applied=True), 216s ], 216s branches={ 216s 'importer/ubuntu/trusty': Placeholder('unapplied'), 216s 'importer/applied/ubuntu/trusty': Placeholder('applied'), 216s }, 216s tags={ 216s 'importer/import/1-1': Placeholder('unapplied'), 216s 'importer/applied/1-1': Placeholder('applied'), 216s }, 216s ), 216s # validation_repo_delta: 216s { 216s # no output repository delta 216s }, 216s # validation_repo_expected_treewise_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/heads/importer/applied/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/applied/1-1', 216s ], 216s # reuse: 216s True, 216s ), 216s 216s # 2) An existing applied tag with a different Git tree 216s # - Create reimport tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[ 216s Commit.from_spec( 216s name='unapplied', 216s has_patches=True, 216s mutate='import tag contents', 216s ), 216s Commit.from_spec( 216s name='unapplied_reimport', 216s has_patches=True, 216s ), 216s Commit.from_spec( 216s name='applied', 216s patches_applied=True, 216s mutate='import tag contents', 216s ) 216s ], 216s branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, 216s tags={ 216s 'importer/import/1-1': 216s Placeholder('unapplied'), 216s 'importer/reimport/import/1-1/0': 216s Placeholder('unapplied'), 216s 'importer/reimport/import/1-1/1': 216s Placeholder('unapplied_reimport'), 216s 'importer/applied/1-1': 216s Placeholder('applied'), 216s }, 216s ), 216s # validation_repo_delta: 216s { 216s 'add_commits': [ 216s Commit.from_spec( 216s name='applied_reimport', 216s patches_applied=True, 216s parents=[Placeholder('unapplied_reimport')], 216s ), 216s ], 216s 'update_tags': { 216s 'importer/reimport/applied/1-1/0': 216s Placeholder('applied'), 216s 'importer/reimport/applied/1-1/1': 216s Placeholder('applied_reimport'), 216s }, 216s 'update_branches': { 216s 'importer/applied/ubuntu/trusty': 216s Placeholder('applied_reimport'), 216s }, 216s }, 216s # validation_repo_expected_treewise_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/heads/importer/applied/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s 'refs/tags/importer/applied/1-1', 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s ], 216s # reuse: 216s False, 216s 216s marks=pytest.mark.xfail(reason='LP: #1755247'), 216s ), 216s 216s # 3) No applied tags 216s # - Create applied tag 216s pytest.param( 216s # input_repo: 216s repo_builder.Repo( 216s commits=[Commit.from_spec(name='unapplied', has_patches=True)], 216s branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, 216s tags={'importer/import/1-1': Placeholder('unapplied')}, 216s ), 216s # validation_repo_delta: 216s { 216s 'add_commits': [ 216s Commit.from_spec( 216s name='applied', 216s patches_applied=True, 216s parents=[Placeholder('unapplied')], 216s ), 216s ], 216s 'update_tags': { 216s 'importer/applied/1-1': Placeholder('applied') 216s }, 216s 'update_branches': { 216s 'importer/applied/ubuntu/trusty': Placeholder('applied'), 216s }, 216s }, 216s # validation_repo_expected_treewise_refs: 216s [ 216s 'refs/heads/importer/ubuntu/trusty', 216s 'refs/heads/importer/applied/ubuntu/trusty', 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/applied/1-1' 216s ], 216s # reuse: 216s False, 216s ), 216s ] 216s ) 216s @patch('gitubuntu.importer.get_import_tag_msg') 216s @patch('gitubuntu.importer.get_import_commit_msg') 216s def test_import_applied_spi_tags( 216s get_import_commit_msg_mock, 216s get_import_tag_msg_mock, 216s repo, 216s input_repo, 216s validation_repo_delta, 216s validation_repo_expected_treewise_refs, 216s reuse, 216s ): 216s """Test that applied tags are correctly created, adjusted and/or reused 216s 216s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 216s that determines the commit message to use for a given import 216s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 216s that determines the tag message to use for a given import 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param repo_builder.Repo input_repo: input repository data 216s :param dict validation_repo_delta: how to transform the input repository 216s into a "validation repository", expressed as a dict to 216s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 216s input repository. The validation repository is then used for the 216s purposes of comparison against the output repository. 216s :param list(str) validation_repo_expected_treewise_refs: refs whose trees 216s must be identical between the validation repository and the output 216s repository 216s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 216s one supplied by the input repository (assumed to have a commit message 216s of "Test commit") and not one created by the importer in this run 216s (arranged by this test to have a different commit message) 216s 216s The input repository data is written into the output repository and then a 216s fake non-native source package publication of version 1-1 in the Trusty 216s release pocket is imported into it by calling import_applied_spi() 216s directly. reuse and validation_repo_expected_treewise_refs are then 216s asserted. 216s 216s This is similar to test_unapplied_spi_tags except that it calls 216s import_applied_spi() instead of import_unapplied_spi() and only treewise 216s ref comparisons are made. 216s """ 216s # Match the repo_builder objects 216s get_import_tag_msg_mock.return_value = 'Test tag' 216s # Importantly, the following commit message must not be the same as the 216s # commit messages used by the test input repository commits, so that we can 216s # later detect the difference between commits that were already there and 216s # new commits created by the importer for the purposes of asserting the 216s # reuse parameter correctly. 216s get_import_commit_msg_mock.return_value = b'Test commit (new)' 216s 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_tag_test.py:711: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpxlc2446h/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: applying a 216s dpkg-source: info: applying b 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: applying a 216s dpkg-source: info: applying b 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: applying a 216s dpkg-source: info: applying b 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s __ test_get_existing_import_tags[input_repo1-PatchState.UNAPPLIED-expected1] ___ 216s 216s repo = 216s patch_state = 216s input_repo = 216s expected = ['refs/tags/importer/import/1-1'] 216s 216s @pytest.mark.parametrize( 216s 'input_repo, patch_state, expected', [ 216s ( 216s repo_builder.Repo(), 216s PatchState.UNAPPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s tags={'importer/import/1-1': repo_builder.Commit()}, 216s ), 216s PatchState.UNAPPLIED, 216s ['refs/tags/importer/import/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit(name='import'), 216s repo_builder.Commit(name='reimport1'), 216s ], 216s tags={ 216s 'importer/import/1-1': repo_builder.Commit(), 216s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 216s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 216s }, 216s ), 216s PatchState.UNAPPLIED, 216s [ 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo(), 216s PatchState.APPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s tags={'importer/applied/1-1': repo_builder.Commit()}, 216s ), 216s PatchState.APPLIED, 216s ['refs/tags/importer/applied/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit(name='applied'), 216s repo_builder.Commit(name='reimport1'), 216s ], 216s tags={ 216s 'importer/applied/1-1': repo_builder.Commit(), 216s 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 216s 'importer/reimport/applied/1-1/1': repo_builder.Commit(), 216s }, 216s ), 216s PatchState.APPLIED, 216s [ 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s ], 216s ), 216s ], 216s ) 216s def test_get_existing_import_tags(repo, patch_state, input_repo, expected): 216s """Test that get_existing_import_tags is generally correct 216s 216s This is the general parameterised test for the common case uses of 216s target.get_existing_import_tags. 216s 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param PatchState patch_state: passed through to get_existing_import_tags 216s :param repo_builder.Repo input_repo: input repository data 216s :param list(str) expected: the names of the references that are expected to 216s be returned, in order. 216s """ 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:214: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpgik2nxim/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s __ test_get_existing_import_tags[input_repo2-PatchState.UNAPPLIED-expected2] ___ 216s 216s repo = 216s patch_state = 216s input_repo = 216s expected = ['refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1'] 216s 216s @pytest.mark.parametrize( 216s 'input_repo, patch_state, expected', [ 216s ( 216s repo_builder.Repo(), 216s PatchState.UNAPPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s tags={'importer/import/1-1': repo_builder.Commit()}, 216s ), 216s PatchState.UNAPPLIED, 216s ['refs/tags/importer/import/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit(name='import'), 216s repo_builder.Commit(name='reimport1'), 216s ], 216s tags={ 216s 'importer/import/1-1': repo_builder.Commit(), 216s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 216s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 216s }, 216s ), 216s PatchState.UNAPPLIED, 216s [ 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo(), 216s PatchState.APPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s tags={'importer/applied/1-1': repo_builder.Commit()}, 216s ), 216s PatchState.APPLIED, 216s ['refs/tags/importer/applied/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit(name='applied'), 216s repo_builder.Commit(name='reimport1'), 216s ], 216s tags={ 216s 'importer/applied/1-1': repo_builder.Commit(), 216s 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 216s 'importer/reimport/applied/1-1/1': repo_builder.Commit(), 216s }, 216s ), 216s PatchState.APPLIED, 216s [ 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s ], 216s ), 216s ], 216s ) 216s def test_get_existing_import_tags(repo, patch_state, input_repo, expected): 216s """Test that get_existing_import_tags is generally correct 216s 216s This is the general parameterised test for the common case uses of 216s target.get_existing_import_tags. 216s 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param PatchState patch_state: passed through to get_existing_import_tags 216s :param repo_builder.Repo input_repo: input repository data 216s :param list(str) expected: the names of the references that are expected to 216s be returned, in order. 216s """ 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:214: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmp5mvjldsi/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ___ test_get_existing_import_tags[input_repo4-PatchState.APPLIED-expected4] ____ 216s 216s repo = 216s patch_state = 216s input_repo = 216s expected = ['refs/tags/importer/applied/1-1'] 216s 216s @pytest.mark.parametrize( 216s 'input_repo, patch_state, expected', [ 216s ( 216s repo_builder.Repo(), 216s PatchState.UNAPPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s tags={'importer/import/1-1': repo_builder.Commit()}, 216s ), 216s PatchState.UNAPPLIED, 216s ['refs/tags/importer/import/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit(name='import'), 216s repo_builder.Commit(name='reimport1'), 216s ], 216s tags={ 216s 'importer/import/1-1': repo_builder.Commit(), 216s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 216s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 216s }, 216s ), 216s PatchState.UNAPPLIED, 216s [ 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo(), 216s PatchState.APPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s tags={'importer/applied/1-1': repo_builder.Commit()}, 216s ), 216s PatchState.APPLIED, 216s ['refs/tags/importer/applied/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit(name='applied'), 216s repo_builder.Commit(name='reimport1'), 216s ], 216s tags={ 216s 'importer/applied/1-1': repo_builder.Commit(), 216s 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 216s 'importer/reimport/applied/1-1/1': repo_builder.Commit(), 216s }, 216s ), 216s PatchState.APPLIED, 216s [ 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s ], 216s ), 216s ], 216s ) 216s def test_get_existing_import_tags(repo, patch_state, input_repo, expected): 216s """Test that get_existing_import_tags is generally correct 216s 216s This is the general parameterised test for the common case uses of 216s target.get_existing_import_tags. 216s 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param PatchState patch_state: passed through to get_existing_import_tags 216s :param repo_builder.Repo input_repo: input repository data 216s :param list(str) expected: the names of the references that are expected to 216s be returned, in order. 216s """ 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:214: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmp99xvfffe/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ___ test_get_existing_import_tags[input_repo5-PatchState.APPLIED-expected5] ____ 216s 216s repo = 216s patch_state = 216s input_repo = 216s expected = ['refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1'] 216s 216s @pytest.mark.parametrize( 216s 'input_repo, patch_state, expected', [ 216s ( 216s repo_builder.Repo(), 216s PatchState.UNAPPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s tags={'importer/import/1-1': repo_builder.Commit()}, 216s ), 216s PatchState.UNAPPLIED, 216s ['refs/tags/importer/import/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit(name='import'), 216s repo_builder.Commit(name='reimport1'), 216s ], 216s tags={ 216s 'importer/import/1-1': repo_builder.Commit(), 216s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 216s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 216s }, 216s ), 216s PatchState.UNAPPLIED, 216s [ 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo(), 216s PatchState.APPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s tags={'importer/applied/1-1': repo_builder.Commit()}, 216s ), 216s PatchState.APPLIED, 216s ['refs/tags/importer/applied/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit(name='applied'), 216s repo_builder.Commit(name='reimport1'), 216s ], 216s tags={ 216s 'importer/applied/1-1': repo_builder.Commit(), 216s 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 216s 'importer/reimport/applied/1-1/1': repo_builder.Commit(), 216s }, 216s ), 216s PatchState.APPLIED, 216s [ 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s ], 216s ), 216s ], 216s ) 216s def test_get_existing_import_tags(repo, patch_state, input_repo, expected): 216s """Test that get_existing_import_tags is generally correct 216s 216s This is the general parameterised test for the common case uses of 216s target.get_existing_import_tags. 216s 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param PatchState patch_state: passed through to get_existing_import_tags 216s :param repo_builder.Repo input_repo: input repository data 216s :param list(str) expected: the names of the references that are expected to 216s be returned, in order. 216s """ 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:214: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpw04qajfp/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ____________________ test_get_existing_import_tags_ordering ____________________ 216s 216s repo = 216s 216s def test_get_existing_import_tags_ordering(repo): 216s """Test that get_existing_import_tags returns results in the correct order 216s 216s To maintain hash stability, the spec defines that multiple changelog 216s parents must appear in the order that they were published. For this to 216s work, get_existing_import_tags must return the tags in the correct order 216s even if the underlying git repository tags appear in an arbitrary order. 216s 216s :param GitUbuntuRepository repo: fixture of a temporary repository to use 216s """ 216s 216s # Construct a synthetic git repository containing tags 216s repo_builder.Repo( 216s tags={ 216s 'importer/import/1-1': repo_builder.Commit(), 216s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 216s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 216s } 216s > ).write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:240: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmp_w89k8mm/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s _ test_create_import_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] _ 216s 216s repo = 216s input_repo = 216s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-1': }} 216s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1'] 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'validation_repo_delta', 216s 'validation_repo_expected_identical_refs', 216s ], 216s [ 216s ( 216s repo_builder.Repo(), 216s { 216s 'add_commits': [ 216s repo_builder.Commit(name='import'), 216s ], 216s 'update_tags': { 216s 'importer/import/1-1': Placeholder('import'), 216s }, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s { 216s 'add_commits': [ 216s repo_builder.Commit(name='reimport'), 216s ], 216s 'update_tags': { 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit(name='import'), 216s repo_builder.Commit(name='reimport1'), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport1'), 216s }, 216s ), 216s { 216s 'add_commits': [ 216s repo_builder.Commit(name='reimport2'), 216s ], 216s 'update_tags': { 216s 'importer/reimport/import/1-1/2': Placeholder('reimport2'), 216s }, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s 'refs/tags/importer/reimport/import/1-1/2', 216s ], 216s ), 216s ], 216s ) 216s def test_create_import_tag( 216s repo, 216s input_repo, 216s validation_repo_delta, 216s validation_repo_expected_identical_refs, 216s ): 216s """ 216s Unit test that create_import_tag creates the correct import tag 216s 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param repo_builder.Repo input_repo: input repository data 216s :param dict validation_repo_delta: how to transform the input repository 216s into a "validation repository", expressed as a dict to 216s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 216s input repository. The validation repository is then used for the 216s purposes of comparison against the output repository. 216s :param list(str) validation_repo_expected_identical_refs: refs that must be 216s identical between the validation repository and the output repository 216s """ 216s publish_commit = repo.raw_repo.get( 216s repo_builder.Commit().write(repo.raw_repo) 216s ).peel(pygit2.Commit) 216s input_repo.write(repo.raw_repo) 216s 216s > target.create_import_tag(repo, publish_commit, '1-1', 'importer') 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:370: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:1379: in create_import_tag 216s repo.create_tag( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s commit_hash = '240dd844a69653244edb52c57c42d709512d64cd' 216s tag_name = 'importer/import/1-1', tag_msg = 'git-ubuntu import' 216s tagger = pygit2.Signature('git-ubuntu importer', 'ubuntu-devel-discuss@lists.ubuntu.com', 0, 0, None) 216s 216s def create_tag(self, 216s commit_hash, 216s tag_name, 216s tag_msg, 216s tagger=None, 216s ): 216s """Create a tag in the repository 216s 216s :param str commit_hash: the commit hash the tag will point to. 216s :param str tag_name: the name of the tag to be created. 216s :param str tag_msg: the text of the tag annotation. 216s :param pygit2.Signature tagger: if supplied, use this signature in the 216s created tag's "tagger" metadata. If not supplied, an arbitrary name 216s and email address is used with the current time. 216s :returns: None 216s """ 216s if not tagger: 216s tagger_time, tagger_offset = datetime_to_signature_spec( 216s datetime.datetime.now(), 216s ) 216s tagger = pygit2.Signature( 216s gitubuntu.spec.SYNTHESIZED_COMMITTER_NAME, 216s gitubuntu.spec.SYNTHESIZED_COMMITTER_EMAIL, 216s tagger_time, 216s tagger_offset, 216s ) 216s 216s logging.debug("Creating tag %s pointing to %s", tag_name, commit_hash) 216s self.raw_repo.create_tag( 216s tag_name, 216s pygit2.Oid(hex=commit_hash), 216s > pygit2.GIT_OBJ_COMMIT, 216s tagger, 216s tag_msg, 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:2114: AttributeError 216s _ test_create_import_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] _ 216s 216s repo = 216s input_repo = 216s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/import/...t at 0x74623a5761e0>, 'importer/reimport/import/1-1/1': }} 216s 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'] 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'validation_repo_delta', 216s 'validation_repo_expected_identical_refs', 216s ], 216s [ 216s ( 216s repo_builder.Repo(), 216s { 216s 'add_commits': [ 216s repo_builder.Commit(name='import'), 216s ], 216s 'update_tags': { 216s 'importer/import/1-1': Placeholder('import'), 216s }, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s { 216s 'add_commits': [ 216s repo_builder.Commit(name='reimport'), 216s ], 216s 'update_tags': { 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit(name='import'), 216s repo_builder.Commit(name='reimport1'), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport1'), 216s }, 216s ), 216s { 216s 'add_commits': [ 216s repo_builder.Commit(name='reimport2'), 216s ], 216s 'update_tags': { 216s 'importer/reimport/import/1-1/2': Placeholder('reimport2'), 216s }, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s 'refs/tags/importer/reimport/import/1-1/2', 216s ], 216s ), 216s ], 216s ) 216s def test_create_import_tag( 216s repo, 216s input_repo, 216s validation_repo_delta, 216s validation_repo_expected_identical_refs, 216s ): 216s """ 216s Unit test that create_import_tag creates the correct import tag 216s 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param repo_builder.Repo input_repo: input repository data 216s :param dict validation_repo_delta: how to transform the input repository 216s into a "validation repository", expressed as a dict to 216s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 216s input repository. The validation repository is then used for the 216s purposes of comparison against the output repository. 216s :param list(str) validation_repo_expected_identical_refs: refs that must be 216s identical between the validation repository and the output repository 216s """ 216s publish_commit = repo.raw_repo.get( 216s repo_builder.Commit().write(repo.raw_repo) 216s ).peel(pygit2.Commit) 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:368: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpb3cf2fsg/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s _ test_create_import_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] _ 216s 216s repo = 216s input_repo = 216s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/import/1-1/2': }} 216s 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'] 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'validation_repo_delta', 216s 'validation_repo_expected_identical_refs', 216s ], 216s [ 216s ( 216s repo_builder.Repo(), 216s { 216s 'add_commits': [ 216s repo_builder.Commit(name='import'), 216s ], 216s 'update_tags': { 216s 'importer/import/1-1': Placeholder('import'), 216s }, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s { 216s 'add_commits': [ 216s repo_builder.Commit(name='reimport'), 216s ], 216s 'update_tags': { 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit(name='import'), 216s repo_builder.Commit(name='reimport1'), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport1'), 216s }, 216s ), 216s { 216s 'add_commits': [ 216s repo_builder.Commit(name='reimport2'), 216s ], 216s 'update_tags': { 216s 'importer/reimport/import/1-1/2': Placeholder('reimport2'), 216s }, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s 'refs/tags/importer/reimport/import/1-1/2', 216s ], 216s ), 216s ], 216s ) 216s def test_create_import_tag( 216s repo, 216s input_repo, 216s validation_repo_delta, 216s validation_repo_expected_identical_refs, 216s ): 216s """ 216s Unit test that create_import_tag creates the correct import tag 216s 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param repo_builder.Repo input_repo: input repository data 216s :param dict validation_repo_delta: how to transform the input repository 216s into a "validation repository", expressed as a dict to 216s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 216s input repository. The validation repository is then used for the 216s purposes of comparison against the output repository. 216s :param list(str) validation_repo_expected_identical_refs: refs that must be 216s identical between the validation repository and the output repository 216s """ 216s publish_commit = repo.raw_repo.get( 216s repo_builder.Commit().write(repo.raw_repo) 216s ).peel(pygit2.Commit) 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:368: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmp8sktc5by/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ____________ test_create_import_tag_hash_stability_on_first_import _____________ 216s 216s repo = 216s 216s def test_create_import_tag_hash_stability_on_first_import(repo): 216s """Created import tags should be hash stable on first import 216s 216s :param GitUbuntuRepository repo: fixture providing a temporary 216s GitUbuntuRepository instance to use 216s """ 216s publish_commit = repo.raw_repo.get( 216s repo_builder.Commit( 216s author=pygit2.Signature( 216s 'Hash stability test author', 216s 'newauthor@example.com', 216s 1, 216s 2, 216s ), 216s committer=pygit2.Signature( 216s 'Hash stability test committer', 216s 'newcommitter@example.com', 216s 3, 216s 4, 216s ), 216s ).write(repo.raw_repo) 216s ).peel(pygit2.Commit) 216s > target.create_import_tag(repo, publish_commit, '1-1', 'importer') 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:402: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:1379: in create_import_tag 216s repo.create_tag( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s commit_hash = '65729a1dca101328820bf4f49fbca4e9571a772a' 216s tag_name = 'importer/import/1-1', tag_msg = 'git-ubuntu import' 216s tagger = pygit2.Signature('git-ubuntu importer', 'ubuntu-devel-discuss@lists.ubuntu.com', 3, 4, None) 216s 216s def create_tag(self, 216s commit_hash, 216s tag_name, 216s tag_msg, 216s tagger=None, 216s ): 216s """Create a tag in the repository 216s 216s :param str commit_hash: the commit hash the tag will point to. 216s :param str tag_name: the name of the tag to be created. 216s :param str tag_msg: the text of the tag annotation. 216s :param pygit2.Signature tagger: if supplied, use this signature in the 216s created tag's "tagger" metadata. If not supplied, an arbitrary name 216s and email address is used with the current time. 216s :returns: None 216s """ 216s if not tagger: 216s tagger_time, tagger_offset = datetime_to_signature_spec( 216s datetime.datetime.now(), 216s ) 216s tagger = pygit2.Signature( 216s gitubuntu.spec.SYNTHESIZED_COMMITTER_NAME, 216s gitubuntu.spec.SYNTHESIZED_COMMITTER_EMAIL, 216s tagger_time, 216s tagger_offset, 216s ) 216s 216s logging.debug("Creating tag %s pointing to %s", tag_name, commit_hash) 216s self.raw_repo.create_tag( 216s tag_name, 216s pygit2.Oid(hex=commit_hash), 216s > pygit2.GIT_OBJ_COMMIT, 216s tagger, 216s tag_msg, 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:2114: AttributeError 216s ______________ test_create_import_tag_hash_stability_on_reimport _______________ 216s 216s repo = 216s 216s def test_create_import_tag_hash_stability_on_reimport(repo): 216s """Created import tags should be hash stable on reimport 216s 216s This includes both the /0 duplicate reimport tag of the original import tag 216s as well as the /1 reimport tag being created. 216s 216s :param GitUbuntuRepository repo: fixture providing a temporary 216s GitUbuntuRepository instance to use 216s """ 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit( 216s name='root', 216s author=pygit2.Signature( 216s 'Hash stability test author', 216s 'author@example.com', 216s 1, 216s 2, 216s ), 216s committer=pygit2.Signature( 216s 'Hash stability test committer', 216s 'committer@example.com', 216s 3, 216s 4, 216s ), 216s ), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('root'), 216s }, 216s tagger=pygit2.Signature( 216s 'Hash stability test name', 216s 'stability@example.com', 216s 5, 216s 6, 216s ), 216s > ).write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:449: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmp0mysfh_k/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s _ test_create_applied_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] _ 216s 216s repo = 216s input_repo = 216s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/applied/1-1': }} 216s validation_repo_expected_identical_refs = ['refs/tags/importer/applied/1-1'] 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'validation_repo_delta', 216s 'validation_repo_expected_identical_refs', 216s ], 216s [ 216s ( 216s repo_builder.Repo(), 216s { 216s 'add_commits': [repo_builder.Commit(name='import')], 216s 'update_tags': {'importer/applied/1-1': Placeholder('import')}, 216s }, 216s [ 216s 'refs/tags/importer/applied/1-1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit(name='import')], 216s tags={'importer/applied/1-1': Placeholder('import')}, 216s ), 216s { 216s 'add_commits': [repo_builder.Commit(name='reimport')], 216s 'update_tags': { 216s 'importer/reimport/applied/1-1/0': Placeholder('import'), 216s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 216s }, 216s }, 216s [ 216s 'refs/tags/importer/applied/1-1', 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit(name='import'), 216s repo_builder.Commit(name='reimport1'), 216s ], 216s tags={ 216s 'importer/applied/1-1': Placeholder('import'), 216s 'importer/reimport/applied/1-1/0': Placeholder('import'), 216s 'importer/reimport/applied/1-1/1': Placeholder('reimport1'), 216s }, 216s ), 216s { 216s 'add_commits': [ 216s repo_builder.Commit(name='reimport2') 216s ], 216s 'update_tags': { 216s 'importer/reimport/applied/1-1/2': Placeholder('reimport2'), 216s }, 216s }, 216s [ 216s 'refs/tags/importer/applied/1-1', 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s 'refs/tags/importer/reimport/applied/1-1/2', 216s ], 216s ), 216s ], 216s ) 216s def test_create_applied_tag( 216s repo, 216s input_repo, 216s validation_repo_delta, 216s validation_repo_expected_identical_refs, 216s ): 216s """ 216s Unit test that create_applied_tag creates the correct import tag 216s 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param repo_builder.Repo input_repo: input repository data 216s :param dict validation_repo_delta: how to transform the input repository 216s into a "validation repository", expressed as a dict to 216s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 216s input repository. The validation repository is then used for the 216s purposes of comparison against the output repository. 216s :param list(str) validation_repo_expected_identical_refs: refs that must be 216s identical between the validation repository and the output repository 216s """ 216s publish_commit_str = str( 216s repo.raw_repo.get( 216s repo_builder.Commit().write(repo.raw_repo) 216s ).peel(pygit2.Commit).id 216s ) 216s 216s input_repo.write(repo.raw_repo) 216s 216s > target.create_applied_tag(repo, publish_commit_str, '1-1', 'importer') 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:577: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:1309: in create_applied_tag 216s repo.create_tag( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s commit_hash = '240dd844a69653244edb52c57c42d709512d64cd' 216s tag_name = 'importer/applied/1-1', tag_msg = 'git-ubuntu import' 216s tagger = pygit2.Signature('git-ubuntu importer', 'ubuntu-devel-discuss@lists.ubuntu.com', 1732613801, 0, None) 216s 216s def create_tag(self, 216s commit_hash, 216s tag_name, 216s tag_msg, 216s tagger=None, 216s ): 216s """Create a tag in the repository 216s 216s :param str commit_hash: the commit hash the tag will point to. 216s :param str tag_name: the name of the tag to be created. 216s :param str tag_msg: the text of the tag annotation. 216s :param pygit2.Signature tagger: if supplied, use this signature in the 216s created tag's "tagger" metadata. If not supplied, an arbitrary name 216s and email address is used with the current time. 216s :returns: None 216s """ 216s if not tagger: 216s tagger_time, tagger_offset = datetime_to_signature_spec( 216s datetime.datetime.now(), 216s ) 216s tagger = pygit2.Signature( 216s gitubuntu.spec.SYNTHESIZED_COMMITTER_NAME, 216s gitubuntu.spec.SYNTHESIZED_COMMITTER_EMAIL, 216s tagger_time, 216s tagger_offset, 216s ) 216s 216s logging.debug("Creating tag %s pointing to %s", tag_name, commit_hash) 216s self.raw_repo.create_tag( 216s tag_name, 216s pygit2.Oid(hex=commit_hash), 216s > pygit2.GIT_OBJ_COMMIT, 216s tagger, 216s tag_msg, 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:2114: AttributeError 216s _ test_create_applied_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] _ 216s 216s repo = 216s input_repo = 216s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/applied... at 0x74623a574cb0>, 'importer/reimport/applied/1-1/1': }} 216s 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'] 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'validation_repo_delta', 216s 'validation_repo_expected_identical_refs', 216s ], 216s [ 216s ( 216s repo_builder.Repo(), 216s { 216s 'add_commits': [repo_builder.Commit(name='import')], 216s 'update_tags': {'importer/applied/1-1': Placeholder('import')}, 216s }, 216s [ 216s 'refs/tags/importer/applied/1-1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit(name='import')], 216s tags={'importer/applied/1-1': Placeholder('import')}, 216s ), 216s { 216s 'add_commits': [repo_builder.Commit(name='reimport')], 216s 'update_tags': { 216s 'importer/reimport/applied/1-1/0': Placeholder('import'), 216s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 216s }, 216s }, 216s [ 216s 'refs/tags/importer/applied/1-1', 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit(name='import'), 216s repo_builder.Commit(name='reimport1'), 216s ], 216s tags={ 216s 'importer/applied/1-1': Placeholder('import'), 216s 'importer/reimport/applied/1-1/0': Placeholder('import'), 216s 'importer/reimport/applied/1-1/1': Placeholder('reimport1'), 216s }, 216s ), 216s { 216s 'add_commits': [ 216s repo_builder.Commit(name='reimport2') 216s ], 216s 'update_tags': { 216s 'importer/reimport/applied/1-1/2': Placeholder('reimport2'), 216s }, 216s }, 216s [ 216s 'refs/tags/importer/applied/1-1', 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s 'refs/tags/importer/reimport/applied/1-1/2', 216s ], 216s ), 216s ], 216s ) 216s def test_create_applied_tag( 216s repo, 216s input_repo, 216s validation_repo_delta, 216s validation_repo_expected_identical_refs, 216s ): 216s """ 216s Unit test that create_applied_tag creates the correct import tag 216s 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param repo_builder.Repo input_repo: input repository data 216s :param dict validation_repo_delta: how to transform the input repository 216s into a "validation repository", expressed as a dict to 216s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 216s input repository. The validation repository is then used for the 216s purposes of comparison against the output repository. 216s :param list(str) validation_repo_expected_identical_refs: refs that must be 216s identical between the validation repository and the output repository 216s """ 216s publish_commit_str = str( 216s repo.raw_repo.get( 216s repo_builder.Commit().write(repo.raw_repo) 216s ).peel(pygit2.Commit).id 216s ) 216s 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:575: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmp6y0kmvod/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s _ test_create_applied_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] _ 216s 216s repo = 216s input_repo = 216s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/applied/1-1/2': }} 216s 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'] 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'validation_repo_delta', 216s 'validation_repo_expected_identical_refs', 216s ], 216s [ 216s ( 216s repo_builder.Repo(), 216s { 216s 'add_commits': [repo_builder.Commit(name='import')], 216s 'update_tags': {'importer/applied/1-1': Placeholder('import')}, 216s }, 216s [ 216s 'refs/tags/importer/applied/1-1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit(name='import')], 216s tags={'importer/applied/1-1': Placeholder('import')}, 216s ), 216s { 216s 'add_commits': [repo_builder.Commit(name='reimport')], 216s 'update_tags': { 216s 'importer/reimport/applied/1-1/0': Placeholder('import'), 216s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 216s }, 216s }, 216s [ 216s 'refs/tags/importer/applied/1-1', 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit(name='import'), 216s repo_builder.Commit(name='reimport1'), 216s ], 216s tags={ 216s 'importer/applied/1-1': Placeholder('import'), 216s 'importer/reimport/applied/1-1/0': Placeholder('import'), 216s 'importer/reimport/applied/1-1/1': Placeholder('reimport1'), 216s }, 216s ), 216s { 216s 'add_commits': [ 216s repo_builder.Commit(name='reimport2') 216s ], 216s 'update_tags': { 216s 'importer/reimport/applied/1-1/2': Placeholder('reimport2'), 216s }, 216s }, 216s [ 216s 'refs/tags/importer/applied/1-1', 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s 'refs/tags/importer/reimport/applied/1-1/2', 216s ], 216s ), 216s ], 216s ) 216s def test_create_applied_tag( 216s repo, 216s input_repo, 216s validation_repo_delta, 216s validation_repo_expected_identical_refs, 216s ): 216s """ 216s Unit test that create_applied_tag creates the correct import tag 216s 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param repo_builder.Repo input_repo: input repository data 216s :param dict validation_repo_delta: how to transform the input repository 216s into a "validation repository", expressed as a dict to 216s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 216s input repository. The validation repository is then used for the 216s purposes of comparison against the output repository. 216s :param list(str) validation_repo_expected_identical_refs: refs that must be 216s identical between the validation repository and the output repository 216s """ 216s publish_commit_str = str( 216s repo.raw_repo.get( 216s repo_builder.Commit().write(repo.raw_repo) 216s ).peel(pygit2.Commit).id 216s ) 216s 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:575: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmprm6a9457/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s _ test_get_changelog_parent_commits[input_repo1-parent_overrides1-changelog_versions1-PatchState.UNAPPLIED-expected_refs1] _ 216s 216s repo = 216s input_repo = 216s parent_overrides = {}, changelog_versions = ['1-2', '1-1'] 216s patch_state = 216s expected_refs = ['refs/tags/importer/import/1-1'] 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'parent_overrides', 216s 'changelog_versions', 216s 'patch_state', 216s 'expected_refs', 216s ], 216s [ 216s ( 216s repo_builder.Repo(), 216s {}, 216s ['1-2', '1-1',], 216s PatchState.UNAPPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s ['refs/tags/importer/import/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec(name='reimport', mutate=1), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s [ 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s {}, 216s ['1-3', '1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s ['refs/tags/importer/import/1-1'], 216s ), 216s ( 216s repo_builder.Repo(), 216s {}, 216s ['1-2', '1-1',], 216s PatchState.APPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='applied')], 216s tags={'importer/applied/1-1': Placeholder('applied')}, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.APPLIED, 216s ['refs/tags/importer/applied/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec(name='reimport', mutate=1), 216s ], 216s tags={ 216s 'importer/applied/1-1': Placeholder('import'), 216s 'importer/reimport/applied/1-1/0': Placeholder('import'), 216s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.APPLIED, 216s [ 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='applied')], 216s tags={'importer/applied/1-1': Placeholder('applied')}, 216s ), 216s {}, 216s ['1-3', '1-2', '1-1'], 216s PatchState.APPLIED, 216s ['refs/tags/importer/applied/1-1'], 216s ), 216s ], 216s ) 216s def test_get_changelog_parent_commits( 216s repo, 216s input_repo, 216s parent_overrides, 216s changelog_versions, 216s patch_state, 216s expected_refs, 216s ): 216s """Test that get_changelog_parent_commits is generally correct 216s 216s This is the general parameterised test for the common case uses of 216s target.get_changelog_parent_commits. 216s 216s :param GitUbuntuRepository repo: fixture providing a temporary 216s GitUbuntuRepository instance to use 216s :param repo_builder.Repo input_repo: the input repository data to use that 216s will be populated into @repo before @repo is passed through to 216s get_changelog_parent_commits 216s :param dict parent_overrides: passed through to 216s get_changelog_parent_commits. 216s :param PatchState patch_state: passed through to 216s get_changelog_parent_commits 216s :param list(str) expected_refs: the expected return value of 216s get_changelog_parent_commits expressed using a list of reference names. 216s Since get_changelog_parent_commits returns a list of commit hash 216s strings, the reference names will need to be dereferenced before 216s comparison; this way the test parameters don't need to be opaque hash 216s strings. 216s """ 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:721: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpoegzr3h4/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_get_changelog_parent_commits[input_repo2-parent_overrides2-changelog_versions2-PatchState.UNAPPLIED-expected_refs2] _ 216s 216s repo = 216s input_repo = 216s parent_overrides = {}, changelog_versions = ['1-2', '1-1'] 216s patch_state = 216s expected_refs = ['refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1'] 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'parent_overrides', 216s 'changelog_versions', 216s 'patch_state', 216s 'expected_refs', 216s ], 216s [ 216s ( 216s repo_builder.Repo(), 216s {}, 216s ['1-2', '1-1',], 216s PatchState.UNAPPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s ['refs/tags/importer/import/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec(name='reimport', mutate=1), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s [ 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s {}, 216s ['1-3', '1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s ['refs/tags/importer/import/1-1'], 216s ), 216s ( 216s repo_builder.Repo(), 216s {}, 216s ['1-2', '1-1',], 216s PatchState.APPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='applied')], 216s tags={'importer/applied/1-1': Placeholder('applied')}, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.APPLIED, 216s ['refs/tags/importer/applied/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec(name='reimport', mutate=1), 216s ], 216s tags={ 216s 'importer/applied/1-1': Placeholder('import'), 216s 'importer/reimport/applied/1-1/0': Placeholder('import'), 216s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.APPLIED, 216s [ 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='applied')], 216s tags={'importer/applied/1-1': Placeholder('applied')}, 216s ), 216s {}, 216s ['1-3', '1-2', '1-1'], 216s PatchState.APPLIED, 216s ['refs/tags/importer/applied/1-1'], 216s ), 216s ], 216s ) 216s def test_get_changelog_parent_commits( 216s repo, 216s input_repo, 216s parent_overrides, 216s changelog_versions, 216s patch_state, 216s expected_refs, 216s ): 216s """Test that get_changelog_parent_commits is generally correct 216s 216s This is the general parameterised test for the common case uses of 216s target.get_changelog_parent_commits. 216s 216s :param GitUbuntuRepository repo: fixture providing a temporary 216s GitUbuntuRepository instance to use 216s :param repo_builder.Repo input_repo: the input repository data to use that 216s will be populated into @repo before @repo is passed through to 216s get_changelog_parent_commits 216s :param dict parent_overrides: passed through to 216s get_changelog_parent_commits. 216s :param PatchState patch_state: passed through to 216s get_changelog_parent_commits 216s :param list(str) expected_refs: the expected return value of 216s get_changelog_parent_commits expressed using a list of reference names. 216s Since get_changelog_parent_commits returns a list of commit hash 216s strings, the reference names will need to be dereferenced before 216s comparison; this way the test parameters don't need to be opaque hash 216s strings. 216s """ 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:721: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpxz_cr06j/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_get_changelog_parent_commits[input_repo3-parent_overrides3-changelog_versions3-PatchState.UNAPPLIED-expected_refs3] _ 216s 216s repo = 216s input_repo = 216s parent_overrides = {}, changelog_versions = ['1-3', '1-2', '1-1'] 216s patch_state = 216s expected_refs = ['refs/tags/importer/import/1-1'] 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'parent_overrides', 216s 'changelog_versions', 216s 'patch_state', 216s 'expected_refs', 216s ], 216s [ 216s ( 216s repo_builder.Repo(), 216s {}, 216s ['1-2', '1-1',], 216s PatchState.UNAPPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s ['refs/tags/importer/import/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec(name='reimport', mutate=1), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s [ 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s {}, 216s ['1-3', '1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s ['refs/tags/importer/import/1-1'], 216s ), 216s ( 216s repo_builder.Repo(), 216s {}, 216s ['1-2', '1-1',], 216s PatchState.APPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='applied')], 216s tags={'importer/applied/1-1': Placeholder('applied')}, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.APPLIED, 216s ['refs/tags/importer/applied/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec(name='reimport', mutate=1), 216s ], 216s tags={ 216s 'importer/applied/1-1': Placeholder('import'), 216s 'importer/reimport/applied/1-1/0': Placeholder('import'), 216s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.APPLIED, 216s [ 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='applied')], 216s tags={'importer/applied/1-1': Placeholder('applied')}, 216s ), 216s {}, 216s ['1-3', '1-2', '1-1'], 216s PatchState.APPLIED, 216s ['refs/tags/importer/applied/1-1'], 216s ), 216s ], 216s ) 216s def test_get_changelog_parent_commits( 216s repo, 216s input_repo, 216s parent_overrides, 216s changelog_versions, 216s patch_state, 216s expected_refs, 216s ): 216s """Test that get_changelog_parent_commits is generally correct 216s 216s This is the general parameterised test for the common case uses of 216s target.get_changelog_parent_commits. 216s 216s :param GitUbuntuRepository repo: fixture providing a temporary 216s GitUbuntuRepository instance to use 216s :param repo_builder.Repo input_repo: the input repository data to use that 216s will be populated into @repo before @repo is passed through to 216s get_changelog_parent_commits 216s :param dict parent_overrides: passed through to 216s get_changelog_parent_commits. 216s :param PatchState patch_state: passed through to 216s get_changelog_parent_commits 216s :param list(str) expected_refs: the expected return value of 216s get_changelog_parent_commits expressed using a list of reference names. 216s Since get_changelog_parent_commits returns a list of commit hash 216s strings, the reference names will need to be dereferenced before 216s comparison; this way the test parameters don't need to be opaque hash 216s strings. 216s """ 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:721: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpnb58dg3o/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_get_changelog_parent_commits[input_repo5-parent_overrides5-changelog_versions5-PatchState.APPLIED-expected_refs5] _ 216s 216s repo = 216s input_repo = 216s parent_overrides = {}, changelog_versions = ['1-2', '1-1'] 216s patch_state = 216s expected_refs = ['refs/tags/importer/applied/1-1'] 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'parent_overrides', 216s 'changelog_versions', 216s 'patch_state', 216s 'expected_refs', 216s ], 216s [ 216s ( 216s repo_builder.Repo(), 216s {}, 216s ['1-2', '1-1',], 216s PatchState.UNAPPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s ['refs/tags/importer/import/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec(name='reimport', mutate=1), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s [ 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s {}, 216s ['1-3', '1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s ['refs/tags/importer/import/1-1'], 216s ), 216s ( 216s repo_builder.Repo(), 216s {}, 216s ['1-2', '1-1',], 216s PatchState.APPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='applied')], 216s tags={'importer/applied/1-1': Placeholder('applied')}, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.APPLIED, 216s ['refs/tags/importer/applied/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec(name='reimport', mutate=1), 216s ], 216s tags={ 216s 'importer/applied/1-1': Placeholder('import'), 216s 'importer/reimport/applied/1-1/0': Placeholder('import'), 216s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.APPLIED, 216s [ 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='applied')], 216s tags={'importer/applied/1-1': Placeholder('applied')}, 216s ), 216s {}, 216s ['1-3', '1-2', '1-1'], 216s PatchState.APPLIED, 216s ['refs/tags/importer/applied/1-1'], 216s ), 216s ], 216s ) 216s def test_get_changelog_parent_commits( 216s repo, 216s input_repo, 216s parent_overrides, 216s changelog_versions, 216s patch_state, 216s expected_refs, 216s ): 216s """Test that get_changelog_parent_commits is generally correct 216s 216s This is the general parameterised test for the common case uses of 216s target.get_changelog_parent_commits. 216s 216s :param GitUbuntuRepository repo: fixture providing a temporary 216s GitUbuntuRepository instance to use 216s :param repo_builder.Repo input_repo: the input repository data to use that 216s will be populated into @repo before @repo is passed through to 216s get_changelog_parent_commits 216s :param dict parent_overrides: passed through to 216s get_changelog_parent_commits. 216s :param PatchState patch_state: passed through to 216s get_changelog_parent_commits 216s :param list(str) expected_refs: the expected return value of 216s get_changelog_parent_commits expressed using a list of reference names. 216s Since get_changelog_parent_commits returns a list of commit hash 216s strings, the reference names will need to be dereferenced before 216s comparison; this way the test parameters don't need to be opaque hash 216s strings. 216s """ 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:721: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpb_9qie19/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_get_changelog_parent_commits[input_repo6-parent_overrides6-changelog_versions6-PatchState.APPLIED-expected_refs6] _ 216s 216s repo = 216s input_repo = 216s parent_overrides = {}, changelog_versions = ['1-2', '1-1'] 216s patch_state = 216s expected_refs = ['refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1'] 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'parent_overrides', 216s 'changelog_versions', 216s 'patch_state', 216s 'expected_refs', 216s ], 216s [ 216s ( 216s repo_builder.Repo(), 216s {}, 216s ['1-2', '1-1',], 216s PatchState.UNAPPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s ['refs/tags/importer/import/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec(name='reimport', mutate=1), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s [ 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s {}, 216s ['1-3', '1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s ['refs/tags/importer/import/1-1'], 216s ), 216s ( 216s repo_builder.Repo(), 216s {}, 216s ['1-2', '1-1',], 216s PatchState.APPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='applied')], 216s tags={'importer/applied/1-1': Placeholder('applied')}, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.APPLIED, 216s ['refs/tags/importer/applied/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec(name='reimport', mutate=1), 216s ], 216s tags={ 216s 'importer/applied/1-1': Placeholder('import'), 216s 'importer/reimport/applied/1-1/0': Placeholder('import'), 216s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.APPLIED, 216s [ 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='applied')], 216s tags={'importer/applied/1-1': Placeholder('applied')}, 216s ), 216s {}, 216s ['1-3', '1-2', '1-1'], 216s PatchState.APPLIED, 216s ['refs/tags/importer/applied/1-1'], 216s ), 216s ], 216s ) 216s def test_get_changelog_parent_commits( 216s repo, 216s input_repo, 216s parent_overrides, 216s changelog_versions, 216s patch_state, 216s expected_refs, 216s ): 216s """Test that get_changelog_parent_commits is generally correct 216s 216s This is the general parameterised test for the common case uses of 216s target.get_changelog_parent_commits. 216s 216s :param GitUbuntuRepository repo: fixture providing a temporary 216s GitUbuntuRepository instance to use 216s :param repo_builder.Repo input_repo: the input repository data to use that 216s will be populated into @repo before @repo is passed through to 216s get_changelog_parent_commits 216s :param dict parent_overrides: passed through to 216s get_changelog_parent_commits. 216s :param PatchState patch_state: passed through to 216s get_changelog_parent_commits 216s :param list(str) expected_refs: the expected return value of 216s get_changelog_parent_commits expressed using a list of reference names. 216s Since get_changelog_parent_commits returns a list of commit hash 216s strings, the reference names will need to be dereferenced before 216s comparison; this way the test parameters don't need to be opaque hash 216s strings. 216s """ 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:721: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpzrqzmjgq/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_get_changelog_parent_commits[input_repo7-parent_overrides7-changelog_versions7-PatchState.APPLIED-expected_refs7] _ 216s 216s repo = 216s input_repo = 216s parent_overrides = {}, changelog_versions = ['1-3', '1-2', '1-1'] 216s patch_state = 216s expected_refs = ['refs/tags/importer/applied/1-1'] 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'parent_overrides', 216s 'changelog_versions', 216s 'patch_state', 216s 'expected_refs', 216s ], 216s [ 216s ( 216s repo_builder.Repo(), 216s {}, 216s ['1-2', '1-1',], 216s PatchState.UNAPPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s ['refs/tags/importer/import/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec(name='reimport', mutate=1), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s [ 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s {}, 216s ['1-3', '1-2', '1-1'], 216s PatchState.UNAPPLIED, 216s ['refs/tags/importer/import/1-1'], 216s ), 216s ( 216s repo_builder.Repo(), 216s {}, 216s ['1-2', '1-1',], 216s PatchState.APPLIED, 216s [], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='applied')], 216s tags={'importer/applied/1-1': Placeholder('applied')}, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.APPLIED, 216s ['refs/tags/importer/applied/1-1'], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec(name='reimport', mutate=1), 216s ], 216s tags={ 216s 'importer/applied/1-1': Placeholder('import'), 216s 'importer/reimport/applied/1-1/0': Placeholder('import'), 216s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s {}, 216s ['1-2', '1-1'], 216s PatchState.APPLIED, 216s [ 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='applied')], 216s tags={'importer/applied/1-1': Placeholder('applied')}, 216s ), 216s {}, 216s ['1-3', '1-2', '1-1'], 216s PatchState.APPLIED, 216s ['refs/tags/importer/applied/1-1'], 216s ), 216s ], 216s ) 216s def test_get_changelog_parent_commits( 216s repo, 216s input_repo, 216s parent_overrides, 216s changelog_versions, 216s patch_state, 216s expected_refs, 216s ): 216s """Test that get_changelog_parent_commits is generally correct 216s 216s This is the general parameterised test for the common case uses of 216s target.get_changelog_parent_commits. 216s 216s :param GitUbuntuRepository repo: fixture providing a temporary 216s GitUbuntuRepository instance to use 216s :param repo_builder.Repo input_repo: the input repository data to use that 216s will be populated into @repo before @repo is passed through to 216s get_changelog_parent_commits 216s :param dict parent_overrides: passed through to 216s get_changelog_parent_commits. 216s :param PatchState patch_state: passed through to 216s get_changelog_parent_commits 216s :param list(str) expected_refs: the expected return value of 216s get_changelog_parent_commits expressed using a list of reference names. 216s Since get_changelog_parent_commits returns a list of commit hash 216s strings, the reference names will need to be dereferenced before 216s comparison; this way the test parameters don't need to be opaque hash 216s strings. 216s """ 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:721: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpmp74jvej/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s _________ test_validate_rich_history[input_repo0-published_spec0-True] _________ 216s 216s repo = 216s input_repo = 216s published_spec = {'changelog_versions': ['1-2', '1-1']}, expected_result = True 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'published_spec', 216s 'expected_result', 216s ], 216s [ 216s ( 216s # Common case: upload tag has a changelog parent as an ancestor 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec( 216s name='upload', 216s changelog_versions=['1-2', '1-1'], 216s parents=[Placeholder('import')], 216s ), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-2': Placeholder('upload'), 216s }, 216s ), 216s {'changelog_versions': ['1-2', '1-1']}, 216s True, 216s ), 216s ( 216s # Upload tag is the first one, with no parents present 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec( 216s name='upload', 216s version='1-2', 216s ), 216s ], 216s tags={ 216s 'importer/upload/1-2': Placeholder('upload'), 216s }, 216s ), 216s {'changelog_versions': ['1-2']}, 216s True, 216s ), 216s ( 216s # Upload tag mismatches published tree but is otherwise correct 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec( 216s name='upload', 216s changelog_versions=['1-2', '1-1'], 216s parents=[Placeholder('import')], 216s mutate=True, 216s ), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-2': Placeholder('upload'), 216s }, 216s ), 216s {'changelog_versions': ['1-2', '1-1']}, 216s target.RichHistoryTreeMismatch, 216s ), 216s ( 216s # Upload tag doesn't have a changelog parent as an ancestor but is 216s # otherwise correct 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec( 216s name='upload', 216s changelog_versions=['1-2', '1-1'], 216s ), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-2': Placeholder('upload'), 216s }, 216s ), 216s {'changelog_versions': ['1-2', '1-1']}, 216s target.RichHistoryHasNoChangelogParentAncestor, 216s ), 216s ], 216s ) 216s def test_validate_rich_history( 216s repo, 216s input_repo, 216s published_spec, 216s expected_result, 216s ): 216s """ 216s General test for validate_rich_history(). 216s 216s This unit tests validate_rich_history() for various parameterized cases. 216s Given an input repository and the specification of a Launchpad publication 216s of a source package, we check that validate_rich_history() correctly 216s accepts or rejects the rich history corresponding to the upload tag named 216s 'importer/upload/1-2'. It is assumed that the package being imported is 216s always of version '1-2' for all parameter sets. 216s 216s Since the target function requires rich history, the case of there not 216s being rich history does not need to be tested here, as it wouldn't be 216s called in this case. 216s 216s validate_rich_history() is generic for all sourced rich history, not just 216s rich history sourced from an upload tag. But since it is independent of how 216s the rich history commit arrived, it is easiest to use upload tags to test 216s it; this results in coverage for all sources. 216s 216s :param GitUbuntuRepository repo: fixture providing a temporary 216s GitUbuntuRepository instance to use 216s :param repo_builder.Repo input_repo: input repository data 216s :param dict published_spec: the package simulated being imported from the 216s archive, specified as a dict to pass as **kwargs to 216s repo_builder.Commit.from_spec() 216s :param bool expected_result: the expected return value of, or exception 216s raised by, the call to validate_rich_history() 216s """ 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:910: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmp1fybag2f/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s _________ test_validate_rich_history[input_repo1-published_spec1-True] _________ 216s 216s repo = 216s input_repo = 216s published_spec = {'changelog_versions': ['1-2']}, expected_result = True 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'published_spec', 216s 'expected_result', 216s ], 216s [ 216s ( 216s # Common case: upload tag has a changelog parent as an ancestor 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec( 216s name='upload', 216s changelog_versions=['1-2', '1-1'], 216s parents=[Placeholder('import')], 216s ), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-2': Placeholder('upload'), 216s }, 216s ), 216s {'changelog_versions': ['1-2', '1-1']}, 216s True, 216s ), 216s ( 216s # Upload tag is the first one, with no parents present 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec( 216s name='upload', 216s version='1-2', 216s ), 216s ], 216s tags={ 216s 'importer/upload/1-2': Placeholder('upload'), 216s }, 216s ), 216s {'changelog_versions': ['1-2']}, 216s True, 216s ), 216s ( 216s # Upload tag mismatches published tree but is otherwise correct 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec( 216s name='upload', 216s changelog_versions=['1-2', '1-1'], 216s parents=[Placeholder('import')], 216s mutate=True, 216s ), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-2': Placeholder('upload'), 216s }, 216s ), 216s {'changelog_versions': ['1-2', '1-1']}, 216s target.RichHistoryTreeMismatch, 216s ), 216s ( 216s # Upload tag doesn't have a changelog parent as an ancestor but is 216s # otherwise correct 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec( 216s name='upload', 216s changelog_versions=['1-2', '1-1'], 216s ), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-2': Placeholder('upload'), 216s }, 216s ), 216s {'changelog_versions': ['1-2', '1-1']}, 216s target.RichHistoryHasNoChangelogParentAncestor, 216s ), 216s ], 216s ) 216s def test_validate_rich_history( 216s repo, 216s input_repo, 216s published_spec, 216s expected_result, 216s ): 216s """ 216s General test for validate_rich_history(). 216s 216s This unit tests validate_rich_history() for various parameterized cases. 216s Given an input repository and the specification of a Launchpad publication 216s of a source package, we check that validate_rich_history() correctly 216s accepts or rejects the rich history corresponding to the upload tag named 216s 'importer/upload/1-2'. It is assumed that the package being imported is 216s always of version '1-2' for all parameter sets. 216s 216s Since the target function requires rich history, the case of there not 216s being rich history does not need to be tested here, as it wouldn't be 216s called in this case. 216s 216s validate_rich_history() is generic for all sourced rich history, not just 216s rich history sourced from an upload tag. But since it is independent of how 216s the rich history commit arrived, it is easiest to use upload tags to test 216s it; this results in coverage for all sources. 216s 216s :param GitUbuntuRepository repo: fixture providing a temporary 216s GitUbuntuRepository instance to use 216s :param repo_builder.Repo input_repo: input repository data 216s :param dict published_spec: the package simulated being imported from the 216s archive, specified as a dict to pass as **kwargs to 216s repo_builder.Commit.from_spec() 216s :param bool expected_result: the expected return value of, or exception 216s raised by, the call to validate_rich_history() 216s """ 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:910: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmp7gpvk87f/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_validate_rich_history[input_repo2-published_spec2-RichHistoryTreeMismatch] _ 216s 216s repo = 216s input_repo = 216s published_spec = {'changelog_versions': ['1-2', '1-1']} 216s expected_result = 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'published_spec', 216s 'expected_result', 216s ], 216s [ 216s ( 216s # Common case: upload tag has a changelog parent as an ancestor 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec( 216s name='upload', 216s changelog_versions=['1-2', '1-1'], 216s parents=[Placeholder('import')], 216s ), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-2': Placeholder('upload'), 216s }, 216s ), 216s {'changelog_versions': ['1-2', '1-1']}, 216s True, 216s ), 216s ( 216s # Upload tag is the first one, with no parents present 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec( 216s name='upload', 216s version='1-2', 216s ), 216s ], 216s tags={ 216s 'importer/upload/1-2': Placeholder('upload'), 216s }, 216s ), 216s {'changelog_versions': ['1-2']}, 216s True, 216s ), 216s ( 216s # Upload tag mismatches published tree but is otherwise correct 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec( 216s name='upload', 216s changelog_versions=['1-2', '1-1'], 216s parents=[Placeholder('import')], 216s mutate=True, 216s ), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-2': Placeholder('upload'), 216s }, 216s ), 216s {'changelog_versions': ['1-2', '1-1']}, 216s target.RichHistoryTreeMismatch, 216s ), 216s ( 216s # Upload tag doesn't have a changelog parent as an ancestor but is 216s # otherwise correct 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec( 216s name='upload', 216s changelog_versions=['1-2', '1-1'], 216s ), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-2': Placeholder('upload'), 216s }, 216s ), 216s {'changelog_versions': ['1-2', '1-1']}, 216s target.RichHistoryHasNoChangelogParentAncestor, 216s ), 216s ], 216s ) 216s def test_validate_rich_history( 216s repo, 216s input_repo, 216s published_spec, 216s expected_result, 216s ): 216s """ 216s General test for validate_rich_history(). 216s 216s This unit tests validate_rich_history() for various parameterized cases. 216s Given an input repository and the specification of a Launchpad publication 216s of a source package, we check that validate_rich_history() correctly 216s accepts or rejects the rich history corresponding to the upload tag named 216s 'importer/upload/1-2'. It is assumed that the package being imported is 216s always of version '1-2' for all parameter sets. 216s 216s Since the target function requires rich history, the case of there not 216s being rich history does not need to be tested here, as it wouldn't be 216s called in this case. 216s 216s validate_rich_history() is generic for all sourced rich history, not just 216s rich history sourced from an upload tag. But since it is independent of how 216s the rich history commit arrived, it is easiest to use upload tags to test 216s it; this results in coverage for all sources. 216s 216s :param GitUbuntuRepository repo: fixture providing a temporary 216s GitUbuntuRepository instance to use 216s :param repo_builder.Repo input_repo: input repository data 216s :param dict published_spec: the package simulated being imported from the 216s archive, specified as a dict to pass as **kwargs to 216s repo_builder.Commit.from_spec() 216s :param bool expected_result: the expected return value of, or exception 216s raised by, the call to validate_rich_history() 216s """ 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:910: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpz5rdqrjb/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_validate_rich_history[input_repo3-published_spec3-RichHistoryHasNoChangelogParentAncestor] _ 216s 216s repo = 216s input_repo = 216s published_spec = {'changelog_versions': ['1-2', '1-1']} 216s expected_result = 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'published_spec', 216s 'expected_result', 216s ], 216s [ 216s ( 216s # Common case: upload tag has a changelog parent as an ancestor 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec( 216s name='upload', 216s changelog_versions=['1-2', '1-1'], 216s parents=[Placeholder('import')], 216s ), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-2': Placeholder('upload'), 216s }, 216s ), 216s {'changelog_versions': ['1-2', '1-1']}, 216s True, 216s ), 216s ( 216s # Upload tag is the first one, with no parents present 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec( 216s name='upload', 216s version='1-2', 216s ), 216s ], 216s tags={ 216s 'importer/upload/1-2': Placeholder('upload'), 216s }, 216s ), 216s {'changelog_versions': ['1-2']}, 216s True, 216s ), 216s ( 216s # Upload tag mismatches published tree but is otherwise correct 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec( 216s name='upload', 216s changelog_versions=['1-2', '1-1'], 216s parents=[Placeholder('import')], 216s mutate=True, 216s ), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-2': Placeholder('upload'), 216s }, 216s ), 216s {'changelog_versions': ['1-2', '1-1']}, 216s target.RichHistoryTreeMismatch, 216s ), 216s ( 216s # Upload tag doesn't have a changelog parent as an ancestor but is 216s # otherwise correct 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec( 216s name='upload', 216s changelog_versions=['1-2', '1-1'], 216s ), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/upload/1-2': Placeholder('upload'), 216s }, 216s ), 216s {'changelog_versions': ['1-2', '1-1']}, 216s target.RichHistoryHasNoChangelogParentAncestor, 216s ), 216s ], 216s ) 216s def test_validate_rich_history( 216s repo, 216s input_repo, 216s published_spec, 216s expected_result, 216s ): 216s """ 216s General test for validate_rich_history(). 216s 216s This unit tests validate_rich_history() for various parameterized cases. 216s Given an input repository and the specification of a Launchpad publication 216s of a source package, we check that validate_rich_history() correctly 216s accepts or rejects the rich history corresponding to the upload tag named 216s 'importer/upload/1-2'. It is assumed that the package being imported is 216s always of version '1-2' for all parameter sets. 216s 216s Since the target function requires rich history, the case of there not 216s being rich history does not need to be tested here, as it wouldn't be 216s called in this case. 216s 216s validate_rich_history() is generic for all sourced rich history, not just 216s rich history sourced from an upload tag. But since it is independent of how 216s the rich history commit arrived, it is easiest to use upload tags to test 216s it; this results in coverage for all sources. 216s 216s :param GitUbuntuRepository repo: fixture providing a temporary 216s GitUbuntuRepository instance to use 216s :param repo_builder.Repo input_repo: input repository data 216s :param dict published_spec: the package simulated being imported from the 216s archive, specified as a dict to pass as **kwargs to 216s repo_builder.Commit.from_spec() 216s :param bool expected_result: the expected return value of, or exception 216s raised by, the call to validate_rich_history() 216s """ 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:910: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpofnhld1i/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s ______________________ test_add_changelog_note_to_commit _______________________ 216s 216s repo = 216s 216s def test_add_changelog_note_to_commit(repo): 216s """add_changelog_note_to_commit should add the expected note""" 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='1-1'), 216s repo_builder.Commit.from_spec( 216s name='1-2', 216s changelog_versions=['1-1', '1-2'], 216s parents=[Placeholder('1-1')], 216s ), 216s ], 216s tags={'1-1': Placeholder('1-1'), '1-2': Placeholder('1-2')}, 216s > ).write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:953: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpbpbaxcra/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s ____________________ test_add_changelog_note_to_commit_utf8 ____________________ 216s 216s repo = 216s 216s def test_add_changelog_note_to_commit_utf8(repo): 216s """A changelog file with non-UTF8 should have such characters substituted 216s 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s """ 216s test_utf8_error_changelog_path = os.path.join( 216s pkg_resources.resource_filename('gitubuntu', 'changelog_tests'), 216s 'test_utf8_error', 216s ) 216s with open(test_utf8_error_changelog_path, 'rb') as f: 216s utf8_changelog_blob = f.read() 216s 216s # We only need an example child commit with a debian/changelog file since 216s # this is the only file accessed by add_changelog_note_to_commit(). 216s # Further, the parent need only exist and can be empty. 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit(name='parent'), 216s repo_builder.Commit( 216s tree=repo_builder.Tree({'debian': repo_builder.Tree( 216s {'changelog': repo_builder.Blob(utf8_changelog_blob)} 216s )}), 216s name='child', 216s ) 216s ], 216s tags={'parent': Placeholder('parent'), 'child': Placeholder('child')}, 216s > ).write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:1002: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpa34dw0ef/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s _________________ test_double_changelog_note_add_does_not_fail _________________ 216s 216s repo = 216s 216s def test_double_changelog_note_add_does_not_fail(repo): 216s """add_changelog_note_to_commit shouldn't fail if a note already exists""" 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='1-1'), 216s repo_builder.Commit.from_spec( 216s name='1-2', 216s changelog_versions=['1-1', '1-2'], 216s parents=[Placeholder('1-1')], 216s ), 216s ], 216s tags={'1-1': Placeholder('1-1'), '1-2': Placeholder('1-2')}, 216s > ).write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:1035: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmp913ep7vj/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s ___________________________ test_create_import_note ____________________________ 216s 216s repo = 216s 216s def test_create_import_note(repo): 216s """create_import_note() should create a note in the correct ref""" 216s repo_builder.Repo( 216s commits=[repo_builder.Commit(name='root')], 216s tags={'root': repo_builder.Placeholder('root')}, 216s > ).write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:1066: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmp5ysd1cnf/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ______________________ test_create_import_note_timestamp _______________________ 216s 216s repo = 216s 216s def test_create_import_note_timestamp(repo): 216s """create_import_note() should include the timestamp in the note""" 216s repo_builder.Repo( 216s commits=[repo_builder.Commit(name='root')], 216s tags={'root': repo_builder.Placeholder('root')}, 216s > ).write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:1082: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpp2qn6urb/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s _______________________ test_import_creates_import_note ________________________ 216s 216s repo = 216s 216s def test_import_creates_import_note(repo): 216s """When an import runs, the note should appear in the correct ref""" 216s with source_builder.Source() as dsc_pathname: 216s > target.import_unapplied_dsc( 216s repo=repo, 216s version='1-1', 216s namespace='importer', 216s dist='ubuntu', 216s dsc_pathname=dsc_pathname, 216s head_name='ubuntu/focal', 216s skip_orig=True, 216s parent_overrides={}, 216s ) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:1102: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 216s commit, tag = find_or_create_unapplied_commit( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 216s changelog_parents = get_unapplied_import_parents( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 216s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 216s changelog = self.get_changelog_from_treeish(treeish) 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 216s return Changelog.from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:569: in from_treeish 216s blob = follow_symlinks_to_blob( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 216s return _follow_symlinks_to_blob( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s repo = pygit2.Repository('/tmp/tmpompcnusc/.git/') 216s top_tree_object = 216s search_path = 'debian/changelog' 216s _rel_tree = 216s _rel_path = '' 216s 216s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 216s _rel_tree=None, _rel_path='' 216s ): 216s '''Recursively follow a path down a tree, following symlinks, to find blob 216s 216s repo: pygit2.Repository object 216s top_tree: pygit2.Tree object of the top of the tree structure 216s search_path: '/'-separated path string of blob to find 216s _rel_tree: (internal) which tree to look further into 216s _rel_path: (internal) the path we are in so far 216s ''' 216s 216s NORMAL_BLOB_MODES = set([ 216s pygit2.GIT_FILEMODE_BLOB, 216s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 216s ]) 216s 216s _rel_tree = _rel_tree or top_tree_object 216s head, tail = posixpath.split(search_path) 216s 216s # A traditional functional split would put a single entry in head with tail 216s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 216s # to make it appear to have traditional semantics. 216s if not head: 216s head = tail 216s tail = None 216s 216s entry = _rel_tree[head] 216s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s ___________________ test_import_unapplied_spi_quilt_patches ____________________ 216s 216s get_import_commit_msg_mock = 216s get_import_tag_msg_mock = 216s repo = 216s 216s @patch('gitubuntu.importer.get_import_tag_msg') 216s @patch('gitubuntu.importer.get_import_commit_msg') 216s def test_import_unapplied_spi_quilt_patches( 216s get_import_commit_msg_mock, 216s get_import_tag_msg_mock, 216s repo, 216s ): 216s """Test that a package with quilt patches is imported with correct 216s unapplied refs 216s 216s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 216s that determines the commit message to use for a given import 216s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 216s that determines the tag message to use for a given import 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s """ 216s # Match the repo_builder objects 216s get_import_tag_msg_mock.return_value = 'Test tag' 216s get_import_commit_msg_mock.return_value = b'Test commit' 216s 216s publish_spec = source_builder.SourceSpec(has_patches=True) 216s 216s input_repo = repo_builder.Repo() 216s input_repo.write(repo.raw_repo) 216s expected_result = repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit( 216s tree=repo_builder.SourceTree( 216s source_builder.Source(publish_spec) 216s ), 216s name='publish' 216s ), 216s ], 216s tags={'importer/import/1-1': Placeholder('publish')}, 216s branches={'importer/ubuntu/trusty': Placeholder('publish')}, 216s ) 216s 216s with source_builder.Source(publish_spec) as dsc_path: 216s # import_unapplied_spi currently assumes it is called from the 216s # repository directory (pristine-tar and other commands rely on 216s # this) 216s > target.import_unapplied_spi( 216s repo=repo, 216s spi=MockSPI(dsc_path, publish_spec.version), 216s namespace='importer', 216s skip_orig=False, 216s parent_overrides={}, 216s ) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:1222: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:2308: in import_unapplied_spi 216s import_unapplied_dsc( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 216s commit, tag = find_or_create_unapplied_commit( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 216s changelog_parents = get_unapplied_import_parents( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 216s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 216s changelog = self.get_changelog_from_treeish(treeish) 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 216s return Changelog.from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:569: in from_treeish 216s blob = follow_symlinks_to_blob( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 216s return _follow_symlinks_to_blob( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s repo = pygit2.Repository('/tmp/tmpipykyre5/.git/') 216s top_tree_object = 216s search_path = 'debian/changelog' 216s _rel_tree = 216s _rel_path = '' 216s 216s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 216s _rel_tree=None, _rel_path='' 216s ): 216s '''Recursively follow a path down a tree, following symlinks, to find blob 216s 216s repo: pygit2.Repository object 216s top_tree: pygit2.Tree object of the top of the tree structure 216s search_path: '/'-separated path string of blob to find 216s _rel_tree: (internal) which tree to look further into 216s _rel_path: (internal) the path we are in so far 216s ''' 216s 216s NORMAL_BLOB_MODES = set([ 216s pygit2.GIT_FILEMODE_BLOB, 216s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 216s ]) 216s 216s _rel_tree = _rel_tree or top_tree_object 216s head, tail = posixpath.split(search_path) 216s 216s # A traditional functional split would put a single entry in head with tail 216s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 216s # to make it appear to have traditional semantics. 216s if not head: 216s head = tail 216s tail = None 216s 216s entry = _rel_tree[head] 216s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: applying a 216s dpkg-source: info: applying b 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_import_unapplied_spi_parenting[input_repo0-changelog_versions0-validation_repo_delta0-validation_repo_expected_identical_refs0] _ 216s 216s get_import_commit_msg_mock = 216s get_import_tag_msg_mock = 216s repo = 216s input_repo = 216s changelog_versions = ['1-1'] 216s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-1': }} 216s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1'] 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'changelog_versions', 216s 'validation_repo_delta', 216s 'validation_repo_expected_identical_refs', 216s ], 216s [ 216s pytest.param( 216s repo_builder.Repo(), 216s ['1-1'], 216s { 216s 'add_commits': [ 216s repo_builder.Commit.from_spec(name='publish'), 216s ], 216s 'update_tags': {'importer/import/1-1': Placeholder('publish')}, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s ] 216s ), 216s pytest.param( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s ['1-2', '1-1'], 216s { 216s 'add_commits': [ 216s repo_builder.Commit.from_spec( 216s name='publish', 216s parents=[Placeholder('import')], 216s changelog_versions=['1-2', '1-1'], 216s ), 216s ], 216s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/import/1-2', 216s ], 216s ), 216s pytest.param( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s ['1-3', '1-2', '1-1'], 216s { 216s 'add_commits': [ 216s repo_builder.Commit.from_spec( 216s parents=[Placeholder('import')], 216s name='publish', 216s changelog_versions=['1-3', '1-2', '1-1'], 216s ), 216s ], 216s 'update_tags': {'importer/import/1-3': Placeholder('publish')}, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/import/1-3', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec( 216s name='reimport', 216s mutate='Reimport tag contents', 216s ), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s ['1-2', '1-1'], 216s { 216s 'add_commits': [ 216s repo_builder.Commit.from_spec( 216s parents=[ 216s Placeholder('import'), 216s Placeholder('reimport'), 216s ], 216s name='publish', 216s changelog_versions=['1-2', '1-1'], 216s ), 216s ], 216s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s 'refs/tags/importer/import/1-2', 216s ], 216s ), 216s ] 216s ) 216s @patch('gitubuntu.importer.get_import_tag_msg') 216s @patch('gitubuntu.importer.get_import_commit_msg') 216s def test_import_unapplied_spi_parenting( 216s get_import_commit_msg_mock, 216s get_import_tag_msg_mock, 216s repo, 216s input_repo, 216s changelog_versions, 216s validation_repo_delta, 216s validation_repo_expected_identical_refs, 216s ): 216s """Test that unapplied import commits have the correct parents 216s 216s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 216s that determines the commit message to use for a given import 216s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 216s that determines the tag message to use for a given import 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param repo_builder.Repo input_repo: input repository data 216s :param list(str) changelog_versions: the versions in the changelog of a 216s fake package to test import 216s :param dict validation_repo_delta: how to transform the input 216s repository into a "validation repository", expressed as a dict to 216s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 216s input repository. The validation repository is then used for the 216s purposes of comparison against the output repository. 216s :param list(str) validation_repo_expected_identical_refs: refs that must be 216s identical between the validation repository and the output repository 216s 216s Verify that if an import of a package is made into input_repo where the 216s package being imported has the given changelog_versions, then the output 216s repository has commits with the parents we expect. This is tested by 216s comparing specific output references against the validation repository. 216s """ 216s 216s # Match the repo_builder objects 216s get_import_tag_msg_mock.return_value = 'Test tag' 216s get_import_commit_msg_mock.return_value = b'Test commit' 216s 216s input_repo.write(repo.raw_repo) 216s 216s publish_spec = source_builder.SourceSpec( 216s changelog_versions=changelog_versions, 216s ) 216s 216s with source_builder.Source(publish_spec) as dsc_path: 216s # import_unapplied_spi currently assumes it is called from the 216s # repository directory (pristine-tar and other commands rely on 216s # this) 216s > target.import_unapplied_spi( 216s repo=repo, 216s spi=MockSPI(dsc_path, publish_spec.version), 216s namespace='importer', 216s skip_orig=False, 216s parent_overrides={}, 216s ) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:1391: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:2308: in import_unapplied_spi 216s import_unapplied_dsc( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 216s commit, tag = find_or_create_unapplied_commit( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 216s changelog_parents = get_unapplied_import_parents( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 216s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 216s changelog = self.get_changelog_from_treeish(treeish) 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 216s return Changelog.from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:569: in from_treeish 216s blob = follow_symlinks_to_blob( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 216s return _follow_symlinks_to_blob( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s repo = pygit2.Repository('/tmp/tmpvmduc7xn/.git/') 216s top_tree_object = 216s search_path = 'debian/changelog' 216s _rel_tree = 216s _rel_path = '' 216s 216s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 216s _rel_tree=None, _rel_path='' 216s ): 216s '''Recursively follow a path down a tree, following symlinks, to find blob 216s 216s repo: pygit2.Repository object 216s top_tree: pygit2.Tree object of the top of the tree structure 216s search_path: '/'-separated path string of blob to find 216s _rel_tree: (internal) which tree to look further into 216s _rel_path: (internal) the path we are in so far 216s ''' 216s 216s NORMAL_BLOB_MODES = set([ 216s pygit2.GIT_FILEMODE_BLOB, 216s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 216s ]) 216s 216s _rel_tree = _rel_tree or top_tree_object 216s head, tail = posixpath.split(search_path) 216s 216s # A traditional functional split would put a single entry in head with tail 216s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 216s # to make it appear to have traditional semantics. 216s if not head: 216s head = tail 216s tail = None 216s 216s entry = _rel_tree[head] 216s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_import_unapplied_spi_parenting[input_repo1-changelog_versions1-validation_repo_delta1-validation_repo_expected_identical_refs1] _ 216s 216s get_import_commit_msg_mock = 216s get_import_tag_msg_mock = 216s repo = 216s input_repo = 216s changelog_versions = ['1-2', '1-1'] 216s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-2': }} 216s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-2'] 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'changelog_versions', 216s 'validation_repo_delta', 216s 'validation_repo_expected_identical_refs', 216s ], 216s [ 216s pytest.param( 216s repo_builder.Repo(), 216s ['1-1'], 216s { 216s 'add_commits': [ 216s repo_builder.Commit.from_spec(name='publish'), 216s ], 216s 'update_tags': {'importer/import/1-1': Placeholder('publish')}, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s ] 216s ), 216s pytest.param( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s ['1-2', '1-1'], 216s { 216s 'add_commits': [ 216s repo_builder.Commit.from_spec( 216s name='publish', 216s parents=[Placeholder('import')], 216s changelog_versions=['1-2', '1-1'], 216s ), 216s ], 216s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/import/1-2', 216s ], 216s ), 216s pytest.param( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s ['1-3', '1-2', '1-1'], 216s { 216s 'add_commits': [ 216s repo_builder.Commit.from_spec( 216s parents=[Placeholder('import')], 216s name='publish', 216s changelog_versions=['1-3', '1-2', '1-1'], 216s ), 216s ], 216s 'update_tags': {'importer/import/1-3': Placeholder('publish')}, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/import/1-3', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec( 216s name='reimport', 216s mutate='Reimport tag contents', 216s ), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s ['1-2', '1-1'], 216s { 216s 'add_commits': [ 216s repo_builder.Commit.from_spec( 216s parents=[ 216s Placeholder('import'), 216s Placeholder('reimport'), 216s ], 216s name='publish', 216s changelog_versions=['1-2', '1-1'], 216s ), 216s ], 216s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s 'refs/tags/importer/import/1-2', 216s ], 216s ), 216s ] 216s ) 216s @patch('gitubuntu.importer.get_import_tag_msg') 216s @patch('gitubuntu.importer.get_import_commit_msg') 216s def test_import_unapplied_spi_parenting( 216s get_import_commit_msg_mock, 216s get_import_tag_msg_mock, 216s repo, 216s input_repo, 216s changelog_versions, 216s validation_repo_delta, 216s validation_repo_expected_identical_refs, 216s ): 216s """Test that unapplied import commits have the correct parents 216s 216s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 216s that determines the commit message to use for a given import 216s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 216s that determines the tag message to use for a given import 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param repo_builder.Repo input_repo: input repository data 216s :param list(str) changelog_versions: the versions in the changelog of a 216s fake package to test import 216s :param dict validation_repo_delta: how to transform the input 216s repository into a "validation repository", expressed as a dict to 216s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 216s input repository. The validation repository is then used for the 216s purposes of comparison against the output repository. 216s :param list(str) validation_repo_expected_identical_refs: refs that must be 216s identical between the validation repository and the output repository 216s 216s Verify that if an import of a package is made into input_repo where the 216s package being imported has the given changelog_versions, then the output 216s repository has commits with the parents we expect. This is tested by 216s comparing specific output references against the validation repository. 216s """ 216s 216s # Match the repo_builder objects 216s get_import_tag_msg_mock.return_value = 'Test tag' 216s get_import_commit_msg_mock.return_value = b'Test commit' 216s 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:1381: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpcx6dkflv/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_import_unapplied_spi_parenting[input_repo2-changelog_versions2-validation_repo_delta2-validation_repo_expected_identical_refs2] _ 216s 216s get_import_commit_msg_mock = 216s get_import_tag_msg_mock = 216s repo = 216s input_repo = 216s changelog_versions = ['1-3', '1-2', '1-1'] 216s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-3': }} 216s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-3'] 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'changelog_versions', 216s 'validation_repo_delta', 216s 'validation_repo_expected_identical_refs', 216s ], 216s [ 216s pytest.param( 216s repo_builder.Repo(), 216s ['1-1'], 216s { 216s 'add_commits': [ 216s repo_builder.Commit.from_spec(name='publish'), 216s ], 216s 'update_tags': {'importer/import/1-1': Placeholder('publish')}, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s ] 216s ), 216s pytest.param( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s ['1-2', '1-1'], 216s { 216s 'add_commits': [ 216s repo_builder.Commit.from_spec( 216s name='publish', 216s parents=[Placeholder('import')], 216s changelog_versions=['1-2', '1-1'], 216s ), 216s ], 216s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/import/1-2', 216s ], 216s ), 216s pytest.param( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s ['1-3', '1-2', '1-1'], 216s { 216s 'add_commits': [ 216s repo_builder.Commit.from_spec( 216s parents=[Placeholder('import')], 216s name='publish', 216s changelog_versions=['1-3', '1-2', '1-1'], 216s ), 216s ], 216s 'update_tags': {'importer/import/1-3': Placeholder('publish')}, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/import/1-3', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec( 216s name='reimport', 216s mutate='Reimport tag contents', 216s ), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s ['1-2', '1-1'], 216s { 216s 'add_commits': [ 216s repo_builder.Commit.from_spec( 216s parents=[ 216s Placeholder('import'), 216s Placeholder('reimport'), 216s ], 216s name='publish', 216s changelog_versions=['1-2', '1-1'], 216s ), 216s ], 216s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s 'refs/tags/importer/import/1-2', 216s ], 216s ), 216s ] 216s ) 216s @patch('gitubuntu.importer.get_import_tag_msg') 216s @patch('gitubuntu.importer.get_import_commit_msg') 216s def test_import_unapplied_spi_parenting( 216s get_import_commit_msg_mock, 216s get_import_tag_msg_mock, 216s repo, 216s input_repo, 216s changelog_versions, 216s validation_repo_delta, 216s validation_repo_expected_identical_refs, 216s ): 216s """Test that unapplied import commits have the correct parents 216s 216s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 216s that determines the commit message to use for a given import 216s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 216s that determines the tag message to use for a given import 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param repo_builder.Repo input_repo: input repository data 216s :param list(str) changelog_versions: the versions in the changelog of a 216s fake package to test import 216s :param dict validation_repo_delta: how to transform the input 216s repository into a "validation repository", expressed as a dict to 216s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 216s input repository. The validation repository is then used for the 216s purposes of comparison against the output repository. 216s :param list(str) validation_repo_expected_identical_refs: refs that must be 216s identical between the validation repository and the output repository 216s 216s Verify that if an import of a package is made into input_repo where the 216s package being imported has the given changelog_versions, then the output 216s repository has commits with the parents we expect. This is tested by 216s comparing specific output references against the validation repository. 216s """ 216s 216s # Match the repo_builder objects 216s get_import_tag_msg_mock.return_value = 'Test tag' 216s get_import_commit_msg_mock.return_value = b'Test commit' 216s 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:1381: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmp1dqqpj9b/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_import_unapplied_spi_parenting[input_repo3-changelog_versions3-validation_repo_delta3-validation_repo_expected_identical_refs3] _ 216s 216s get_import_commit_msg_mock = 216s get_import_tag_msg_mock = 216s repo = 216s input_repo = 216s changelog_versions = ['1-2', '1-1'] 216s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-2': }} 216s 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'] 216s 216s @pytest.mark.parametrize( 216s [ 216s 'input_repo', 216s 'changelog_versions', 216s 'validation_repo_delta', 216s 'validation_repo_expected_identical_refs', 216s ], 216s [ 216s pytest.param( 216s repo_builder.Repo(), 216s ['1-1'], 216s { 216s 'add_commits': [ 216s repo_builder.Commit.from_spec(name='publish'), 216s ], 216s 'update_tags': {'importer/import/1-1': Placeholder('publish')}, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s ] 216s ), 216s pytest.param( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s ['1-2', '1-1'], 216s { 216s 'add_commits': [ 216s repo_builder.Commit.from_spec( 216s name='publish', 216s parents=[Placeholder('import')], 216s changelog_versions=['1-2', '1-1'], 216s ), 216s ], 216s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/import/1-2', 216s ], 216s ), 216s pytest.param( 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import')], 216s tags={'importer/import/1-1': Placeholder('import')}, 216s ), 216s ['1-3', '1-2', '1-1'], 216s { 216s 'add_commits': [ 216s repo_builder.Commit.from_spec( 216s parents=[Placeholder('import')], 216s name='publish', 216s changelog_versions=['1-3', '1-2', '1-1'], 216s ), 216s ], 216s 'update_tags': {'importer/import/1-3': Placeholder('publish')}, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/import/1-3', 216s ], 216s ), 216s ( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import'), 216s repo_builder.Commit.from_spec( 216s name='reimport', 216s mutate='Reimport tag contents', 216s ), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import'), 216s 'importer/reimport/import/1-1/0': Placeholder('import'), 216s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 216s }, 216s ), 216s ['1-2', '1-1'], 216s { 216s 'add_commits': [ 216s repo_builder.Commit.from_spec( 216s parents=[ 216s Placeholder('import'), 216s Placeholder('reimport'), 216s ], 216s name='publish', 216s changelog_versions=['1-2', '1-1'], 216s ), 216s ], 216s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 216s }, 216s [ 216s 'refs/tags/importer/import/1-1', 216s 'refs/tags/importer/reimport/import/1-1/0', 216s 'refs/tags/importer/reimport/import/1-1/1', 216s 'refs/tags/importer/import/1-2', 216s ], 216s ), 216s ] 216s ) 216s @patch('gitubuntu.importer.get_import_tag_msg') 216s @patch('gitubuntu.importer.get_import_commit_msg') 216s def test_import_unapplied_spi_parenting( 216s get_import_commit_msg_mock, 216s get_import_tag_msg_mock, 216s repo, 216s input_repo, 216s changelog_versions, 216s validation_repo_delta, 216s validation_repo_expected_identical_refs, 216s ): 216s """Test that unapplied import commits have the correct parents 216s 216s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 216s that determines the commit message to use for a given import 216s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 216s that determines the tag message to use for a given import 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param repo_builder.Repo input_repo: input repository data 216s :param list(str) changelog_versions: the versions in the changelog of a 216s fake package to test import 216s :param dict validation_repo_delta: how to transform the input 216s repository into a "validation repository", expressed as a dict to 216s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 216s input repository. The validation repository is then used for the 216s purposes of comparison against the output repository. 216s :param list(str) validation_repo_expected_identical_refs: refs that must be 216s identical between the validation repository and the output repository 216s 216s Verify that if an import of a package is made into input_repo where the 216s package being imported has the given changelog_versions, then the output 216s repository has commits with the parents we expect. This is tested by 216s comparing specific output references against the validation repository. 216s """ 216s 216s # Match the repo_builder objects 216s get_import_tag_msg_mock.return_value = 'Test tag' 216s get_import_commit_msg_mock.return_value = b'Test commit' 216s 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:1381: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpsfcz3mem/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s __________________ test_import_unapplied_spi_parent_override ___________________ 216s 216s get_import_commit_msg_mock = 216s get_import_tag_msg_mock = 216s repo = 216s 216s @patch('gitubuntu.importer.get_import_tag_msg') 216s @patch('gitubuntu.importer.get_import_commit_msg') 216s def test_import_unapplied_spi_parent_override( 216s get_import_commit_msg_mock, 216s get_import_tag_msg_mock, 216s repo, 216s ): 216s """Test import_unapplied_spi() parent_override functionality 216s 216s Test that if parent_overrides is used in the import_unapplied_spi call then 216s the resulting commit correctly uses the overridden parents specified. 216s 216s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 216s that determines the commit message to use for a given import 216s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 216s that determines the tag message to use for a given import 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param repo_builder.Repo input_repo: input repository data 216s """ 216s # Match the repo_builder objects 216s get_import_tag_msg_mock.return_value = 'Test tag' 216s get_import_commit_msg_mock.return_value = b'Test commit' 216s 216s input_repo = repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec(name='import1-1', version='1-1'), 216s repo_builder.Commit.from_spec(name='import1-2', version='1-2'), 216s ], 216s tags={ 216s 'importer/import/1-1': Placeholder('import1-1'), 216s 'importer/import/1-2': Placeholder('import1-2'), 216s }, 216s ) 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:1444: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpbk7nm8xa/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s ______________ test_import_unapplied_spi_parent_override_failure _______________ 216s 216s repo = 216s 216s def test_import_unapplied_spi_parent_override_failure(repo): 216s """ 216s Test override_parents ParentOverrideError raise 216s 216s When a parent override is specified but the specified version doesn't have 216s an import tag, an exception should be raised. 216s 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s """ 216s repo_builder.Repo( 216s commits=[repo_builder.Commit.from_spec(name='import1-1')], 216s tags={'importer/import/1-1': Placeholder('import1-1')}, 216s > ).write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:1499: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmp0qdp736f/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_import_applied_spi_parenting[input_repo0-expected_ancestor_commits0-expected_parent_commits0] _ 216s 216s get_import_commit_msg_mock = 216s get_import_tag_msg_mock = 216s repo = 216s input_repo = 216s expected_ancestor_commits = ['refs/tags/importer/import/1-2'] 216s expected_parent_commits = ['refs/tags/importer/applied/1-1'] 216s 216s @pytest.mark.parametrize( 216s 'input_repo, expected_ancestor_commits, expected_parent_commits', [ 216s # In general, these tests do not set applied commit parents in the 216s # input repository since we have no mechanism to do that correctly, but 216s # this doesn't matter for the purposes of these tests. 216s 216s # if only one import tag exists, then it is the parent 216s pytest.param( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec( 216s name='unapplied1', 216s has_patches=True, 216s ), 216s repo_builder.Commit.from_spec( 216s parents=[Placeholder('unapplied1')], 216s name='unapplied2', 216s changelog_versions=['1-2', '1-1'], 216s has_patches=True, 216s ), 216s repo_builder.Commit.from_spec( 216s name='applied1', 216s patches_applied=True, 216s ), 216s ], 216s # no branches: technically not possible but branches are not 216s # relevant to the test 216s branches={}, 216s tags={ 216s 'importer/import/1-1': Placeholder('unapplied1'), 216s 'importer/import/1-2': Placeholder('unapplied2'), 216s 'importer/applied/1-1': Placeholder('applied1'), 216s }, 216s ), 216s ['refs/tags/importer/import/1-2'], 216s ['refs/tags/importer/applied/1-1'], 216s ), 216s 216s # if multiple import tags exist, then do they all end up as parents? 216s pytest.param( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec( 216s name='unapplied1', 216s has_patches=True, 216s ), 216s repo_builder.Commit.from_spec( 216s parents=[Placeholder('unapplied1')], 216s name='unapplied2', 216s changelog_versions=['1-2', '1-1'], 216s has_patches=True, 216s ), 216s repo_builder.Commit.from_spec( 216s parents=[Placeholder('unapplied1')], 216s name='unapplied2reimport', 216s changelog_versions=['1-2', '1-1'], 216s has_patches=True, 216s mutate='reimport tag', 216s ), 216s repo_builder.Commit.from_spec( 216s name='applied1', 216s patches_applied=True, 216s ), 216s ], 216s # no branches: technically not possible but branches are not 216s # relevant to the test 216s branches={}, 216s tags={ 216s 'importer/import/1-1': 216s Placeholder('unapplied1'), 216s 'importer/import/1-2': 216s Placeholder('unapplied2'), 216s 'importer/reimport/import/1-2/0': 216s Placeholder('unapplied2'), 216s 'importer/reimport/import/1-2/1': 216s Placeholder('unapplied2reimport'), 216s 'importer/applied/1-1': 216s Placeholder('applied1'), 216s }, 216s ), 216s [ 216s 'refs/tags/importer/reimport/import/1-2/0', 216s 'refs/tags/importer/reimport/import/1-2/1', 216s ], 216s [ 216s 'refs/tags/importer/applied/1-1', 216s ], 216s marks=pytest.mark.xfail(reason='LP: #1755247'), 216s ), 216s 216s # do we correctly create a reimport tag because a different import 216s # already exists? 216s pytest.param( 216s repo_builder.Repo( 216s commits=[ 216s repo_builder.Commit.from_spec( 216s name='unapplied1', 216s has_patches=True, 216s ), 216s repo_builder.Commit.from_spec( 216s name='unapplied1_reimport', 216s has_patches=True, 216s mutate='reimport contents', 216s ), 216s repo_builder.Commit.from_spec( 216s parents=[Placeholder('unapplied1')], 216s name='unapplied2', 216s changelog_versions=['1-2', '1-1'], 216s has_patches=True, 216s ), 216s repo_builder.Commit.from_spec( 216s name='applied1', 216s patches_applied=True, 216s ), 216s repo_builder.Commit.from_spec( 216s name='applied1_reimport', 216s patches_applied=True, 216s mutate='reimport contents', 216s ), 216s ], 216s # no branches: technically not possible but branches are not 216s # relevant to the test 216s branches={}, 216s tags={ 216s 'importer/import/1-1': 216s Placeholder('unapplied1'), 216s 'importer/reimport/import/1-1/0': 216s Placeholder('unapplied1'), 216s 'importer/reimport/import/1-1/1': 216s Placeholder('unapplied1_reimport'), 216s 'importer/import/1-2': 216s Placeholder('unapplied2'), 216s 'importer/applied/1-1': 216s Placeholder('applied1'), 216s 'importer/reimport/applied/1-1/0': 216s Placeholder('applied1'), 216s 'importer/reimport/applied/1-1/1': 216s Placeholder('applied1_reimport'), 216s }, 216s ), 216s [ 216s 'refs/tags/importer/reimport/import/1-2/0', 216s 'refs/tags/importer/reimport/import/1-2/1', 216s ], 216s [ 216s 'refs/tags/importer/reimport/applied/1-1/0', 216s 'refs/tags/importer/reimport/applied/1-1/1', 216s ], 216s marks=pytest.mark.xfail(reason='LP: #1755247'), 216s ), 216s ], 216s ) 216s @patch('gitubuntu.importer.get_import_tag_msg') 216s @patch('gitubuntu.importer.get_import_commit_msg') 216s def test_import_applied_spi_parenting( 216s get_import_commit_msg_mock, 216s get_import_tag_msg_mock, 216s repo, 216s input_repo, 216s expected_ancestor_commits, 216s expected_parent_commits, 216s ): 216s """Test that applied import commits have the right parents 216s 216s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 216s that determines the commit message to use for a given import 216s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 216s that determines the tag message to use for a given import 216s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 216s temporary output repository 216s :param repo_builder.Repo input_repo: input repository data 216s :param list(str) expected_ancestor_commits: list of commit-ish strings that 216s must be ancestors of the 'applied/1-2' tag following the applied import 216s :param list(str) expected_parent_commits: list of commit-ish strings that 216s must be parents of the 'applied/1-2' tag following the applied import. 216s 216s A fake package with version '1-2' that has a changelog parent of '1-1' is 216s imported on top of the provided input_repo. The test fails if any 216s of the expected_ancestor_commits or expected_parent_commits are not 216s present. 216s 216s This test is ugly because we do not yet have a programmatic way 216s to get the interstitial commits of the patch applications. 216s """ 216s # Match the repo_builder objects 216s get_import_tag_msg_mock.return_value = 'Test tag' 216s get_import_commit_msg_mock.return_value = b'Test commit' 216s 216s > input_repo.write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:1698: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpbinwpt6j/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: applying a 216s dpkg-source: info: applying b 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: applying a 216s dpkg-source: info: applying b 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: applying a 216s dpkg-source: info: applying b 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: applying a 216s dpkg-source: info: applying b 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: applying a 216s dpkg-source: info: applying b 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_authorship_date[False-Fri, 2 Feb 1971 12:34:56 +0100-expected_result0] __ 216s 216s repo = 216s override = False, input_string = 'Fri, 2 Feb 1971 12:34:56 +0100' 216s expected_result = (1971, 2, 2, 11, 34, 56, ...) 216s 216s @pytest.mark.parametrize(['override', 'input_string', 'expected_result'], [ 216s # Standard date that should parse and be used 216s (False, 'Fri, 2 Feb 1971 12:34:56 +0100', (1971, 2, 2, 11, 34, 56, 60)), 216s # Deliberately illegal date that cannot be parsed 216s (True, 'Failday, 30 Feb 1971 99:99:99 +9999', (1972, 3, 3, 12, 45, 57, 0)), 216s ]) 216s def test_authorship_date(repo, override, input_string, expected_result): 216s """Synthesized commit should use changelog or override when provided 216s 216s A synthesized commit should use the date of the changelog entry in the 216s usual case, or commit_date when an override is requested. 216s 216s :param GitUbuntuRepository repo: fixture providing a temporary 216s GitUbuntuRepository instance to use 216s :param bool override: whether a changelog date override should be requested 216s from import_unapplied_dsc() 216s :param str input_string: the timestamp part of the changelog entry to use 216s :param tuple expected_result: the expected author date of the synthesized 216s commit, specified as six parameters to datetime.datetime() followed by 216s the expected tz offset in minutes. 216s """ 216s spec = source_builder.SourceSpec(changelog_date=input_string) 216s with source_builder.Source(spec) as dsc_pathname: 216s > target.import_unapplied_dsc( 216s repo=repo, 216s version='1-1', 216s namespace='importer', 216s dist='ubuntu', 216s dsc_pathname=dsc_pathname, 216s head_name='ubuntu/focal', 216s skip_orig=True, 216s parent_overrides={}, 216s commit_date=datetime.datetime( 216s 1972, 216s 3, 216s 3, 216s 12, 216s 45, 216s 57, 216s tzinfo=datetime.timezone.utc, 216s ), 216s changelog_date_overrides=( 216s frozenset({'1-1'}) if override else frozenset() 216s ), 216s ) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:1815: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 216s commit, tag = find_or_create_unapplied_commit( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 216s changelog_parents = get_unapplied_import_parents( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 216s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 216s changelog = self.get_changelog_from_treeish(treeish) 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 216s return Changelog.from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:569: in from_treeish 216s blob = follow_symlinks_to_blob( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 216s return _follow_symlinks_to_blob( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s repo = pygit2.Repository('/tmp/tmp4tjyt9c0/.git/') 216s top_tree_object = 216s search_path = 'debian/changelog' 216s _rel_tree = 216s _rel_path = '' 216s 216s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 216s _rel_tree=None, _rel_path='' 216s ): 216s '''Recursively follow a path down a tree, following symlinks, to find blob 216s 216s repo: pygit2.Repository object 216s top_tree: pygit2.Tree object of the top of the tree structure 216s search_path: '/'-separated path string of blob to find 216s _rel_tree: (internal) which tree to look further into 216s _rel_path: (internal) the path we are in so far 216s ''' 216s 216s NORMAL_BLOB_MODES = set([ 216s pygit2.GIT_FILEMODE_BLOB, 216s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 216s ]) 216s 216s _rel_tree = _rel_tree or top_tree_object 216s head, tail = posixpath.split(search_path) 216s 216s # A traditional functional split would put a single entry in head with tail 216s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 216s # to make it appear to have traditional semantics. 216s if not head: 216s head = tail 216s tail = None 216s 216s entry = _rel_tree[head] 216s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s _ test_authorship_date[True-Failday, 30 Feb 1971 99:99:99 +9999-expected_result1] _ 216s 216s repo = 216s override = True, input_string = 'Failday, 30 Feb 1971 99:99:99 +9999' 216s expected_result = (1972, 3, 3, 12, 45, 57, ...) 216s 216s @pytest.mark.parametrize(['override', 'input_string', 'expected_result'], [ 216s # Standard date that should parse and be used 216s (False, 'Fri, 2 Feb 1971 12:34:56 +0100', (1971, 2, 2, 11, 34, 56, 60)), 216s # Deliberately illegal date that cannot be parsed 216s (True, 'Failday, 30 Feb 1971 99:99:99 +9999', (1972, 3, 3, 12, 45, 57, 0)), 216s ]) 216s def test_authorship_date(repo, override, input_string, expected_result): 216s """Synthesized commit should use changelog or override when provided 216s 216s A synthesized commit should use the date of the changelog entry in the 216s usual case, or commit_date when an override is requested. 216s 216s :param GitUbuntuRepository repo: fixture providing a temporary 216s GitUbuntuRepository instance to use 216s :param bool override: whether a changelog date override should be requested 216s from import_unapplied_dsc() 216s :param str input_string: the timestamp part of the changelog entry to use 216s :param tuple expected_result: the expected author date of the synthesized 216s commit, specified as six parameters to datetime.datetime() followed by 216s the expected tz offset in minutes. 216s """ 216s spec = source_builder.SourceSpec(changelog_date=input_string) 216s with source_builder.Source(spec) as dsc_pathname: 216s > target.import_unapplied_dsc( 216s repo=repo, 216s version='1-1', 216s namespace='importer', 216s dist='ubuntu', 216s dsc_pathname=dsc_pathname, 216s head_name='ubuntu/focal', 216s skip_orig=True, 216s parent_overrides={}, 216s commit_date=datetime.datetime( 216s 1972, 216s 3, 216s 3, 216s 12, 216s 45, 216s 57, 216s tzinfo=datetime.timezone.utc, 216s ), 216s changelog_date_overrides=( 216s frozenset({'1-1'}) if override else frozenset() 216s ), 216s ) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:1815: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 216s commit, tag = find_or_create_unapplied_commit( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 216s changelog_parents = get_unapplied_import_parents( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 216s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 216s changelog = self.get_changelog_from_treeish(treeish) 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 216s return Changelog.from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:569: in from_treeish 216s blob = follow_symlinks_to_blob( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 216s return _follow_symlinks_to_blob( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s repo = pygit2.Repository('/tmp/tmpjbbal7cs/.git/') 216s top_tree_object = 216s search_path = 'debian/changelog' 216s _rel_tree = 216s _rel_path = '' 216s 216s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 216s _rel_tree=None, _rel_path='' 216s ): 216s '''Recursively follow a path down a tree, following symlinks, to find blob 216s 216s repo: pygit2.Repository object 216s top_tree: pygit2.Tree object of the top of the tree structure 216s search_path: '/'-separated path string of blob to find 216s _rel_tree: (internal) which tree to look further into 216s _rel_path: (internal) the path we are in so far 216s ''' 216s 216s NORMAL_BLOB_MODES = set([ 216s pygit2.GIT_FILEMODE_BLOB, 216s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 216s ]) 216s 216s _rel_tree = _rel_tree or top_tree_object 216s head, tail = posixpath.split(search_path) 216s 216s # A traditional functional split would put a single entry in head with tail 216s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 216s # to make it appear to have traditional semantics. 216s if not head: 216s head = tail 216s tail = None 216s 216s entry = _rel_tree[head] 216s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: srcpkg/debian/changelog(l4): ignoring invalid week day 'Failday' 216s LINE: -- git ubuntu Failday, 30 Feb 1971 99:99:99 +9999 216s dpkg-source: warning: srcpkg/debian/changelog(l4): cannot parse non-conformant date '30 Feb 1971 99:99:99 +9999' 216s LINE: -- git ubuntu Failday, 30 Feb 1971 99:99:99 +9999 216s dpkg-source: warning: missing information for output field Standards-Version 216s __________________ test_fetch_rich_history_from_changes_file ___________________ 216s 216s repo = 216s pygit2_repo = pygit2.Repository('/tmp/tmpauo5c9yi/.git/') 216s 216s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 216s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 216s def test_fetch_rich_history_from_changes_file(repo, pygit2_repo): 216s """Rich history specified in a changes file is found and validated""" 216s > rich_commit, parent_commit, import_tree = populate_rich_history( 216s import_repo=repo.raw_repo, 216s uploader_repo=pygit2_repo, 216s ) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:2111: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:2080: in populate_rich_history 216s ).write(import_repo) 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpxs2d0d6i/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s ________ test_fetch_rich_history_from_changes_file_fetch_failure_retry _________ 216s 216s repo = 216s pygit2_repo = pygit2.Repository('/tmp/tmpw5_o4ki5/.git/') 216s 216s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 216s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 216s def test_fetch_rich_history_from_changes_file_fetch_failure_retry( 216s repo, 216s pygit2_repo, 216s ): 216s """If rich history cannot be fetched once, it is retried""" 216s > rich_commit, parent_commit, import_tree = populate_rich_history( 216s import_repo=repo.raw_repo, 216s uploader_repo=pygit2_repo, 216s ) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:2204: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:2080: in populate_rich_history 216s ).write(import_repo) 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmp_s7rprj5/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s ____________ test_fetch_rich_history_from_changes_file_missing_ref _____________ 216s 216s repo = 216s pygit2_repo = pygit2.Repository('/tmp/tmpnbgnlkx6/.git/') 216s 216s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 216s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 216s def test_fetch_rich_history_from_changes_file_missing_ref( 216s repo, 216s pygit2_repo, 216s ): 216s """If rich history is specified but the ref cannot be found, a hard 216s exception is raised 216s """ 216s > rich_commit, _, _ = populate_rich_history( 216s import_repo=repo.raw_repo, 216s uploader_repo=pygit2_repo, 216s ) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:2243: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:2080: in populate_rich_history 216s ).write(import_repo) 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpwi0n4xjz/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s ___________ test_fetch_rich_history_from_changes_file_missing_commit ___________ 216s 216s repo = 216s pygit2_repo = pygit2.Repository('/tmp/tmp4aaklxth/.git/') 216s 216s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 216s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 216s def test_fetch_rich_history_from_changes_file_missing_commit( 216s repo, 216s pygit2_repo, 216s ): 216s """If rich history is specified but the commit cannot be found, an 216s exception is raised 216s """ 216s > rich_commit, _, _ = populate_rich_history( 216s import_repo=repo.raw_repo, 216s uploader_repo=pygit2_repo, 216s ) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:2271: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:2080: in populate_rich_history 216s ).write(import_repo) 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmp6tcfaf1i/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s ____________ test_fetch_rich_history_from_changes_file_not_a_commit ____________ 216s 216s repo = 216s pygit2_repo = pygit2.Repository('/tmp/tmpw8s1sq0m/.git/') 216s 216s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 216s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 216s def test_fetch_rich_history_from_changes_file_not_a_commit(repo, pygit2_repo): 216s """If rich history is specified but the commit hash resolves to something 216s other than a commit, an exception is raised 216s """ 216s > rich_commit, _, _ = populate_rich_history( 216s import_repo=repo.raw_repo, 216s uploader_repo=pygit2_repo, 216s ) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:2297: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/importer_test.py:2080: in populate_rich_history 216s ).write(import_repo) 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmp5tbc4wvp/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s __________________________ test_reconstruct_changelog __________________________ 216s 216s pygit2_repo = pygit2.Repository('/tmp/tmpskje4743/.git/') 216s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7462396ad7f0> 216s 216s @pytest.mark.skipif( 216s ENTRY_POINT_TYPE is None, 216s reason="Entry point testing not available", 216s ) 216s def test_reconstruct_changelog(pygit2_repo, monkeypatch): 216s '''The reconstruct-changelog endpoint should add the expected commit''' 216s monkeypatch.setenv('DEBFULLNAME', 'Test User') 216s monkeypatch.setenv('DEBEMAIL', 'test@example.com') 216s Repo( 216s commits=[ 216s Commit(tree=SourceTree(Source()), name='root'), 216s Commit( 216s tree=SourceTree(Source(spec=SourceSpec(mutate=1))), 216s message=' * Test changelog entry', 216s name='child', 216s parents=[Placeholder('root')], 216s ), 216s ], 216s tags={'root': Placeholder('root'), 'child': Placeholder('child')}, 216s > ).write(pygit2_repo) 216s 216s gitubuntu/integration_test.py:219: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpskje4743/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s gitubuntu/repo_builder.py:389: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s dpkg-source: warning: missing information for output field Standards-Version 216s ___________________ TestObjectCreation.testRepoBranchesTags ____________________ 216s 216s self = 216s 216s def testRepoBranchesTags(self): 216s graph = Repo( 216s commits=[ 216s Commit( 216s Tree({}), 216s parents=[Placeholder('parent')], 216s name='child', 216s ), 216s Commit(Tree({}), name='parent'), 216s ], 216s branches={ 216s 'branch1': Placeholder('parent'), 216s 'branch2': Commit(Tree({'foo': Blob(b'qux')})), 216s }, 216s tags={ 216s 'tag1': Placeholder('child'), 216s 'tag2': Commit(Tree({'foo': Blob(b'quz')})), 216s }, 216s ) 216s > child_ref = graph.write(self.repo) 216s 216s gitubuntu/repo_builder_test.py:154: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpx7kwjknf/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s gitubuntu/repo_builder.py:389: AttributeError 216s ______________________ TestObjectCreation.testRepoTagger _______________________ 216s 216s self = 216s 216s def testRepoTagger(self): 216s """The tagger parameter should make it through to the tag""" 216s input_repo = Repo( 216s commits=[Commit(name='root')], 216s tags={'root': Placeholder('root')}, 216s tagger=pygit2.Signature( 216s 'Test Tagger', 216s 'test@example.com', 216s 1, 216s 2, 216s ), 216s ) 216s > input_repo.write(self.repo) 216s 216s gitubuntu/repo_builder_test.py:178: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmplks8dvtg/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s gitubuntu/repo_builder.py:389: AttributeError 216s _______________________________ test_source_tree _______________________________ 216s 216s pygit2_repo = pygit2.Repository('/tmp/tmpp8wtj9_y/.git/') 216s 216s def test_source_tree(pygit2_repo): 216s commit_str = Commit(SourceTree(Source())).write(pygit2_repo) 216s commit = pygit2_repo.get(commit_str) 216s > assert gitubuntu.git_repository.follow_symlinks_to_blob( 216s repo=pygit2_repo, 216s treeish_object=commit, 216s path='debian/changelog', 216s ) 216s 216s gitubuntu/repo_builder_test.py:190: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 216s return _follow_symlinks_to_blob( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s repo = pygit2.Repository('/tmp/tmpp8wtj9_y/.git/') 216s top_tree_object = 216s search_path = 'debian/changelog' 216s _rel_tree = 216s _rel_path = '' 216s 216s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 216s _rel_tree=None, _rel_path='' 216s ): 216s '''Recursively follow a path down a tree, following symlinks, to find blob 216s 216s repo: pygit2.Repository object 216s top_tree: pygit2.Tree object of the top of the tree structure 216s search_path: '/'-separated path string of blob to find 216s _rel_tree: (internal) which tree to look further into 216s _rel_path: (internal) the path we are in so far 216s ''' 216s 216s NORMAL_BLOB_MODES = set([ 216s pygit2.GIT_FILEMODE_BLOB, 216s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 216s ]) 216s 216s _rel_tree = _rel_tree or top_tree_object 216s head, tail = posixpath.split(search_path) 216s 216s # A traditional functional split would put a single entry in head with tail 216s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 216s # to make it appear to have traditional semantics. 216s if not head: 216s head = tail 216s tail = None 216s 216s entry = _rel_tree[head] 216s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s gitubuntu/git_repository.py:68: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s ______________________________ test_preservation _______________________________ 216s 216s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_preservation0') 216s repo = 216s 216s def test_preservation(tmpdir, repo): 216s """An export followed by an import should preserve rich history 216s 216s Given a minimal repository that should be able to have upload tags be 216s exported, when we import the export result into a similar repository with a 216s subtly different upload tag in which the rich history should still apply, 216s the result should be a correctly reconstructed upload tag. 216s 216s :param py.path tmpdir: the pytest standard tmpdir fixture. 216s :param repo: our standard repo fixture. 216s """ 216s Repo( 216s commits=[ 216s Commit( 216s name='1', 216s tree=Tree({ 216s 'a': Blob(b'a'), 216s }), 216s ), 216s Commit( 216s name='2', 216s parents=[Placeholder('1')], 216s tree=Tree({ 216s 'a': Blob(b'ab'), 216s }), 216s ), 216s Commit( 216s name='3', 216s parents=[Placeholder('2')], 216s tree=Tree({ 216s 'a': Blob(b'abc'), 216s }), 216s ), 216s ], 216s tags={ 216s 'importer/import/1': Placeholder('1'), 216s 'importer/upload/2': Placeholder('3'), 216s } 216s > ).write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/rich_history_test.py:51: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpgj8v3vpx/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s ______________________ test_preservation_multiple_parents ______________________ 216s 216s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_preservation_multiple_par0') 216s repo = 216s 216s def test_preservation_multiple_parents(tmpdir, repo): 216s """An export of rich history should omit multiple parent cases 216s 216s If an upload tag leads to multiple parents before we reach an import tag, 216s it should be excluded from the export as this type of upload tag is not 216s supported for rich history preservation. This test also serves to verify 216s code paths that handle the MultipleParentError exception in the export 216s code. 216s 216s :param py.path tmpdir: the pytest standard tmpdir fixture. 216s :param repo: our standard repo fixture. 216s """ 216s Repo( 216s commits=[ 216s Commit(name='1', message='a'), 216s Commit(name='2', message='b'), 216s Commit(name='child', parents=[Placeholder('1'), Placeholder('2')]), 216s ], 216s tags={ 216s 'importer/import/1': Placeholder('1'), 216s 'importer/upload/2': Placeholder('child'), 216s } 216s > ).write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/rich_history_test.py:102: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpld7a4t0t/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s _________________________ test_preservation_no_parents _________________________ 216s 216s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_preservation_no_parents0') 216s repo = 216s 216s def test_preservation_no_parents(tmpdir, repo): 216s """An export of rich history should omit no parent cases 216s 216s If an upload tag leads to no parents before we reach an import tag, 216s it should be excluded from the export as this type of upload tag is not 216s supported for rich history preservation. This test also serves to verify 216s code paths that handle the NoParentError exception in the export 216s code. 216s 216s :param py.path tmpdir: the pytest standard tmpdir fixture. 216s :param repo: our standard repo fixture. 216s """ 216s Repo( 216s commits=[ 216s Commit(name='1', message='a'), 216s Commit(name='2', message='b'), 216s ], 216s tags={ 216s 'importer/import/1': Placeholder('1'), 216s 'importer/upload/2': Placeholder('2'), 216s } 216s > ).write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/rich_history_test.py:129: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpn9pmraf_/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s _____________ test_input_edge_cases[before_export0-before_import0] _____________ 216s 216s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_input_edge_cases_before_e0') 216s repo = 216s before_export = {'commits': [, , 'importer/upload/2': }} 216s before_import = {'commits': [], 'tags': {'importer/import/1': }} 216s 216s @pytest.mark.parametrize(['before_export', 'before_import'], [ 216s ( 216s # Commit messages with patch-like contents should not fail 216s 216s # If a commit message in rich history contains text in a patch-like 216s # format (such as a diff of some file), it should not prevent correct 216s # round-tripping. "git format-patch" followed by "git am" fails this 216s # test, for example. 216s { 216s 'commits': [ 216s Commit(name='1', message='a', tree=Tree({'a': Blob(b'a')})), 216s Commit( 216s name='2', 216s message='''First line 216s 216s Inline patch that isn't part of the real patch starts here 216s 216s --- a/foo 216s +++ b/foo 216s @@ -1 +1,2 @@ 216s foo 216s +bar 216s ''', 216s tree=Tree({'a': Blob(b'ab')}), 216s parents=[Placeholder('1')], 216s ), 216s ], 216s 'tags': { 216s 'importer/import/1': Placeholder('1'), 216s 'importer/upload/2': Placeholder('2'), 216s } 216s }, 216s { 216s 'commits': [ 216s Commit(name='b1', message='c', tree=Tree({'a': Blob(b'a')})), 216s ], 216s 'tags': {'importer/import/1': Placeholder('b1')}, 216s }, 216s ), 216s ( 216s # Commits that have no changes should round trip 216s { 216s 'commits': [ 216s Commit( 216s name='1', 216s message='a', 216s ), 216s Commit( 216s name='2', 216s message='b', 216s parents=[Placeholder('1')], 216s ), 216s ], 216s 'tags': { 216s 'importer/import/1': Placeholder('1'), 216s 'importer/upload/2': Placeholder('2'), 216s }, 216s }, 216s { 216s 'commits': [Commit(name='b1', message='c')], 216s 'tags': {'importer/import/1': Placeholder('b1')}, 216s }, 216s ), 216s ( 216s # Commits that have no commit message should round trip 216s { 216s 'commits': [ 216s Commit( 216s name='1', 216s message='a', 216s ), 216s Commit( 216s name='2', 216s message='', 216s tree=Tree({'a': Blob(b'a')}), 216s parents=[Placeholder('1')], 216s ), 216s ], 216s 'tags': { 216s 'importer/import/1': Placeholder('1'), 216s 'importer/upload/2': Placeholder('2'), 216s } 216s }, 216s { 216s 'commits': [Commit(name='b1', message='c')], 216s 'tags': {'importer/import/1': Placeholder('b1')}, 216s }, 216s ), 216s ]) 216s def test_input_edge_cases(tmpdir, repo, before_export, before_import): 216s """ 216s Edge cases in input rich history should reimport without failure 216s 216s Check that rich history preservation completes without an exception in 216s various cases. Details of each case are described in comments in the test 216s parameters above. 216s 216s Since these tests generally cover the mutated case (where rich history has 216s to be ported forward because parent commits have mutated), we must remove 216s and recreate the 'importer/import/1' tag so that it is different before 216s attempting reimport. This is done by deleting all ('importer/*') tags and 216s then using the before_import parameter to recreate it again. 216s 216s :param py.path tmpdir: the pytest standard tmpdir fixture. 216s :param GitUbuntuRepository repo: our standard repo fixture. 216s :param dict before_export: the parameters to supply to Repo() to construct 216s the repository that will be exported. 216s :param dict before_import: the parametsrs to supply to Repo() to add to the 216s repository before attempting reimport. 216s """ 216s > Repo(**before_export).write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/rich_history_test.py:260: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpmhxkskjh/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s _____________ test_input_edge_cases[before_export1-before_import1] _____________ 216s 216s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_input_edge_cases_before_e1') 216s repo = 216s before_export = {'commits': [, , 'importer/upload/2': }} 216s before_import = {'commits': [], 'tags': {'importer/import/1': }} 216s 216s @pytest.mark.parametrize(['before_export', 'before_import'], [ 216s ( 216s # Commit messages with patch-like contents should not fail 216s 216s # If a commit message in rich history contains text in a patch-like 216s # format (such as a diff of some file), it should not prevent correct 216s # round-tripping. "git format-patch" followed by "git am" fails this 216s # test, for example. 216s { 216s 'commits': [ 216s Commit(name='1', message='a', tree=Tree({'a': Blob(b'a')})), 216s Commit( 216s name='2', 216s message='''First line 216s 216s Inline patch that isn't part of the real patch starts here 216s 216s --- a/foo 216s +++ b/foo 216s @@ -1 +1,2 @@ 216s foo 216s +bar 216s ''', 216s tree=Tree({'a': Blob(b'ab')}), 216s parents=[Placeholder('1')], 216s ), 216s ], 216s 'tags': { 216s 'importer/import/1': Placeholder('1'), 216s 'importer/upload/2': Placeholder('2'), 216s } 216s }, 216s { 216s 'commits': [ 216s Commit(name='b1', message='c', tree=Tree({'a': Blob(b'a')})), 216s ], 216s 'tags': {'importer/import/1': Placeholder('b1')}, 216s }, 216s ), 216s ( 216s # Commits that have no changes should round trip 216s { 216s 'commits': [ 216s Commit( 216s name='1', 216s message='a', 216s ), 216s Commit( 216s name='2', 216s message='b', 216s parents=[Placeholder('1')], 216s ), 216s ], 216s 'tags': { 216s 'importer/import/1': Placeholder('1'), 216s 'importer/upload/2': Placeholder('2'), 216s }, 216s }, 216s { 216s 'commits': [Commit(name='b1', message='c')], 216s 'tags': {'importer/import/1': Placeholder('b1')}, 216s }, 216s ), 216s ( 216s # Commits that have no commit message should round trip 216s { 216s 'commits': [ 216s Commit( 216s name='1', 216s message='a', 216s ), 216s Commit( 216s name='2', 216s message='', 216s tree=Tree({'a': Blob(b'a')}), 216s parents=[Placeholder('1')], 216s ), 216s ], 216s 'tags': { 216s 'importer/import/1': Placeholder('1'), 216s 'importer/upload/2': Placeholder('2'), 216s } 216s }, 216s { 216s 'commits': [Commit(name='b1', message='c')], 216s 'tags': {'importer/import/1': Placeholder('b1')}, 216s }, 216s ), 216s ]) 216s def test_input_edge_cases(tmpdir, repo, before_export, before_import): 216s """ 216s Edge cases in input rich history should reimport without failure 216s 216s Check that rich history preservation completes without an exception in 216s various cases. Details of each case are described in comments in the test 216s parameters above. 216s 216s Since these tests generally cover the mutated case (where rich history has 216s to be ported forward because parent commits have mutated), we must remove 216s and recreate the 'importer/import/1' tag so that it is different before 216s attempting reimport. This is done by deleting all ('importer/*') tags and 216s then using the before_import parameter to recreate it again. 216s 216s :param py.path tmpdir: the pytest standard tmpdir fixture. 216s :param GitUbuntuRepository repo: our standard repo fixture. 216s :param dict before_export: the parameters to supply to Repo() to construct 216s the repository that will be exported. 216s :param dict before_import: the parametsrs to supply to Repo() to add to the 216s repository before attempting reimport. 216s """ 216s > Repo(**before_export).write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/rich_history_test.py:260: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmprgpnsvom/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s _____________ test_input_edge_cases[before_export2-before_import2] _____________ 216s 216s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_input_edge_cases_before_e2') 216s repo = 216s before_export = {'commits': [, , 'importer/upload/2': }} 216s before_import = {'commits': [], 'tags': {'importer/import/1': }} 216s 216s @pytest.mark.parametrize(['before_export', 'before_import'], [ 216s ( 216s # Commit messages with patch-like contents should not fail 216s 216s # If a commit message in rich history contains text in a patch-like 216s # format (such as a diff of some file), it should not prevent correct 216s # round-tripping. "git format-patch" followed by "git am" fails this 216s # test, for example. 216s { 216s 'commits': [ 216s Commit(name='1', message='a', tree=Tree({'a': Blob(b'a')})), 216s Commit( 216s name='2', 216s message='''First line 216s 216s Inline patch that isn't part of the real patch starts here 216s 216s --- a/foo 216s +++ b/foo 216s @@ -1 +1,2 @@ 216s foo 216s +bar 216s ''', 216s tree=Tree({'a': Blob(b'ab')}), 216s parents=[Placeholder('1')], 216s ), 216s ], 216s 'tags': { 216s 'importer/import/1': Placeholder('1'), 216s 'importer/upload/2': Placeholder('2'), 216s } 216s }, 216s { 216s 'commits': [ 216s Commit(name='b1', message='c', tree=Tree({'a': Blob(b'a')})), 216s ], 216s 'tags': {'importer/import/1': Placeholder('b1')}, 216s }, 216s ), 216s ( 216s # Commits that have no changes should round trip 216s { 216s 'commits': [ 216s Commit( 216s name='1', 216s message='a', 216s ), 216s Commit( 216s name='2', 216s message='b', 216s parents=[Placeholder('1')], 216s ), 216s ], 216s 'tags': { 216s 'importer/import/1': Placeholder('1'), 216s 'importer/upload/2': Placeholder('2'), 216s }, 216s }, 216s { 216s 'commits': [Commit(name='b1', message='c')], 216s 'tags': {'importer/import/1': Placeholder('b1')}, 216s }, 216s ), 216s ( 216s # Commits that have no commit message should round trip 216s { 216s 'commits': [ 216s Commit( 216s name='1', 216s message='a', 216s ), 216s Commit( 216s name='2', 216s message='', 216s tree=Tree({'a': Blob(b'a')}), 216s parents=[Placeholder('1')], 216s ), 216s ], 216s 'tags': { 216s 'importer/import/1': Placeholder('1'), 216s 'importer/upload/2': Placeholder('2'), 216s } 216s }, 216s { 216s 'commits': [Commit(name='b1', message='c')], 216s 'tags': {'importer/import/1': Placeholder('b1')}, 216s }, 216s ), 216s ]) 216s def test_input_edge_cases(tmpdir, repo, before_export, before_import): 216s """ 216s Edge cases in input rich history should reimport without failure 216s 216s Check that rich history preservation completes without an exception in 216s various cases. Details of each case are described in comments in the test 216s parameters above. 216s 216s Since these tests generally cover the mutated case (where rich history has 216s to be ported forward because parent commits have mutated), we must remove 216s and recreate the 'importer/import/1' tag so that it is different before 216s attempting reimport. This is done by deleting all ('importer/*') tags and 216s then using the before_import parameter to recreate it again. 216s 216s :param py.path tmpdir: the pytest standard tmpdir fixture. 216s :param GitUbuntuRepository repo: our standard repo fixture. 216s :param dict before_export: the parameters to supply to Repo() to construct 216s the repository that will be exported. 216s :param dict before_import: the parametsrs to supply to Repo() to add to the 216s repository before attempting reimport. 216s """ 216s > Repo(**before_export).write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/rich_history_test.py:260: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmpv2r0ifbg/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s _______________________ test_preservation_fast_forwards ________________________ 216s 216s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_preservation_fast_forward0') 216s repo = 216s 216s def test_preservation_fast_forwards(tmpdir, repo): 216s """Rich history that can be fast forwarded should not mutate 216s 216s :param py.path tmpdir: the pytest standard tmpdir fixture. 216s :param GitUbuntuRepository repo: our standard repo fixture. 216s """ 216s Repo( 216s commits=[ 216s Commit( 216s name='1', 216s message='a', 216s ), 216s Commit( 216s name='2', 216s message='', 216s tree=Tree({'a': Blob(b'a')}), 216s parents=[Placeholder('1')], 216s ), 216s ], 216s tags={ 216s 'importer/import/1': Placeholder('1'), 216s 'importer/upload/2': Placeholder('2'), 216s } 216s > ).write(repo.raw_repo) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/rich_history_test.py:294: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s self = 216s repo = pygit2.Repository('/tmp/tmps9q8yvub/.git/'), record = {} 216s 216s def write(self, repo, record=None): 216s replace_placeholders(self) 216s record = record or dict() 216s written_commits = [ 216s commit.write(repo=repo, record=record) 216s for commit 216s in self.commit_list 216s ] 216s for name, target in self.branches.items(): 216s repo.create_branch( 216s name, 216s repo.get(target.write(repo)).peel(pygit2.Commit), 216s ) 216s for name, target in self.tags.items(): 216s repo.create_tag( 216s name, 216s target.write(repo), 216s > pygit2.GIT_OBJ_COMMIT, 216s self.tagger.signature, 216s 'Tag message', 216s ) 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/repo_builder.py:389: AttributeError 216s _______________________ test_source_create_with_version ________________________ 216s 216s repo = 216s 216s def test_source_create_with_version(repo): 216s > version = get_spec_changelog_version(repo, version='3', native=True) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/source_builder_test.py:57: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 216s changelog = repo.get_changelog_from_treeish(tree_hash) 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 216s return Changelog.from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:569: in from_treeish 216s blob = follow_symlinks_to_blob( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 216s return _follow_symlinks_to_blob( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s repo = pygit2.Repository('/tmp/tmpjjzv1tvt/.git/') 216s top_tree_object = 216s search_path = 'debian/changelog' 216s _rel_tree = 216s _rel_path = '' 216s 216s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 216s _rel_tree=None, _rel_path='' 216s ): 216s '''Recursively follow a path down a tree, following symlinks, to find blob 216s 216s repo: pygit2.Repository object 216s top_tree: pygit2.Tree object of the top of the tree structure 216s search_path: '/'-separated path string of blob to find 216s _rel_tree: (internal) which tree to look further into 216s _rel_path: (internal) the path we are in so far 216s ''' 216s 216s NORMAL_BLOB_MODES = set([ 216s pygit2.GIT_FILEMODE_BLOB, 216s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 216s ]) 216s 216s _rel_tree = _rel_tree or top_tree_object 216s head, tail = posixpath.split(search_path) 216s 216s # A traditional functional split would put a single entry in head with tail 216s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 216s # to make it appear to have traditional semantics. 216s if not head: 216s head = tail 216s tail = None 216s 216s entry = _rel_tree[head] 216s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (native)' 216s dpkg-source: info: building source-builder-package in source-builder-package_3.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_3.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s _______________________ test_source_create_with_versions _______________________ 216s 216s repo = 216s 216s def test_source_create_with_versions(repo): 216s source_spec = target.SourceSpec(changelog_versions=['3', '4'], native=True) 216s with target.Source(source_spec) as f: 216s tree_hash = importer.dsc_to_tree_hash(repo.raw_repo, f) 216s > changelog = repo.get_changelog_from_treeish(tree_hash) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/source_builder_test.py:65: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 216s return Changelog.from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:569: in from_treeish 216s blob = follow_symlinks_to_blob( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 216s return _follow_symlinks_to_blob( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s repo = pygit2.Repository('/tmp/tmp7mfu_nax/.git/') 216s top_tree_object = 216s search_path = 'debian/changelog' 216s _rel_tree = 216s _rel_path = '' 216s 216s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 216s _rel_tree=None, _rel_path='' 216s ): 216s '''Recursively follow a path down a tree, following symlinks, to find blob 216s 216s repo: pygit2.Repository object 216s top_tree: pygit2.Tree object of the top of the tree structure 216s search_path: '/'-separated path string of blob to find 216s _rel_tree: (internal) which tree to look further into 216s _rel_path: (internal) the path we are in so far 216s ''' 216s 216s NORMAL_BLOB_MODES = set([ 216s pygit2.GIT_FILEMODE_BLOB, 216s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 216s ]) 216s 216s _rel_tree = _rel_tree or top_tree_object 216s head, tail = posixpath.split(search_path) 216s 216s # A traditional functional split would put a single entry in head with tail 216s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 216s # to make it appear to have traditional semantics. 216s if not head: 216s head = tail 216s tail = None 216s 216s entry = _rel_tree[head] 216s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (native)' 216s dpkg-source: info: building source-builder-package in source-builder-package_3.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_3.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s ____________ test_source_native_source_format[True-3.0 (native)\n] _____________ 216s 216s repo = 216s native = True, expected = b'3.0 (native)\n' 216s 216s @pytest.mark.parametrize('native,expected', [ 216s (True, b"3.0 (native)\n"), 216s (False, b"3.0 (quilt)\n"), 216s ]) 216s def test_source_native_source_format(repo, native, expected): 216s with target.Source(target.SourceSpec(native=native)) as dsc_path: 216s > blob = git_repository.follow_symlinks_to_blob( 216s repo.raw_repo, 216s dsc_path_to_tree(repo, dsc_path), 216s 'debian/source/format', 216s ) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/source_builder_test.py:133: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 216s return _follow_symlinks_to_blob( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s repo = pygit2.Repository('/tmp/tmpcm189eap/.git/') 216s top_tree_object = 216s search_path = 'debian/source/format' 216s _rel_tree = 216s _rel_path = '' 216s 216s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 216s _rel_tree=None, _rel_path='' 216s ): 216s '''Recursively follow a path down a tree, following symlinks, to find blob 216s 216s repo: pygit2.Repository object 216s top_tree: pygit2.Tree object of the top of the tree structure 216s search_path: '/'-separated path string of blob to find 216s _rel_tree: (internal) which tree to look further into 216s _rel_path: (internal) the path we are in so far 216s ''' 216s 216s NORMAL_BLOB_MODES = set([ 216s pygit2.GIT_FILEMODE_BLOB, 216s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 216s ]) 216s 216s _rel_tree = _rel_tree or top_tree_object 216s head, tail = posixpath.split(search_path) 216s 216s # A traditional functional split would put a single entry in head with tail 216s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 216s # to make it appear to have traditional semantics. 216s if not head: 216s head = tail 216s tail = None 216s 216s entry = _rel_tree[head] 216s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (native)' 216s dpkg-source: info: building source-builder-package in source-builder-package_1.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s ____________ test_source_native_source_format[False-3.0 (quilt)\n] _____________ 216s 216s repo = 216s native = False, expected = b'3.0 (quilt)\n' 216s 216s @pytest.mark.parametrize('native,expected', [ 216s (True, b"3.0 (native)\n"), 216s (False, b"3.0 (quilt)\n"), 216s ]) 216s def test_source_native_source_format(repo, native, expected): 216s with target.Source(target.SourceSpec(native=native)) as dsc_path: 216s > blob = git_repository.follow_symlinks_to_blob( 216s repo.raw_repo, 216s dsc_path_to_tree(repo, dsc_path), 216s 'debian/source/format', 216s ) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/source_builder_test.py:133: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 216s return _follow_symlinks_to_blob( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s repo = pygit2.Repository('/tmp/tmpskc_umiz/.git/') 216s top_tree_object = 216s search_path = 'debian/source/format' 216s _rel_tree = 216s _rel_path = '' 216s 216s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 216s _rel_tree=None, _rel_path='' 216s ): 216s '''Recursively follow a path down a tree, following symlinks, to find blob 216s 216s repo: pygit2.Repository object 216s top_tree: pygit2.Tree object of the top of the tree structure 216s search_path: '/'-separated path string of blob to find 216s _rel_tree: (internal) which tree to look further into 216s _rel_path: (internal) the path we are in so far 216s ''' 216s 216s NORMAL_BLOB_MODES = set([ 216s pygit2.GIT_FILEMODE_BLOB, 216s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 216s ]) 216s 216s _rel_tree = _rel_tree or top_tree_object 216s head, tail = posixpath.split(search_path) 216s 216s # A traditional functional split would put a single entry in head with tail 216s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 216s # to make it appear to have traditional semantics. 216s if not head: 216s head = tail 216s tail = None 216s 216s entry = _rel_tree[head] 216s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s _________________________ test_source_quilt_no_patches _________________________ 216s 216s repo = 216s 216s def test_source_quilt_no_patches(repo): 216s with target.Source(target.SourceSpec()) as dsc_path: 216s top = dsc_path_to_tree(repo, dsc_path) 216s debian_entry = top['debian'] 216s > assert debian_entry.type in [pygit2.GIT_OBJ_TREE, 'tree'] 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/source_builder_test.py:144: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s ________________________ test_source_quilt_with_patches ________________________ 216s 216s repo = 216s 216s def test_source_quilt_with_patches(repo): 216s spec = target.SourceSpec(has_patches=True) 216s with target.Source(spec) as dsc_path: 216s top = dsc_path_to_tree(repo, dsc_path) 216s expected_files = ['series', 'a', 'b'] 216s for basename in expected_files: 216s > assert git_repository.follow_symlinks_to_blob( 216s repo.raw_repo, 216s top, 216s 'debian/patches/%s' % basename, 216s ) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/source_builder_test.py:156: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 216s return _follow_symlinks_to_blob( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s repo = pygit2.Repository('/tmp/tmplo92_pjw/.git/') 216s top_tree_object = 216s search_path = 'debian/patches/series' 216s _rel_tree = 216s _rel_path = '' 216s 216s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 216s _rel_tree=None, _rel_path='' 216s ): 216s '''Recursively follow a path down a tree, following symlinks, to find blob 216s 216s repo: pygit2.Repository object 216s top_tree: pygit2.Tree object of the top of the tree structure 216s search_path: '/'-separated path string of blob to find 216s _rel_tree: (internal) which tree to look further into 216s _rel_path: (internal) the path we are in so far 216s ''' 216s 216s NORMAL_BLOB_MODES = set([ 216s pygit2.GIT_FILEMODE_BLOB, 216s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 216s ]) 216s 216s _rel_tree = _rel_tree or top_tree_object 216s head, tail = posixpath.split(search_path) 216s 216s # A traditional functional split would put a single entry in head with tail 216s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 216s # to make it appear to have traditional semantics. 216s if not head: 216s head = tail 216s tail = None 216s 216s entry = _rel_tree[head] 216s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: applying a 216s dpkg-source: info: applying b 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s ____________________ test_source_quilt_with_patches_applied ____________________ 216s 216s repo = 216s 216s def test_source_quilt_with_patches_applied(repo): 216s spec = target.SourceSpec(has_patches=True) 216s with target.Source(spec) as dsc_path: 216s top = dsc_path_to_tree(repo, dsc_path, patches_applied=True) 216s expected_files = [ 216s 'debian/patches/series', 216s 'debian/patches/a', 216s 'debian/patches/b', 216s 'a', 216s 'b', 216s ] 216s for filename in expected_files: 216s > assert git_repository.follow_symlinks_to_blob( 216s repo.raw_repo, 216s top, 216s filename, 216s ) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/source_builder_test.py:183: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 216s return _follow_symlinks_to_blob( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s repo = pygit2.Repository('/tmp/tmp43hf_e6c/.git/') 216s top_tree_object = 216s search_path = 'debian/patches/series' 216s _rel_tree = 216s _rel_path = '' 216s 216s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 216s _rel_tree=None, _rel_path='' 216s ): 216s '''Recursively follow a path down a tree, following symlinks, to find blob 216s 216s repo: pygit2.Repository object 216s top_tree: pygit2.Tree object of the top of the tree structure 216s search_path: '/'-separated path string of blob to find 216s _rel_tree: (internal) which tree to look further into 216s _rel_path: (internal) the path we are in so far 216s ''' 216s 216s NORMAL_BLOB_MODES = set([ 216s pygit2.GIT_FILEMODE_BLOB, 216s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 216s ]) 216s 216s _rel_tree = _rel_tree or top_tree_object 216s head, tail = posixpath.split(search_path) 216s 216s # A traditional functional split would put a single entry in head with tail 216s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 216s # to make it appear to have traditional semantics. 216s if not head: 216s head = tail 216s tail = None 216s 216s entry = _rel_tree[head] 216s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: applying a 216s dpkg-source: info: applying b 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: using patch list from debian/patches/series 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s ______________________ test_source_version_native_default ______________________ 216s 216s repo = 216s 216s def test_source_version_native_default(repo): 216s """The default version string for a native package should not have a 216s '-' in it. 216s """ 216s > version = get_spec_changelog_version(repo, native=True) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/source_builder_test.py:194: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 216s changelog = repo.get_changelog_from_treeish(tree_hash) 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 216s return Changelog.from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:569: in from_treeish 216s blob = follow_symlinks_to_blob( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 216s return _follow_symlinks_to_blob( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s repo = pygit2.Repository('/tmp/tmpxm0g_517/.git/') 216s top_tree_object = 216s search_path = 'debian/changelog' 216s _rel_tree = 216s _rel_path = '' 216s 216s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 216s _rel_tree=None, _rel_path='' 216s ): 216s '''Recursively follow a path down a tree, following symlinks, to find blob 216s 216s repo: pygit2.Repository object 216s top_tree: pygit2.Tree object of the top of the tree structure 216s search_path: '/'-separated path string of blob to find 216s _rel_tree: (internal) which tree to look further into 216s _rel_path: (internal) the path we are in so far 216s ''' 216s 216s NORMAL_BLOB_MODES = set([ 216s pygit2.GIT_FILEMODE_BLOB, 216s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 216s ]) 216s 216s _rel_tree = _rel_tree or top_tree_object 216s head, tail = posixpath.split(search_path) 216s 216s # A traditional functional split would put a single entry in head with tail 216s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 216s # to make it appear to have traditional semantics. 216s if not head: 216s head = tail 216s tail = None 216s 216s entry = _rel_tree[head] 216s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (native)' 216s dpkg-source: info: building source-builder-package in source-builder-package_1.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s ____________________ test_source_version_non_native_default ____________________ 216s 216s repo = 216s 216s def test_source_version_non_native_default(repo): 216s """The default version string for a non-native package should have a 216s '-' in it. 216s """ 216s > version = get_spec_changelog_version(repo, native=False) 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/source_builder_test.py:202: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 216s changelog = repo.get_changelog_from_treeish(tree_hash) 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 216s return Changelog.from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:569: in from_treeish 216s blob = follow_symlinks_to_blob( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 216s return _follow_symlinks_to_blob( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s repo = pygit2.Repository('/tmp/tmpbd4qdwgq/.git/') 216s top_tree_object = 216s search_path = 'debian/changelog' 216s _rel_tree = 216s _rel_path = '' 216s 216s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 216s _rel_tree=None, _rel_path='' 216s ): 216s '''Recursively follow a path down a tree, following symlinks, to find blob 216s 216s repo: pygit2.Repository object 216s top_tree: pygit2.Tree object of the top of the tree structure 216s search_path: '/'-separated path string of blob to find 216s _rel_tree: (internal) which tree to look further into 216s _rel_path: (internal) the path we are in so far 216s ''' 216s 216s NORMAL_BLOB_MODES = set([ 216s pygit2.GIT_FILEMODE_BLOB, 216s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 216s ]) 216s 216s _rel_tree = _rel_tree or top_tree_object 216s head, tail = posixpath.split(search_path) 216s 216s # A traditional functional split would put a single entry in head with tail 216s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 216s # to make it appear to have traditional semantics. 216s if not head: 216s head = tail 216s tail = None 216s 216s entry = _rel_tree[head] 216s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s _____________________ test_source_version_native_specific ______________________ 216s 216s repo = 216s 216s def test_source_version_native_specific(repo): 216s """We should be able to create a native package with a 216s native-looking version string. 216s """ 216s > version = get_spec_changelog_version(repo, native=True, version='1.0') 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/source_builder_test.py:210: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 216s changelog = repo.get_changelog_from_treeish(tree_hash) 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 216s return Changelog.from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:569: in from_treeish 216s blob = follow_symlinks_to_blob( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 216s return _follow_symlinks_to_blob( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s repo = pygit2.Repository('/tmp/tmpy1fs67je/.git/') 216s top_tree_object = 216s search_path = 'debian/changelog' 216s _rel_tree = 216s _rel_path = '' 216s 216s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 216s _rel_tree=None, _rel_path='' 216s ): 216s '''Recursively follow a path down a tree, following symlinks, to find blob 216s 216s repo: pygit2.Repository object 216s top_tree: pygit2.Tree object of the top of the tree structure 216s search_path: '/'-separated path string of blob to find 216s _rel_tree: (internal) which tree to look further into 216s _rel_path: (internal) the path we are in so far 216s ''' 216s 216s NORMAL_BLOB_MODES = set([ 216s pygit2.GIT_FILEMODE_BLOB, 216s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 216s ]) 216s 216s _rel_tree = _rel_tree or top_tree_object 216s head, tail = posixpath.split(search_path) 216s 216s # A traditional functional split would put a single entry in head with tail 216s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 216s # to make it appear to have traditional semantics. 216s if not head: 216s head = tail 216s tail = None 216s 216s entry = _rel_tree[head] 216s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (native)' 216s dpkg-source: info: building source-builder-package in source-builder-package_1.0.tar.xz 216s dpkg-source: info: building source-builder-package in source-builder-package_1.0.dsc 216s ----------------------------- Captured stderr call ----------------------------- 216s dpkg-source: warning: missing information for output field Standards-Version 216s ___________________ test_source_version_non_native_specific ____________________ 216s 216s repo = 216s 216s def test_source_version_non_native_specific(repo): 216s """We should be able to create a non-native package with a 216s non-native-looking version string. 216s """ 216s > version = get_spec_changelog_version(repo, native=False, version='1.0-1') 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/source_builder_test.py:218: 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 216s changelog = repo.get_changelog_from_treeish(tree_hash) 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 216s return Changelog.from_treeish( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:569: in from_treeish 216s blob = follow_symlinks_to_blob( 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 216s return _follow_symlinks_to_blob( 216s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 216s 216s repo = pygit2.Repository('/tmp/tmp0faf_s_n/.git/') 216s top_tree_object = 216s search_path = 'debian/changelog' 216s _rel_tree = 216s _rel_path = '' 216s 216s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 216s _rel_tree=None, _rel_path='' 216s ): 216s '''Recursively follow a path down a tree, following symlinks, to find blob 216s 216s repo: pygit2.Repository object 216s top_tree: pygit2.Tree object of the top of the tree structure 216s search_path: '/'-separated path string of blob to find 216s _rel_tree: (internal) which tree to look further into 216s _rel_path: (internal) the path we are in so far 216s ''' 216s 216s NORMAL_BLOB_MODES = set([ 216s pygit2.GIT_FILEMODE_BLOB, 216s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 216s ]) 216s 216s _rel_tree = _rel_tree or top_tree_object 216s head, tail = posixpath.split(search_path) 216s 216s # A traditional functional split would put a single entry in head with tail 216s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 216s # to make it appear to have traditional semantics. 216s if not head: 216s head = tail 216s tail = None 216s 216s entry = _rel_tree[head] 216s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 216s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 216s 216s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/git_repository.py:68: AttributeError 216s ----------------------------- Captured stdout call ----------------------------- 216s dpkg-source: info: using source format '3.0 (quilt)' 216s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.0.orig.tar.gz 216s dpkg-source: info: building source-builder-package in source-builder-package_1.0-1.debian.tar.xz 217s dpkg-source: info: building source-builder-package in source-builder-package_1.0-1.dsc 217s ----------------------------- Captured stderr call ----------------------------- 217s dpkg-source: warning: missing information for output field Standards-Version 217s =============================== warnings summary =============================== 217s gitubuntu/__main__.py:7 217s /tmp/autopkgtest.1k2RJG/build.6jh/src/gitubuntu/__main__.py:7: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html 217s import pkg_resources 217s 217s ../../../../usr/lib/python3/dist-packages/pkg_resources/__init__.py:3154 217s /usr/lib/python3/dist-packages/pkg_resources/__init__.py:3154: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('logilab')`. 217s 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 217s declare_namespace(pkg) 217s 217s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 217s 217s ---------- coverage: platform linux, python 3.12.7-final-0 ----------- 217s Name Stmts Miss Cover 217s --------------------------------------------------------------- 217s gitubuntu/__init__.py 0 0 100% 217s gitubuntu/__main__.py 103 94 9% 217s gitubuntu/build.py 185 131 29% 217s gitubuntu/cache.py 1 0 100% 217s gitubuntu/clone.py 70 54 23% 217s gitubuntu/dsc.py 65 16 75% 217s gitubuntu/exportorig.py 48 37 23% 217s gitubuntu/git_repository.py 1103 521 53% 217s gitubuntu/git_repository_test.py 316 40 87% 217s gitubuntu/importer.py 707 446 37% 217s gitubuntu/importer_service.py 215 22 90% 217s gitubuntu/importer_service_broker.py 60 49 18% 217s gitubuntu/importer_service_ipc.py 12 2 83% 217s gitubuntu/importer_service_poller.py 37 25 32% 217s gitubuntu/importer_service_test.py 147 0 100% 217s gitubuntu/importer_service_worker.py 87 64 26% 217s gitubuntu/importer_service_worker_test.py 18 0 100% 217s gitubuntu/importer_tag_test.py 47 20 57% 217s gitubuntu/importer_test.py 388 133 66% 217s gitubuntu/integration_test.py 67 26 61% 217s gitubuntu/logging.py 8 4 50% 217s gitubuntu/merge.py 219 192 12% 217s gitubuntu/patch_state.py 2 0 100% 217s gitubuntu/prepare_upload.py 86 3 97% 217s gitubuntu/prepare_upload_test.py 152 0 100% 217s gitubuntu/queue.py 174 148 15% 217s gitubuntu/remote.py 100 85 15% 217s gitubuntu/repo_builder.py 162 0 100% 217s gitubuntu/repo_builder_test.py 159 12 92% 217s gitubuntu/repo_comparator.py 32 25 22% 217s gitubuntu/rich_history.py 67 45 33% 217s gitubuntu/rich_history_test.py 53 31 42% 217s gitubuntu/run.py 72 12 83% 217s gitubuntu/scriptutils.py 11 0 100% 217s gitubuntu/source_builder.py 119 0 100% 217s gitubuntu/source_builder_test.py 105 18 83% 217s gitubuntu/source_information.py 339 133 61% 217s gitubuntu/source_information_test.py 78 3 96% 217s gitubuntu/spec.py 3 0 100% 217s gitubuntu/submit.py 103 86 17% 217s gitubuntu/tag.py 78 69 12% 217s gitubuntu/test_fixtures.py 29 5 83% 217s gitubuntu/test_util.py 5 0 100% 217s gitubuntu/version.py 1 0 100% 217s gitubuntu/versioning.py 124 16 87% 217s --------------------------------------------------------------- 217s TOTAL 5957 2567 57% 217s 217s =========================== short test summary info ============================ 217s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[0] 217s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[1] 217s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[2] 217s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[3] 217s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[4] 217s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob_not_found[tree1] 217s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob_not_found[tree2] 217s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob_not_found[tree3] 217s FAILED gitubuntu/git_repository_test.py::test_git_escape_dir_to_tree - Attrib... 217s FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data1-debian/patches/series] 217s FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data2-debian/patches/series] 217s FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data3-debian/patches/debian.series] 217s FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data4-debian/patches/debian.series] 217s FAILED gitubuntu/git_repository_test.py::test_quilt_env - AttributeError: mod... 217s FAILED gitubuntu/git_repository_test.py::test_repo_quilt_env - AttributeError... 217s FAILED gitubuntu/git_repository_test.py::test_repo_quilt_env_from_treeish_str 217s 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] 217s 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] 217s 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] 217s FAILED gitubuntu/git_repository_test.py::test_commit_tree - AttributeError: m... 217s FAILED gitubuntu/git_repository_test.py::test_descendant_of[root-root-False] 217s FAILED gitubuntu/git_repository_test.py::test_descendant_of[child1-root-True] 217s FAILED gitubuntu/git_repository_test.py::test_descendant_of[root-child1-False] 217s FAILED gitubuntu/git_repository_test.py::test_descendant_of[grandchild1-root-True] 217s FAILED gitubuntu/git_repository_test.py::test_descendant_of[child1-child2-False] 217s FAILED gitubuntu/git_repository_test.py::test_descendant_of[root-disjoint-False] 217s FAILED gitubuntu/git_repository_test.py::test_create_tag - AttributeError: mo... 217s FAILED gitubuntu/git_repository_test.py::test_get_all_reimport_tags - Attribu... 217s FAILED gitubuntu/git_repository_test.py::test_get_head_info - AttributeError:... 217s 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] 217s 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] 217s 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] 217s 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] 217s 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] 217s 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] 217s 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] 217s 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] 217s FAILED gitubuntu/importer_tag_test.py::test_import_applied_spi_tags[input_repo0-validation_repo_delta0-validation_repo_expected_treewise_refs0-True] 217s FAILED gitubuntu/importer_tag_test.py::test_import_applied_spi_tags[input_repo2-validation_repo_delta2-validation_repo_expected_treewise_refs2-False] 217s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo1-PatchState.UNAPPLIED-expected1] 217s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo2-PatchState.UNAPPLIED-expected2] 217s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo4-PatchState.APPLIED-expected4] 217s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo5-PatchState.APPLIED-expected5] 217s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags_ordering - A... 217s FAILED gitubuntu/importer_test.py::test_create_import_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] 217s FAILED gitubuntu/importer_test.py::test_create_import_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] 217s FAILED gitubuntu/importer_test.py::test_create_import_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] 217s FAILED gitubuntu/importer_test.py::test_create_import_tag_hash_stability_on_first_import 217s FAILED gitubuntu/importer_test.py::test_create_import_tag_hash_stability_on_reimport 217s FAILED gitubuntu/importer_test.py::test_create_applied_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] 217s FAILED gitubuntu/importer_test.py::test_create_applied_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] 217s FAILED gitubuntu/importer_test.py::test_create_applied_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] 217s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo1-parent_overrides1-changelog_versions1-PatchState.UNAPPLIED-expected_refs1] 217s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo2-parent_overrides2-changelog_versions2-PatchState.UNAPPLIED-expected_refs2] 217s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo3-parent_overrides3-changelog_versions3-PatchState.UNAPPLIED-expected_refs3] 217s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo5-parent_overrides5-changelog_versions5-PatchState.APPLIED-expected_refs5] 217s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo6-parent_overrides6-changelog_versions6-PatchState.APPLIED-expected_refs6] 217s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo7-parent_overrides7-changelog_versions7-PatchState.APPLIED-expected_refs7] 217s FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo0-published_spec0-True] 217s FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo1-published_spec1-True] 217s FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo2-published_spec2-RichHistoryTreeMismatch] 217s FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo3-published_spec3-RichHistoryHasNoChangelogParentAncestor] 217s FAILED gitubuntu/importer_test.py::test_add_changelog_note_to_commit - Attrib... 217s FAILED gitubuntu/importer_test.py::test_add_changelog_note_to_commit_utf8 - A... 217s FAILED gitubuntu/importer_test.py::test_double_changelog_note_add_does_not_fail 217s FAILED gitubuntu/importer_test.py::test_create_import_note - AttributeError: ... 217s FAILED gitubuntu/importer_test.py::test_create_import_note_timestamp - Attrib... 217s FAILED gitubuntu/importer_test.py::test_import_creates_import_note - Attribut... 217s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_quilt_patches - ... 217s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo0-changelog_versions0-validation_repo_delta0-validation_repo_expected_identical_refs0] 217s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo1-changelog_versions1-validation_repo_delta1-validation_repo_expected_identical_refs1] 217s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo2-changelog_versions2-validation_repo_delta2-validation_repo_expected_identical_refs2] 217s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo3-changelog_versions3-validation_repo_delta3-validation_repo_expected_identical_refs3] 217s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parent_override 217s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parent_override_failure 217s FAILED gitubuntu/importer_test.py::test_import_applied_spi_parenting[input_repo0-expected_ancestor_commits0-expected_parent_commits0] 217s FAILED gitubuntu/importer_test.py::test_authorship_date[False-Fri, 2 Feb 1971 12:34:56 +0100-expected_result0] 217s FAILED gitubuntu/importer_test.py::test_authorship_date[True-Failday, 30 Feb 1971 99:99:99 +9999-expected_result1] 217s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file 217s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_fetch_failure_retry 217s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_missing_ref 217s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_missing_commit 217s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_not_a_commit 217s FAILED gitubuntu/integration_test.py::test_reconstruct_changelog - AttributeE... 217s FAILED gitubuntu/repo_builder_test.py::TestObjectCreation::testRepoBranchesTags 217s FAILED gitubuntu/repo_builder_test.py::TestObjectCreation::testRepoTagger - A... 217s FAILED gitubuntu/repo_builder_test.py::test_source_tree - AttributeError: mod... 217s FAILED gitubuntu/rich_history_test.py::test_preservation - AttributeError: mo... 217s FAILED gitubuntu/rich_history_test.py::test_preservation_multiple_parents - A... 217s FAILED gitubuntu/rich_history_test.py::test_preservation_no_parents - Attribu... 217s FAILED gitubuntu/rich_history_test.py::test_input_edge_cases[before_export0-before_import0] 217s FAILED gitubuntu/rich_history_test.py::test_input_edge_cases[before_export1-before_import1] 217s FAILED gitubuntu/rich_history_test.py::test_input_edge_cases[before_export2-before_import2] 217s FAILED gitubuntu/rich_history_test.py::test_preservation_fast_forwards - Attr... 217s FAILED gitubuntu/source_builder_test.py::test_source_create_with_version - At... 217s FAILED gitubuntu/source_builder_test.py::test_source_create_with_versions - A... 217s FAILED gitubuntu/source_builder_test.py::test_source_native_source_format[True-3.0 (native)\n] 217s FAILED gitubuntu/source_builder_test.py::test_source_native_source_format[False-3.0 (quilt)\n] 217s FAILED gitubuntu/source_builder_test.py::test_source_quilt_no_patches - Attri... 217s FAILED gitubuntu/source_builder_test.py::test_source_quilt_with_patches - Att... 217s FAILED gitubuntu/source_builder_test.py::test_source_quilt_with_patches_applied 217s FAILED gitubuntu/source_builder_test.py::test_source_version_native_default 217s FAILED gitubuntu/source_builder_test.py::test_source_version_non_native_default 217s FAILED gitubuntu/source_builder_test.py::test_source_version_native_specific 217s FAILED gitubuntu/source_builder_test.py::test_source_version_non_native_specific 217s = 105 failed, 348 passed, 3 skipped, 3 xfailed, 2 warnings in 62.73s (0:01:02) = 217s pytest failed; self test will fail 217s autopkgtest [09:37:17]: test self-test: -----------------------] 218s autopkgtest [09:37:18]: test self-test: - - - - - - - - - - results - - - - - - - - - - 218s self-test FAIL non-zero exit status 1 219s autopkgtest [09:37:19]: @@@@@@@@@@@@@@@@@@@@ summary 219s self-test FAIL non-zero exit status 1 223s nova [W] Skipping flock for amd64 223s Creating nova instance adt-plucky-i386-git-ubuntu-20241126-093339-juju-7f2275-prod-proposed-migration-environment-20-5c13d378-2bb2-472f-8b62-cc08f050dd31 from image adt/ubuntu-plucky-amd64-server-20241119.img (UUID 2e5306de-7efa-448c-bc27-5518979e66f0)...