0s autopkgtest [10:37:56]: starting date and time: 2024-11-25 10:37:56+0000 0s autopkgtest [10:37:56]: git checkout: 6f3be7a8 Fix armhf LXD image generation for plucky 0s autopkgtest [10:37:56]: host juju-7f2275-prod-proposed-migration-environment-20; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.olku9qxu/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:python-pygit2 --apt-upgrade git-ubuntu --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=python-pygit2/1.16.0-2 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor builder-cpu2-ram4-disk20 --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-20@bos03-26.secgroup --name adt-plucky-amd64-git-ubuntu-20241125-092049-juju-7f2275-prod-proposed-migration-environment-20-bdaf9ab4-49d1-4485-a103-c188db8f9133 --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/ 44s autopkgtest [10:38:40]: testbed dpkg architecture: amd64 44s autopkgtest [10:38:40]: testbed apt version: 2.9.8 44s autopkgtest [10:38:40]: @@@@@@@@@@@@@@@@@@@@ test bed setup 45s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [73.9 kB] 45s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [796 kB] 45s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/restricted Sources [9704 B] 45s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [50.2 kB] 45s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [14.2 kB] 45s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 Packages [83.4 kB] 45s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/main i386 Packages [42.8 kB] 45s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/restricted amd64 Packages [40.1 kB] 45s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/restricted i386 Packages [2408 B] 45s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/universe i386 Packages [226 kB] 45s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe amd64 Packages [641 kB] 46s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse i386 Packages [5528 B] 46s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse amd64 Packages [20.2 kB] 46s Fetched 2006 kB in 1s (1815 kB/s) 46s Reading package lists... 49s Reading package lists... 49s Building dependency tree... 49s Reading state information... 49s Calculating upgrade... 49s The following package was automatically installed and is no longer required: 49s libsgutils2-1.46-2 49s Use 'sudo apt autoremove' to remove it. 49s The following NEW packages will be installed: 49s libsgutils2-1.48 49s The following packages will be upgraded: 49s amd64-microcode bash bpftrace curl debconf debconf-i18n distro-info 49s dracut-install fwupd-signed gir1.2-girepository-2.0 gir1.2-glib-2.0 hostname 49s init init-system-helpers intel-microcode libaudit-common libaudit1 49s libcurl3t64-gnutls libcurl4t64 libgirepository-1.0-1 libglib2.0-0t64 49s libglib2.0-data liblzma5 libpam-modules libpam-modules-bin libpam-runtime 49s libpam0g libplymouth5 libselinux1 libsemanage-common libsemanage2 linux-base 49s lto-disabled-list lxd-installer openssh-client openssh-server 49s openssh-sftp-server pinentry-curses plymouth plymouth-theme-ubuntu-text 49s python3-blinker python3-dbus python3-debconf python3-gi 49s python3-jsonschema-specifications python3-rpds-py python3-yaml sg3-utils 49s sg3-utils-udev vim-common vim-tiny xxd xz-utils 50s 53 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 50s Need to get 20.4 MB of archives. 50s After this operation, 4254 kB of additional disk space will be used. 50s Get:1 http://ftpmaster.internal/ubuntu plucky/main amd64 bash amd64 5.2.32-1ubuntu2 [918 kB] 50s Get:2 http://ftpmaster.internal/ubuntu plucky/main amd64 hostname amd64 3.25 [11.1 kB] 50s Get:3 http://ftpmaster.internal/ubuntu plucky/main amd64 init-system-helpers all 1.67ubuntu1 [39.1 kB] 50s Get:4 http://ftpmaster.internal/ubuntu plucky/main amd64 libaudit-common all 1:4.0.2-2ubuntu1 [6578 B] 50s Get:5 http://ftpmaster.internal/ubuntu plucky/main amd64 libaudit1 amd64 1:4.0.2-2ubuntu1 [53.9 kB] 50s Get:6 http://ftpmaster.internal/ubuntu plucky/main amd64 debconf-i18n all 1.5.87ubuntu1 [204 kB] 50s Get:7 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-debconf all 1.5.87ubuntu1 [4156 B] 50s Get:8 http://ftpmaster.internal/ubuntu plucky/main amd64 debconf all 1.5.87ubuntu1 [124 kB] 50s Get:9 http://ftpmaster.internal/ubuntu plucky/main amd64 libpam0g amd64 1.5.3-7ubuntu4 [69.6 kB] 50s Get:10 http://ftpmaster.internal/ubuntu plucky/main amd64 libselinux1 amd64 3.7-3ubuntu1 [86.9 kB] 50s Get:11 http://ftpmaster.internal/ubuntu plucky/main amd64 libpam-modules-bin amd64 1.5.3-7ubuntu4 [53.7 kB] 50s Get:12 http://ftpmaster.internal/ubuntu plucky/main amd64 libpam-modules amd64 1.5.3-7ubuntu4 [294 kB] 50s Get:13 http://ftpmaster.internal/ubuntu plucky/main amd64 init amd64 1.67ubuntu1 [6428 B] 50s Get:14 http://ftpmaster.internal/ubuntu plucky/main amd64 openssh-sftp-server amd64 1:9.9p1-3ubuntu2 [41.2 kB] 50s Get:15 http://ftpmaster.internal/ubuntu plucky/main amd64 openssh-server amd64 1:9.9p1-3ubuntu2 [625 kB] 50s Get:16 http://ftpmaster.internal/ubuntu plucky/main amd64 openssh-client amd64 1:9.9p1-3ubuntu2 [1080 kB] 51s Get:17 http://ftpmaster.internal/ubuntu plucky/main amd64 libpam-runtime all 1.5.3-7ubuntu4 [40.8 kB] 51s Get:18 http://ftpmaster.internal/ubuntu plucky/main amd64 liblzma5 amd64 5.6.3-1 [156 kB] 51s Get:19 http://ftpmaster.internal/ubuntu plucky/main amd64 libsemanage-common all 3.7-2build1 [7186 B] 51s Get:20 http://ftpmaster.internal/ubuntu plucky/main amd64 libsemanage2 amd64 3.7-2build1 [105 kB] 51s Get:21 http://ftpmaster.internal/ubuntu plucky/main amd64 distro-info amd64 1.12 [20.0 kB] 51s Get:22 http://ftpmaster.internal/ubuntu plucky/main amd64 gir1.2-girepository-2.0 amd64 1.82.0-2 [25.3 kB] 51s Get:23 http://ftpmaster.internal/ubuntu plucky/main amd64 gir1.2-glib-2.0 amd64 2.82.2-3 [182 kB] 51s Get:24 http://ftpmaster.internal/ubuntu plucky/main amd64 libglib2.0-0t64 amd64 2.82.2-3 [1655 kB] 51s Get:25 http://ftpmaster.internal/ubuntu plucky/main amd64 libgirepository-1.0-1 amd64 1.82.0-2 [88.7 kB] 51s Get:26 http://ftpmaster.internal/ubuntu plucky/main amd64 libglib2.0-data all 2.82.2-3 [51.7 kB] 51s Get:27 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-dbus amd64 1.3.2-5build4 [110 kB] 51s Get:28 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-gi amd64 3.50.0-3build1 [293 kB] 51s Get:29 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-yaml amd64 6.0.2-1build1 [187 kB] 51s Get:30 http://ftpmaster.internal/ubuntu plucky/main amd64 vim-tiny amd64 2:9.1.0861-1ubuntu1 [1037 kB] 51s Get:31 http://ftpmaster.internal/ubuntu plucky/main amd64 vim-common all 2:9.1.0861-1ubuntu1 [395 kB] 51s Get:32 http://ftpmaster.internal/ubuntu plucky/main amd64 xxd amd64 2:9.1.0861-1ubuntu1 [67.8 kB] 51s Get:33 http://ftpmaster.internal/ubuntu plucky/main amd64 libplymouth5 amd64 24.004.60-2ubuntu4 [145 kB] 51s Get:34 http://ftpmaster.internal/ubuntu plucky/main amd64 plymouth-theme-ubuntu-text amd64 24.004.60-2ubuntu4 [10.2 kB] 51s Get:35 http://ftpmaster.internal/ubuntu plucky/main amd64 plymouth amd64 24.004.60-2ubuntu4 [139 kB] 51s Get:36 http://ftpmaster.internal/ubuntu plucky/main amd64 xz-utils amd64 5.6.3-1 [276 kB] 51s Get:37 http://ftpmaster.internal/ubuntu plucky/main amd64 bpftrace amd64 0.21.2-2ubuntu3 [1787 kB] 52s Get:38 http://ftpmaster.internal/ubuntu plucky/main amd64 curl amd64 8.11.0-1ubuntu2 [250 kB] 52s Get:39 http://ftpmaster.internal/ubuntu plucky/main amd64 libcurl4t64 amd64 8.11.0-1ubuntu2 [429 kB] 52s Get:40 http://ftpmaster.internal/ubuntu plucky/main amd64 dracut-install amd64 105-2ubuntu2 [35.9 kB] 52s Get:41 http://ftpmaster.internal/ubuntu plucky/main amd64 fwupd-signed amd64 1.55+1.7-1 [30.6 kB] 52s Get:42 http://ftpmaster.internal/ubuntu plucky/main amd64 libcurl3t64-gnutls amd64 8.11.0-1ubuntu2 [423 kB] 52s Get:43 http://ftpmaster.internal/ubuntu plucky/main amd64 libsgutils2-1.48 amd64 1.48-0ubuntu1 [124 kB] 52s Get:44 http://ftpmaster.internal/ubuntu plucky/main amd64 linux-base all 4.10.1ubuntu1 [34.8 kB] 52s Get:45 http://ftpmaster.internal/ubuntu plucky/main amd64 lto-disabled-list all 54 [12.2 kB] 52s Get:46 http://ftpmaster.internal/ubuntu plucky/main amd64 lxd-installer all 10 [5264 B] 52s Get:47 http://ftpmaster.internal/ubuntu plucky/main amd64 pinentry-curses amd64 1.3.1-0ubuntu2 [41.6 kB] 52s Get:48 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-blinker all 1.9.0-1 [10.7 kB] 52s Get:49 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-rpds-py amd64 0.21.0-2ubuntu1 [323 kB] 52s Get:50 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-jsonschema-specifications all 2023.12.1-2 [9116 B] 52s Get:51 http://ftpmaster.internal/ubuntu plucky/main amd64 sg3-utils amd64 1.48-0ubuntu1 [1042 kB] 52s Get:52 http://ftpmaster.internal/ubuntu plucky/main amd64 sg3-utils-udev all 1.48-0ubuntu1 [6608 B] 52s Get:53 http://ftpmaster.internal/ubuntu plucky/main amd64 amd64-microcode amd64 3.20240820.1ubuntu1 [187 kB] 52s Get:54 http://ftpmaster.internal/ubuntu plucky/main amd64 intel-microcode amd64 3.20241112.1ubuntu2 [7055 kB] 53s Preconfiguring packages ... 53s Fetched 20.4 MB in 3s (7113 kB/s) 53s (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.) 53s Preparing to unpack .../bash_5.2.32-1ubuntu2_amd64.deb ... 53s Unpacking bash (5.2.32-1ubuntu2) over (5.2.32-1ubuntu1) ... 53s Setting up bash (5.2.32-1ubuntu2) ... 53s 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 53s (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.) 53s Preparing to unpack .../hostname_3.25_amd64.deb ... 53s Unpacking hostname (3.25) over (3.23+nmu2ubuntu2) ... 53s Setting up hostname (3.25) ... 53s (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.) 53s Preparing to unpack .../init-system-helpers_1.67ubuntu1_all.deb ... 53s Unpacking init-system-helpers (1.67ubuntu1) over (1.66ubuntu1) ... 53s Setting up init-system-helpers (1.67ubuntu1) ... 53s (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.) 53s Preparing to unpack .../libaudit-common_1%3a4.0.2-2ubuntu1_all.deb ... 53s Unpacking libaudit-common (1:4.0.2-2ubuntu1) over (1:4.0.1-1ubuntu2) ... 53s Setting up libaudit-common (1:4.0.2-2ubuntu1) ... 53s (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.) 53s Preparing to unpack .../libaudit1_1%3a4.0.2-2ubuntu1_amd64.deb ... 53s Unpacking libaudit1:amd64 (1:4.0.2-2ubuntu1) over (1:4.0.1-1ubuntu2) ... 53s Setting up libaudit1:amd64 (1:4.0.2-2ubuntu1) ... 53s (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.) 53s Preparing to unpack .../debconf-i18n_1.5.87ubuntu1_all.deb ... 53s Unpacking debconf-i18n (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 54s Preparing to unpack .../python3-debconf_1.5.87ubuntu1_all.deb ... 54s Unpacking python3-debconf (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 54s Preparing to unpack .../debconf_1.5.87ubuntu1_all.deb ... 54s Unpacking debconf (1.5.87ubuntu1) over (1.5.86ubuntu1) ... 54s Setting up debconf (1.5.87ubuntu1) ... 54s (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.) 54s Preparing to unpack .../libpam0g_1.5.3-7ubuntu4_amd64.deb ... 54s Unpacking libpam0g:amd64 (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 54s Setting up libpam0g:amd64 (1.5.3-7ubuntu4) ... 54s (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.) 54s Preparing to unpack .../libselinux1_3.7-3ubuntu1_amd64.deb ... 54s Unpacking libselinux1:amd64 (3.7-3ubuntu1) over (3.5-2ubuntu5) ... 54s Setting up libselinux1:amd64 (3.7-3ubuntu1) ... 54s (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.) 54s Preparing to unpack .../libpam-modules-bin_1.5.3-7ubuntu4_amd64.deb ... 54s Unpacking libpam-modules-bin (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 54s Setting up libpam-modules-bin (1.5.3-7ubuntu4) ... 54s pam_namespace.service is a disabled or a static unit not running, not starting it. 55s (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.) 55s Preparing to unpack .../libpam-modules_1.5.3-7ubuntu4_amd64.deb ... 55s Unpacking libpam-modules:amd64 (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 55s Setting up libpam-modules:amd64 (1.5.3-7ubuntu4) ... 55s (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.) 55s Preparing to unpack .../init_1.67ubuntu1_amd64.deb ... 55s Unpacking init (1.67ubuntu1) over (1.66ubuntu1) ... 55s Preparing to unpack .../openssh-sftp-server_1%3a9.9p1-3ubuntu2_amd64.deb ... 55s Unpacking openssh-sftp-server (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 55s Preparing to unpack .../openssh-server_1%3a9.9p1-3ubuntu2_amd64.deb ... 55s Unpacking openssh-server (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 55s Preparing to unpack .../openssh-client_1%3a9.9p1-3ubuntu2_amd64.deb ... 55s Unpacking openssh-client (1:9.9p1-3ubuntu2) over (1:9.7p1-7ubuntu5) ... 55s Preparing to unpack .../libpam-runtime_1.5.3-7ubuntu4_all.deb ... 55s Unpacking libpam-runtime (1.5.3-7ubuntu4) over (1.5.3-7ubuntu2) ... 55s Setting up libpam-runtime (1.5.3-7ubuntu4) ... 55s (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 ... 75622 files and directories currently installed.) 55s Preparing to unpack .../liblzma5_5.6.3-1_amd64.deb ... 55s Unpacking liblzma5:amd64 (5.6.3-1) over (5.6.2-2) ... 55s Setting up liblzma5:amd64 (5.6.3-1) ... 55s (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 ... 75622 files and directories currently installed.) 55s Preparing to unpack .../libsemanage-common_3.7-2build1_all.deb ... 55s Unpacking libsemanage-common (3.7-2build1) over (3.5-1build6) ... 55s Setting up libsemanage-common (3.7-2build1) ... 56s (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 ... 75621 files and directories currently installed.) 56s Preparing to unpack .../libsemanage2_3.7-2build1_amd64.deb ... 56s Unpacking libsemanage2:amd64 (3.7-2build1) over (3.5-1build6) ... 56s Setting up libsemanage2:amd64 (3.7-2build1) ... 56s (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 ... 75621 files and directories currently installed.) 56s Preparing to unpack .../00-distro-info_1.12_amd64.deb ... 56s Unpacking distro-info (1.12) over (1.9) ... 56s Preparing to unpack .../01-gir1.2-girepository-2.0_1.82.0-2_amd64.deb ... 56s Unpacking gir1.2-girepository-2.0:amd64 (1.82.0-2) over (1.80.1-4) ... 56s Preparing to unpack .../02-gir1.2-glib-2.0_2.82.2-3_amd64.deb ... 56s Unpacking gir1.2-glib-2.0:amd64 (2.82.2-3) over (2.82.1-0ubuntu1) ... 56s Preparing to unpack .../03-libglib2.0-0t64_2.82.2-3_amd64.deb ... 56s Unpacking libglib2.0-0t64:amd64 (2.82.2-3) over (2.82.1-0ubuntu1) ... 56s Preparing to unpack .../04-libgirepository-1.0-1_1.82.0-2_amd64.deb ... 56s Unpacking libgirepository-1.0-1:amd64 (1.82.0-2) over (1.80.1-4) ... 56s Preparing to unpack .../05-libglib2.0-data_2.82.2-3_all.deb ... 56s Unpacking libglib2.0-data (2.82.2-3) over (2.82.1-0ubuntu1) ... 56s Preparing to unpack .../06-python3-dbus_1.3.2-5build4_amd64.deb ... 56s Unpacking python3-dbus (1.3.2-5build4) over (1.3.2-5build3) ... 56s Preparing to unpack .../07-python3-gi_3.50.0-3build1_amd64.deb ... 56s Unpacking python3-gi (3.50.0-3build1) over (3.50.0-3) ... 56s Preparing to unpack .../08-python3-yaml_6.0.2-1build1_amd64.deb ... 56s Unpacking python3-yaml (6.0.2-1build1) over (6.0.2-1) ... 56s Preparing to unpack .../09-vim-tiny_2%3a9.1.0861-1ubuntu1_amd64.deb ... 56s Unpacking vim-tiny (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 56s Preparing to unpack .../10-vim-common_2%3a9.1.0861-1ubuntu1_all.deb ... 56s Unpacking vim-common (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 56s Preparing to unpack .../11-xxd_2%3a9.1.0861-1ubuntu1_amd64.deb ... 56s Unpacking xxd (2:9.1.0861-1ubuntu1) over (2:9.1.0777-1ubuntu1) ... 56s Preparing to unpack .../12-libplymouth5_24.004.60-2ubuntu4_amd64.deb ... 56s Unpacking libplymouth5:amd64 (24.004.60-2ubuntu4) over (24.004.60-1ubuntu11) ... 56s Preparing to unpack .../13-plymouth-theme-ubuntu-text_24.004.60-2ubuntu4_amd64.deb ... 56s Unpacking plymouth-theme-ubuntu-text (24.004.60-2ubuntu4) over (24.004.60-1ubuntu11) ... 56s Preparing to unpack .../14-plymouth_24.004.60-2ubuntu4_amd64.deb ... 56s Unpacking plymouth (24.004.60-2ubuntu4) over (24.004.60-1ubuntu11) ... 56s Preparing to unpack .../15-xz-utils_5.6.3-1_amd64.deb ... 56s Unpacking xz-utils (5.6.3-1) over (5.6.2-2) ... 57s Preparing to unpack .../16-bpftrace_0.21.2-2ubuntu3_amd64.deb ... 57s Unpacking bpftrace (0.21.2-2ubuntu3) over (0.21.2-2ubuntu2) ... 57s Preparing to unpack .../17-curl_8.11.0-1ubuntu2_amd64.deb ... 57s Unpacking curl (8.11.0-1ubuntu2) over (8.9.1-2ubuntu2) ... 57s Preparing to unpack .../18-libcurl4t64_8.11.0-1ubuntu2_amd64.deb ... 57s Unpacking libcurl4t64:amd64 (8.11.0-1ubuntu2) over (8.9.1-2ubuntu2) ... 57s Preparing to unpack .../19-dracut-install_105-2ubuntu2_amd64.deb ... 57s Unpacking dracut-install (105-2ubuntu2) over (105-1ubuntu1) ... 57s Preparing to unpack .../20-fwupd-signed_1.55+1.7-1_amd64.deb ... 57s Unpacking fwupd-signed (1.55+1.7-1) over (1.54+1.6-1build1) ... 57s Preparing to unpack .../21-libcurl3t64-gnutls_8.11.0-1ubuntu2_amd64.deb ... 57s Unpacking libcurl3t64-gnutls:amd64 (8.11.0-1ubuntu2) over (8.9.1-2ubuntu2) ... 57s Selecting previously unselected package libsgutils2-1.48:amd64. 57s Preparing to unpack .../22-libsgutils2-1.48_1.48-0ubuntu1_amd64.deb ... 57s Unpacking libsgutils2-1.48:amd64 (1.48-0ubuntu1) ... 57s Preparing to unpack .../23-linux-base_4.10.1ubuntu1_all.deb ... 57s Unpacking linux-base (4.10.1ubuntu1) over (4.5ubuntu9) ... 57s Preparing to unpack .../24-lto-disabled-list_54_all.deb ... 57s Unpacking lto-disabled-list (54) over (53) ... 57s Preparing to unpack .../25-lxd-installer_10_all.deb ... 57s Unpacking lxd-installer (10) over (9) ... 57s Preparing to unpack .../26-pinentry-curses_1.3.1-0ubuntu2_amd64.deb ... 57s Unpacking pinentry-curses (1.3.1-0ubuntu2) over (1.2.1-3ubuntu5) ... 57s Preparing to unpack .../27-python3-blinker_1.9.0-1_all.deb ... 57s Unpacking python3-blinker (1.9.0-1) over (1.8.2-1) ... 57s Preparing to unpack .../28-python3-rpds-py_0.21.0-2ubuntu1_amd64.deb ... 57s Unpacking python3-rpds-py (0.21.0-2ubuntu1) over (0.20.0-0ubuntu3) ... 57s Preparing to unpack .../29-python3-jsonschema-specifications_2023.12.1-2_all.deb ... 57s Unpacking python3-jsonschema-specifications (2023.12.1-2) over (2023.12.1-1ubuntu1) ... 57s Preparing to unpack .../30-sg3-utils_1.48-0ubuntu1_amd64.deb ... 57s Unpacking sg3-utils (1.48-0ubuntu1) over (1.46-3ubuntu5) ... 57s Preparing to unpack .../31-sg3-utils-udev_1.48-0ubuntu1_all.deb ... 57s Unpacking sg3-utils-udev (1.48-0ubuntu1) over (1.46-3ubuntu5) ... 57s Preparing to unpack .../32-amd64-microcode_3.20240820.1ubuntu1_amd64.deb ... 57s Unpacking amd64-microcode (3.20240820.1ubuntu1) over (3.20240116.2+nmu1ubuntu1.1) ... 57s Preparing to unpack .../33-intel-microcode_3.20241112.1ubuntu2_amd64.deb ... 57s Unpacking intel-microcode (3.20241112.1ubuntu2) over (3.20240910.0ubuntu1) ... 58s Setting up pinentry-curses (1.3.1-0ubuntu2) ... 58s Setting up distro-info (1.12) ... 58s Setting up lto-disabled-list (54) ... 58s Setting up linux-base (4.10.1ubuntu1) ... 58s Setting up init (1.67ubuntu1) ... 58s Setting up libcurl4t64:amd64 (8.11.0-1ubuntu2) ... 58s Setting up bpftrace (0.21.2-2ubuntu3) ... 58s Setting up openssh-client (1:9.9p1-3ubuntu2) ... 58s Setting up intel-microcode (3.20241112.1ubuntu2) ... 58s intel-microcode: microcode will be updated at next boot 58s Setting up python3-debconf (1.5.87ubuntu1) ... 58s Setting up libcurl3t64-gnutls:amd64 (8.11.0-1ubuntu2) ... 58s Setting up fwupd-signed (1.55+1.7-1) ... 58s Setting up libsgutils2-1.48:amd64 (1.48-0ubuntu1) ... 58s Setting up python3-yaml (6.0.2-1build1) ... 58s Setting up debconf-i18n (1.5.87ubuntu1) ... 58s Setting up amd64-microcode (3.20240820.1ubuntu1) ... 58s amd64-microcode: microcode will be updated at next boot 58s Setting up xxd (2:9.1.0861-1ubuntu1) ... 58s Setting up libglib2.0-0t64:amd64 (2.82.2-3) ... 58s No schema files found: doing nothing. 58s Setting up libglib2.0-data (2.82.2-3) ... 58s Setting up vim-common (2:9.1.0861-1ubuntu1) ... 58s Setting up xz-utils (5.6.3-1) ... 58s Setting up gir1.2-glib-2.0:amd64 (2.82.2-3) ... 58s Setting up lxd-installer (10) ... 58s Setting up python3-rpds-py (0.21.0-2ubuntu1) ... 59s Setting up dracut-install (105-2ubuntu2) ... 59s Setting up libplymouth5:amd64 (24.004.60-2ubuntu4) ... 59s Setting up libgirepository-1.0-1:amd64 (1.82.0-2) ... 59s Setting up curl (8.11.0-1ubuntu2) ... 59s Setting up python3-jsonschema-specifications (2023.12.1-2) ... 59s Setting up sg3-utils (1.48-0ubuntu1) ... 59s Setting up python3-blinker (1.9.0-1) ... 59s Setting up openssh-sftp-server (1:9.9p1-3ubuntu2) ... 59s Setting up python3-dbus (1.3.2-5build4) ... 59s Setting up openssh-server (1:9.9p1-3ubuntu2) ... 59s Installing new version of config file /etc/ssh/moduli ... 59s Replacing config file /etc/ssh/sshd_config with new version 60s Setting up plymouth (24.004.60-2ubuntu4) ... 60s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 60s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 61s Setting up vim-tiny (2:9.1.0861-1ubuntu1) ... 61s Setting up sg3-utils-udev (1.48-0ubuntu1) ... 61s update-initramfs: deferring update (trigger activated) 61s Setting up gir1.2-girepository-2.0:amd64 (1.82.0-2) ... 61s Setting up python3-gi (3.50.0-3build1) ... 61s Processing triggers for debianutils (5.21) ... 61s Processing triggers for install-info (7.1.1-1) ... 61s Processing triggers for initramfs-tools (0.142ubuntu35) ... 61s update-initramfs: Generating /boot/initrd.img-6.11.0-8-generic 61s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 70s Processing triggers for libc-bin (2.40-1ubuntu3) ... 70s Processing triggers for ufw (0.36.2-8) ... 70s Processing triggers for man-db (2.13.0-1) ... 72s Setting up plymouth-theme-ubuntu-text (24.004.60-2ubuntu4) ... 72s Processing triggers for initramfs-tools (0.142ubuntu35) ... 72s update-initramfs: Generating /boot/initrd.img-6.11.0-8-generic 72s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 80s Reading package lists... 80s Building dependency tree... 80s Reading state information... 80s The following packages will be REMOVED: 80s libsgutils2-1.46-2* 80s 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 80s After this operation, 294 kB disk space will be freed. 80s (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 ... 75655 files and directories currently installed.) 80s Removing libsgutils2-1.46-2:amd64 (1.46-3ubuntu5) ... 80s Processing triggers for libc-bin (2.40-1ubuntu3) ... 81s Hit:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease 81s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 81s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 81s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 82s Reading package lists... 82s Reading package lists... 82s Building dependency tree... 82s Reading state information... 82s Calculating upgrade... 82s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 82s Reading package lists... 83s Building dependency tree... 83s Reading state information... 83s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 83s autopkgtest [10:39:19]: rebooting testbed after setup commands that affected boot 99s autopkgtest [10:39:35]: testbed running kernel: Linux 6.11.0-8-generic #8-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep 16 13:41:20 UTC 2024 101s autopkgtest [10:39:37]: @@@@@@@@@@@@@@@@@@@@ apt-source git-ubuntu 103s Get:1 http://ftpmaster.internal/ubuntu plucky/universe git-ubuntu 1.1-1 (dsc) [2280 B] 103s Get:2 http://ftpmaster.internal/ubuntu plucky/universe git-ubuntu 1.1-1 (tar) [179 kB] 103s Get:3 http://ftpmaster.internal/ubuntu plucky/universe git-ubuntu 1.1-1 (diff) [5776 B] 103s gpgv: Signature made Wed Jul 3 16:18:24 2024 UTC 103s gpgv: using RSA key A62D2CFBD50B9B5BF360D54B159EB5C4EFC8774C 103s gpgv: Can't check signature: No public key 103s dpkg-source: warning: cannot verify inline signature for ./git-ubuntu_1.1-1.dsc: no acceptable signature found 103s autopkgtest [10:39:39]: testing package git-ubuntu version 1.1-1 104s autopkgtest [10:39:40]: build not needed 104s autopkgtest [10:39:40]: test self-test: preparing testbed 105s Reading package lists... 106s Building dependency tree... 106s Reading state information... 106s Starting pkgProblemResolver with broken count: 0 106s Starting 2 pkgProblemResolver with broken count: 0 106s Done 106s The following additional packages will be installed: 106s dctrl-tools debian-archive-keyring devscripts diffstat dput gettext git 106s git-buildpackage git-man git-ubuntu libb-hooks-op-check-perl 106s libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-perl 106s libdevel-callchecker-perl libdynaloader-functions-perl libencode-locale-perl 106s liberror-perl libfile-dirlist-perl libfile-homedir-perl libfile-listing-perl 106s libfile-touch-perl libfile-which-perl libgit2-1.8 libgomp1 106s libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl 106s libhttp-cookies-perl libhttp-date-perl libhttp-message-perl 106s libhttp-negotiate-perl libhttp-parser2.9 libimport-into-perl libio-html-perl 106s libio-pty-perl libio-socket-ssl-perl libipc-run-perl libjs-jquery 106s libjs-jquery-hotkeys libjs-jquery-isonscreen libjs-jquery-metadata 106s libjs-jquery-tablesorter libjs-jquery-throttle-debounce libjs-sphinxdoc 106s libjs-underscore liblwp-mediatypes-perl liblwp-protocol-https-perl 106s libmodule-runtime-perl libmoo-perl libnet-http-perl libnet-ssleay-perl 106s libnorm1t64 libparams-classify-perl libpgm-5.3-0t64 libpython3.13-minimal 106s libpython3.13-stdlib librole-tiny-perl libsodium23 libsub-quote-perl 106s libsys-cpuaffinity-perl libtimedate-perl libtry-tiny-perl liburi-perl 106s libwww-perl libwww-robotrules-perl libxdelta2t64 libzmq5 patchutils pbzip2 106s perl-openssl-defaults pixz pristine-tar pylint python3-argcomplete 106s python3-astroid python3-cachetools python3-coverage python3-dateutil 106s python3-debian python3-debianbts python3-dill python3-distro-info 106s python3-gpg python3-importlib-metadata python3-iniconfig python3-isort 106s python3-jaraco.classes python3-jeepney python3-keyring python3-keyrings.alt 106s python3-launchpadlib-desktop python3-logilab-common python3-mccabe 106s python3-mypy-extensions python3-packaging python3-platformdirs 106s python3-pluggy python3-py python3-pycryptodome python3-pygit2 python3-pytest 106s python3-pytest-cov python3-secretstorage python3-tenacity python3-tomlkit 106s python3-ubuntutools python3-xdg python3-zmq python3.13 python3.13-minimal 106s quilt ubuntu-dev-tools wdiff xdelta xdelta3 106s Suggested packages: 106s debtags adequate at autopkgtest bls-standalone bsd-mailx | mailx 106s build-essential check-all-the-things cvs-buildpackage debhelper diffoscope 106s disorderfs docker.io dose-extra duck elpa-devscripts faketime gnuplot 106s how-can-i-help libauthen-sasl-perl libdbd-pg-perl libfile-desktopentry-perl 106s libterm-size-perl libyaml-syck-perl mmdebstrap mutt piuparts 106s postgresql-client pristine-lfs python3-pycurl ratt reprotest 106s svn-buildpackage w3m debian-keyring equivs libgitlab-api-v4-perl 106s libsoap-lite-perl lintian mini-dinstall autopoint gettext-doc 106s libasprintf-dev libgettextpo-dev git-daemon-run | git-daemon-sysvinit 106s git-doc git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn 106s python3-notify2 unzip libdata-dump-perl libio-compress-brotli-perl 106s libcrypt-ssleay-perl libscalar-number-perl libxstring-perl libsub-name-perl 106s libbusiness-isbn-perl libmime-base32-perl libregexp-ipv6-perl 106s libauthen-ntlm-perl python-coverage-doc python3-objgraph gir1.2-secret-1 106s gnome-keyring libkf5wallet-bin python3-shtab subversion python-pygit2-doc 106s gnome-keyring | libkf5wallet-bin | keepassxc python-secretstorage-doc 106s python-tenacity-doc python-pyxdg-doc python3.13-venv python3.13-doc 106s binfmt-support default-mta | mail-transport-agent graphviz procmail bzr 106s | brz bzr-builddeb | brz-debian qemu-user-static wdiff-doc 106s Recommended packages: 106s libdistro-info-perl libgit-wrapper-perl libjson-perl liblist-compare-perl 106s libstring-shellquote-perl licensecheck lintian python3-magic python3-unidiff 106s unzip python3-paramiko cowbuilder | pbuilder | sbuild libhtml-format-perl 106s javascript-common libnamespace-clean-perl libdata-dump-perl 106s libhtml-form-perl libhttp-daemon-perl libmailtools-perl python3-tk arch-test 106s debian-keyring debootstrap genisoimage sbuild | pbuilder | cowbuilder 106s python3-dns reportbug 106s The following NEW packages will be installed: 106s autopkgtest-satdep dctrl-tools debian-archive-keyring devscripts diffstat 106s dput gettext git git-buildpackage git-man git-ubuntu 106s libb-hooks-op-check-perl libclass-method-modifiers-perl 106s libclass-xsaccessor-perl libclone-perl libdevel-callchecker-perl 106s libdynaloader-functions-perl libencode-locale-perl liberror-perl 106s libfile-dirlist-perl libfile-homedir-perl libfile-listing-perl 106s libfile-touch-perl libfile-which-perl libgit2-1.8 libgomp1 106s libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl 106s libhttp-cookies-perl libhttp-date-perl libhttp-message-perl 106s libhttp-negotiate-perl libhttp-parser2.9 libimport-into-perl libio-html-perl 106s libio-pty-perl libio-socket-ssl-perl libipc-run-perl libjs-jquery 106s libjs-jquery-hotkeys libjs-jquery-isonscreen libjs-jquery-metadata 106s libjs-jquery-tablesorter libjs-jquery-throttle-debounce libjs-sphinxdoc 106s libjs-underscore liblwp-mediatypes-perl liblwp-protocol-https-perl 106s libmodule-runtime-perl libmoo-perl libnet-http-perl libnet-ssleay-perl 106s libnorm1t64 libparams-classify-perl libpgm-5.3-0t64 libpython3.13-minimal 106s libpython3.13-stdlib librole-tiny-perl libsodium23 libsub-quote-perl 106s libsys-cpuaffinity-perl libtimedate-perl libtry-tiny-perl liburi-perl 106s libwww-perl libwww-robotrules-perl libxdelta2t64 libzmq5 patchutils pbzip2 106s perl-openssl-defaults pixz pristine-tar pylint python3-argcomplete 106s python3-astroid python3-cachetools python3-coverage python3-dateutil 106s python3-debian python3-debianbts python3-dill python3-distro-info 106s python3-gpg python3-importlib-metadata python3-iniconfig python3-isort 106s python3-jaraco.classes python3-jeepney python3-keyring python3-keyrings.alt 106s python3-launchpadlib-desktop python3-logilab-common python3-mccabe 106s python3-mypy-extensions python3-packaging python3-platformdirs 106s python3-pluggy python3-py python3-pycryptodome python3-pygit2 python3-pytest 106s python3-pytest-cov python3-secretstorage python3-tenacity python3-tomlkit 106s python3-ubuntutools python3-xdg python3-zmq python3.13 python3.13-minimal 106s quilt ubuntu-dev-tools wdiff xdelta xdelta3 106s 0 upgraded, 117 newly installed, 0 to remove and 0 not upgraded. 106s Need to get 24.1 MB/24.1 MB of archives. 106s After this operation, 100 MB of additional disk space will be used. 106s Get:1 /tmp/autopkgtest.QJfPOB/1-autopkgtest-satdep.deb autopkgtest-satdep amd64 0 [704 B] 107s Get:2 http://ftpmaster.internal/ubuntu plucky/main amd64 libpython3.13-minimal amd64 3.13.0-2 [879 kB] 107s Get:3 http://ftpmaster.internal/ubuntu plucky/main amd64 python3.13-minimal amd64 3.13.0-2 [2188 kB] 107s Get:4 http://ftpmaster.internal/ubuntu plucky/main amd64 libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [328 kB] 107s Get:5 http://ftpmaster.internal/ubuntu plucky/universe amd64 libjs-jquery-hotkeys all 0~20130707+git2d51e3a9+dfsg-2.1 [11.5 kB] 107s Get:6 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-distro-info all 1.12 [7754 B] 107s Get:7 http://ftpmaster.internal/ubuntu plucky/main amd64 dctrl-tools amd64 2.24-3build3 [106 kB] 107s Get:8 http://ftpmaster.internal/ubuntu plucky/universe amd64 debian-archive-keyring all 2023.4ubuntu1 [168 kB] 107s Get:9 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-dirlist-perl all 0.05-3 [7286 B] 107s Get:10 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-which-perl all 1.27-2 [12.5 kB] 107s Get:11 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-homedir-perl all 1.006-2 [37.0 kB] 107s Get:12 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-touch-perl all 0.12-2 [7498 B] 107s Get:13 http://ftpmaster.internal/ubuntu plucky/main amd64 libio-pty-perl amd64 1:1.20-1build3 [31.4 kB] 107s Get:14 http://ftpmaster.internal/ubuntu plucky/main amd64 libipc-run-perl all 20231003.0-2 [91.5 kB] 107s Get:15 http://ftpmaster.internal/ubuntu plucky/main amd64 libclass-method-modifiers-perl all 2.15-1 [16.1 kB] 107s Get:16 http://ftpmaster.internal/ubuntu plucky/main amd64 libclass-xsaccessor-perl amd64 1.19-4build5 [33.0 kB] 107s Get:17 http://ftpmaster.internal/ubuntu plucky/main amd64 libb-hooks-op-check-perl amd64 0.22-3build2 [9624 B] 107s Get:18 http://ftpmaster.internal/ubuntu plucky/main amd64 libdynaloader-functions-perl all 0.004-1 [11.4 kB] 107s Get:19 http://ftpmaster.internal/ubuntu plucky/main amd64 libdevel-callchecker-perl amd64 0.009-1build1 [14.2 kB] 107s Get:20 http://ftpmaster.internal/ubuntu plucky/main amd64 libparams-classify-perl amd64 0.015-2build6 [20.1 kB] 107s Get:21 http://ftpmaster.internal/ubuntu plucky/main amd64 libmodule-runtime-perl all 0.016-2 [16.4 kB] 107s Get:22 http://ftpmaster.internal/ubuntu plucky/main amd64 libimport-into-perl all 1.002005-2 [10.7 kB] 107s Get:23 http://ftpmaster.internal/ubuntu plucky/main amd64 librole-tiny-perl all 2.002004-1 [16.3 kB] 107s Get:24 http://ftpmaster.internal/ubuntu plucky/main amd64 libsub-quote-perl all 2.006008-1ubuntu1 [20.7 kB] 107s Get:25 http://ftpmaster.internal/ubuntu plucky/main amd64 libmoo-perl all 2.005005-1 [47.4 kB] 107s Get:26 http://ftpmaster.internal/ubuntu plucky/main amd64 libencode-locale-perl all 1.05-3 [11.6 kB] 107s Get:27 http://ftpmaster.internal/ubuntu plucky/main amd64 libtimedate-perl all 2.3300-2 [34.0 kB] 107s Get:28 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-date-perl all 6.06-1 [10.2 kB] 107s Get:29 http://ftpmaster.internal/ubuntu plucky/main amd64 libfile-listing-perl all 6.16-1 [11.3 kB] 107s Get:30 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-tagset-perl all 3.24-1 [14.1 kB] 108s Get:31 http://ftpmaster.internal/ubuntu plucky/main amd64 liburi-perl all 5.30-1 [94.4 kB] 108s Get:32 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-parser-perl amd64 3.83-1build1 [86.2 kB] 108s Get:33 http://ftpmaster.internal/ubuntu plucky/main amd64 libhtml-tree-perl all 5.07-3 [200 kB] 108s Get:34 http://ftpmaster.internal/ubuntu plucky/main amd64 libclone-perl amd64 0.47-1 [10.7 kB] 108s Get:35 http://ftpmaster.internal/ubuntu plucky/main amd64 libio-html-perl all 1.004-3 [15.9 kB] 108s Get:36 http://ftpmaster.internal/ubuntu plucky/main amd64 liblwp-mediatypes-perl all 6.04-2 [20.1 kB] 108s Get:37 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-message-perl all 7.00-2ubuntu1 [75.9 kB] 108s Get:38 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-cookies-perl all 6.11-1 [18.2 kB] 108s Get:39 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-negotiate-perl all 6.01-2 [12.4 kB] 108s Get:40 http://ftpmaster.internal/ubuntu plucky/main amd64 perl-openssl-defaults amd64 7build3 [6626 B] 108s Get:41 http://ftpmaster.internal/ubuntu plucky/main amd64 libnet-ssleay-perl amd64 1.94-2 [317 kB] 108s Get:42 http://ftpmaster.internal/ubuntu plucky/main amd64 libio-socket-ssl-perl all 2.089-1 [200 kB] 108s Get:43 http://ftpmaster.internal/ubuntu plucky/main amd64 libnet-http-perl all 6.23-1 [22.3 kB] 108s Get:44 http://ftpmaster.internal/ubuntu plucky/main amd64 liblwp-protocol-https-perl all 6.14-1 [9040 B] 108s Get:45 http://ftpmaster.internal/ubuntu plucky/main amd64 libtry-tiny-perl all 0.32-1 [21.2 kB] 108s Get:46 http://ftpmaster.internal/ubuntu plucky/main amd64 libwww-robotrules-perl all 6.02-1 [12.6 kB] 108s Get:47 http://ftpmaster.internal/ubuntu plucky/main amd64 libwww-perl all 6.77-1 [138 kB] 108s Get:48 http://ftpmaster.internal/ubuntu plucky/main amd64 patchutils amd64 0.4.2-1build3 [77.0 kB] 108s Get:49 http://ftpmaster.internal/ubuntu plucky/main amd64 wdiff amd64 1.2.2-6build1 [29.1 kB] 108s Get:50 http://ftpmaster.internal/ubuntu plucky/main amd64 devscripts all 2.24.3 [1080 kB] 108s Get:51 http://ftpmaster.internal/ubuntu plucky/main amd64 diffstat amd64 1.67-1 [33.1 kB] 108s Get:52 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-debian all 0.1.49ubuntu3 [116 kB] 108s Get:53 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-gpg amd64 1.24.0-2ubuntu1 [275 kB] 108s Get:54 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-xdg all 0.28-2 [38.3 kB] 108s Get:55 http://ftpmaster.internal/ubuntu plucky/main amd64 dput all 1.2.4ubuntu1 [49.1 kB] 108s Get:56 http://ftpmaster.internal/ubuntu plucky/main amd64 libgomp1 amd64 14.2.0-8ubuntu1 [148 kB] 108s Get:57 http://ftpmaster.internal/ubuntu plucky/main amd64 gettext amd64 0.22.5-2 [948 kB] 108s Get:58 http://ftpmaster.internal/ubuntu plucky/main amd64 liberror-perl all 0.17029-2 [25.6 kB] 108s Get:59 http://ftpmaster.internal/ubuntu plucky/main amd64 git-man all 1:2.45.2-1.2ubuntu1 [1122 kB] 108s Get:60 http://ftpmaster.internal/ubuntu plucky/main amd64 git amd64 1:2.45.2-1.2ubuntu1 [4634 kB] 108s Get:61 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-dateutil all 2.9.0-3 [80.2 kB] 108s Get:62 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-importlib-metadata all 8.5.0-1 [20.7 kB] 108s Get:63 http://ftpmaster.internal/ubuntu plucky/universe amd64 git-buildpackage all 0.9.35 [677 kB] 108s Get:64 http://ftpmaster.internal/ubuntu plucky/universe amd64 libsys-cpuaffinity-perl amd64 1.13~03-2build4 [31.9 kB] 108s Get:65 http://ftpmaster.internal/ubuntu plucky/universe amd64 pbzip2 amd64 1.1.13-1build1 [40.0 kB] 108s Get:66 http://ftpmaster.internal/ubuntu plucky/universe amd64 pixz amd64 1.0.7-3 [21.8 kB] 108s Get:67 http://ftpmaster.internal/ubuntu plucky/universe amd64 libxdelta2t64 amd64 1.1.3-10.7 [50.9 kB] 108s Get:68 http://ftpmaster.internal/ubuntu plucky/universe amd64 xdelta amd64 1.1.3-10.7 [25.2 kB] 108s Get:69 http://ftpmaster.internal/ubuntu plucky/universe amd64 xdelta3 amd64 3.0.11-dfsg-1.2 [73.9 kB] 108s Get:70 http://ftpmaster.internal/ubuntu plucky/universe amd64 pristine-tar amd64 1.50+nmu2build1 [117 kB] 108s Get:71 http://ftpmaster.internal/ubuntu plucky/universe amd64 quilt all 0.68-1 [439 kB] 109s Get:72 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-debianbts all 4.1.1 [12.8 kB] 109s Get:73 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-jeepney all 0.8.0-4 [33.1 kB] 109s Get:74 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-secretstorage all 3.3.3-3 [13.7 kB] 109s Get:75 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-jaraco.classes all 3.4.0-1 [7664 B] 109s Get:76 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-keyring all 25.4.1-1 [40.5 kB] 109s Get:77 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-launchpadlib-desktop all 2.0.0-1 [1778 B] 109s Get:78 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-ubuntutools all 0.203 [67.4 kB] 109s Get:79 http://ftpmaster.internal/ubuntu plucky/universe amd64 ubuntu-dev-tools all 0.203 [93.2 kB] 109s Get:80 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-astroid all 3.3.5-1 [174 kB] 109s Get:81 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-isort all 5.13.2-2 [59.3 kB] 109s Get:82 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-mypy-extensions all 1.0.0-1 [6148 B] 109s Get:83 http://ftpmaster.internal/ubuntu plucky/main amd64 libjs-underscore all 1.13.4~dfsg+~1.11.4-3 [118 kB] 109s Get:84 http://ftpmaster.internal/ubuntu plucky/main amd64 libjs-sphinxdoc all 7.4.7-4 [158 kB] 109s Get:85 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-logilab-common all 2.0.0-1 [281 kB] 109s Get:86 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-dill all 0.3.9-1 [84.5 kB] 109s Get:87 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-mccabe all 0.7.0-1 [8678 B] 109s Get:88 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-platformdirs all 4.3.6-1 [16.8 kB] 109s Get:89 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-tomlkit all 0.13.2-1 [37.6 kB] 109s Get:90 http://ftpmaster.internal/ubuntu plucky/universe amd64 pylint all 3.3.1-2 [345 kB] 109s Get:91 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-argcomplete all 3.5.1-1ubuntu1 [35.6 kB] 109s Get:92 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-cachetools all 5.3.3-1 [10.3 kB] 109s Get:93 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-pycryptodome amd64 3.20.0+dfsg-3build1 [1113 kB] 109s Get:94 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-keyrings.alt all 5.0.2-1 [16.6 kB] 109s Get:95 http://ftpmaster.internal/ubuntu plucky/main amd64 libhttp-parser2.9 amd64 2.9.4-6build1 [22.3 kB] 109s Get:96 http://ftpmaster.internal/ubuntu plucky-proposed/main amd64 libgit2-1.8 amd64 1.8.4+ds-1ubuntu1 [654 kB] 109s Get:97 http://ftpmaster.internal/ubuntu plucky-proposed/universe amd64 python3-pygit2 amd64 1.16.0-2 [183 kB] 109s Get:98 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-iniconfig all 1.1.1-2 [6024 B] 109s Get:99 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-packaging all 24.2-1 [51.5 kB] 109s Get:100 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-pluggy all 1.5.0-1 [21.0 kB] 109s Get:101 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-pytest all 8.3.3-1 [251 kB] 109s Get:102 http://ftpmaster.internal/ubuntu plucky/main amd64 libpython3.13-stdlib amd64 3.13.0-2 [2107 kB] 109s Get:103 http://ftpmaster.internal/ubuntu plucky/main amd64 python3.13 amd64 3.13.0-2 [719 kB] 109s Get:104 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-coverage amd64 7.4.4+dfsg1-0ubuntu3 [150 kB] 109s Get:105 http://ftpmaster.internal/ubuntu plucky/universe amd64 libjs-jquery-isonscreen all 1.2.0-1.1 [3244 B] 109s Get:106 http://ftpmaster.internal/ubuntu plucky/universe amd64 libjs-jquery-metadata all 12-4 [6582 B] 109s Get:107 http://ftpmaster.internal/ubuntu plucky/universe amd64 libjs-jquery-tablesorter all 1:2.31.3+dfsg1-4 [192 kB] 109s Get:108 http://ftpmaster.internal/ubuntu plucky/universe amd64 libjs-jquery-throttle-debounce all 1.1+dfsg.1-2 [12.5 kB] 109s Get:109 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-pytest-cov all 5.0.0-1 [21.3 kB] 109s Get:110 http://ftpmaster.internal/ubuntu plucky/main amd64 python3-tenacity all 8.5.0-0ubuntu1 [17.0 kB] 109s Get:111 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-py all 1.11.0-2 [72.7 kB] 109s Get:112 http://ftpmaster.internal/ubuntu plucky/universe amd64 libnorm1t64 amd64 1.5.9+dfsg-3.1build1 [154 kB] 110s Get:113 http://ftpmaster.internal/ubuntu plucky/universe amd64 libpgm-5.3-0t64 amd64 5.3.128~dfsg-2.1build1 [167 kB] 110s Get:114 http://ftpmaster.internal/ubuntu plucky/main amd64 libsodium23 amd64 1.0.18-1build3 [161 kB] 110s Get:115 http://ftpmaster.internal/ubuntu plucky/universe amd64 libzmq5 amd64 4.3.5-1build2 [260 kB] 110s Get:116 http://ftpmaster.internal/ubuntu plucky/universe amd64 python3-zmq amd64 24.0.1-5build2 [406 kB] 110s Get:117 http://ftpmaster.internal/ubuntu plucky/universe amd64 git-ubuntu all 1.1-1 [152 kB] 110s Fetched 24.1 MB in 3s (7224 kB/s) 110s Selecting previously unselected package libpython3.13-minimal:amd64. 110s (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 ... 75650 files and directories currently installed.) 110s Preparing to unpack .../000-libpython3.13-minimal_3.13.0-2_amd64.deb ... 110s Unpacking libpython3.13-minimal:amd64 (3.13.0-2) ... 110s Selecting previously unselected package python3.13-minimal. 110s Preparing to unpack .../001-python3.13-minimal_3.13.0-2_amd64.deb ... 110s Unpacking python3.13-minimal (3.13.0-2) ... 111s Selecting previously unselected package libjs-jquery. 111s Preparing to unpack .../002-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ... 111s Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 111s Selecting previously unselected package libjs-jquery-hotkeys. 111s Preparing to unpack .../003-libjs-jquery-hotkeys_0~20130707+git2d51e3a9+dfsg-2.1_all.deb ... 111s Unpacking libjs-jquery-hotkeys (0~20130707+git2d51e3a9+dfsg-2.1) ... 111s Selecting previously unselected package python3-distro-info. 111s Preparing to unpack .../004-python3-distro-info_1.12_all.deb ... 111s Unpacking python3-distro-info (1.12) ... 111s Selecting previously unselected package dctrl-tools. 111s Preparing to unpack .../005-dctrl-tools_2.24-3build3_amd64.deb ... 111s Unpacking dctrl-tools (2.24-3build3) ... 111s Selecting previously unselected package debian-archive-keyring. 111s Preparing to unpack .../006-debian-archive-keyring_2023.4ubuntu1_all.deb ... 111s Unpacking debian-archive-keyring (2023.4ubuntu1) ... 111s Selecting previously unselected package libfile-dirlist-perl. 111s Preparing to unpack .../007-libfile-dirlist-perl_0.05-3_all.deb ... 111s Unpacking libfile-dirlist-perl (0.05-3) ... 111s Selecting previously unselected package libfile-which-perl. 111s Preparing to unpack .../008-libfile-which-perl_1.27-2_all.deb ... 111s Unpacking libfile-which-perl (1.27-2) ... 111s Selecting previously unselected package libfile-homedir-perl. 111s Preparing to unpack .../009-libfile-homedir-perl_1.006-2_all.deb ... 111s Unpacking libfile-homedir-perl (1.006-2) ... 111s Selecting previously unselected package libfile-touch-perl. 111s Preparing to unpack .../010-libfile-touch-perl_0.12-2_all.deb ... 111s Unpacking libfile-touch-perl (0.12-2) ... 111s Selecting previously unselected package libio-pty-perl. 111s Preparing to unpack .../011-libio-pty-perl_1%3a1.20-1build3_amd64.deb ... 111s Unpacking libio-pty-perl (1:1.20-1build3) ... 111s Selecting previously unselected package libipc-run-perl. 111s Preparing to unpack .../012-libipc-run-perl_20231003.0-2_all.deb ... 111s Unpacking libipc-run-perl (20231003.0-2) ... 111s Selecting previously unselected package libclass-method-modifiers-perl. 111s Preparing to unpack .../013-libclass-method-modifiers-perl_2.15-1_all.deb ... 111s Unpacking libclass-method-modifiers-perl (2.15-1) ... 111s Selecting previously unselected package libclass-xsaccessor-perl. 111s Preparing to unpack .../014-libclass-xsaccessor-perl_1.19-4build5_amd64.deb ... 111s Unpacking libclass-xsaccessor-perl (1.19-4build5) ... 111s Selecting previously unselected package libb-hooks-op-check-perl:amd64. 111s Preparing to unpack .../015-libb-hooks-op-check-perl_0.22-3build2_amd64.deb ... 111s Unpacking libb-hooks-op-check-perl:amd64 (0.22-3build2) ... 111s Selecting previously unselected package libdynaloader-functions-perl. 111s Preparing to unpack .../016-libdynaloader-functions-perl_0.004-1_all.deb ... 111s Unpacking libdynaloader-functions-perl (0.004-1) ... 111s Selecting previously unselected package libdevel-callchecker-perl:amd64. 111s Preparing to unpack .../017-libdevel-callchecker-perl_0.009-1build1_amd64.deb ... 111s Unpacking libdevel-callchecker-perl:amd64 (0.009-1build1) ... 111s Selecting previously unselected package libparams-classify-perl:amd64. 111s Preparing to unpack .../018-libparams-classify-perl_0.015-2build6_amd64.deb ... 111s Unpacking libparams-classify-perl:amd64 (0.015-2build6) ... 111s Selecting previously unselected package libmodule-runtime-perl. 111s Preparing to unpack .../019-libmodule-runtime-perl_0.016-2_all.deb ... 111s Unpacking libmodule-runtime-perl (0.016-2) ... 111s Selecting previously unselected package libimport-into-perl. 111s Preparing to unpack .../020-libimport-into-perl_1.002005-2_all.deb ... 111s Unpacking libimport-into-perl (1.002005-2) ... 111s Selecting previously unselected package librole-tiny-perl. 111s Preparing to unpack .../021-librole-tiny-perl_2.002004-1_all.deb ... 111s Unpacking librole-tiny-perl (2.002004-1) ... 111s Selecting previously unselected package libsub-quote-perl. 111s Preparing to unpack .../022-libsub-quote-perl_2.006008-1ubuntu1_all.deb ... 111s Unpacking libsub-quote-perl (2.006008-1ubuntu1) ... 111s Selecting previously unselected package libmoo-perl. 111s Preparing to unpack .../023-libmoo-perl_2.005005-1_all.deb ... 111s Unpacking libmoo-perl (2.005005-1) ... 111s Selecting previously unselected package libencode-locale-perl. 111s Preparing to unpack .../024-libencode-locale-perl_1.05-3_all.deb ... 111s Unpacking libencode-locale-perl (1.05-3) ... 111s Selecting previously unselected package libtimedate-perl. 111s Preparing to unpack .../025-libtimedate-perl_2.3300-2_all.deb ... 111s Unpacking libtimedate-perl (2.3300-2) ... 111s Selecting previously unselected package libhttp-date-perl. 111s Preparing to unpack .../026-libhttp-date-perl_6.06-1_all.deb ... 111s Unpacking libhttp-date-perl (6.06-1) ... 111s Selecting previously unselected package libfile-listing-perl. 111s Preparing to unpack .../027-libfile-listing-perl_6.16-1_all.deb ... 111s Unpacking libfile-listing-perl (6.16-1) ... 111s Selecting previously unselected package libhtml-tagset-perl. 111s Preparing to unpack .../028-libhtml-tagset-perl_3.24-1_all.deb ... 111s Unpacking libhtml-tagset-perl (3.24-1) ... 111s Selecting previously unselected package liburi-perl. 111s Preparing to unpack .../029-liburi-perl_5.30-1_all.deb ... 111s Unpacking liburi-perl (5.30-1) ... 111s Selecting previously unselected package libhtml-parser-perl:amd64. 111s Preparing to unpack .../030-libhtml-parser-perl_3.83-1build1_amd64.deb ... 111s Unpacking libhtml-parser-perl:amd64 (3.83-1build1) ... 111s Selecting previously unselected package libhtml-tree-perl. 111s Preparing to unpack .../031-libhtml-tree-perl_5.07-3_all.deb ... 111s Unpacking libhtml-tree-perl (5.07-3) ... 111s Selecting previously unselected package libclone-perl:amd64. 111s Preparing to unpack .../032-libclone-perl_0.47-1_amd64.deb ... 111s Unpacking libclone-perl:amd64 (0.47-1) ... 111s Selecting previously unselected package libio-html-perl. 111s Preparing to unpack .../033-libio-html-perl_1.004-3_all.deb ... 111s Unpacking libio-html-perl (1.004-3) ... 111s Selecting previously unselected package liblwp-mediatypes-perl. 112s Preparing to unpack .../034-liblwp-mediatypes-perl_6.04-2_all.deb ... 112s Unpacking liblwp-mediatypes-perl (6.04-2) ... 112s Selecting previously unselected package libhttp-message-perl. 112s Preparing to unpack .../035-libhttp-message-perl_7.00-2ubuntu1_all.deb ... 112s Unpacking libhttp-message-perl (7.00-2ubuntu1) ... 112s Selecting previously unselected package libhttp-cookies-perl. 112s Preparing to unpack .../036-libhttp-cookies-perl_6.11-1_all.deb ... 112s Unpacking libhttp-cookies-perl (6.11-1) ... 112s Selecting previously unselected package libhttp-negotiate-perl. 112s Preparing to unpack .../037-libhttp-negotiate-perl_6.01-2_all.deb ... 112s Unpacking libhttp-negotiate-perl (6.01-2) ... 112s Selecting previously unselected package perl-openssl-defaults:amd64. 112s Preparing to unpack .../038-perl-openssl-defaults_7build3_amd64.deb ... 112s Unpacking perl-openssl-defaults:amd64 (7build3) ... 112s Selecting previously unselected package libnet-ssleay-perl:amd64. 112s Preparing to unpack .../039-libnet-ssleay-perl_1.94-2_amd64.deb ... 112s Unpacking libnet-ssleay-perl:amd64 (1.94-2) ... 112s Selecting previously unselected package libio-socket-ssl-perl. 112s Preparing to unpack .../040-libio-socket-ssl-perl_2.089-1_all.deb ... 112s Unpacking libio-socket-ssl-perl (2.089-1) ... 112s Selecting previously unselected package libnet-http-perl. 112s Preparing to unpack .../041-libnet-http-perl_6.23-1_all.deb ... 112s Unpacking libnet-http-perl (6.23-1) ... 112s Selecting previously unselected package liblwp-protocol-https-perl. 112s Preparing to unpack .../042-liblwp-protocol-https-perl_6.14-1_all.deb ... 112s Unpacking liblwp-protocol-https-perl (6.14-1) ... 112s Selecting previously unselected package libtry-tiny-perl. 112s Preparing to unpack .../043-libtry-tiny-perl_0.32-1_all.deb ... 112s Unpacking libtry-tiny-perl (0.32-1) ... 112s Selecting previously unselected package libwww-robotrules-perl. 112s Preparing to unpack .../044-libwww-robotrules-perl_6.02-1_all.deb ... 112s Unpacking libwww-robotrules-perl (6.02-1) ... 112s Selecting previously unselected package libwww-perl. 112s Preparing to unpack .../045-libwww-perl_6.77-1_all.deb ... 112s Unpacking libwww-perl (6.77-1) ... 112s Selecting previously unselected package patchutils. 112s Preparing to unpack .../046-patchutils_0.4.2-1build3_amd64.deb ... 112s Unpacking patchutils (0.4.2-1build3) ... 112s Selecting previously unselected package wdiff. 112s Preparing to unpack .../047-wdiff_1.2.2-6build1_amd64.deb ... 112s Unpacking wdiff (1.2.2-6build1) ... 112s Selecting previously unselected package devscripts. 112s Preparing to unpack .../048-devscripts_2.24.3_all.deb ... 112s Unpacking devscripts (2.24.3) ... 112s Selecting previously unselected package diffstat. 112s Preparing to unpack .../049-diffstat_1.67-1_amd64.deb ... 112s Unpacking diffstat (1.67-1) ... 112s Selecting previously unselected package python3-debian. 112s Preparing to unpack .../050-python3-debian_0.1.49ubuntu3_all.deb ... 112s Unpacking python3-debian (0.1.49ubuntu3) ... 112s Selecting previously unselected package python3-gpg. 112s Preparing to unpack .../051-python3-gpg_1.24.0-2ubuntu1_amd64.deb ... 112s Unpacking python3-gpg (1.24.0-2ubuntu1) ... 112s Selecting previously unselected package python3-xdg. 112s Preparing to unpack .../052-python3-xdg_0.28-2_all.deb ... 112s Unpacking python3-xdg (0.28-2) ... 112s Selecting previously unselected package dput. 112s Preparing to unpack .../053-dput_1.2.4ubuntu1_all.deb ... 112s Unpacking dput (1.2.4ubuntu1) ... 112s Selecting previously unselected package libgomp1:amd64. 112s Preparing to unpack .../054-libgomp1_14.2.0-8ubuntu1_amd64.deb ... 112s Unpacking libgomp1:amd64 (14.2.0-8ubuntu1) ... 112s Selecting previously unselected package gettext. 112s Preparing to unpack .../055-gettext_0.22.5-2_amd64.deb ... 112s Unpacking gettext (0.22.5-2) ... 112s Selecting previously unselected package liberror-perl. 112s Preparing to unpack .../056-liberror-perl_0.17029-2_all.deb ... 112s Unpacking liberror-perl (0.17029-2) ... 112s Selecting previously unselected package git-man. 112s Preparing to unpack .../057-git-man_1%3a2.45.2-1.2ubuntu1_all.deb ... 112s Unpacking git-man (1:2.45.2-1.2ubuntu1) ... 112s Selecting previously unselected package git. 112s Preparing to unpack .../058-git_1%3a2.45.2-1.2ubuntu1_amd64.deb ... 112s Unpacking git (1:2.45.2-1.2ubuntu1) ... 112s Selecting previously unselected package python3-dateutil. 112s Preparing to unpack .../059-python3-dateutil_2.9.0-3_all.deb ... 112s Unpacking python3-dateutil (2.9.0-3) ... 112s Selecting previously unselected package python3-importlib-metadata. 112s Preparing to unpack .../060-python3-importlib-metadata_8.5.0-1_all.deb ... 112s Unpacking python3-importlib-metadata (8.5.0-1) ... 112s Selecting previously unselected package git-buildpackage. 112s Preparing to unpack .../061-git-buildpackage_0.9.35_all.deb ... 112s Unpacking git-buildpackage (0.9.35) ... 113s Selecting previously unselected package libsys-cpuaffinity-perl. 113s Preparing to unpack .../062-libsys-cpuaffinity-perl_1.13~03-2build4_amd64.deb ... 113s Unpacking libsys-cpuaffinity-perl (1.13~03-2build4) ... 113s Selecting previously unselected package pbzip2. 113s Preparing to unpack .../063-pbzip2_1.1.13-1build1_amd64.deb ... 113s Unpacking pbzip2 (1.1.13-1build1) ... 113s Selecting previously unselected package pixz. 113s Preparing to unpack .../064-pixz_1.0.7-3_amd64.deb ... 113s Unpacking pixz (1.0.7-3) ... 113s Selecting previously unselected package libxdelta2t64:amd64. 113s Preparing to unpack .../065-libxdelta2t64_1.1.3-10.7_amd64.deb ... 113s Unpacking libxdelta2t64:amd64 (1.1.3-10.7) ... 113s Selecting previously unselected package xdelta. 113s Preparing to unpack .../066-xdelta_1.1.3-10.7_amd64.deb ... 113s Unpacking xdelta (1.1.3-10.7) ... 113s Selecting previously unselected package xdelta3. 113s Preparing to unpack .../067-xdelta3_3.0.11-dfsg-1.2_amd64.deb ... 113s Unpacking xdelta3 (3.0.11-dfsg-1.2) ... 113s Selecting previously unselected package pristine-tar. 113s Preparing to unpack .../068-pristine-tar_1.50+nmu2build1_amd64.deb ... 113s Unpacking pristine-tar (1.50+nmu2build1) ... 113s Selecting previously unselected package quilt. 113s Preparing to unpack .../069-quilt_0.68-1_all.deb ... 113s Unpacking quilt (0.68-1) ... 113s Selecting previously unselected package python3-debianbts. 113s Preparing to unpack .../070-python3-debianbts_4.1.1_all.deb ... 113s Unpacking python3-debianbts (4.1.1) ... 113s Selecting previously unselected package python3-jeepney. 113s Preparing to unpack .../071-python3-jeepney_0.8.0-4_all.deb ... 113s Unpacking python3-jeepney (0.8.0-4) ... 113s Selecting previously unselected package python3-secretstorage. 113s Preparing to unpack .../072-python3-secretstorage_3.3.3-3_all.deb ... 113s Unpacking python3-secretstorage (3.3.3-3) ... 113s Selecting previously unselected package python3-jaraco.classes. 113s Preparing to unpack .../073-python3-jaraco.classes_3.4.0-1_all.deb ... 113s Unpacking python3-jaraco.classes (3.4.0-1) ... 113s Selecting previously unselected package python3-keyring. 113s Preparing to unpack .../074-python3-keyring_25.4.1-1_all.deb ... 113s Unpacking python3-keyring (25.4.1-1) ... 113s Selecting previously unselected package python3-launchpadlib-desktop. 113s Preparing to unpack .../075-python3-launchpadlib-desktop_2.0.0-1_all.deb ... 113s Unpacking python3-launchpadlib-desktop (2.0.0-1) ... 113s Selecting previously unselected package python3-ubuntutools. 113s Preparing to unpack .../076-python3-ubuntutools_0.203_all.deb ... 113s Unpacking python3-ubuntutools (0.203) ... 113s Selecting previously unselected package ubuntu-dev-tools. 113s Preparing to unpack .../077-ubuntu-dev-tools_0.203_all.deb ... 113s Unpacking ubuntu-dev-tools (0.203) ... 113s Selecting previously unselected package python3-astroid. 113s Preparing to unpack .../078-python3-astroid_3.3.5-1_all.deb ... 113s Unpacking python3-astroid (3.3.5-1) ... 113s Selecting previously unselected package python3-isort. 113s Preparing to unpack .../079-python3-isort_5.13.2-2_all.deb ... 113s Unpacking python3-isort (5.13.2-2) ... 113s Selecting previously unselected package python3-mypy-extensions. 113s Preparing to unpack .../080-python3-mypy-extensions_1.0.0-1_all.deb ... 113s Unpacking python3-mypy-extensions (1.0.0-1) ... 113s Selecting previously unselected package libjs-underscore. 113s Preparing to unpack .../081-libjs-underscore_1.13.4~dfsg+~1.11.4-3_all.deb ... 113s Unpacking libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 113s Selecting previously unselected package libjs-sphinxdoc. 113s Preparing to unpack .../082-libjs-sphinxdoc_7.4.7-4_all.deb ... 113s Unpacking libjs-sphinxdoc (7.4.7-4) ... 113s Selecting previously unselected package python3-logilab-common. 113s Preparing to unpack .../083-python3-logilab-common_2.0.0-1_all.deb ... 113s Unpacking python3-logilab-common (2.0.0-1) ... 113s Selecting previously unselected package python3-dill. 113s Preparing to unpack .../084-python3-dill_0.3.9-1_all.deb ... 113s Unpacking python3-dill (0.3.9-1) ... 113s Selecting previously unselected package python3-mccabe. 113s Preparing to unpack .../085-python3-mccabe_0.7.0-1_all.deb ... 113s Unpacking python3-mccabe (0.7.0-1) ... 113s Selecting previously unselected package python3-platformdirs. 113s Preparing to unpack .../086-python3-platformdirs_4.3.6-1_all.deb ... 113s Unpacking python3-platformdirs (4.3.6-1) ... 113s Selecting previously unselected package python3-tomlkit. 113s Preparing to unpack .../087-python3-tomlkit_0.13.2-1_all.deb ... 113s Unpacking python3-tomlkit (0.13.2-1) ... 113s Selecting previously unselected package pylint. 113s Preparing to unpack .../088-pylint_3.3.1-2_all.deb ... 113s Unpacking pylint (3.3.1-2) ... 113s Selecting previously unselected package python3-argcomplete. 113s Preparing to unpack .../089-python3-argcomplete_3.5.1-1ubuntu1_all.deb ... 113s Unpacking python3-argcomplete (3.5.1-1ubuntu1) ... 113s Selecting previously unselected package python3-cachetools. 113s Preparing to unpack .../090-python3-cachetools_5.3.3-1_all.deb ... 113s Unpacking python3-cachetools (5.3.3-1) ... 113s Selecting previously unselected package python3-pycryptodome. 113s Preparing to unpack .../091-python3-pycryptodome_3.20.0+dfsg-3build1_amd64.deb ... 113s Unpacking python3-pycryptodome (3.20.0+dfsg-3build1) ... 113s Selecting previously unselected package python3-keyrings.alt. 113s Preparing to unpack .../092-python3-keyrings.alt_5.0.2-1_all.deb ... 113s Unpacking python3-keyrings.alt (5.0.2-1) ... 113s Selecting previously unselected package libhttp-parser2.9:amd64. 113s Preparing to unpack .../093-libhttp-parser2.9_2.9.4-6build1_amd64.deb ... 113s Unpacking libhttp-parser2.9:amd64 (2.9.4-6build1) ... 113s Selecting previously unselected package libgit2-1.8:amd64. 113s Preparing to unpack .../094-libgit2-1.8_1.8.4+ds-1ubuntu1_amd64.deb ... 113s Unpacking libgit2-1.8:amd64 (1.8.4+ds-1ubuntu1) ... 114s Selecting previously unselected package python3-pygit2. 114s Preparing to unpack .../095-python3-pygit2_1.16.0-2_amd64.deb ... 114s Unpacking python3-pygit2 (1.16.0-2) ... 114s Selecting previously unselected package python3-iniconfig. 114s Preparing to unpack .../096-python3-iniconfig_1.1.1-2_all.deb ... 114s Unpacking python3-iniconfig (1.1.1-2) ... 114s Selecting previously unselected package python3-packaging. 114s Preparing to unpack .../097-python3-packaging_24.2-1_all.deb ... 114s Unpacking python3-packaging (24.2-1) ... 114s Selecting previously unselected package python3-pluggy. 114s Preparing to unpack .../098-python3-pluggy_1.5.0-1_all.deb ... 114s Unpacking python3-pluggy (1.5.0-1) ... 114s Selecting previously unselected package python3-pytest. 114s Preparing to unpack .../099-python3-pytest_8.3.3-1_all.deb ... 114s Unpacking python3-pytest (8.3.3-1) ... 114s Selecting previously unselected package libpython3.13-stdlib:amd64. 114s Preparing to unpack .../100-libpython3.13-stdlib_3.13.0-2_amd64.deb ... 114s Unpacking libpython3.13-stdlib:amd64 (3.13.0-2) ... 114s Selecting previously unselected package python3.13. 114s Preparing to unpack .../101-python3.13_3.13.0-2_amd64.deb ... 114s Unpacking python3.13 (3.13.0-2) ... 114s Selecting previously unselected package python3-coverage. 114s Preparing to unpack .../102-python3-coverage_7.4.4+dfsg1-0ubuntu3_amd64.deb ... 114s Unpacking python3-coverage (7.4.4+dfsg1-0ubuntu3) ... 114s Selecting previously unselected package libjs-jquery-isonscreen. 114s Preparing to unpack .../103-libjs-jquery-isonscreen_1.2.0-1.1_all.deb ... 114s Unpacking libjs-jquery-isonscreen (1.2.0-1.1) ... 114s Selecting previously unselected package libjs-jquery-metadata. 114s Preparing to unpack .../104-libjs-jquery-metadata_12-4_all.deb ... 114s Unpacking libjs-jquery-metadata (12-4) ... 114s Selecting previously unselected package libjs-jquery-tablesorter. 114s Preparing to unpack .../105-libjs-jquery-tablesorter_1%3a2.31.3+dfsg1-4_all.deb ... 114s Unpacking libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 114s Selecting previously unselected package libjs-jquery-throttle-debounce. 114s Preparing to unpack .../106-libjs-jquery-throttle-debounce_1.1+dfsg.1-2_all.deb ... 114s Unpacking libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 114s Selecting previously unselected package python3-pytest-cov. 114s Preparing to unpack .../107-python3-pytest-cov_5.0.0-1_all.deb ... 114s Unpacking python3-pytest-cov (5.0.0-1) ... 114s Selecting previously unselected package python3-tenacity. 114s Preparing to unpack .../108-python3-tenacity_8.5.0-0ubuntu1_all.deb ... 114s Unpacking python3-tenacity (8.5.0-0ubuntu1) ... 114s Selecting previously unselected package python3-py. 114s Preparing to unpack .../109-python3-py_1.11.0-2_all.deb ... 114s Unpacking python3-py (1.11.0-2) ... 114s Selecting previously unselected package libnorm1t64:amd64. 114s Preparing to unpack .../110-libnorm1t64_1.5.9+dfsg-3.1build1_amd64.deb ... 114s Unpacking libnorm1t64:amd64 (1.5.9+dfsg-3.1build1) ... 114s Selecting previously unselected package libpgm-5.3-0t64:amd64. 114s Preparing to unpack .../111-libpgm-5.3-0t64_5.3.128~dfsg-2.1build1_amd64.deb ... 114s Unpacking libpgm-5.3-0t64:amd64 (5.3.128~dfsg-2.1build1) ... 114s Selecting previously unselected package libsodium23:amd64. 114s Preparing to unpack .../112-libsodium23_1.0.18-1build3_amd64.deb ... 114s Unpacking libsodium23:amd64 (1.0.18-1build3) ... 114s Selecting previously unselected package libzmq5:amd64. 114s Preparing to unpack .../113-libzmq5_4.3.5-1build2_amd64.deb ... 114s Unpacking libzmq5:amd64 (4.3.5-1build2) ... 114s Selecting previously unselected package python3-zmq. 114s Preparing to unpack .../114-python3-zmq_24.0.1-5build2_amd64.deb ... 114s Unpacking python3-zmq (24.0.1-5build2) ... 114s Selecting previously unselected package git-ubuntu. 114s Preparing to unpack .../115-git-ubuntu_1.1-1_all.deb ... 114s Unpacking git-ubuntu (1.1-1) ... 114s Selecting previously unselected package autopkgtest-satdep. 114s Preparing to unpack .../116-1-autopkgtest-satdep.deb ... 114s Unpacking autopkgtest-satdep (0) ... 114s Setting up python3-iniconfig (1.1.1-2) ... 114s Setting up libnorm1t64:amd64 (1.5.9+dfsg-3.1build1) ... 114s Setting up wdiff (1.2.2-6build1) ... 114s Setting up libfile-which-perl (1.27-2) ... 114s Setting up libsodium23:amd64 (1.0.18-1build3) ... 114s Setting up python3-jaraco.classes (3.4.0-1) ... 114s Setting up libxdelta2t64:amd64 (1.1.3-10.7) ... 114s Setting up python3-importlib-metadata (8.5.0-1) ... 115s Setting up xdelta (1.1.3-10.7) ... 115s Setting up libsys-cpuaffinity-perl (1.13~03-2build4) ... 115s Setting up python3-py (1.11.0-2) ... 115s Setting up libdynaloader-functions-perl (0.004-1) ... 115s Setting up libclass-method-modifiers-perl (2.15-1) ... 115s Setting up libio-pty-perl (1:1.20-1build3) ... 115s Setting up python3-cachetools (5.3.3-1) ... 115s Setting up python3-debianbts (4.1.1) ... 115s Setting up libclone-perl:amd64 (0.47-1) ... 115s Setting up libhtml-tagset-perl (3.24-1) ... 115s Setting up python3-mypy-extensions (1.0.0-1) ... 115s Setting up python3-pycryptodome (3.20.0+dfsg-3build1) ... 115s Setting up python3-tenacity (8.5.0-0ubuntu1) ... 115s Setting up liblwp-mediatypes-perl (6.04-2) ... 115s Setting up debian-archive-keyring (2023.4ubuntu1) ... 116s Setting up libtry-tiny-perl (0.32-1) ... 116s Setting up perl-openssl-defaults:amd64 (7build3) ... 116s Setting up libencode-locale-perl (1.05-3) ... 116s Setting up libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... 116s Setting up libgomp1:amd64 (14.2.0-8ubuntu1) ... 116s Setting up python3-xdg (0.28-2) ... 116s Setting up pbzip2 (1.1.13-1build1) ... 116s Setting up python3-platformdirs (4.3.6-1) ... 116s Setting up liberror-perl (0.17029-2) ... 116s Setting up libpython3.13-minimal:amd64 (3.13.0-2) ... 116s Setting up patchutils (0.4.2-1build3) ... 116s Setting up libpgm-5.3-0t64:amd64 (5.3.128~dfsg-2.1build1) ... 116s Setting up python3-packaging (24.2-1) ... 116s Setting up python3-gpg (1.24.0-2ubuntu1) ... 116s Setting up python3-dill (0.3.9-1) ... 116s Setting up python3-debian (0.1.49ubuntu3) ... 116s Setting up diffstat (1.67-1) ... 116s Setting up libio-html-perl (1.004-3) ... 116s Setting up libb-hooks-op-check-perl:amd64 (0.22-3build2) ... 116s Setting up libipc-run-perl (20231003.0-2) ... 116s Setting up python3-jeepney (0.8.0-4) ... 116s Setting up python3-isort (5.13.2-2) ... 117s Setting up python3-pluggy (1.5.0-1) ... 117s Setting up libtimedate-perl (2.3300-2) ... 117s Setting up python3-astroid (3.3.5-1) ... 117s Setting up xdelta3 (3.0.11-dfsg-1.2) ... 117s Setting up pixz (1.0.7-3) ... 117s Setting up librole-tiny-perl (2.002004-1) ... 117s Setting up python3.13-minimal (3.13.0-2) ... 118s Setting up git-man (1:2.45.2-1.2ubuntu1) ... 118s Setting up python3-dateutil (2.9.0-3) ... 118s Setting up python3-mccabe (0.7.0-1) ... 118s Setting up libsub-quote-perl (2.006008-1ubuntu1) ... 118s Setting up libclass-xsaccessor-perl (1.19-4build5) ... 118s Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ... 118s Setting up libfile-dirlist-perl (0.05-3) ... 118s Setting up libjs-jquery-hotkeys (0~20130707+git2d51e3a9+dfsg-2.1) ... 118s Setting up python3-argcomplete (3.5.1-1ubuntu1) ... 118s Setting up libfile-homedir-perl (1.006-2) ... 118s Setting up python3-tomlkit (0.13.2-1) ... 118s Setting up python3-distro-info (1.12) ... 118s Setting up libpython3.13-stdlib:amd64 (3.13.0-2) ... 118s Setting up liburi-perl (5.30-1) ... 118s Setting up pristine-tar (1.50+nmu2build1) ... 118s Setting up libfile-touch-perl (0.12-2) ... 118s Setting up dctrl-tools (2.24-3build3) ... 118s Setting up libhttp-parser2.9:amd64 (2.9.4-6build1) ... 118s Setting up libjs-underscore (1.13.4~dfsg+~1.11.4-3) ... 118s Setting up libnet-ssleay-perl:amd64 (1.94-2) ... 118s Setting up libhttp-date-perl (6.06-1) ... 118s Setting up gettext (0.22.5-2) ... 118s Setting up libfile-listing-perl (6.16-1) ... 118s Setting up libzmq5:amd64 (4.3.5-1build2) ... 118s Setting up python3.13 (3.13.0-2) ... 119s Setting up python3-pytest (8.3.3-1) ... 119s Setting up libnet-http-perl (6.23-1) ... 119s Setting up python3-coverage (7.4.4+dfsg1-0ubuntu3) ... 120s Setting up quilt (0.68-1) ... 120s Setting up libdevel-callchecker-perl:amd64 (0.009-1build1) ... 120s Setting up dput (1.2.4ubuntu1) ... 120s Setting up python3-secretstorage (3.3.3-3) ... 120s Setting up python3-zmq (24.0.1-5build2) ... 120s Setting up libjs-jquery-metadata (12-4) ... 120s Setting up libgit2-1.8:amd64 (1.8.4+ds-1ubuntu1) ... 120s Setting up libjs-jquery-isonscreen (1.2.0-1.1) ... 120s Setting up git (1:2.45.2-1.2ubuntu1) ... 120s Setting up libjs-sphinxdoc (7.4.7-4) ... 120s Setting up libwww-robotrules-perl (6.02-1) ... 120s Setting up libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... 120s Setting up libhtml-parser-perl:amd64 (3.83-1build1) ... 120s Setting up python3-keyring (25.4.1-1) ... 120s Setting up libio-socket-ssl-perl (2.089-1) ... 120s Setting up libhttp-message-perl (7.00-2ubuntu1) ... 120s Setting up libhttp-negotiate-perl (6.01-2) ... 120s Setting up libhttp-cookies-perl (6.11-1) ... 120s Setting up python3-logilab-common (2.0.0-1) ... 120s Setting up python3-pygit2 (1.16.0-2) ... 120s Setting up libhtml-tree-perl (5.07-3) ... 120s Setting up libparams-classify-perl:amd64 (0.015-2build6) ... 120s Setting up python3-pytest-cov (5.0.0-1) ... 120s Setting up libmodule-runtime-perl (0.016-2) ... 120s Setting up python3-launchpadlib-desktop (2.0.0-1) ... 120s Setting up python3-keyrings.alt (5.0.2-1) ... 121s Setting up pylint (3.3.1-2) ... 121s Setting up libimport-into-perl (1.002005-2) ... 121s Setting up libmoo-perl (2.005005-1) ... 121s Setting up python3-ubuntutools (0.203) ... 121s Setting up liblwp-protocol-https-perl (6.14-1) ... 121s Setting up libwww-perl (6.77-1) ... 121s Setting up devscripts (2.24.3) ... 121s Setting up git-buildpackage (0.9.35) ... 121s Setting up ubuntu-dev-tools (0.203) ... 121s Setting up git-ubuntu (1.1-1) ... 122s Setting up autopkgtest-satdep (0) ... 122s Processing triggers for libc-bin (2.40-1ubuntu3) ... 122s Processing triggers for systemd (256.5-2ubuntu4) ... 122s Processing triggers for man-db (2.13.0-1) ... 123s Processing triggers for install-info (7.1.1-1) ... 126s (Reading database ... 81880 files and directories currently installed.) 126s Removing autopkgtest-satdep (0) ... 127s autopkgtest [10:40:03]: test self-test: TEST_SYSTEM_TREE=1 /usr/share/git-ubuntu/self-test 127s autopkgtest [10:40:03]: test self-test: [----------------------- 127s Testing git-ubuntu system installation. 127s Testing tree in /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu 127s Working dir /tmp/autopkgtest.QJfPOB/build.JpR/src 138s pylint passed! 144s ============================= test session starts ============================== 144s platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0 144s rootdir: /tmp/autopkgtest.QJfPOB/build.JpR/src 144s configfile: pytest.ini 144s plugins: typeguard-4.4.1, cov-5.0.0 144s collected 459 items 144s 144s gitubuntu/build.py ..... [ 1%] 145s gitubuntu/git_repository_test.py ....................................... [ 9%] 155s ...FFFFF.FFF...........................F.FFFFFFF.FFF.......FFFFFFFFFF [ 24%] 155s gitubuntu/importer_service_test.py ..................................... [ 32%] 155s ..... [ 33%] 155s gitubuntu/importer_service_worker_test.py ... [ 34%] 166s gitubuntu/importer_tag_test.py FFFFFFFFFxF [ 36%] 181s gitubuntu/importer_test.py .......FF.FFFFFFFFFFF.FFF.FFF..FFFFFFFFFFFFFF [ 46%] 193s FFFFxx..FF.................................................F....FFFF. [ 61%] 195s gitubuntu/integration_test.py ...............Fsss [ 65%] 195s gitubuntu/prepare_upload_test.py .............. [ 68%] 196s gitubuntu/repo_builder_test.py .........FF.F................ [ 75%] 196s gitubuntu/rich_history_test.py FFF.FFFF [ 76%] 200s gitubuntu/source_builder_test.py .FF.......FFFFFFFFF.. [ 81%] 201s gitubuntu/source_information_test.py ................................... [ 89%] 201s ... [ 89%] 201s gitubuntu/versioning.py ............................................... [100%] 201s 201s =================================== FAILURES =================================== 201s ___________________ test_follow_symlinks_to_blob[0] ____________________ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmpdp7evsyh/.git/') 201s tree_func = at 0x77b02f4791c0> 201s 201s @pytest.mark.parametrize('tree_func', [ 201s # The tree_func parameter is a function that accepts a mock Blob that is to 201s # represent the changelog blob itself and returns a mock Tree with the mock 201s # Blob embedded somewhere within it. The test function can then ensure that 201s # follow_symlinks_to_blob can correctly find the changelog Blob given the 201s # Tree. 201s 201s # Of course this is only expected to work if, after checking out the Tree, 201s # "cat debian/changelog" would work. But this allows us to test the various 201s # permutations of symlink following in Trees that _are_ valid. 201s 201s # Simple case 201s lambda b: Tree({ 201s 'debian': Tree({'changelog': b}), 201s }), 201s 201s # Symlink in debian/ 201s lambda b: Tree({ 201s 'debian': Tree({ 201s 'changelog.real': b, 201s 'changelog': Symlink('changelog.real'), 201s }), 201s }), 201s 201s # Symlink to parent directory 201s lambda b: Tree({ 201s 'changelog': b, 201s 'debian': Tree({ 201s 'changelog': Symlink('../changelog'), 201s }) 201s }), 201s 201s # Symlink to subdirectory 201s lambda b: Tree({ 201s 'debian': Tree({ 201s 'changelog': Symlink('subdirectory/changelog'), 201s 'subdirectory': Tree({'changelog': b}), 201s }) 201s }), 201s 201s # debian/ itself is a symlink to a different directory 201s lambda b: Tree({ 201s 'pkg': Tree({'changelog': b}), 201s 'debian': Symlink('pkg'), 201s }) 201s ]) 201s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 201s blob = Blob(b'') 201s blob_id = blob.write(pygit2_repo) 201s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 201s > result_blob = target.follow_symlinks_to_blob( 201s pygit2_repo, 201s tree, 201s 'debian/changelog', 201s ) 201s 201s gitubuntu/git_repository_test.py:342: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmpdp7evsyh/.git/') 201s top_tree_object = 201s search_path = 'debian/changelog' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s gitubuntu/git_repository.py:68: AttributeError 201s ___________________ test_follow_symlinks_to_blob[1] ____________________ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmptrmmuv40/.git/') 201s tree_func = at 0x77b02f479260> 201s 201s @pytest.mark.parametrize('tree_func', [ 201s # The tree_func parameter is a function that accepts a mock Blob that is to 201s # represent the changelog blob itself and returns a mock Tree with the mock 201s # Blob embedded somewhere within it. The test function can then ensure that 201s # follow_symlinks_to_blob can correctly find the changelog Blob given the 201s # Tree. 201s 201s # Of course this is only expected to work if, after checking out the Tree, 201s # "cat debian/changelog" would work. But this allows us to test the various 201s # permutations of symlink following in Trees that _are_ valid. 201s 201s # Simple case 201s lambda b: Tree({ 201s 'debian': Tree({'changelog': b}), 201s }), 201s 201s # Symlink in debian/ 201s lambda b: Tree({ 201s 'debian': Tree({ 201s 'changelog.real': b, 201s 'changelog': Symlink('changelog.real'), 201s }), 201s }), 201s 201s # Symlink to parent directory 201s lambda b: Tree({ 201s 'changelog': b, 201s 'debian': Tree({ 201s 'changelog': Symlink('../changelog'), 201s }) 201s }), 201s 201s # Symlink to subdirectory 201s lambda b: Tree({ 201s 'debian': Tree({ 201s 'changelog': Symlink('subdirectory/changelog'), 201s 'subdirectory': Tree({'changelog': b}), 201s }) 201s }), 201s 201s # debian/ itself is a symlink to a different directory 201s lambda b: Tree({ 201s 'pkg': Tree({'changelog': b}), 201s 'debian': Symlink('pkg'), 201s }) 201s ]) 201s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 201s blob = Blob(b'') 201s blob_id = blob.write(pygit2_repo) 201s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 201s > result_blob = target.follow_symlinks_to_blob( 201s pygit2_repo, 201s tree, 201s 'debian/changelog', 201s ) 201s 201s gitubuntu/git_repository_test.py:342: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmptrmmuv40/.git/') 201s top_tree_object = 201s search_path = 'debian/changelog' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s gitubuntu/git_repository.py:68: AttributeError 201s ___________________ test_follow_symlinks_to_blob[2] ____________________ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmpqzfp9gfa/.git/') 201s tree_func = at 0x77b02f479300> 201s 201s @pytest.mark.parametrize('tree_func', [ 201s # The tree_func parameter is a function that accepts a mock Blob that is to 201s # represent the changelog blob itself and returns a mock Tree with the mock 201s # Blob embedded somewhere within it. The test function can then ensure that 201s # follow_symlinks_to_blob can correctly find the changelog Blob given the 201s # Tree. 201s 201s # Of course this is only expected to work if, after checking out the Tree, 201s # "cat debian/changelog" would work. But this allows us to test the various 201s # permutations of symlink following in Trees that _are_ valid. 201s 201s # Simple case 201s lambda b: Tree({ 201s 'debian': Tree({'changelog': b}), 201s }), 201s 201s # Symlink in debian/ 201s lambda b: Tree({ 201s 'debian': Tree({ 201s 'changelog.real': b, 201s 'changelog': Symlink('changelog.real'), 201s }), 201s }), 201s 201s # Symlink to parent directory 201s lambda b: Tree({ 201s 'changelog': b, 201s 'debian': Tree({ 201s 'changelog': Symlink('../changelog'), 201s }) 201s }), 201s 201s # Symlink to subdirectory 201s lambda b: Tree({ 201s 'debian': Tree({ 201s 'changelog': Symlink('subdirectory/changelog'), 201s 'subdirectory': Tree({'changelog': b}), 201s }) 201s }), 201s 201s # debian/ itself is a symlink to a different directory 201s lambda b: Tree({ 201s 'pkg': Tree({'changelog': b}), 201s 'debian': Symlink('pkg'), 201s }) 201s ]) 201s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 201s blob = Blob(b'') 201s blob_id = blob.write(pygit2_repo) 201s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 201s > result_blob = target.follow_symlinks_to_blob( 201s pygit2_repo, 201s tree, 201s 'debian/changelog', 201s ) 201s 201s gitubuntu/git_repository_test.py:342: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmpqzfp9gfa/.git/') 201s top_tree_object = 201s search_path = 'debian/changelog' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s gitubuntu/git_repository.py:68: AttributeError 201s ___________________ test_follow_symlinks_to_blob[3] ____________________ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmp0t0ds3bi/.git/') 201s tree_func = at 0x77b02f4793a0> 201s 201s @pytest.mark.parametrize('tree_func', [ 201s # The tree_func parameter is a function that accepts a mock Blob that is to 201s # represent the changelog blob itself and returns a mock Tree with the mock 201s # Blob embedded somewhere within it. The test function can then ensure that 201s # follow_symlinks_to_blob can correctly find the changelog Blob given the 201s # Tree. 201s 201s # Of course this is only expected to work if, after checking out the Tree, 201s # "cat debian/changelog" would work. But this allows us to test the various 201s # permutations of symlink following in Trees that _are_ valid. 201s 201s # Simple case 201s lambda b: Tree({ 201s 'debian': Tree({'changelog': b}), 201s }), 201s 201s # Symlink in debian/ 201s lambda b: Tree({ 201s 'debian': Tree({ 201s 'changelog.real': b, 201s 'changelog': Symlink('changelog.real'), 201s }), 201s }), 201s 201s # Symlink to parent directory 201s lambda b: Tree({ 201s 'changelog': b, 201s 'debian': Tree({ 201s 'changelog': Symlink('../changelog'), 201s }) 201s }), 201s 201s # Symlink to subdirectory 201s lambda b: Tree({ 201s 'debian': Tree({ 201s 'changelog': Symlink('subdirectory/changelog'), 201s 'subdirectory': Tree({'changelog': b}), 201s }) 201s }), 201s 201s # debian/ itself is a symlink to a different directory 201s lambda b: Tree({ 201s 'pkg': Tree({'changelog': b}), 201s 'debian': Symlink('pkg'), 201s }) 201s ]) 201s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 201s blob = Blob(b'') 201s blob_id = blob.write(pygit2_repo) 201s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 201s > result_blob = target.follow_symlinks_to_blob( 201s pygit2_repo, 201s tree, 201s 'debian/changelog', 201s ) 201s 201s gitubuntu/git_repository_test.py:342: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmp0t0ds3bi/.git/') 201s top_tree_object = 201s search_path = 'debian/changelog' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s gitubuntu/git_repository.py:68: AttributeError 201s ___________________ test_follow_symlinks_to_blob[4] ____________________ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmps80muhee/.git/') 201s tree_func = at 0x77b02f479440> 201s 201s @pytest.mark.parametrize('tree_func', [ 201s # The tree_func parameter is a function that accepts a mock Blob that is to 201s # represent the changelog blob itself and returns a mock Tree with the mock 201s # Blob embedded somewhere within it. The test function can then ensure that 201s # follow_symlinks_to_blob can correctly find the changelog Blob given the 201s # Tree. 201s 201s # Of course this is only expected to work if, after checking out the Tree, 201s # "cat debian/changelog" would work. But this allows us to test the various 201s # permutations of symlink following in Trees that _are_ valid. 201s 201s # Simple case 201s lambda b: Tree({ 201s 'debian': Tree({'changelog': b}), 201s }), 201s 201s # Symlink in debian/ 201s lambda b: Tree({ 201s 'debian': Tree({ 201s 'changelog.real': b, 201s 'changelog': Symlink('changelog.real'), 201s }), 201s }), 201s 201s # Symlink to parent directory 201s lambda b: Tree({ 201s 'changelog': b, 201s 'debian': Tree({ 201s 'changelog': Symlink('../changelog'), 201s }) 201s }), 201s 201s # Symlink to subdirectory 201s lambda b: Tree({ 201s 'debian': Tree({ 201s 'changelog': Symlink('subdirectory/changelog'), 201s 'subdirectory': Tree({'changelog': b}), 201s }) 201s }), 201s 201s # debian/ itself is a symlink to a different directory 201s lambda b: Tree({ 201s 'pkg': Tree({'changelog': b}), 201s 'debian': Symlink('pkg'), 201s }) 201s ]) 201s def test_follow_symlinks_to_blob(pygit2_repo, tree_func): 201s blob = Blob(b'') 201s blob_id = blob.write(pygit2_repo) 201s tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) 201s > result_blob = target.follow_symlinks_to_blob( 201s pygit2_repo, 201s tree, 201s 'debian/changelog', 201s ) 201s 201s gitubuntu/git_repository_test.py:342: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmps80muhee/.git/') 201s top_tree_object = 201s search_path = 'debian/changelog' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s gitubuntu/git_repository.py:68: AttributeError 201s ________________ test_follow_symlinks_to_blob_not_found[tree1] _________________ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmpn79ajmfb/.git/') 201s tree = 201s 201s @pytest.mark.parametrize('tree', [ 201s Tree({}), 201s Tree({'debian': Tree({})}), 201s Tree({'debian': Tree({'changelog': Symlink('other')})}), 201s Tree({'debian': Tree({'changelog': Symlink('../other')})}), 201s ]) 201s def test_follow_symlinks_to_blob_not_found(pygit2_repo, tree): 201s pygit2_tree = pygit2_repo.get(tree.write(pygit2_repo)) 201s with pytest.raises(KeyError): 201s > target.follow_symlinks_to_blob( 201s pygit2_repo, 201s pygit2_tree, 201s 'debian/changelog', 201s ) 201s 201s gitubuntu/git_repository_test.py:359: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmpn79ajmfb/.git/') 201s top_tree_object = 201s search_path = 'debian/changelog' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s gitubuntu/git_repository.py:68: AttributeError 201s ________________ test_follow_symlinks_to_blob_not_found[tree2] _________________ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmpnt8tif1p/.git/') 201s tree = 201s 201s @pytest.mark.parametrize('tree', [ 201s Tree({}), 201s Tree({'debian': Tree({})}), 201s Tree({'debian': Tree({'changelog': Symlink('other')})}), 201s Tree({'debian': Tree({'changelog': Symlink('../other')})}), 201s ]) 201s def test_follow_symlinks_to_blob_not_found(pygit2_repo, tree): 201s pygit2_tree = pygit2_repo.get(tree.write(pygit2_repo)) 201s with pytest.raises(KeyError): 201s > target.follow_symlinks_to_blob( 201s pygit2_repo, 201s pygit2_tree, 201s 'debian/changelog', 201s ) 201s 201s gitubuntu/git_repository_test.py:359: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmpnt8tif1p/.git/') 201s top_tree_object = 201s search_path = 'debian/changelog' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s gitubuntu/git_repository.py:68: AttributeError 201s ________________ test_follow_symlinks_to_blob_not_found[tree3] _________________ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmpcrtzua5c/.git/') 201s tree = 201s 201s @pytest.mark.parametrize('tree', [ 201s Tree({}), 201s Tree({'debian': Tree({})}), 201s Tree({'debian': Tree({'changelog': Symlink('other')})}), 201s Tree({'debian': Tree({'changelog': Symlink('../other')})}), 201s ]) 201s def test_follow_symlinks_to_blob_not_found(pygit2_repo, tree): 201s pygit2_tree = pygit2_repo.get(tree.write(pygit2_repo)) 201s with pytest.raises(KeyError): 201s > target.follow_symlinks_to_blob( 201s pygit2_repo, 201s pygit2_tree, 201s 'debian/changelog', 201s ) 201s 201s gitubuntu/git_repository_test.py:359: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmpcrtzua5c/.git/') 201s top_tree_object = 201s search_path = 'debian/changelog' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s gitubuntu/git_repository.py:68: AttributeError 201s _________________________ test_git_escape_dir_to_tree __________________________ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmp1s82zg5u/.git/') 201s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_git_escape_dir_to_tree0') 201s 201s def test_git_escape_dir_to_tree(pygit2_repo, tmpdir): 201s tmpdir.mkdir('.git') 201s > tree_hash = target.GitUbuntuRepository.dir_to_tree( 201s pygit2_repo, 201s str(tmpdir), 201s escape=True, 201s ) 201s 201s gitubuntu/git_repository_test.py:668: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s gitubuntu/git_repository.py:2463: in dir_to_tree 201s replacement_oid = cls._add_missing_tree_dirs( 201s gitubuntu/git_repository.py:2397: in _add_missing_tree_dirs 201s tree_builder = cls._create_replacement_tree_builder( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s cls = 201s repo = pygit2.Repository('/tmp/tmp1s82zg5u/.git/') 201s treeish = 201s sub_path = '' 201s 201s @classmethod 201s def _create_replacement_tree_builder(cls, repo, treeish, sub_path): 201s '''Create a replacement TreeBuilder 201s 201s Create a TreeBuilder based on an existing repository, top-level 201s tree-ish and path inside that tree. 201s 201s A sub_path of '' is taken to mean a request for a replacement 201s TreeBuilder for the top level tree. 201s 201s Returns a TreeBuilder object pre-populated with the previous contents. 201s If the path did not previously exist in the tree-ish, then return an 201s empty TreeBuilder instead. 201s ''' 201s 201s > tree = treeish.peel(pygit2.GIT_OBJ_TREE) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s gitubuntu/git_repository.py:2331: AttributeError 201s ______ test_determine_quilt_series_path[tree_data1-debian/patches/series] ______ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmpyohpj5ip/.git/') 201s tree_data = 201s expected_path = 'debian/patches/series' 201s 201s @pytest.mark.parametrize('tree_data,expected_path', [ 201s # Empty tree -> default 201s (Tree({}), 'debian/patches/series'), 201s 201s # Empty debian/patches directory -> default 201s (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), 201s 201s # Only debian/patches/series -> that one 201s ( 201s Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 201s 'debian/patches/series', 201s ), 201s 201s # Only debian/patches/debian.series -> that one 201s ( 201s Tree({'debian': Tree({'patches': Tree({ 201s 'debian.series': Blob(b'') 201s })})}), 201s 'debian/patches/debian.series', 201s ), 201s 201s # Both -> debian.series 201s ( 201s Tree({'debian': Tree({'patches': Tree({ 201s 'debian.series': Blob(b''), 201s 'series': Blob(b''), 201s })})}), 201s 'debian/patches/debian.series', 201s ), 201s ]) 201s def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): 201s tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) 201s > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) 201s 201s gitubuntu/git_repository_test.py:708: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s gitubuntu/git_repository.py:991: in determine_quilt_series_path 201s blob = follow_symlinks_to_blob( 201s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmpyohpj5ip/.git/') 201s top_tree_object = 201s search_path = 'debian/patches/debian.series' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s gitubuntu/git_repository.py:68: AttributeError 201s ______ test_determine_quilt_series_path[tree_data2-debian/patches/series] ______ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmpy8nblk2z/.git/') 201s tree_data = 201s expected_path = 'debian/patches/series' 201s 201s @pytest.mark.parametrize('tree_data,expected_path', [ 201s # Empty tree -> default 201s (Tree({}), 'debian/patches/series'), 201s 201s # Empty debian/patches directory -> default 201s (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), 201s 201s # Only debian/patches/series -> that one 201s ( 201s Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 201s 'debian/patches/series', 201s ), 201s 201s # Only debian/patches/debian.series -> that one 201s ( 201s Tree({'debian': Tree({'patches': Tree({ 201s 'debian.series': Blob(b'') 201s })})}), 201s 'debian/patches/debian.series', 201s ), 201s 201s # Both -> debian.series 201s ( 201s Tree({'debian': Tree({'patches': Tree({ 201s 'debian.series': Blob(b''), 201s 'series': Blob(b''), 201s })})}), 201s 'debian/patches/debian.series', 201s ), 201s ]) 201s def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): 201s tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) 201s > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) 201s 201s gitubuntu/git_repository_test.py:708: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s gitubuntu/git_repository.py:991: in determine_quilt_series_path 201s blob = follow_symlinks_to_blob( 201s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmpy8nblk2z/.git/') 201s top_tree_object = 201s search_path = 'debian/patches/debian.series' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s gitubuntu/git_repository.py:68: AttributeError 201s __ test_determine_quilt_series_path[tree_data3-debian/patches/debian.series] ___ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmpv_1n5bgk/.git/') 201s tree_data = 201s expected_path = 'debian/patches/debian.series' 201s 201s @pytest.mark.parametrize('tree_data,expected_path', [ 201s # Empty tree -> default 201s (Tree({}), 'debian/patches/series'), 201s 201s # Empty debian/patches directory -> default 201s (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), 201s 201s # Only debian/patches/series -> that one 201s ( 201s Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 201s 'debian/patches/series', 201s ), 201s 201s # Only debian/patches/debian.series -> that one 201s ( 201s Tree({'debian': Tree({'patches': Tree({ 201s 'debian.series': Blob(b'') 201s })})}), 201s 'debian/patches/debian.series', 201s ), 201s 201s # Both -> debian.series 201s ( 201s Tree({'debian': Tree({'patches': Tree({ 201s 'debian.series': Blob(b''), 201s 'series': Blob(b''), 201s })})}), 201s 'debian/patches/debian.series', 201s ), 201s ]) 201s def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): 201s tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) 201s > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) 201s 201s gitubuntu/git_repository_test.py:708: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s gitubuntu/git_repository.py:991: in determine_quilt_series_path 201s blob = follow_symlinks_to_blob( 201s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmpv_1n5bgk/.git/') 201s top_tree_object = 201s search_path = 'debian/patches/debian.series' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s gitubuntu/git_repository.py:68: AttributeError 201s __ test_determine_quilt_series_path[tree_data4-debian/patches/debian.series] ___ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmpkh1hy4fu/.git/') 201s tree_data = 201s expected_path = 'debian/patches/debian.series' 201s 201s @pytest.mark.parametrize('tree_data,expected_path', [ 201s # Empty tree -> default 201s (Tree({}), 'debian/patches/series'), 201s 201s # Empty debian/patches directory -> default 201s (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), 201s 201s # Only debian/patches/series -> that one 201s ( 201s Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 201s 'debian/patches/series', 201s ), 201s 201s # Only debian/patches/debian.series -> that one 201s ( 201s Tree({'debian': Tree({'patches': Tree({ 201s 'debian.series': Blob(b'') 201s })})}), 201s 'debian/patches/debian.series', 201s ), 201s 201s # Both -> debian.series 201s ( 201s Tree({'debian': Tree({'patches': Tree({ 201s 'debian.series': Blob(b''), 201s 'series': Blob(b''), 201s })})}), 201s 'debian/patches/debian.series', 201s ), 201s ]) 201s def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): 201s tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) 201s > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) 201s 201s gitubuntu/git_repository_test.py:708: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s gitubuntu/git_repository.py:991: in determine_quilt_series_path 201s blob = follow_symlinks_to_blob( 201s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmpkh1hy4fu/.git/') 201s top_tree_object = 201s search_path = 'debian/patches/debian.series' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s gitubuntu/git_repository.py:68: AttributeError 201s ________________________________ test_quilt_env ________________________________ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmpoby1wrdu/.git/') 201s 201s def test_quilt_env(pygit2_repo): 201s tree_builder = Tree({'debian': 201s Tree({'patches': Tree({'debian.series': Blob(b'')})}) 201s }) 201s tree_obj = pygit2_repo.get(tree_builder.write(pygit2_repo)) 201s > env = target.quilt_env(pygit2_repo, tree_obj) 201s 201s gitubuntu/git_repository_test.py:717: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s gitubuntu/git_repository.py:1022: in quilt_env 201s 'QUILT_SERIES': determine_quilt_series_path(pygit2_repo, treeish), 201s gitubuntu/git_repository.py:991: in determine_quilt_series_path 201s blob = follow_symlinks_to_blob( 201s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmpoby1wrdu/.git/') 201s top_tree_object = 201s search_path = 'debian/patches/debian.series' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s gitubuntu/git_repository.py:68: AttributeError 201s _____________________________ test_repo_quilt_env ______________________________ 201s 201s repo = 201s 201s def test_repo_quilt_env(repo): 201s tree_builder = Tree({'debian': 201s Tree({'patches': Tree({'debian.series': Blob(b'')})}) 201s }) 201s tree_obj = repo.raw_repo.get(tree_builder.write(repo.raw_repo)) 201s > env = repo.quilt_env(tree_obj) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository_test.py:732: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:2575: in quilt_env 201s env.update(quilt_env(self.raw_repo, treeish)) 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1022: in quilt_env 201s 'QUILT_SERIES': determine_quilt_series_path(pygit2_repo, treeish), 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:991: in determine_quilt_series_path 201s blob = follow_symlinks_to_blob( 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmp809p5l9e/.git/') 201s top_tree_object = 201s search_path = 'debian/patches/debian.series' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 201s _____________________ test_repo_quilt_env_from_treeish_str _____________________ 201s 201s repo = 201s 201s def test_repo_quilt_env_from_treeish_str(repo): 201s tree_builder = Tree({'debian': 201s Tree({'patches': Tree({'debian.series': Blob(b'')})}) 201s }) 201s tree_obj = repo.raw_repo.get(tree_builder.write(repo.raw_repo)) 201s > env = repo.quilt_env_from_treeish_str(str(tree_obj.id)) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository_test.py:757: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:2589: in quilt_env_from_treeish_str 201s return self.quilt_env(self.raw_repo.get(treeish_str)) 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:2575: in quilt_env 201s env.update(quilt_env(self.raw_repo, treeish)) 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1022: in quilt_env 201s 'QUILT_SERIES': determine_quilt_series_path(pygit2_repo, treeish), 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:991: in determine_quilt_series_path 201s blob = follow_symlinks_to_blob( 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmp7b42ttq6/.git/') 201s top_tree_object = 201s search_path = 'debian/patches/debian.series' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 201s _ test_repo_find_ubuntu_merge[Common case-input_data0-pkg/import/1-1ubuntu1-pkg/import/2-1-pkg/import/1-1] _ 201s 201s description = 'Common case' 201s repo = 201s input_data = 201s old_ubuntu = 'pkg/import/1-1ubuntu1', new_debian = 'pkg/import/2-1' 201s expected = 'pkg/import/1-1' 201s 201s @pytest.mark.parametrize( 201s 'description, input_data, old_ubuntu, new_debian, expected', 201s [ 201s ( 201s 'Common case', 201s Repo( 201s commits=[ 201s Commit.from_spec( 201s name='old/debian' 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('old/debian')], 201s name='old/ubuntu', 201s changelog_versions=['1-1ubuntu1', '1-1'], 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('old/debian')], 201s name='new/debian', 201s changelog_versions=['2-1', '1-1'], 201s ), 201s ], 201s tags={ 201s 'pkg/import/1-1': Placeholder('old/debian'), 201s 'pkg/import/1-1ubuntu1': Placeholder('old/ubuntu'), 201s 'pkg/import/2-1': Placeholder('new/debian'), 201s }, 201s ), 201s 'pkg/import/1-1ubuntu1', 201s 'pkg/import/2-1', 201s 'pkg/import/1-1', 201s ), 201s ( 201s 'Ubuntu delta based on a NMU', 201s Repo( 201s commits=[ 201s Commit.from_spec( 201s name='fork_point' 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('fork_point')], 201s name='old/debian', 201s changelog_versions=['1-1.1', '1-1'], 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('old/debian')], 201s name='old/ubuntu', 201s changelog_versions=['1-1.1ubuntu1', '1-1.1', '1-1'], 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('fork_point')], 201s name='new/debian', 201s changelog_versions=['2-1', '1-1'], 201s ), 201s ], 201s tags={ 201s 'pkg/import/1-1': Placeholder('fork_point'), 201s 'pkg/import/1-1.1': Placeholder('old/debian'), 201s 'pkg/import/1-1.1ubuntu1': Placeholder('old/ubuntu'), 201s 'pkg/import/2-1': Placeholder('new/debian'), 201s }, 201s ), 201s 'pkg/import/1-1.1ubuntu1', 201s 'pkg/import/2-1', 201s 'pkg/import/1-1.1', 201s ), 201s ( 201s 'Ubuntu upstream version head of Debian', 201s Repo( 201s commits=[ 201s Commit.from_spec( 201s name='old/debian' 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('old/debian')], 201s name='mid_ubuntu', 201s changelog_versions=['1-1ubuntu1', '1-1'], 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('mid_ubuntu')], 201s name='old/ubuntu', 201s changelog_versions=['2-0ubuntu1', '1-1ubuntu1', '1-1'], 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('old/debian')], 201s name='new/debian', 201s changelog_versions=['3-1', '1-1'], 201s ), 201s ], 201s tags={ 201s 'pkg/import/1-1': Placeholder('old/debian'), 201s 'pkg/import/1-1ubuntu1': Placeholder('mid_ubuntu'), 201s 'pkg/import/2-0ubuntu1': Placeholder('old/ubuntu'), 201s 'pkg/import/3-1': Placeholder('new/debian'), 201s }, 201s ), 201s 'pkg/import/2-0ubuntu1', 201s 'pkg/import/3-1', 201s 'pkg/import/1-1', 201s ), 201s ], 201s ) 201s def test_repo_find_ubuntu_merge( 201s description, 201s repo, 201s input_data, 201s old_ubuntu, 201s new_debian, 201s expected, 201s ): 201s > input_data.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository_test.py:889: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpjk0yk1x5/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_2.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_2-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_2-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ 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] _ 201s 201s description = 'Ubuntu delta based on a NMU' 201s repo = 201s input_data = 201s old_ubuntu = 'pkg/import/1-1.1ubuntu1', new_debian = 'pkg/import/2-1' 201s expected = 'pkg/import/1-1.1' 201s 201s @pytest.mark.parametrize( 201s 'description, input_data, old_ubuntu, new_debian, expected', 201s [ 201s ( 201s 'Common case', 201s Repo( 201s commits=[ 201s Commit.from_spec( 201s name='old/debian' 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('old/debian')], 201s name='old/ubuntu', 201s changelog_versions=['1-1ubuntu1', '1-1'], 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('old/debian')], 201s name='new/debian', 201s changelog_versions=['2-1', '1-1'], 201s ), 201s ], 201s tags={ 201s 'pkg/import/1-1': Placeholder('old/debian'), 201s 'pkg/import/1-1ubuntu1': Placeholder('old/ubuntu'), 201s 'pkg/import/2-1': Placeholder('new/debian'), 201s }, 201s ), 201s 'pkg/import/1-1ubuntu1', 201s 'pkg/import/2-1', 201s 'pkg/import/1-1', 201s ), 201s ( 201s 'Ubuntu delta based on a NMU', 201s Repo( 201s commits=[ 201s Commit.from_spec( 201s name='fork_point' 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('fork_point')], 201s name='old/debian', 201s changelog_versions=['1-1.1', '1-1'], 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('old/debian')], 201s name='old/ubuntu', 201s changelog_versions=['1-1.1ubuntu1', '1-1.1', '1-1'], 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('fork_point')], 201s name='new/debian', 201s changelog_versions=['2-1', '1-1'], 201s ), 201s ], 201s tags={ 201s 'pkg/import/1-1': Placeholder('fork_point'), 201s 'pkg/import/1-1.1': Placeholder('old/debian'), 201s 'pkg/import/1-1.1ubuntu1': Placeholder('old/ubuntu'), 201s 'pkg/import/2-1': Placeholder('new/debian'), 201s }, 201s ), 201s 'pkg/import/1-1.1ubuntu1', 201s 'pkg/import/2-1', 201s 'pkg/import/1-1.1', 201s ), 201s ( 201s 'Ubuntu upstream version head of Debian', 201s Repo( 201s commits=[ 201s Commit.from_spec( 201s name='old/debian' 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('old/debian')], 201s name='mid_ubuntu', 201s changelog_versions=['1-1ubuntu1', '1-1'], 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('mid_ubuntu')], 201s name='old/ubuntu', 201s changelog_versions=['2-0ubuntu1', '1-1ubuntu1', '1-1'], 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('old/debian')], 201s name='new/debian', 201s changelog_versions=['3-1', '1-1'], 201s ), 201s ], 201s tags={ 201s 'pkg/import/1-1': Placeholder('old/debian'), 201s 'pkg/import/1-1ubuntu1': Placeholder('mid_ubuntu'), 201s 'pkg/import/2-0ubuntu1': Placeholder('old/ubuntu'), 201s 'pkg/import/3-1': Placeholder('new/debian'), 201s }, 201s ), 201s 'pkg/import/2-0ubuntu1', 201s 'pkg/import/3-1', 201s 'pkg/import/1-1', 201s ), 201s ], 201s ) 201s def test_repo_find_ubuntu_merge( 201s description, 201s repo, 201s input_data, 201s old_ubuntu, 201s new_debian, 201s expected, 201s ): 201s > input_data.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository_test.py:889: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpmk1w_dsm/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1ubuntu1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1ubuntu1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_2.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_2-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_2-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ 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] _ 201s 201s description = 'Ubuntu upstream version head of Debian' 201s repo = 201s input_data = 201s old_ubuntu = 'pkg/import/2-0ubuntu1', new_debian = 'pkg/import/3-1' 201s expected = 'pkg/import/1-1' 201s 201s @pytest.mark.parametrize( 201s 'description, input_data, old_ubuntu, new_debian, expected', 201s [ 201s ( 201s 'Common case', 201s Repo( 201s commits=[ 201s Commit.from_spec( 201s name='old/debian' 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('old/debian')], 201s name='old/ubuntu', 201s changelog_versions=['1-1ubuntu1', '1-1'], 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('old/debian')], 201s name='new/debian', 201s changelog_versions=['2-1', '1-1'], 201s ), 201s ], 201s tags={ 201s 'pkg/import/1-1': Placeholder('old/debian'), 201s 'pkg/import/1-1ubuntu1': Placeholder('old/ubuntu'), 201s 'pkg/import/2-1': Placeholder('new/debian'), 201s }, 201s ), 201s 'pkg/import/1-1ubuntu1', 201s 'pkg/import/2-1', 201s 'pkg/import/1-1', 201s ), 201s ( 201s 'Ubuntu delta based on a NMU', 201s Repo( 201s commits=[ 201s Commit.from_spec( 201s name='fork_point' 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('fork_point')], 201s name='old/debian', 201s changelog_versions=['1-1.1', '1-1'], 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('old/debian')], 201s name='old/ubuntu', 201s changelog_versions=['1-1.1ubuntu1', '1-1.1', '1-1'], 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('fork_point')], 201s name='new/debian', 201s changelog_versions=['2-1', '1-1'], 201s ), 201s ], 201s tags={ 201s 'pkg/import/1-1': Placeholder('fork_point'), 201s 'pkg/import/1-1.1': Placeholder('old/debian'), 201s 'pkg/import/1-1.1ubuntu1': Placeholder('old/ubuntu'), 201s 'pkg/import/2-1': Placeholder('new/debian'), 201s }, 201s ), 201s 'pkg/import/1-1.1ubuntu1', 201s 'pkg/import/2-1', 201s 'pkg/import/1-1.1', 201s ), 201s ( 201s 'Ubuntu upstream version head of Debian', 201s Repo( 201s commits=[ 201s Commit.from_spec( 201s name='old/debian' 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('old/debian')], 201s name='mid_ubuntu', 201s changelog_versions=['1-1ubuntu1', '1-1'], 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('mid_ubuntu')], 201s name='old/ubuntu', 201s changelog_versions=['2-0ubuntu1', '1-1ubuntu1', '1-1'], 201s ), 201s Commit.from_spec( 201s parents=[Placeholder('old/debian')], 201s name='new/debian', 201s changelog_versions=['3-1', '1-1'], 201s ), 201s ], 201s tags={ 201s 'pkg/import/1-1': Placeholder('old/debian'), 201s 'pkg/import/1-1ubuntu1': Placeholder('mid_ubuntu'), 201s 'pkg/import/2-0ubuntu1': Placeholder('old/ubuntu'), 201s 'pkg/import/3-1': Placeholder('new/debian'), 201s }, 201s ), 201s 'pkg/import/2-0ubuntu1', 201s 'pkg/import/3-1', 201s 'pkg/import/1-1', 201s ), 201s ], 201s ) 201s def test_repo_find_ubuntu_merge( 201s description, 201s repo, 201s input_data, 201s old_ubuntu, 201s new_debian, 201s expected, 201s ): 201s > input_data.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository_test.py:889: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmps090pi7k/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_2.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_2-0ubuntu1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_2-0ubuntu1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_3.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_3-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_3-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _______________________________ test_commit_tree _______________________________ 201s 201s repo = 201s 201s def test_commit_tree(repo): 201s # Construct a repository with an initial commit on the master branch so 201s # that we can verify later parentage and lack of branch movement 201s parent_commit_oid = Repo( 201s commits=[Commit(name='master')], 201s branches={'master': Placeholder('master')} 201s ).write(repo.raw_repo) 201s repo.raw_repo.lookup_reference('HEAD').set_target('refs/heads/master') 201s 201s # Construct a tree inside the repository with a debian/changelog in it to 201s # feed to the method under test 201s test_changelog_path = os.path.join( 201s pkg_resources.resource_filename('gitubuntu', 'changelog_tests'), 201s 'test_date_1', 201s ) 201s with open(test_changelog_path, 'rb') as f: 201s test_changelog_bytes = f.read() 201s test_changelog_blob = Blob(test_changelog_bytes) 201s source_tree = Tree({'debian': Tree({'changelog': test_changelog_blob})}) 201s source_tree_oid = source_tree.write(repo.raw_repo) 201s 201s # Call the method under test 201s > commit_oid = repo.commit_source_tree( 201s tree=source_tree_oid, 201s parents=[parent_commit_oid], 201s log_message='test_commit_msg', 201s commit_date=datetime.datetime( 201s 1971, # year 201s 2, # month 201s 3, # day 201s 4, # hours 201s 5, # minutes 201s 6, # seconds 201s 7, # milliseconds (this should get truncated down to 0) 201s datetime.timezone(datetime.timedelta(hours=-8)) 201s ), 201s ) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository_test.py:993: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:2299: in commit_source_tree 201s changelog = self.get_changelog_from_treeish(str(tree)) 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 201s return Changelog.from_treeish( 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:569: in from_treeish 201s blob = follow_symlinks_to_blob( 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmpsc_v9k1b/.git/') 201s top_tree_object = 201s search_path = 'debian/changelog' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 201s _____________________ test_descendant_of[root-root-False] ______________________ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmpelf3phcz/.git/'), a = 'root' 201s b = 'root', expected = False 201s 201s @pytest.mark.parametrize(['a', 'b', 'expected'], 201s [ 201s ('root', 'root', False), 201s ('child1', 'root', True), 201s ('root', 'child1', False), 201s ('grandchild1', 'root', True), 201s ('child1', 'child2', False), 201s ('root', 'disjoint', False), 201s ] 201s ) 201s def test_descendant_of(pygit2_repo, a, b, expected): 201s """ 201s General test for pygit2.Repository.descendant_of(). 201s 201s This test was formerly for a temporary alternative implementation of 201s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 201s use until we updated our pinning to use a newer version of pygit2 that 201s included the pygit2.Repository.descendant_of() method. After the pinning 201s was removed and this implementation replacement took place, we kept the 201s test to ensure that actual behaviour did not change. 201s 201s This unit tests validate_upload_tag() for various parameterized cases. The 201s paramater sets assume the repository structure encoded in the Repo() call 201s below. 201s 201s :param pygit2.Repository pygit2_repo: fixture providing a temporary 201s pygit2.Repository instance to use 201s :param str a: tag name of the first commit to pass to descendant_of() 201s :param str b: tag name of the second commit to pass to descendant_of() 201s :param bool expected: the expected result of descendant_of() 201s """ 201s Repo( 201s # Unique message parameters are used in each entry here in order to 201s # ensure that otherwise-identical commits do not end up being the same 201s # commit (with the same hash, etc). 201s commits=[ 201s Commit(name='root', message='1'), 201s Commit(name='child1', parents=[Placeholder('root')], message='2'), 201s Commit(name='child2', parents=[Placeholder('root')], message='3'), 201s Commit( 201s name='grandchild1', 201s parents=[Placeholder('child1')], 201s message='4' 201s ), 201s Commit(name='disjoint', message='5'), 201s ], 201s tags={ 201s 'root': Placeholder('root'), 201s 'child1': Placeholder('child1'), 201s 'child2': Placeholder('child2'), 201s 'grandchild1': Placeholder('grandchild1'), 201s 'disjoint': Placeholder('disjoint'), 201s } 201s > ).write(pygit2_repo) 201s 201s gitubuntu/git_repository_test.py:1099: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpelf3phcz/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s gitubuntu/repo_builder.py:389: AttributeError 201s _____________________ test_descendant_of[child1-root-True] _____________________ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmp88fe5m6l/.git/'), a = 'child1' 201s b = 'root', expected = True 201s 201s @pytest.mark.parametrize(['a', 'b', 'expected'], 201s [ 201s ('root', 'root', False), 201s ('child1', 'root', True), 201s ('root', 'child1', False), 201s ('grandchild1', 'root', True), 201s ('child1', 'child2', False), 201s ('root', 'disjoint', False), 201s ] 201s ) 201s def test_descendant_of(pygit2_repo, a, b, expected): 201s """ 201s General test for pygit2.Repository.descendant_of(). 201s 201s This test was formerly for a temporary alternative implementation of 201s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 201s use until we updated our pinning to use a newer version of pygit2 that 201s included the pygit2.Repository.descendant_of() method. After the pinning 201s was removed and this implementation replacement took place, we kept the 201s test to ensure that actual behaviour did not change. 201s 201s This unit tests validate_upload_tag() for various parameterized cases. The 201s paramater sets assume the repository structure encoded in the Repo() call 201s below. 201s 201s :param pygit2.Repository pygit2_repo: fixture providing a temporary 201s pygit2.Repository instance to use 201s :param str a: tag name of the first commit to pass to descendant_of() 201s :param str b: tag name of the second commit to pass to descendant_of() 201s :param bool expected: the expected result of descendant_of() 201s """ 201s Repo( 201s # Unique message parameters are used in each entry here in order to 201s # ensure that otherwise-identical commits do not end up being the same 201s # commit (with the same hash, etc). 201s commits=[ 201s Commit(name='root', message='1'), 201s Commit(name='child1', parents=[Placeholder('root')], message='2'), 201s Commit(name='child2', parents=[Placeholder('root')], message='3'), 201s Commit( 201s name='grandchild1', 201s parents=[Placeholder('child1')], 201s message='4' 201s ), 201s Commit(name='disjoint', message='5'), 201s ], 201s tags={ 201s 'root': Placeholder('root'), 201s 'child1': Placeholder('child1'), 201s 'child2': Placeholder('child2'), 201s 'grandchild1': Placeholder('grandchild1'), 201s 'disjoint': Placeholder('disjoint'), 201s } 201s > ).write(pygit2_repo) 201s 201s gitubuntu/git_repository_test.py:1099: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmp88fe5m6l/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s gitubuntu/repo_builder.py:389: AttributeError 201s ____________________ test_descendant_of[root-child1-False] _____________________ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmp0byaser1/.git/'), a = 'root' 201s b = 'child1', expected = False 201s 201s @pytest.mark.parametrize(['a', 'b', 'expected'], 201s [ 201s ('root', 'root', False), 201s ('child1', 'root', True), 201s ('root', 'child1', False), 201s ('grandchild1', 'root', True), 201s ('child1', 'child2', False), 201s ('root', 'disjoint', False), 201s ] 201s ) 201s def test_descendant_of(pygit2_repo, a, b, expected): 201s """ 201s General test for pygit2.Repository.descendant_of(). 201s 201s This test was formerly for a temporary alternative implementation of 201s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 201s use until we updated our pinning to use a newer version of pygit2 that 201s included the pygit2.Repository.descendant_of() method. After the pinning 201s was removed and this implementation replacement took place, we kept the 201s test to ensure that actual behaviour did not change. 201s 201s This unit tests validate_upload_tag() for various parameterized cases. The 201s paramater sets assume the repository structure encoded in the Repo() call 201s below. 201s 201s :param pygit2.Repository pygit2_repo: fixture providing a temporary 201s pygit2.Repository instance to use 201s :param str a: tag name of the first commit to pass to descendant_of() 201s :param str b: tag name of the second commit to pass to descendant_of() 201s :param bool expected: the expected result of descendant_of() 201s """ 201s Repo( 201s # Unique message parameters are used in each entry here in order to 201s # ensure that otherwise-identical commits do not end up being the same 201s # commit (with the same hash, etc). 201s commits=[ 201s Commit(name='root', message='1'), 201s Commit(name='child1', parents=[Placeholder('root')], message='2'), 201s Commit(name='child2', parents=[Placeholder('root')], message='3'), 201s Commit( 201s name='grandchild1', 201s parents=[Placeholder('child1')], 201s message='4' 201s ), 201s Commit(name='disjoint', message='5'), 201s ], 201s tags={ 201s 'root': Placeholder('root'), 201s 'child1': Placeholder('child1'), 201s 'child2': Placeholder('child2'), 201s 'grandchild1': Placeholder('grandchild1'), 201s 'disjoint': Placeholder('disjoint'), 201s } 201s > ).write(pygit2_repo) 201s 201s gitubuntu/git_repository_test.py:1099: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmp0byaser1/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s gitubuntu/repo_builder.py:389: AttributeError 201s __________________ test_descendant_of[grandchild1-root-True] ___________________ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmp2gp4fgvm/.git/'), a = 'grandchild1' 201s b = 'root', expected = True 201s 201s @pytest.mark.parametrize(['a', 'b', 'expected'], 201s [ 201s ('root', 'root', False), 201s ('child1', 'root', True), 201s ('root', 'child1', False), 201s ('grandchild1', 'root', True), 201s ('child1', 'child2', False), 201s ('root', 'disjoint', False), 201s ] 201s ) 201s def test_descendant_of(pygit2_repo, a, b, expected): 201s """ 201s General test for pygit2.Repository.descendant_of(). 201s 201s This test was formerly for a temporary alternative implementation of 201s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 201s use until we updated our pinning to use a newer version of pygit2 that 201s included the pygit2.Repository.descendant_of() method. After the pinning 201s was removed and this implementation replacement took place, we kept the 201s test to ensure that actual behaviour did not change. 201s 201s This unit tests validate_upload_tag() for various parameterized cases. The 201s paramater sets assume the repository structure encoded in the Repo() call 201s below. 201s 201s :param pygit2.Repository pygit2_repo: fixture providing a temporary 201s pygit2.Repository instance to use 201s :param str a: tag name of the first commit to pass to descendant_of() 201s :param str b: tag name of the second commit to pass to descendant_of() 201s :param bool expected: the expected result of descendant_of() 201s """ 201s Repo( 201s # Unique message parameters are used in each entry here in order to 201s # ensure that otherwise-identical commits do not end up being the same 201s # commit (with the same hash, etc). 201s commits=[ 201s Commit(name='root', message='1'), 201s Commit(name='child1', parents=[Placeholder('root')], message='2'), 201s Commit(name='child2', parents=[Placeholder('root')], message='3'), 201s Commit( 201s name='grandchild1', 201s parents=[Placeholder('child1')], 201s message='4' 201s ), 201s Commit(name='disjoint', message='5'), 201s ], 201s tags={ 201s 'root': Placeholder('root'), 201s 'child1': Placeholder('child1'), 201s 'child2': Placeholder('child2'), 201s 'grandchild1': Placeholder('grandchild1'), 201s 'disjoint': Placeholder('disjoint'), 201s } 201s > ).write(pygit2_repo) 201s 201s gitubuntu/git_repository_test.py:1099: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmp2gp4fgvm/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s gitubuntu/repo_builder.py:389: AttributeError 201s ___________________ test_descendant_of[child1-child2-False] ____________________ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmpjzepnrae/.git/'), a = 'child1' 201s b = 'child2', expected = False 201s 201s @pytest.mark.parametrize(['a', 'b', 'expected'], 201s [ 201s ('root', 'root', False), 201s ('child1', 'root', True), 201s ('root', 'child1', False), 201s ('grandchild1', 'root', True), 201s ('child1', 'child2', False), 201s ('root', 'disjoint', False), 201s ] 201s ) 201s def test_descendant_of(pygit2_repo, a, b, expected): 201s """ 201s General test for pygit2.Repository.descendant_of(). 201s 201s This test was formerly for a temporary alternative implementation of 201s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 201s use until we updated our pinning to use a newer version of pygit2 that 201s included the pygit2.Repository.descendant_of() method. After the pinning 201s was removed and this implementation replacement took place, we kept the 201s test to ensure that actual behaviour did not change. 201s 201s This unit tests validate_upload_tag() for various parameterized cases. The 201s paramater sets assume the repository structure encoded in the Repo() call 201s below. 201s 201s :param pygit2.Repository pygit2_repo: fixture providing a temporary 201s pygit2.Repository instance to use 201s :param str a: tag name of the first commit to pass to descendant_of() 201s :param str b: tag name of the second commit to pass to descendant_of() 201s :param bool expected: the expected result of descendant_of() 201s """ 201s Repo( 201s # Unique message parameters are used in each entry here in order to 201s # ensure that otherwise-identical commits do not end up being the same 201s # commit (with the same hash, etc). 201s commits=[ 201s Commit(name='root', message='1'), 201s Commit(name='child1', parents=[Placeholder('root')], message='2'), 201s Commit(name='child2', parents=[Placeholder('root')], message='3'), 201s Commit( 201s name='grandchild1', 201s parents=[Placeholder('child1')], 201s message='4' 201s ), 201s Commit(name='disjoint', message='5'), 201s ], 201s tags={ 201s 'root': Placeholder('root'), 201s 'child1': Placeholder('child1'), 201s 'child2': Placeholder('child2'), 201s 'grandchild1': Placeholder('grandchild1'), 201s 'disjoint': Placeholder('disjoint'), 201s } 201s > ).write(pygit2_repo) 201s 201s gitubuntu/git_repository_test.py:1099: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpjzepnrae/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s gitubuntu/repo_builder.py:389: AttributeError 201s ___________________ test_descendant_of[root-disjoint-False] ____________________ 201s 201s pygit2_repo = pygit2.Repository('/tmp/tmpu2_z7k1n/.git/'), a = 'root' 201s b = 'disjoint', expected = False 201s 201s @pytest.mark.parametrize(['a', 'b', 'expected'], 201s [ 201s ('root', 'root', False), 201s ('child1', 'root', True), 201s ('root', 'child1', False), 201s ('grandchild1', 'root', True), 201s ('child1', 'child2', False), 201s ('root', 'disjoint', False), 201s ] 201s ) 201s def test_descendant_of(pygit2_repo, a, b, expected): 201s """ 201s General test for pygit2.Repository.descendant_of(). 201s 201s This test was formerly for a temporary alternative implementation of 201s pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for 201s use until we updated our pinning to use a newer version of pygit2 that 201s included the pygit2.Repository.descendant_of() method. After the pinning 201s was removed and this implementation replacement took place, we kept the 201s test to ensure that actual behaviour did not change. 201s 201s This unit tests validate_upload_tag() for various parameterized cases. The 201s paramater sets assume the repository structure encoded in the Repo() call 201s below. 201s 201s :param pygit2.Repository pygit2_repo: fixture providing a temporary 201s pygit2.Repository instance to use 201s :param str a: tag name of the first commit to pass to descendant_of() 201s :param str b: tag name of the second commit to pass to descendant_of() 201s :param bool expected: the expected result of descendant_of() 201s """ 201s Repo( 201s # Unique message parameters are used in each entry here in order to 201s # ensure that otherwise-identical commits do not end up being the same 201s # commit (with the same hash, etc). 201s commits=[ 201s Commit(name='root', message='1'), 201s Commit(name='child1', parents=[Placeholder('root')], message='2'), 201s Commit(name='child2', parents=[Placeholder('root')], message='3'), 201s Commit( 201s name='grandchild1', 201s parents=[Placeholder('child1')], 201s message='4' 201s ), 201s Commit(name='disjoint', message='5'), 201s ], 201s tags={ 201s 'root': Placeholder('root'), 201s 'child1': Placeholder('child1'), 201s 'child2': Placeholder('child2'), 201s 'grandchild1': Placeholder('grandchild1'), 201s 'disjoint': Placeholder('disjoint'), 201s } 201s > ).write(pygit2_repo) 201s 201s gitubuntu/git_repository_test.py:1099: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpu2_z7k1n/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s gitubuntu/repo_builder.py:389: AttributeError 201s _______________________________ test_create_tag ________________________________ 201s 201s repo = 201s 201s def test_create_tag(repo): 201s """create_tag() should create a tag 201s 201s :param GitUbuntuRepository repo: fixture providing a temporary 201s GitUbuntuRepository instance to use 201s """ 201s Repo( 201s commits=[Commit(name='root')], 201s tags={'root': Placeholder('root')}, 201s > ).write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository_test.py:1127: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpwt8q4vyo/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s __________________________ test_get_all_reimport_tags __________________________ 201s 201s repo = 201s 201s def test_get_all_reimport_tags(repo): 201s """get_all_reimport_tags() should return only matching reimport tags 201s 201s :param GitUbuntuRepository repo: fixture providing a temporary 201s GitUbuntuRepository instance to use 201s """ 201s Repo( 201s commits=[Commit(name='root')], 201s tags={ 201s 'importer/reimport/import/1/0': Placeholder('root'), 201s 'importer/reimport/import/1/1': Placeholder('root'), 201s 201s # This entry must not be identified as one of version 1's reimport 201s # tags, even though it shares the same base prefix. 201s 'importer/reimport/import/11/0': Placeholder('root'), 201s }, 201s > ).write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository_test.py:1165: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmppm1pv0vv/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ______________________________ test_get_head_info ______________________________ 201s 201s repo = 201s 201s def test_get_head_info(repo): 201s """get_head_info() extracts expected commit and version info from the head 201s commit 201s """ 201s Repo( 201s commits=[ 201s Commit(name='foo', tree=SourceTree(source=Source())), 201s ], 201s branches={ 201s 'importer/ubuntu/foo': Placeholder('foo'), 201s 'importer/debian/bar': Placeholder('foo'), 201s 'other/ubuntu/baz': Placeholder('foo'), 201s }, 201s ).write(repo.raw_repo) 201s foo_commit_id = ( 201s repo.raw_repo 201s .lookup_reference('refs/heads/importer/ubuntu/foo') 201s .peel(pygit2.Commit).id 201s ) 201s > assert repo.get_head_info('ubuntu', 'importer') == { 201s 'importer/ubuntu/foo': HeadInfoItem( 201s version='1-1', 201s commit_time=0, 201s commit_id=foo_commit_id, 201s ), 201s } 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository_test.py:1193: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1952: in get_head_info 201s self.get_changelog_versions_from_treeish(str(head.peel().id)) 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1888: in get_changelog_versions_from_treeish 201s changelog = self.get_changelog_from_treeish(treeish_string) 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 201s return Changelog.from_treeish( 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:569: in from_treeish 201s blob = follow_symlinks_to_blob( 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmp241x4rou/.git/') 201s top_tree_object = 201s search_path = 'debian/changelog' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ test_import_unapplied_spi_tags[input_repo0-expected_output_refs0-validation_repo_delta0-validation_repo_expected_identical_refs0-True] _ 201s 201s get_import_commit_msg_mock = 201s get_import_tag_msg_mock = 201s repo = 201s input_repo = 201s 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'] 201s validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }} 201s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty-proposed', 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1'] 201s reuse = True 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'expected_output_refs', 201s 'validation_repo_delta', 201s 'validation_repo_expected_identical_refs', 201s 'reuse', 201s ], 201s [ 201s # 1) An existing import tag (or reimport tag) with the same Git tree 201s # - Reuse import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='import')], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('import'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='import tag contents', 201s ), 201s Commit.from_spec(name='reimport'), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 2) An existing import tag with a different Git tree and an existing 201s # upload tag with the same Git tree 201s # - Reuse upload tag, create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s Commit.from_spec(name='upload'), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-1': Placeholder('upload'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('upload'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('upload'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 3) An existing import tag with a different Git tree and an existing 201s # upload tag with a different Git tree 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s Commit.from_spec( 201s name='upload', 201s mutate='The upload tag contents', 201s ), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-1': Placeholder('upload'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [Commit.from_spec( 201s name='reimport', 201s message='Test commit (new)', 201s )], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 4) An existing import tag with a different Git tree and no upload tag 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [Commit.from_spec( 201s name='reimport', 201s message='Test commit (new)', 201s )], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 5) No import tag and an existing upload tag with the same Git tree 201s # - Reuse upload tag, create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='upload')], 201s tags={'importer/upload/1-1': Placeholder('upload')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('upload'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('upload'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 6) No import tag and an existing upload tag with a different Git tree 201s # - Create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='upload', 201s mutate='The upload tag contents', 201s ), 201s ], 201s tags={'importer/upload/1-1': Placeholder('upload')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='publish', 201s message='Test commit (new)', 201s ), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('publish'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('publish'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 7) No import tags or upload tags 201s # - Create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo(), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='publish', 201s message='Test commit (new)', 201s ), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('publish'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('publish'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1' 201s ], 201s # reuse: 201s False, 201s ), 201s ] 201s ) 201s @patch('gitubuntu.importer.get_import_tag_msg') 201s @patch('gitubuntu.importer.get_import_commit_msg') 201s def test_import_unapplied_spi_tags( 201s get_import_commit_msg_mock, 201s get_import_tag_msg_mock, 201s repo, 201s input_repo, 201s expected_output_refs, 201s validation_repo_delta, 201s validation_repo_expected_identical_refs, 201s reuse, 201s ): 201s """Test that unapplied tags are correctly created, adjusted and/or reused 201s 201s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 201s that determines the commit message to use for a given import 201s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 201s that determines the tag message to use for a given import 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param repo_builder.Repo input_repo: input repository data 201s :param list(str) expected_output_refs: refs that must exist in the output 201s repository 201s :param dict validation_repo_delta: how to transform the input 201s repository into a "validation repository", expressed as a dict to 201s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 201s input repository. The validation repository is then used for the 201s purposes of comparison against the output repository. 201s :param list(str) validation_repo_expected_identical_refs: refs that must be 201s identical between the validation repository and the output repository 201s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 201s one supplied by the input repository (assumed to have a commit message 201s of "Test commit") and not one created by the importer in this run 201s (arranged by this test to have a different commit message) 201s 201s The input repository data is written into the output repository and then a 201s fake non-native source package publication of version 1-1 in the Trusty 201s release pocket is imported into it by calling import_unapplied_spi() 201s directly. expected_output_refs, validation_repo_expected_identical_refs and 201s reuse are then asserted. It is further asserted that no other refs exist in 201s the output repository except for those listed in expected_output_refs and 201s validation_repo_expected_identical_refs. 201s """ 201s # Match the repo_builder objects 201s get_import_tag_msg_mock.return_value = 'Test tag' 201s # Importantly, the following commit message must not be the same as the 201s # commit messages used by the test input repository commits, so that we can 201s # later detect the difference between commits that were already there and 201s # new commits created by the importer for the purposes of asserting the 201s # reuse parameter correctly. 201s get_import_commit_msg_mock.return_value = b'Test commit (new)' 201s 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_tag_test.py:463: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpirjdajpp/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ test_import_unapplied_spi_tags[input_repo1-expected_output_refs1-validation_repo_delta1-validation_repo_expected_identical_refs1-True] _ 201s 201s get_import_commit_msg_mock = 201s get_import_tag_msg_mock = 201s repo = 201s input_repo = 201s 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'] 201s validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }} 201s 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'] 201s reuse = True 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'expected_output_refs', 201s 'validation_repo_delta', 201s 'validation_repo_expected_identical_refs', 201s 'reuse', 201s ], 201s [ 201s # 1) An existing import tag (or reimport tag) with the same Git tree 201s # - Reuse import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='import')], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('import'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='import tag contents', 201s ), 201s Commit.from_spec(name='reimport'), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 2) An existing import tag with a different Git tree and an existing 201s # upload tag with the same Git tree 201s # - Reuse upload tag, create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s Commit.from_spec(name='upload'), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-1': Placeholder('upload'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('upload'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('upload'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 3) An existing import tag with a different Git tree and an existing 201s # upload tag with a different Git tree 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s Commit.from_spec( 201s name='upload', 201s mutate='The upload tag contents', 201s ), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-1': Placeholder('upload'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [Commit.from_spec( 201s name='reimport', 201s message='Test commit (new)', 201s )], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 4) An existing import tag with a different Git tree and no upload tag 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [Commit.from_spec( 201s name='reimport', 201s message='Test commit (new)', 201s )], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 5) No import tag and an existing upload tag with the same Git tree 201s # - Reuse upload tag, create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='upload')], 201s tags={'importer/upload/1-1': Placeholder('upload')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('upload'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('upload'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 6) No import tag and an existing upload tag with a different Git tree 201s # - Create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='upload', 201s mutate='The upload tag contents', 201s ), 201s ], 201s tags={'importer/upload/1-1': Placeholder('upload')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='publish', 201s message='Test commit (new)', 201s ), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('publish'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('publish'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 7) No import tags or upload tags 201s # - Create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo(), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='publish', 201s message='Test commit (new)', 201s ), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('publish'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('publish'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1' 201s ], 201s # reuse: 201s False, 201s ), 201s ] 201s ) 201s @patch('gitubuntu.importer.get_import_tag_msg') 201s @patch('gitubuntu.importer.get_import_commit_msg') 201s def test_import_unapplied_spi_tags( 201s get_import_commit_msg_mock, 201s get_import_tag_msg_mock, 201s repo, 201s input_repo, 201s expected_output_refs, 201s validation_repo_delta, 201s validation_repo_expected_identical_refs, 201s reuse, 201s ): 201s """Test that unapplied tags are correctly created, adjusted and/or reused 201s 201s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 201s that determines the commit message to use for a given import 201s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 201s that determines the tag message to use for a given import 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param repo_builder.Repo input_repo: input repository data 201s :param list(str) expected_output_refs: refs that must exist in the output 201s repository 201s :param dict validation_repo_delta: how to transform the input 201s repository into a "validation repository", expressed as a dict to 201s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 201s input repository. The validation repository is then used for the 201s purposes of comparison against the output repository. 201s :param list(str) validation_repo_expected_identical_refs: refs that must be 201s identical between the validation repository and the output repository 201s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 201s one supplied by the input repository (assumed to have a commit message 201s of "Test commit") and not one created by the importer in this run 201s (arranged by this test to have a different commit message) 201s 201s The input repository data is written into the output repository and then a 201s fake non-native source package publication of version 1-1 in the Trusty 201s release pocket is imported into it by calling import_unapplied_spi() 201s directly. expected_output_refs, validation_repo_expected_identical_refs and 201s reuse are then asserted. It is further asserted that no other refs exist in 201s the output repository except for those listed in expected_output_refs and 201s validation_repo_expected_identical_refs. 201s """ 201s # Match the repo_builder objects 201s get_import_tag_msg_mock.return_value = 'Test tag' 201s # Importantly, the following commit message must not be the same as the 201s # commit messages used by the test input repository commits, so that we can 201s # later detect the difference between commits that were already there and 201s # new commits created by the importer for the purposes of asserting the 201s # reuse parameter correctly. 201s get_import_commit_msg_mock.return_value = b'Test commit (new)' 201s 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_tag_test.py:463: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmp7fqgwtwd/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ test_import_unapplied_spi_tags[input_repo2-expected_output_refs2-validation_repo_delta2-validation_repo_expected_identical_refs2-True] _ 201s 201s get_import_commit_msg_mock = 201s get_import_tag_msg_mock = 201s repo = 201s input_repo = 201s 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'] 201s validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }, 'update...t at 0x77b02fa9eb40>, 'importer/reimport/import/1-1/1': }} 201s 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'] 201s reuse = True 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'expected_output_refs', 201s 'validation_repo_delta', 201s 'validation_repo_expected_identical_refs', 201s 'reuse', 201s ], 201s [ 201s # 1) An existing import tag (or reimport tag) with the same Git tree 201s # - Reuse import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='import')], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('import'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='import tag contents', 201s ), 201s Commit.from_spec(name='reimport'), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 2) An existing import tag with a different Git tree and an existing 201s # upload tag with the same Git tree 201s # - Reuse upload tag, create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s Commit.from_spec(name='upload'), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-1': Placeholder('upload'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('upload'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('upload'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 3) An existing import tag with a different Git tree and an existing 201s # upload tag with a different Git tree 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s Commit.from_spec( 201s name='upload', 201s mutate='The upload tag contents', 201s ), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-1': Placeholder('upload'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [Commit.from_spec( 201s name='reimport', 201s message='Test commit (new)', 201s )], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 4) An existing import tag with a different Git tree and no upload tag 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [Commit.from_spec( 201s name='reimport', 201s message='Test commit (new)', 201s )], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 5) No import tag and an existing upload tag with the same Git tree 201s # - Reuse upload tag, create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='upload')], 201s tags={'importer/upload/1-1': Placeholder('upload')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('upload'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('upload'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 6) No import tag and an existing upload tag with a different Git tree 201s # - Create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='upload', 201s mutate='The upload tag contents', 201s ), 201s ], 201s tags={'importer/upload/1-1': Placeholder('upload')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='publish', 201s message='Test commit (new)', 201s ), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('publish'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('publish'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 7) No import tags or upload tags 201s # - Create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo(), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='publish', 201s message='Test commit (new)', 201s ), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('publish'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('publish'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1' 201s ], 201s # reuse: 201s False, 201s ), 201s ] 201s ) 201s @patch('gitubuntu.importer.get_import_tag_msg') 201s @patch('gitubuntu.importer.get_import_commit_msg') 201s def test_import_unapplied_spi_tags( 201s get_import_commit_msg_mock, 201s get_import_tag_msg_mock, 201s repo, 201s input_repo, 201s expected_output_refs, 201s validation_repo_delta, 201s validation_repo_expected_identical_refs, 201s reuse, 201s ): 201s """Test that unapplied tags are correctly created, adjusted and/or reused 201s 201s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 201s that determines the commit message to use for a given import 201s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 201s that determines the tag message to use for a given import 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param repo_builder.Repo input_repo: input repository data 201s :param list(str) expected_output_refs: refs that must exist in the output 201s repository 201s :param dict validation_repo_delta: how to transform the input 201s repository into a "validation repository", expressed as a dict to 201s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 201s input repository. The validation repository is then used for the 201s purposes of comparison against the output repository. 201s :param list(str) validation_repo_expected_identical_refs: refs that must be 201s identical between the validation repository and the output repository 201s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 201s one supplied by the input repository (assumed to have a commit message 201s of "Test commit") and not one created by the importer in this run 201s (arranged by this test to have a different commit message) 201s 201s The input repository data is written into the output repository and then a 201s fake non-native source package publication of version 1-1 in the Trusty 201s release pocket is imported into it by calling import_unapplied_spi() 201s directly. expected_output_refs, validation_repo_expected_identical_refs and 201s reuse are then asserted. It is further asserted that no other refs exist in 201s the output repository except for those listed in expected_output_refs and 201s validation_repo_expected_identical_refs. 201s """ 201s # Match the repo_builder objects 201s get_import_tag_msg_mock.return_value = 'Test tag' 201s # Importantly, the following commit message must not be the same as the 201s # commit messages used by the test input repository commits, so that we can 201s # later detect the difference between commits that were already there and 201s # new commits created by the importer for the purposes of asserting the 201s # reuse parameter correctly. 201s get_import_commit_msg_mock.return_value = b'Test commit (new)' 201s 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_tag_test.py:463: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmp2ywd7cm8/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ test_import_unapplied_spi_tags[input_repo3-expected_output_refs3-validation_repo_delta3-validation_repo_expected_identical_refs3-False] _ 201s 201s get_import_commit_msg_mock = 201s get_import_tag_msg_mock = 201s repo = 201s input_repo = 201s 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'] 201s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trust...t at 0x77b02fa9c170>, 'importer/reimport/import/1-1/1': }} 201s 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'] 201s reuse = False 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'expected_output_refs', 201s 'validation_repo_delta', 201s 'validation_repo_expected_identical_refs', 201s 'reuse', 201s ], 201s [ 201s # 1) An existing import tag (or reimport tag) with the same Git tree 201s # - Reuse import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='import')], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('import'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='import tag contents', 201s ), 201s Commit.from_spec(name='reimport'), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 2) An existing import tag with a different Git tree and an existing 201s # upload tag with the same Git tree 201s # - Reuse upload tag, create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s Commit.from_spec(name='upload'), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-1': Placeholder('upload'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('upload'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('upload'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 3) An existing import tag with a different Git tree and an existing 201s # upload tag with a different Git tree 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s Commit.from_spec( 201s name='upload', 201s mutate='The upload tag contents', 201s ), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-1': Placeholder('upload'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [Commit.from_spec( 201s name='reimport', 201s message='Test commit (new)', 201s )], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 4) An existing import tag with a different Git tree and no upload tag 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [Commit.from_spec( 201s name='reimport', 201s message='Test commit (new)', 201s )], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 5) No import tag and an existing upload tag with the same Git tree 201s # - Reuse upload tag, create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='upload')], 201s tags={'importer/upload/1-1': Placeholder('upload')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('upload'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('upload'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 6) No import tag and an existing upload tag with a different Git tree 201s # - Create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='upload', 201s mutate='The upload tag contents', 201s ), 201s ], 201s tags={'importer/upload/1-1': Placeholder('upload')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='publish', 201s message='Test commit (new)', 201s ), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('publish'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('publish'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 7) No import tags or upload tags 201s # - Create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo(), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='publish', 201s message='Test commit (new)', 201s ), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('publish'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('publish'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1' 201s ], 201s # reuse: 201s False, 201s ), 201s ] 201s ) 201s @patch('gitubuntu.importer.get_import_tag_msg') 201s @patch('gitubuntu.importer.get_import_commit_msg') 201s def test_import_unapplied_spi_tags( 201s get_import_commit_msg_mock, 201s get_import_tag_msg_mock, 201s repo, 201s input_repo, 201s expected_output_refs, 201s validation_repo_delta, 201s validation_repo_expected_identical_refs, 201s reuse, 201s ): 201s """Test that unapplied tags are correctly created, adjusted and/or reused 201s 201s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 201s that determines the commit message to use for a given import 201s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 201s that determines the tag message to use for a given import 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param repo_builder.Repo input_repo: input repository data 201s :param list(str) expected_output_refs: refs that must exist in the output 201s repository 201s :param dict validation_repo_delta: how to transform the input 201s repository into a "validation repository", expressed as a dict to 201s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 201s input repository. The validation repository is then used for the 201s purposes of comparison against the output repository. 201s :param list(str) validation_repo_expected_identical_refs: refs that must be 201s identical between the validation repository and the output repository 201s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 201s one supplied by the input repository (assumed to have a commit message 201s of "Test commit") and not one created by the importer in this run 201s (arranged by this test to have a different commit message) 201s 201s The input repository data is written into the output repository and then a 201s fake non-native source package publication of version 1-1 in the Trusty 201s release pocket is imported into it by calling import_unapplied_spi() 201s directly. expected_output_refs, validation_repo_expected_identical_refs and 201s reuse are then asserted. It is further asserted that no other refs exist in 201s the output repository except for those listed in expected_output_refs and 201s validation_repo_expected_identical_refs. 201s """ 201s # Match the repo_builder objects 201s get_import_tag_msg_mock.return_value = 'Test tag' 201s # Importantly, the following commit message must not be the same as the 201s # commit messages used by the test input repository commits, so that we can 201s # later detect the difference between commits that were already there and 201s # new commits created by the importer for the purposes of asserting the 201s # reuse parameter correctly. 201s get_import_commit_msg_mock.return_value = b'Test commit (new)' 201s 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_tag_test.py:463: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpbo566tum/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ test_import_unapplied_spi_tags[input_repo4-expected_output_refs4-validation_repo_delta4-validation_repo_expected_identical_refs4-False] _ 201s 201s get_import_commit_msg_mock = 201s get_import_tag_msg_mock = 201s repo = 201s input_repo = 201s 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'] 201s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trust...t at 0x77b02fa9c650>, 'importer/reimport/import/1-1/1': }} 201s 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'] 201s reuse = False 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'expected_output_refs', 201s 'validation_repo_delta', 201s 'validation_repo_expected_identical_refs', 201s 'reuse', 201s ], 201s [ 201s # 1) An existing import tag (or reimport tag) with the same Git tree 201s # - Reuse import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='import')], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('import'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='import tag contents', 201s ), 201s Commit.from_spec(name='reimport'), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 2) An existing import tag with a different Git tree and an existing 201s # upload tag with the same Git tree 201s # - Reuse upload tag, create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s Commit.from_spec(name='upload'), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-1': Placeholder('upload'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('upload'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('upload'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 3) An existing import tag with a different Git tree and an existing 201s # upload tag with a different Git tree 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s Commit.from_spec( 201s name='upload', 201s mutate='The upload tag contents', 201s ), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-1': Placeholder('upload'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [Commit.from_spec( 201s name='reimport', 201s message='Test commit (new)', 201s )], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 4) An existing import tag with a different Git tree and no upload tag 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [Commit.from_spec( 201s name='reimport', 201s message='Test commit (new)', 201s )], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 5) No import tag and an existing upload tag with the same Git tree 201s # - Reuse upload tag, create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='upload')], 201s tags={'importer/upload/1-1': Placeholder('upload')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('upload'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('upload'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 6) No import tag and an existing upload tag with a different Git tree 201s # - Create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='upload', 201s mutate='The upload tag contents', 201s ), 201s ], 201s tags={'importer/upload/1-1': Placeholder('upload')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='publish', 201s message='Test commit (new)', 201s ), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('publish'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('publish'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 7) No import tags or upload tags 201s # - Create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo(), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='publish', 201s message='Test commit (new)', 201s ), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('publish'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('publish'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1' 201s ], 201s # reuse: 201s False, 201s ), 201s ] 201s ) 201s @patch('gitubuntu.importer.get_import_tag_msg') 201s @patch('gitubuntu.importer.get_import_commit_msg') 201s def test_import_unapplied_spi_tags( 201s get_import_commit_msg_mock, 201s get_import_tag_msg_mock, 201s repo, 201s input_repo, 201s expected_output_refs, 201s validation_repo_delta, 201s validation_repo_expected_identical_refs, 201s reuse, 201s ): 201s """Test that unapplied tags are correctly created, adjusted and/or reused 201s 201s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 201s that determines the commit message to use for a given import 201s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 201s that determines the tag message to use for a given import 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param repo_builder.Repo input_repo: input repository data 201s :param list(str) expected_output_refs: refs that must exist in the output 201s repository 201s :param dict validation_repo_delta: how to transform the input 201s repository into a "validation repository", expressed as a dict to 201s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 201s input repository. The validation repository is then used for the 201s purposes of comparison against the output repository. 201s :param list(str) validation_repo_expected_identical_refs: refs that must be 201s identical between the validation repository and the output repository 201s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 201s one supplied by the input repository (assumed to have a commit message 201s of "Test commit") and not one created by the importer in this run 201s (arranged by this test to have a different commit message) 201s 201s The input repository data is written into the output repository and then a 201s fake non-native source package publication of version 1-1 in the Trusty 201s release pocket is imported into it by calling import_unapplied_spi() 201s directly. expected_output_refs, validation_repo_expected_identical_refs and 201s reuse are then asserted. It is further asserted that no other refs exist in 201s the output repository except for those listed in expected_output_refs and 201s validation_repo_expected_identical_refs. 201s """ 201s # Match the repo_builder objects 201s get_import_tag_msg_mock.return_value = 'Test tag' 201s # Importantly, the following commit message must not be the same as the 201s # commit messages used by the test input repository commits, so that we can 201s # later detect the difference between commits that were already there and 201s # new commits created by the importer for the purposes of asserting the 201s # reuse parameter correctly. 201s get_import_commit_msg_mock.return_value = b'Test commit (new)' 201s 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_tag_test.py:463: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmponnw8h1b/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ test_import_unapplied_spi_tags[input_repo5-expected_output_refs5-validation_repo_delta5-validation_repo_expected_identical_refs5-True] _ 201s 201s get_import_commit_msg_mock = 201s get_import_tag_msg_mock = 201s repo = 201s input_repo = 201s 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'] 201s validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }, 'update_tags': {'importer/import/1-1': }} 201s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1'] 201s reuse = True 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'expected_output_refs', 201s 'validation_repo_delta', 201s 'validation_repo_expected_identical_refs', 201s 'reuse', 201s ], 201s [ 201s # 1) An existing import tag (or reimport tag) with the same Git tree 201s # - Reuse import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='import')], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('import'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='import tag contents', 201s ), 201s Commit.from_spec(name='reimport'), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 2) An existing import tag with a different Git tree and an existing 201s # upload tag with the same Git tree 201s # - Reuse upload tag, create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s Commit.from_spec(name='upload'), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-1': Placeholder('upload'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('upload'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('upload'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 3) An existing import tag with a different Git tree and an existing 201s # upload tag with a different Git tree 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s Commit.from_spec( 201s name='upload', 201s mutate='The upload tag contents', 201s ), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-1': Placeholder('upload'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [Commit.from_spec( 201s name='reimport', 201s message='Test commit (new)', 201s )], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 4) An existing import tag with a different Git tree and no upload tag 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [Commit.from_spec( 201s name='reimport', 201s message='Test commit (new)', 201s )], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 5) No import tag and an existing upload tag with the same Git tree 201s # - Reuse upload tag, create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='upload')], 201s tags={'importer/upload/1-1': Placeholder('upload')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('upload'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('upload'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 6) No import tag and an existing upload tag with a different Git tree 201s # - Create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='upload', 201s mutate='The upload tag contents', 201s ), 201s ], 201s tags={'importer/upload/1-1': Placeholder('upload')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='publish', 201s message='Test commit (new)', 201s ), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('publish'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('publish'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 7) No import tags or upload tags 201s # - Create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo(), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='publish', 201s message='Test commit (new)', 201s ), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('publish'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('publish'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1' 201s ], 201s # reuse: 201s False, 201s ), 201s ] 201s ) 201s @patch('gitubuntu.importer.get_import_tag_msg') 201s @patch('gitubuntu.importer.get_import_commit_msg') 201s def test_import_unapplied_spi_tags( 201s get_import_commit_msg_mock, 201s get_import_tag_msg_mock, 201s repo, 201s input_repo, 201s expected_output_refs, 201s validation_repo_delta, 201s validation_repo_expected_identical_refs, 201s reuse, 201s ): 201s """Test that unapplied tags are correctly created, adjusted and/or reused 201s 201s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 201s that determines the commit message to use for a given import 201s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 201s that determines the tag message to use for a given import 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param repo_builder.Repo input_repo: input repository data 201s :param list(str) expected_output_refs: refs that must exist in the output 201s repository 201s :param dict validation_repo_delta: how to transform the input 201s repository into a "validation repository", expressed as a dict to 201s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 201s input repository. The validation repository is then used for the 201s purposes of comparison against the output repository. 201s :param list(str) validation_repo_expected_identical_refs: refs that must be 201s identical between the validation repository and the output repository 201s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 201s one supplied by the input repository (assumed to have a commit message 201s of "Test commit") and not one created by the importer in this run 201s (arranged by this test to have a different commit message) 201s 201s The input repository data is written into the output repository and then a 201s fake non-native source package publication of version 1-1 in the Trusty 201s release pocket is imported into it by calling import_unapplied_spi() 201s directly. expected_output_refs, validation_repo_expected_identical_refs and 201s reuse are then asserted. It is further asserted that no other refs exist in 201s the output repository except for those listed in expected_output_refs and 201s validation_repo_expected_identical_refs. 201s """ 201s # Match the repo_builder objects 201s get_import_tag_msg_mock.return_value = 'Test tag' 201s # Importantly, the following commit message must not be the same as the 201s # commit messages used by the test input repository commits, so that we can 201s # later detect the difference between commits that were already there and 201s # new commits created by the importer for the purposes of asserting the 201s # reuse parameter correctly. 201s get_import_commit_msg_mock.return_value = b'Test commit (new)' 201s 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_tag_test.py:463: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpx094wh1l/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ test_import_unapplied_spi_tags[input_repo6-expected_output_refs6-validation_repo_delta6-validation_repo_expected_identical_refs6-False] _ 201s 201s get_import_commit_msg_mock = 201s get_import_tag_msg_mock = 201s repo = 201s input_repo = 201s 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'] 201s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trust...x77b02fa9cec0>}, 'update_tags': {'importer/import/1-1': }} 201s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1'] 201s reuse = False 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'expected_output_refs', 201s 'validation_repo_delta', 201s 'validation_repo_expected_identical_refs', 201s 'reuse', 201s ], 201s [ 201s # 1) An existing import tag (or reimport tag) with the same Git tree 201s # - Reuse import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='import')], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('import'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='import tag contents', 201s ), 201s Commit.from_spec(name='reimport'), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 2) An existing import tag with a different Git tree and an existing 201s # upload tag with the same Git tree 201s # - Reuse upload tag, create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s Commit.from_spec(name='upload'), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-1': Placeholder('upload'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('upload'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('upload'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 3) An existing import tag with a different Git tree and an existing 201s # upload tag with a different Git tree 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s Commit.from_spec( 201s name='upload', 201s mutate='The upload tag contents', 201s ), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-1': Placeholder('upload'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [Commit.from_spec( 201s name='reimport', 201s message='Test commit (new)', 201s )], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 4) An existing import tag with a different Git tree and no upload tag 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [Commit.from_spec( 201s name='reimport', 201s message='Test commit (new)', 201s )], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 5) No import tag and an existing upload tag with the same Git tree 201s # - Reuse upload tag, create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='upload')], 201s tags={'importer/upload/1-1': Placeholder('upload')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('upload'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('upload'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 6) No import tag and an existing upload tag with a different Git tree 201s # - Create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='upload', 201s mutate='The upload tag contents', 201s ), 201s ], 201s tags={'importer/upload/1-1': Placeholder('upload')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='publish', 201s message='Test commit (new)', 201s ), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('publish'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('publish'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 7) No import tags or upload tags 201s # - Create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo(), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='publish', 201s message='Test commit (new)', 201s ), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('publish'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('publish'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1' 201s ], 201s # reuse: 201s False, 201s ), 201s ] 201s ) 201s @patch('gitubuntu.importer.get_import_tag_msg') 201s @patch('gitubuntu.importer.get_import_commit_msg') 201s def test_import_unapplied_spi_tags( 201s get_import_commit_msg_mock, 201s get_import_tag_msg_mock, 201s repo, 201s input_repo, 201s expected_output_refs, 201s validation_repo_delta, 201s validation_repo_expected_identical_refs, 201s reuse, 201s ): 201s """Test that unapplied tags are correctly created, adjusted and/or reused 201s 201s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 201s that determines the commit message to use for a given import 201s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 201s that determines the tag message to use for a given import 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param repo_builder.Repo input_repo: input repository data 201s :param list(str) expected_output_refs: refs that must exist in the output 201s repository 201s :param dict validation_repo_delta: how to transform the input 201s repository into a "validation repository", expressed as a dict to 201s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 201s input repository. The validation repository is then used for the 201s purposes of comparison against the output repository. 201s :param list(str) validation_repo_expected_identical_refs: refs that must be 201s identical between the validation repository and the output repository 201s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 201s one supplied by the input repository (assumed to have a commit message 201s of "Test commit") and not one created by the importer in this run 201s (arranged by this test to have a different commit message) 201s 201s The input repository data is written into the output repository and then a 201s fake non-native source package publication of version 1-1 in the Trusty 201s release pocket is imported into it by calling import_unapplied_spi() 201s directly. expected_output_refs, validation_repo_expected_identical_refs and 201s reuse are then asserted. It is further asserted that no other refs exist in 201s the output repository except for those listed in expected_output_refs and 201s validation_repo_expected_identical_refs. 201s """ 201s # Match the repo_builder objects 201s get_import_tag_msg_mock.return_value = 'Test tag' 201s # Importantly, the following commit message must not be the same as the 201s # commit messages used by the test input repository commits, so that we can 201s # later detect the difference between commits that were already there and 201s # new commits created by the importer for the purposes of asserting the 201s # reuse parameter correctly. 201s get_import_commit_msg_mock.return_value = b'Test commit (new)' 201s 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_tag_test.py:463: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmp3nh5q1gb/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ test_import_unapplied_spi_tags[input_repo7-expected_output_refs7-validation_repo_delta7-validation_repo_expected_identical_refs7-False] _ 201s 201s get_import_commit_msg_mock = 201s get_import_tag_msg_mock = 201s repo = 201s input_repo = 201s 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'] 201s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trust...x77b02fa9d160>}, 'update_tags': {'importer/import/1-1': }} 201s validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1'] 201s reuse = False 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'expected_output_refs', 201s 'validation_repo_delta', 201s 'validation_repo_expected_identical_refs', 201s 'reuse', 201s ], 201s [ 201s # 1) An existing import tag (or reimport tag) with the same Git tree 201s # - Reuse import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='import')], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('import'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='import tag contents', 201s ), 201s Commit.from_spec(name='reimport'), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 2) An existing import tag with a different Git tree and an existing 201s # upload tag with the same Git tree 201s # - Reuse upload tag, create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s Commit.from_spec(name='upload'), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-1': Placeholder('upload'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('upload'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('upload'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 3) An existing import tag with a different Git tree and an existing 201s # upload tag with a different Git tree 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s Commit.from_spec( 201s name='upload', 201s mutate='The upload tag contents', 201s ), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-1': Placeholder('upload'), 201s }, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [Commit.from_spec( 201s name='reimport', 201s message='Test commit (new)', 201s )], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 4) An existing import tag with a different Git tree and no upload tag 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='import', 201s mutate='The import tag contents', 201s ), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty-proposed': Placeholder('import'), 201s }, 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [Commit.from_spec( 201s name='reimport', 201s message='Test commit (new)', 201s )], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('reimport'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty-proposed', 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 5) No import tag and an existing upload tag with the same Git tree 201s # - Reuse upload tag, create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='upload')], 201s tags={'importer/upload/1-1': Placeholder('upload')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('upload'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('upload'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 6) No import tag and an existing upload tag with a different Git tree 201s # - Create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='upload', 201s mutate='The upload tag contents', 201s ), 201s ], 201s tags={'importer/upload/1-1': Placeholder('upload')}, 201s ), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='publish', 201s message='Test commit (new)', 201s ), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('publish'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('publish'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/upload/1-1', 201s ], 201s # reuse: 201s False, 201s ), 201s 201s # 7) No import tags or upload tags 201s # - Create import tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo(), 201s # expected_output_refs: 201s [ 201s 'refs/heads/do-not-push', 201s 'refs/tags/importer/upstream/ubuntu/1.gz', 201s 'refs/heads/importer/importer/ubuntu/dsc', 201s 'refs/heads/importer/importer/ubuntu/pristine-tar', 201s 'refs/notes/importer/changelog', 201s 'refs/notes/importer/importer', 201s ], 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='publish', 201s message='Test commit (new)', 201s ), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('publish'), 201s }, 201s 'update_branches': { 201s 'importer/ubuntu/trusty': Placeholder('publish'), 201s }, 201s }, 201s # validation_repo_expected_identical_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1' 201s ], 201s # reuse: 201s False, 201s ), 201s ] 201s ) 201s @patch('gitubuntu.importer.get_import_tag_msg') 201s @patch('gitubuntu.importer.get_import_commit_msg') 201s def test_import_unapplied_spi_tags( 201s get_import_commit_msg_mock, 201s get_import_tag_msg_mock, 201s repo, 201s input_repo, 201s expected_output_refs, 201s validation_repo_delta, 201s validation_repo_expected_identical_refs, 201s reuse, 201s ): 201s """Test that unapplied tags are correctly created, adjusted and/or reused 201s 201s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 201s that determines the commit message to use for a given import 201s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 201s that determines the tag message to use for a given import 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param repo_builder.Repo input_repo: input repository data 201s :param list(str) expected_output_refs: refs that must exist in the output 201s repository 201s :param dict validation_repo_delta: how to transform the input 201s repository into a "validation repository", expressed as a dict to 201s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 201s input repository. The validation repository is then used for the 201s purposes of comparison against the output repository. 201s :param list(str) validation_repo_expected_identical_refs: refs that must be 201s identical between the validation repository and the output repository 201s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 201s one supplied by the input repository (assumed to have a commit message 201s of "Test commit") and not one created by the importer in this run 201s (arranged by this test to have a different commit message) 201s 201s The input repository data is written into the output repository and then a 201s fake non-native source package publication of version 1-1 in the Trusty 201s release pocket is imported into it by calling import_unapplied_spi() 201s directly. expected_output_refs, validation_repo_expected_identical_refs and 201s reuse are then asserted. It is further asserted that no other refs exist in 201s the output repository except for those listed in expected_output_refs and 201s validation_repo_expected_identical_refs. 201s """ 201s # Match the repo_builder objects 201s get_import_tag_msg_mock.return_value = 'Test tag' 201s # Importantly, the following commit message must not be the same as the 201s # commit messages used by the test input repository commits, so that we can 201s # later detect the difference between commits that were already there and 201s # new commits created by the importer for the purposes of asserting the 201s # reuse parameter correctly. 201s get_import_commit_msg_mock.return_value = b'Test commit (new)' 201s 201s input_repo.write(repo.raw_repo) 201s 201s publish_spec = source_builder.SourceSpec( 201s version='1-1', 201s native=False, 201s ) 201s 201s with source_builder.Source(publish_spec) as dsc_path: 201s > target.import_unapplied_spi( 201s repo=repo, 201s spi=MockSPI(dsc_path, publish_spec.version), 201s namespace='importer', 201s skip_orig=False, 201s parent_overrides={}, 201s ) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_tag_test.py:471: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:2308: in import_unapplied_spi 201s import_unapplied_dsc( 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 201s commit, tag = find_or_create_unapplied_commit( 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 201s changelog_parents = get_unapplied_import_parents( 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 201s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 201s changelog = self.get_changelog_from_treeish(treeish) 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 201s return Changelog.from_treeish( 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:569: in from_treeish 201s blob = follow_symlinks_to_blob( 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 201s return _follow_symlinks_to_blob( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s repo = pygit2.Repository('/tmp/tmp7bi63wzw/.git/') 201s top_tree_object = 201s search_path = 'debian/changelog' 201s _rel_tree = 201s _rel_path = '' 201s 201s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 201s _rel_tree=None, _rel_path='' 201s ): 201s '''Recursively follow a path down a tree, following symlinks, to find blob 201s 201s repo: pygit2.Repository object 201s top_tree: pygit2.Tree object of the top of the tree structure 201s search_path: '/'-separated path string of blob to find 201s _rel_tree: (internal) which tree to look further into 201s _rel_path: (internal) the path we are in so far 201s ''' 201s 201s NORMAL_BLOB_MODES = set([ 201s pygit2.GIT_FILEMODE_BLOB, 201s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 201s ]) 201s 201s _rel_tree = _rel_tree or top_tree_object 201s head, tail = posixpath.split(search_path) 201s 201s # A traditional functional split would put a single entry in head with tail 201s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 201s # to make it appear to have traditional semantics. 201s if not head: 201s head = tail 201s tail = None 201s 201s entry = _rel_tree[head] 201s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ test_import_applied_spi_tags[input_repo0-validation_repo_delta0-validation_repo_expected_treewise_refs0-True] _ 201s 201s get_import_commit_msg_mock = 201s get_import_tag_msg_mock = 201s repo = 201s input_repo = 201s validation_repo_delta = {} 201s 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'] 201s reuse = True 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'validation_repo_delta', 201s 'validation_repo_expected_treewise_refs', 201s 'reuse', 201s ], 201s [ 201s # 1) An existing applied tag (or reimport tag) with the same Git tree 201s # - Reuse applied tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec(name='unapplied', has_patches=True), 201s Commit.from_spec(name='applied', patches_applied=True), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty': Placeholder('unapplied'), 201s 'importer/applied/ubuntu/trusty': Placeholder('applied'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('unapplied'), 201s 'importer/applied/1-1': Placeholder('applied'), 201s }, 201s ), 201s # validation_repo_delta: 201s { 201s # no output repository delta 201s }, 201s # validation_repo_expected_treewise_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/heads/importer/applied/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/applied/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 2) An existing applied tag with a different Git tree 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='unapplied', 201s has_patches=True, 201s mutate='import tag contents', 201s ), 201s Commit.from_spec( 201s name='unapplied_reimport', 201s has_patches=True, 201s ), 201s Commit.from_spec( 201s name='applied', 201s patches_applied=True, 201s mutate='import tag contents', 201s ) 201s ], 201s branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, 201s tags={ 201s 'importer/import/1-1': 201s Placeholder('unapplied'), 201s 'importer/reimport/import/1-1/0': 201s Placeholder('unapplied'), 201s 'importer/reimport/import/1-1/1': 201s Placeholder('unapplied_reimport'), 201s 'importer/applied/1-1': 201s Placeholder('applied'), 201s }, 201s ), 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='applied_reimport', 201s patches_applied=True, 201s parents=[Placeholder('unapplied_reimport')], 201s ), 201s ], 201s 'update_tags': { 201s 'importer/reimport/applied/1-1/0': 201s Placeholder('applied'), 201s 'importer/reimport/applied/1-1/1': 201s Placeholder('applied_reimport'), 201s }, 201s 'update_branches': { 201s 'importer/applied/ubuntu/trusty': 201s Placeholder('applied_reimport'), 201s }, 201s }, 201s # validation_repo_expected_treewise_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/heads/importer/applied/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s 'refs/tags/importer/applied/1-1', 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s ], 201s # reuse: 201s False, 201s 201s marks=pytest.mark.xfail(reason='LP: #1755247'), 201s ), 201s 201s # 3) No applied tags 201s # - Create applied tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='unapplied', has_patches=True)], 201s branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, 201s tags={'importer/import/1-1': Placeholder('unapplied')}, 201s ), 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='applied', 201s patches_applied=True, 201s parents=[Placeholder('unapplied')], 201s ), 201s ], 201s 'update_tags': { 201s 'importer/applied/1-1': Placeholder('applied') 201s }, 201s 'update_branches': { 201s 'importer/applied/ubuntu/trusty': Placeholder('applied'), 201s }, 201s }, 201s # validation_repo_expected_treewise_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/heads/importer/applied/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/applied/1-1' 201s ], 201s # reuse: 201s False, 201s ), 201s ] 201s ) 201s @patch('gitubuntu.importer.get_import_tag_msg') 201s @patch('gitubuntu.importer.get_import_commit_msg') 201s def test_import_applied_spi_tags( 201s get_import_commit_msg_mock, 201s get_import_tag_msg_mock, 201s repo, 201s input_repo, 201s validation_repo_delta, 201s validation_repo_expected_treewise_refs, 201s reuse, 201s ): 201s """Test that applied tags are correctly created, adjusted and/or reused 201s 201s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 201s that determines the commit message to use for a given import 201s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 201s that determines the tag message to use for a given import 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param repo_builder.Repo input_repo: input repository data 201s :param dict validation_repo_delta: how to transform the input repository 201s into a "validation repository", expressed as a dict to 201s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 201s input repository. The validation repository is then used for the 201s purposes of comparison against the output repository. 201s :param list(str) validation_repo_expected_treewise_refs: refs whose trees 201s must be identical between the validation repository and the output 201s repository 201s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 201s one supplied by the input repository (assumed to have a commit message 201s of "Test commit") and not one created by the importer in this run 201s (arranged by this test to have a different commit message) 201s 201s The input repository data is written into the output repository and then a 201s fake non-native source package publication of version 1-1 in the Trusty 201s release pocket is imported into it by calling import_applied_spi() 201s directly. reuse and validation_repo_expected_treewise_refs are then 201s asserted. 201s 201s This is similar to test_unapplied_spi_tags except that it calls 201s import_applied_spi() instead of import_unapplied_spi() and only treewise 201s ref comparisons are made. 201s """ 201s # Match the repo_builder objects 201s get_import_tag_msg_mock.return_value = 'Test tag' 201s # Importantly, the following commit message must not be the same as the 201s # commit messages used by the test input repository commits, so that we can 201s # later detect the difference between commits that were already there and 201s # new commits created by the importer for the purposes of asserting the 201s # reuse parameter correctly. 201s get_import_commit_msg_mock.return_value = b'Test commit (new)' 201s 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_tag_test.py:711: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpyulflmjh/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: using patch list from debian/patches/series 201s dpkg-source: info: applying a 201s dpkg-source: info: applying b 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: using patch list from debian/patches/series 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: using patch list from debian/patches/series 201s dpkg-source: info: applying a 201s dpkg-source: info: applying b 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: using patch list from debian/patches/series 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: using patch list from debian/patches/series 201s dpkg-source: info: applying a 201s dpkg-source: info: applying b 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: using patch list from debian/patches/series 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: using patch list from debian/patches/series 201s dpkg-source: info: applying a 201s dpkg-source: info: applying b 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: using patch list from debian/patches/series 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: using patch list from debian/patches/series 201s dpkg-source: info: applying a 201s dpkg-source: info: applying b 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: using patch list from debian/patches/series 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ test_import_applied_spi_tags[input_repo2-validation_repo_delta2-validation_repo_expected_treewise_refs2-False] _ 201s 201s get_import_commit_msg_mock = 201s get_import_tag_msg_mock = 201s repo = 201s input_repo = 201s validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/applied/ubun...77b02fa9e4e0>}, 'update_tags': {'importer/applied/1-1': }} 201s 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'] 201s reuse = False 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'validation_repo_delta', 201s 'validation_repo_expected_treewise_refs', 201s 'reuse', 201s ], 201s [ 201s # 1) An existing applied tag (or reimport tag) with the same Git tree 201s # - Reuse applied tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec(name='unapplied', has_patches=True), 201s Commit.from_spec(name='applied', patches_applied=True), 201s ], 201s branches={ 201s 'importer/ubuntu/trusty': Placeholder('unapplied'), 201s 'importer/applied/ubuntu/trusty': Placeholder('applied'), 201s }, 201s tags={ 201s 'importer/import/1-1': Placeholder('unapplied'), 201s 'importer/applied/1-1': Placeholder('applied'), 201s }, 201s ), 201s # validation_repo_delta: 201s { 201s # no output repository delta 201s }, 201s # validation_repo_expected_treewise_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/heads/importer/applied/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/applied/1-1', 201s ], 201s # reuse: 201s True, 201s ), 201s 201s # 2) An existing applied tag with a different Git tree 201s # - Create reimport tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[ 201s Commit.from_spec( 201s name='unapplied', 201s has_patches=True, 201s mutate='import tag contents', 201s ), 201s Commit.from_spec( 201s name='unapplied_reimport', 201s has_patches=True, 201s ), 201s Commit.from_spec( 201s name='applied', 201s patches_applied=True, 201s mutate='import tag contents', 201s ) 201s ], 201s branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, 201s tags={ 201s 'importer/import/1-1': 201s Placeholder('unapplied'), 201s 'importer/reimport/import/1-1/0': 201s Placeholder('unapplied'), 201s 'importer/reimport/import/1-1/1': 201s Placeholder('unapplied_reimport'), 201s 'importer/applied/1-1': 201s Placeholder('applied'), 201s }, 201s ), 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='applied_reimport', 201s patches_applied=True, 201s parents=[Placeholder('unapplied_reimport')], 201s ), 201s ], 201s 'update_tags': { 201s 'importer/reimport/applied/1-1/0': 201s Placeholder('applied'), 201s 'importer/reimport/applied/1-1/1': 201s Placeholder('applied_reimport'), 201s }, 201s 'update_branches': { 201s 'importer/applied/ubuntu/trusty': 201s Placeholder('applied_reimport'), 201s }, 201s }, 201s # validation_repo_expected_treewise_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/heads/importer/applied/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s 'refs/tags/importer/applied/1-1', 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s ], 201s # reuse: 201s False, 201s 201s marks=pytest.mark.xfail(reason='LP: #1755247'), 201s ), 201s 201s # 3) No applied tags 201s # - Create applied tag 201s pytest.param( 201s # input_repo: 201s repo_builder.Repo( 201s commits=[Commit.from_spec(name='unapplied', has_patches=True)], 201s branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, 201s tags={'importer/import/1-1': Placeholder('unapplied')}, 201s ), 201s # validation_repo_delta: 201s { 201s 'add_commits': [ 201s Commit.from_spec( 201s name='applied', 201s patches_applied=True, 201s parents=[Placeholder('unapplied')], 201s ), 201s ], 201s 'update_tags': { 201s 'importer/applied/1-1': Placeholder('applied') 201s }, 201s 'update_branches': { 201s 'importer/applied/ubuntu/trusty': Placeholder('applied'), 201s }, 201s }, 201s # validation_repo_expected_treewise_refs: 201s [ 201s 'refs/heads/importer/ubuntu/trusty', 201s 'refs/heads/importer/applied/ubuntu/trusty', 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/applied/1-1' 201s ], 201s # reuse: 201s False, 201s ), 201s ] 201s ) 201s @patch('gitubuntu.importer.get_import_tag_msg') 201s @patch('gitubuntu.importer.get_import_commit_msg') 201s def test_import_applied_spi_tags( 201s get_import_commit_msg_mock, 201s get_import_tag_msg_mock, 201s repo, 201s input_repo, 201s validation_repo_delta, 201s validation_repo_expected_treewise_refs, 201s reuse, 201s ): 201s """Test that applied tags are correctly created, adjusted and/or reused 201s 201s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 201s that determines the commit message to use for a given import 201s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 201s that determines the tag message to use for a given import 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param repo_builder.Repo input_repo: input repository data 201s :param dict validation_repo_delta: how to transform the input repository 201s into a "validation repository", expressed as a dict to 201s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 201s input repository. The validation repository is then used for the 201s purposes of comparison against the output repository. 201s :param list(str) validation_repo_expected_treewise_refs: refs whose trees 201s must be identical between the validation repository and the output 201s repository 201s :param bool reuse: if set, the output ref importer/ubuntu/trusty must be 201s one supplied by the input repository (assumed to have a commit message 201s of "Test commit") and not one created by the importer in this run 201s (arranged by this test to have a different commit message) 201s 201s The input repository data is written into the output repository and then a 201s fake non-native source package publication of version 1-1 in the Trusty 201s release pocket is imported into it by calling import_applied_spi() 201s directly. reuse and validation_repo_expected_treewise_refs are then 201s asserted. 201s 201s This is similar to test_unapplied_spi_tags except that it calls 201s import_applied_spi() instead of import_unapplied_spi() and only treewise 201s ref comparisons are made. 201s """ 201s # Match the repo_builder objects 201s get_import_tag_msg_mock.return_value = 'Test tag' 201s # Importantly, the following commit message must not be the same as the 201s # commit messages used by the test input repository commits, so that we can 201s # later detect the difference between commits that were already there and 201s # new commits created by the importer for the purposes of asserting the 201s # reuse parameter correctly. 201s get_import_commit_msg_mock.return_value = b'Test commit (new)' 201s 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_tag_test.py:711: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmp3206gg5q/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: using patch list from debian/patches/series 201s dpkg-source: info: applying a 201s dpkg-source: info: applying b 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: using patch list from debian/patches/series 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: using patch list from debian/patches/series 201s dpkg-source: info: applying a 201s dpkg-source: info: applying b 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: using patch list from debian/patches/series 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: using patch list from debian/patches/series 201s dpkg-source: info: applying a 201s dpkg-source: info: applying b 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: using patch list from debian/patches/series 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s __ test_get_existing_import_tags[input_repo1-PatchState.UNAPPLIED-expected1] ___ 201s 201s repo = 201s patch_state = 201s input_repo = 201s expected = ['refs/tags/importer/import/1-1'] 201s 201s @pytest.mark.parametrize( 201s 'input_repo, patch_state, expected', [ 201s ( 201s repo_builder.Repo(), 201s PatchState.UNAPPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s tags={'importer/import/1-1': repo_builder.Commit()}, 201s ), 201s PatchState.UNAPPLIED, 201s ['refs/tags/importer/import/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit(name='import'), 201s repo_builder.Commit(name='reimport1'), 201s ], 201s tags={ 201s 'importer/import/1-1': repo_builder.Commit(), 201s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 201s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 201s }, 201s ), 201s PatchState.UNAPPLIED, 201s [ 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo(), 201s PatchState.APPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s tags={'importer/applied/1-1': repo_builder.Commit()}, 201s ), 201s PatchState.APPLIED, 201s ['refs/tags/importer/applied/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit(name='applied'), 201s repo_builder.Commit(name='reimport1'), 201s ], 201s tags={ 201s 'importer/applied/1-1': repo_builder.Commit(), 201s 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 201s 'importer/reimport/applied/1-1/1': repo_builder.Commit(), 201s }, 201s ), 201s PatchState.APPLIED, 201s [ 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s ], 201s ), 201s ], 201s ) 201s def test_get_existing_import_tags(repo, patch_state, input_repo, expected): 201s """Test that get_existing_import_tags is generally correct 201s 201s This is the general parameterised test for the common case uses of 201s target.get_existing_import_tags. 201s 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param PatchState patch_state: passed through to get_existing_import_tags 201s :param repo_builder.Repo input_repo: input repository data 201s :param list(str) expected: the names of the references that are expected to 201s be returned, in order. 201s """ 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:214: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmp2imw7oc9/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s __ test_get_existing_import_tags[input_repo2-PatchState.UNAPPLIED-expected2] ___ 201s 201s repo = 201s patch_state = 201s input_repo = 201s expected = ['refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1'] 201s 201s @pytest.mark.parametrize( 201s 'input_repo, patch_state, expected', [ 201s ( 201s repo_builder.Repo(), 201s PatchState.UNAPPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s tags={'importer/import/1-1': repo_builder.Commit()}, 201s ), 201s PatchState.UNAPPLIED, 201s ['refs/tags/importer/import/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit(name='import'), 201s repo_builder.Commit(name='reimport1'), 201s ], 201s tags={ 201s 'importer/import/1-1': repo_builder.Commit(), 201s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 201s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 201s }, 201s ), 201s PatchState.UNAPPLIED, 201s [ 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo(), 201s PatchState.APPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s tags={'importer/applied/1-1': repo_builder.Commit()}, 201s ), 201s PatchState.APPLIED, 201s ['refs/tags/importer/applied/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit(name='applied'), 201s repo_builder.Commit(name='reimport1'), 201s ], 201s tags={ 201s 'importer/applied/1-1': repo_builder.Commit(), 201s 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 201s 'importer/reimport/applied/1-1/1': repo_builder.Commit(), 201s }, 201s ), 201s PatchState.APPLIED, 201s [ 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s ], 201s ), 201s ], 201s ) 201s def test_get_existing_import_tags(repo, patch_state, input_repo, expected): 201s """Test that get_existing_import_tags is generally correct 201s 201s This is the general parameterised test for the common case uses of 201s target.get_existing_import_tags. 201s 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param PatchState patch_state: passed through to get_existing_import_tags 201s :param repo_builder.Repo input_repo: input repository data 201s :param list(str) expected: the names of the references that are expected to 201s be returned, in order. 201s """ 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:214: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpy418_a59/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ___ test_get_existing_import_tags[input_repo4-PatchState.APPLIED-expected4] ____ 201s 201s repo = 201s patch_state = 201s input_repo = 201s expected = ['refs/tags/importer/applied/1-1'] 201s 201s @pytest.mark.parametrize( 201s 'input_repo, patch_state, expected', [ 201s ( 201s repo_builder.Repo(), 201s PatchState.UNAPPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s tags={'importer/import/1-1': repo_builder.Commit()}, 201s ), 201s PatchState.UNAPPLIED, 201s ['refs/tags/importer/import/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit(name='import'), 201s repo_builder.Commit(name='reimport1'), 201s ], 201s tags={ 201s 'importer/import/1-1': repo_builder.Commit(), 201s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 201s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 201s }, 201s ), 201s PatchState.UNAPPLIED, 201s [ 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo(), 201s PatchState.APPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s tags={'importer/applied/1-1': repo_builder.Commit()}, 201s ), 201s PatchState.APPLIED, 201s ['refs/tags/importer/applied/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit(name='applied'), 201s repo_builder.Commit(name='reimport1'), 201s ], 201s tags={ 201s 'importer/applied/1-1': repo_builder.Commit(), 201s 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 201s 'importer/reimport/applied/1-1/1': repo_builder.Commit(), 201s }, 201s ), 201s PatchState.APPLIED, 201s [ 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s ], 201s ), 201s ], 201s ) 201s def test_get_existing_import_tags(repo, patch_state, input_repo, expected): 201s """Test that get_existing_import_tags is generally correct 201s 201s This is the general parameterised test for the common case uses of 201s target.get_existing_import_tags. 201s 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param PatchState patch_state: passed through to get_existing_import_tags 201s :param repo_builder.Repo input_repo: input repository data 201s :param list(str) expected: the names of the references that are expected to 201s be returned, in order. 201s """ 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:214: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpb6tu5p7g/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ___ test_get_existing_import_tags[input_repo5-PatchState.APPLIED-expected5] ____ 201s 201s repo = 201s patch_state = 201s input_repo = 201s expected = ['refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1'] 201s 201s @pytest.mark.parametrize( 201s 'input_repo, patch_state, expected', [ 201s ( 201s repo_builder.Repo(), 201s PatchState.UNAPPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s tags={'importer/import/1-1': repo_builder.Commit()}, 201s ), 201s PatchState.UNAPPLIED, 201s ['refs/tags/importer/import/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit(name='import'), 201s repo_builder.Commit(name='reimport1'), 201s ], 201s tags={ 201s 'importer/import/1-1': repo_builder.Commit(), 201s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 201s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 201s }, 201s ), 201s PatchState.UNAPPLIED, 201s [ 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo(), 201s PatchState.APPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s tags={'importer/applied/1-1': repo_builder.Commit()}, 201s ), 201s PatchState.APPLIED, 201s ['refs/tags/importer/applied/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit(name='applied'), 201s repo_builder.Commit(name='reimport1'), 201s ], 201s tags={ 201s 'importer/applied/1-1': repo_builder.Commit(), 201s 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 201s 'importer/reimport/applied/1-1/1': repo_builder.Commit(), 201s }, 201s ), 201s PatchState.APPLIED, 201s [ 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s ], 201s ), 201s ], 201s ) 201s def test_get_existing_import_tags(repo, patch_state, input_repo, expected): 201s """Test that get_existing_import_tags is generally correct 201s 201s This is the general parameterised test for the common case uses of 201s target.get_existing_import_tags. 201s 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param PatchState patch_state: passed through to get_existing_import_tags 201s :param repo_builder.Repo input_repo: input repository data 201s :param list(str) expected: the names of the references that are expected to 201s be returned, in order. 201s """ 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:214: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpbm_sz28z/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ____________________ test_get_existing_import_tags_ordering ____________________ 201s 201s repo = 201s 201s def test_get_existing_import_tags_ordering(repo): 201s """Test that get_existing_import_tags returns results in the correct order 201s 201s To maintain hash stability, the spec defines that multiple changelog 201s parents must appear in the order that they were published. For this to 201s work, get_existing_import_tags must return the tags in the correct order 201s even if the underlying git repository tags appear in an arbitrary order. 201s 201s :param GitUbuntuRepository repo: fixture of a temporary repository to use 201s """ 201s 201s # Construct a synthetic git repository containing tags 201s repo_builder.Repo( 201s tags={ 201s 'importer/import/1-1': repo_builder.Commit(), 201s 'importer/reimport/import/1-1/0': repo_builder.Commit(), 201s 'importer/reimport/import/1-1/1': repo_builder.Commit(), 201s } 201s > ).write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:240: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmp4aocckkl/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s _ test_create_import_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] _ 201s 201s repo = 201s input_repo = 201s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-1': }} 201s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1'] 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'validation_repo_delta', 201s 'validation_repo_expected_identical_refs', 201s ], 201s [ 201s ( 201s repo_builder.Repo(), 201s { 201s 'add_commits': [ 201s repo_builder.Commit(name='import'), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('import'), 201s }, 201s }, 201s [ 201s 'refs/tags/importer/import/1-1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit(name='import')], 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s { 201s 'add_commits': [ 201s repo_builder.Commit(name='reimport'), 201s ], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s }, 201s [ 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit(name='import'), 201s repo_builder.Commit(name='reimport1'), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport1'), 201s }, 201s ), 201s { 201s 'add_commits': [ 201s repo_builder.Commit(name='reimport2'), 201s ], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/2': Placeholder('reimport2'), 201s }, 201s }, 201s [ 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s 'refs/tags/importer/reimport/import/1-1/2', 201s ], 201s ), 201s ], 201s ) 201s def test_create_import_tag( 201s repo, 201s input_repo, 201s validation_repo_delta, 201s validation_repo_expected_identical_refs, 201s ): 201s """ 201s Unit test that create_import_tag creates the correct import tag 201s 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param repo_builder.Repo input_repo: input repository data 201s :param dict validation_repo_delta: how to transform the input repository 201s into a "validation repository", expressed as a dict to 201s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 201s input repository. The validation repository is then used for the 201s purposes of comparison against the output repository. 201s :param list(str) validation_repo_expected_identical_refs: refs that must be 201s identical between the validation repository and the output repository 201s """ 201s publish_commit = repo.raw_repo.get( 201s repo_builder.Commit().write(repo.raw_repo) 201s ).peel(pygit2.Commit) 201s input_repo.write(repo.raw_repo) 201s 201s > target.create_import_tag(repo, publish_commit, '1-1', 'importer') 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:370: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:1379: in create_import_tag 201s repo.create_tag( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s commit_hash = '240dd844a69653244edb52c57c42d709512d64cd' 201s tag_name = 'importer/import/1-1', tag_msg = 'git-ubuntu import' 201s tagger = pygit2.Signature('git-ubuntu importer', 'ubuntu-devel-discuss@lists.ubuntu.com', 0, 0, None) 201s 201s def create_tag(self, 201s commit_hash, 201s tag_name, 201s tag_msg, 201s tagger=None, 201s ): 201s """Create a tag in the repository 201s 201s :param str commit_hash: the commit hash the tag will point to. 201s :param str tag_name: the name of the tag to be created. 201s :param str tag_msg: the text of the tag annotation. 201s :param pygit2.Signature tagger: if supplied, use this signature in the 201s created tag's "tagger" metadata. If not supplied, an arbitrary name 201s and email address is used with the current time. 201s :returns: None 201s """ 201s if not tagger: 201s tagger_time, tagger_offset = datetime_to_signature_spec( 201s datetime.datetime.now(), 201s ) 201s tagger = pygit2.Signature( 201s gitubuntu.spec.SYNTHESIZED_COMMITTER_NAME, 201s gitubuntu.spec.SYNTHESIZED_COMMITTER_EMAIL, 201s tagger_time, 201s tagger_offset, 201s ) 201s 201s logging.debug("Creating tag %s pointing to %s", tag_name, commit_hash) 201s self.raw_repo.create_tag( 201s tag_name, 201s pygit2.Oid(hex=commit_hash), 201s > pygit2.GIT_OBJ_COMMIT, 201s tagger, 201s tag_msg, 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:2114: AttributeError 201s _ test_create_import_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] _ 201s 201s repo = 201s input_repo = 201s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/import/...t at 0x77b02f3da2a0>, 'importer/reimport/import/1-1/1': }} 201s 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'] 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'validation_repo_delta', 201s 'validation_repo_expected_identical_refs', 201s ], 201s [ 201s ( 201s repo_builder.Repo(), 201s { 201s 'add_commits': [ 201s repo_builder.Commit(name='import'), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('import'), 201s }, 201s }, 201s [ 201s 'refs/tags/importer/import/1-1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit(name='import')], 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s { 201s 'add_commits': [ 201s repo_builder.Commit(name='reimport'), 201s ], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s }, 201s [ 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit(name='import'), 201s repo_builder.Commit(name='reimport1'), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport1'), 201s }, 201s ), 201s { 201s 'add_commits': [ 201s repo_builder.Commit(name='reimport2'), 201s ], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/2': Placeholder('reimport2'), 201s }, 201s }, 201s [ 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s 'refs/tags/importer/reimport/import/1-1/2', 201s ], 201s ), 201s ], 201s ) 201s def test_create_import_tag( 201s repo, 201s input_repo, 201s validation_repo_delta, 201s validation_repo_expected_identical_refs, 201s ): 201s """ 201s Unit test that create_import_tag creates the correct import tag 201s 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param repo_builder.Repo input_repo: input repository data 201s :param dict validation_repo_delta: how to transform the input repository 201s into a "validation repository", expressed as a dict to 201s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 201s input repository. The validation repository is then used for the 201s purposes of comparison against the output repository. 201s :param list(str) validation_repo_expected_identical_refs: refs that must be 201s identical between the validation repository and the output repository 201s """ 201s publish_commit = repo.raw_repo.get( 201s repo_builder.Commit().write(repo.raw_repo) 201s ).peel(pygit2.Commit) 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:368: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpoypj9u3i/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s _ test_create_import_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] _ 201s 201s repo = 201s input_repo = 201s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/import/1-1/2': }} 201s 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'] 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'validation_repo_delta', 201s 'validation_repo_expected_identical_refs', 201s ], 201s [ 201s ( 201s repo_builder.Repo(), 201s { 201s 'add_commits': [ 201s repo_builder.Commit(name='import'), 201s ], 201s 'update_tags': { 201s 'importer/import/1-1': Placeholder('import'), 201s }, 201s }, 201s [ 201s 'refs/tags/importer/import/1-1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit(name='import')], 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s { 201s 'add_commits': [ 201s repo_builder.Commit(name='reimport'), 201s ], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s }, 201s [ 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit(name='import'), 201s repo_builder.Commit(name='reimport1'), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport1'), 201s }, 201s ), 201s { 201s 'add_commits': [ 201s repo_builder.Commit(name='reimport2'), 201s ], 201s 'update_tags': { 201s 'importer/reimport/import/1-1/2': Placeholder('reimport2'), 201s }, 201s }, 201s [ 201s 'refs/tags/importer/import/1-1', 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s 'refs/tags/importer/reimport/import/1-1/2', 201s ], 201s ), 201s ], 201s ) 201s def test_create_import_tag( 201s repo, 201s input_repo, 201s validation_repo_delta, 201s validation_repo_expected_identical_refs, 201s ): 201s """ 201s Unit test that create_import_tag creates the correct import tag 201s 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param repo_builder.Repo input_repo: input repository data 201s :param dict validation_repo_delta: how to transform the input repository 201s into a "validation repository", expressed as a dict to 201s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 201s input repository. The validation repository is then used for the 201s purposes of comparison against the output repository. 201s :param list(str) validation_repo_expected_identical_refs: refs that must be 201s identical between the validation repository and the output repository 201s """ 201s publish_commit = repo.raw_repo.get( 201s repo_builder.Commit().write(repo.raw_repo) 201s ).peel(pygit2.Commit) 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:368: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmphmhqwntt/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ____________ test_create_import_tag_hash_stability_on_first_import _____________ 201s 201s repo = 201s 201s def test_create_import_tag_hash_stability_on_first_import(repo): 201s """Created import tags should be hash stable on first import 201s 201s :param GitUbuntuRepository repo: fixture providing a temporary 201s GitUbuntuRepository instance to use 201s """ 201s publish_commit = repo.raw_repo.get( 201s repo_builder.Commit( 201s author=pygit2.Signature( 201s 'Hash stability test author', 201s 'newauthor@example.com', 201s 1, 201s 2, 201s ), 201s committer=pygit2.Signature( 201s 'Hash stability test committer', 201s 'newcommitter@example.com', 201s 3, 201s 4, 201s ), 201s ).write(repo.raw_repo) 201s ).peel(pygit2.Commit) 201s > target.create_import_tag(repo, publish_commit, '1-1', 'importer') 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:402: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:1379: in create_import_tag 201s repo.create_tag( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s commit_hash = '65729a1dca101328820bf4f49fbca4e9571a772a' 201s tag_name = 'importer/import/1-1', tag_msg = 'git-ubuntu import' 201s tagger = pygit2.Signature('git-ubuntu importer', 'ubuntu-devel-discuss@lists.ubuntu.com', 3, 4, None) 201s 201s def create_tag(self, 201s commit_hash, 201s tag_name, 201s tag_msg, 201s tagger=None, 201s ): 201s """Create a tag in the repository 201s 201s :param str commit_hash: the commit hash the tag will point to. 201s :param str tag_name: the name of the tag to be created. 201s :param str tag_msg: the text of the tag annotation. 201s :param pygit2.Signature tagger: if supplied, use this signature in the 201s created tag's "tagger" metadata. If not supplied, an arbitrary name 201s and email address is used with the current time. 201s :returns: None 201s """ 201s if not tagger: 201s tagger_time, tagger_offset = datetime_to_signature_spec( 201s datetime.datetime.now(), 201s ) 201s tagger = pygit2.Signature( 201s gitubuntu.spec.SYNTHESIZED_COMMITTER_NAME, 201s gitubuntu.spec.SYNTHESIZED_COMMITTER_EMAIL, 201s tagger_time, 201s tagger_offset, 201s ) 201s 201s logging.debug("Creating tag %s pointing to %s", tag_name, commit_hash) 201s self.raw_repo.create_tag( 201s tag_name, 201s pygit2.Oid(hex=commit_hash), 201s > pygit2.GIT_OBJ_COMMIT, 201s tagger, 201s tag_msg, 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:2114: AttributeError 201s ______________ test_create_import_tag_hash_stability_on_reimport _______________ 201s 201s repo = 201s 201s def test_create_import_tag_hash_stability_on_reimport(repo): 201s """Created import tags should be hash stable on reimport 201s 201s This includes both the /0 duplicate reimport tag of the original import tag 201s as well as the /1 reimport tag being created. 201s 201s :param GitUbuntuRepository repo: fixture providing a temporary 201s GitUbuntuRepository instance to use 201s """ 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit( 201s name='root', 201s author=pygit2.Signature( 201s 'Hash stability test author', 201s 'author@example.com', 201s 1, 201s 2, 201s ), 201s committer=pygit2.Signature( 201s 'Hash stability test committer', 201s 'committer@example.com', 201s 3, 201s 4, 201s ), 201s ), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('root'), 201s }, 201s tagger=pygit2.Signature( 201s 'Hash stability test name', 201s 'stability@example.com', 201s 5, 201s 6, 201s ), 201s > ).write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:449: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpdy9p4_w9/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s _ test_create_applied_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] _ 201s 201s repo = 201s input_repo = 201s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/applied/1-1': }} 201s validation_repo_expected_identical_refs = ['refs/tags/importer/applied/1-1'] 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'validation_repo_delta', 201s 'validation_repo_expected_identical_refs', 201s ], 201s [ 201s ( 201s repo_builder.Repo(), 201s { 201s 'add_commits': [repo_builder.Commit(name='import')], 201s 'update_tags': {'importer/applied/1-1': Placeholder('import')}, 201s }, 201s [ 201s 'refs/tags/importer/applied/1-1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit(name='import')], 201s tags={'importer/applied/1-1': Placeholder('import')}, 201s ), 201s { 201s 'add_commits': [repo_builder.Commit(name='reimport')], 201s 'update_tags': { 201s 'importer/reimport/applied/1-1/0': Placeholder('import'), 201s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 201s }, 201s }, 201s [ 201s 'refs/tags/importer/applied/1-1', 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit(name='import'), 201s repo_builder.Commit(name='reimport1'), 201s ], 201s tags={ 201s 'importer/applied/1-1': Placeholder('import'), 201s 'importer/reimport/applied/1-1/0': Placeholder('import'), 201s 'importer/reimport/applied/1-1/1': Placeholder('reimport1'), 201s }, 201s ), 201s { 201s 'add_commits': [ 201s repo_builder.Commit(name='reimport2') 201s ], 201s 'update_tags': { 201s 'importer/reimport/applied/1-1/2': Placeholder('reimport2'), 201s }, 201s }, 201s [ 201s 'refs/tags/importer/applied/1-1', 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s 'refs/tags/importer/reimport/applied/1-1/2', 201s ], 201s ), 201s ], 201s ) 201s def test_create_applied_tag( 201s repo, 201s input_repo, 201s validation_repo_delta, 201s validation_repo_expected_identical_refs, 201s ): 201s """ 201s Unit test that create_applied_tag creates the correct import tag 201s 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param repo_builder.Repo input_repo: input repository data 201s :param dict validation_repo_delta: how to transform the input repository 201s into a "validation repository", expressed as a dict to 201s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 201s input repository. The validation repository is then used for the 201s purposes of comparison against the output repository. 201s :param list(str) validation_repo_expected_identical_refs: refs that must be 201s identical between the validation repository and the output repository 201s """ 201s publish_commit_str = str( 201s repo.raw_repo.get( 201s repo_builder.Commit().write(repo.raw_repo) 201s ).peel(pygit2.Commit).id 201s ) 201s 201s input_repo.write(repo.raw_repo) 201s 201s > target.create_applied_tag(repo, publish_commit_str, '1-1', 'importer') 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:577: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:1309: in create_applied_tag 201s repo.create_tag( 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s commit_hash = '240dd844a69653244edb52c57c42d709512d64cd' 201s tag_name = 'importer/applied/1-1', tag_msg = 'git-ubuntu import' 201s tagger = pygit2.Signature('git-ubuntu importer', 'ubuntu-devel-discuss@lists.ubuntu.com', 1732531243, 0, None) 201s 201s def create_tag(self, 201s commit_hash, 201s tag_name, 201s tag_msg, 201s tagger=None, 201s ): 201s """Create a tag in the repository 201s 201s :param str commit_hash: the commit hash the tag will point to. 201s :param str tag_name: the name of the tag to be created. 201s :param str tag_msg: the text of the tag annotation. 201s :param pygit2.Signature tagger: if supplied, use this signature in the 201s created tag's "tagger" metadata. If not supplied, an arbitrary name 201s and email address is used with the current time. 201s :returns: None 201s """ 201s if not tagger: 201s tagger_time, tagger_offset = datetime_to_signature_spec( 201s datetime.datetime.now(), 201s ) 201s tagger = pygit2.Signature( 201s gitubuntu.spec.SYNTHESIZED_COMMITTER_NAME, 201s gitubuntu.spec.SYNTHESIZED_COMMITTER_EMAIL, 201s tagger_time, 201s tagger_offset, 201s ) 201s 201s logging.debug("Creating tag %s pointing to %s", tag_name, commit_hash) 201s self.raw_repo.create_tag( 201s tag_name, 201s pygit2.Oid(hex=commit_hash), 201s > pygit2.GIT_OBJ_COMMIT, 201s tagger, 201s tag_msg, 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:2114: AttributeError 201s _ test_create_applied_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] _ 201s 201s repo = 201s input_repo = 201s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/applied... at 0x77b02f3dda90>, 'importer/reimport/applied/1-1/1': }} 201s 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'] 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'validation_repo_delta', 201s 'validation_repo_expected_identical_refs', 201s ], 201s [ 201s ( 201s repo_builder.Repo(), 201s { 201s 'add_commits': [repo_builder.Commit(name='import')], 201s 'update_tags': {'importer/applied/1-1': Placeholder('import')}, 201s }, 201s [ 201s 'refs/tags/importer/applied/1-1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit(name='import')], 201s tags={'importer/applied/1-1': Placeholder('import')}, 201s ), 201s { 201s 'add_commits': [repo_builder.Commit(name='reimport')], 201s 'update_tags': { 201s 'importer/reimport/applied/1-1/0': Placeholder('import'), 201s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 201s }, 201s }, 201s [ 201s 'refs/tags/importer/applied/1-1', 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit(name='import'), 201s repo_builder.Commit(name='reimport1'), 201s ], 201s tags={ 201s 'importer/applied/1-1': Placeholder('import'), 201s 'importer/reimport/applied/1-1/0': Placeholder('import'), 201s 'importer/reimport/applied/1-1/1': Placeholder('reimport1'), 201s }, 201s ), 201s { 201s 'add_commits': [ 201s repo_builder.Commit(name='reimport2') 201s ], 201s 'update_tags': { 201s 'importer/reimport/applied/1-1/2': Placeholder('reimport2'), 201s }, 201s }, 201s [ 201s 'refs/tags/importer/applied/1-1', 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s 'refs/tags/importer/reimport/applied/1-1/2', 201s ], 201s ), 201s ], 201s ) 201s def test_create_applied_tag( 201s repo, 201s input_repo, 201s validation_repo_delta, 201s validation_repo_expected_identical_refs, 201s ): 201s """ 201s Unit test that create_applied_tag creates the correct import tag 201s 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param repo_builder.Repo input_repo: input repository data 201s :param dict validation_repo_delta: how to transform the input repository 201s into a "validation repository", expressed as a dict to 201s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 201s input repository. The validation repository is then used for the 201s purposes of comparison against the output repository. 201s :param list(str) validation_repo_expected_identical_refs: refs that must be 201s identical between the validation repository and the output repository 201s """ 201s publish_commit_str = str( 201s repo.raw_repo.get( 201s repo_builder.Commit().write(repo.raw_repo) 201s ).peel(pygit2.Commit).id 201s ) 201s 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:575: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpe0ytxooz/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s _ test_create_applied_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] _ 201s 201s repo = 201s input_repo = 201s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/applied/1-1/2': }} 201s 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'] 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'validation_repo_delta', 201s 'validation_repo_expected_identical_refs', 201s ], 201s [ 201s ( 201s repo_builder.Repo(), 201s { 201s 'add_commits': [repo_builder.Commit(name='import')], 201s 'update_tags': {'importer/applied/1-1': Placeholder('import')}, 201s }, 201s [ 201s 'refs/tags/importer/applied/1-1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit(name='import')], 201s tags={'importer/applied/1-1': Placeholder('import')}, 201s ), 201s { 201s 'add_commits': [repo_builder.Commit(name='reimport')], 201s 'update_tags': { 201s 'importer/reimport/applied/1-1/0': Placeholder('import'), 201s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 201s }, 201s }, 201s [ 201s 'refs/tags/importer/applied/1-1', 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit(name='import'), 201s repo_builder.Commit(name='reimport1'), 201s ], 201s tags={ 201s 'importer/applied/1-1': Placeholder('import'), 201s 'importer/reimport/applied/1-1/0': Placeholder('import'), 201s 'importer/reimport/applied/1-1/1': Placeholder('reimport1'), 201s }, 201s ), 201s { 201s 'add_commits': [ 201s repo_builder.Commit(name='reimport2') 201s ], 201s 'update_tags': { 201s 'importer/reimport/applied/1-1/2': Placeholder('reimport2'), 201s }, 201s }, 201s [ 201s 'refs/tags/importer/applied/1-1', 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s 'refs/tags/importer/reimport/applied/1-1/2', 201s ], 201s ), 201s ], 201s ) 201s def test_create_applied_tag( 201s repo, 201s input_repo, 201s validation_repo_delta, 201s validation_repo_expected_identical_refs, 201s ): 201s """ 201s Unit test that create_applied_tag creates the correct import tag 201s 201s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 201s temporary output repository 201s :param repo_builder.Repo input_repo: input repository data 201s :param dict validation_repo_delta: how to transform the input repository 201s into a "validation repository", expressed as a dict to 201s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 201s input repository. The validation repository is then used for the 201s purposes of comparison against the output repository. 201s :param list(str) validation_repo_expected_identical_refs: refs that must be 201s identical between the validation repository and the output repository 201s """ 201s publish_commit_str = str( 201s repo.raw_repo.get( 201s repo_builder.Commit().write(repo.raw_repo) 201s ).peel(pygit2.Commit).id 201s ) 201s 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:575: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmplk2cckdz/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s _ test_get_changelog_parent_commits[input_repo1-parent_overrides1-changelog_versions1-PatchState.UNAPPLIED-expected_refs1] _ 201s 201s repo = 201s input_repo = 201s parent_overrides = {}, changelog_versions = ['1-2', '1-1'] 201s patch_state = 201s expected_refs = ['refs/tags/importer/import/1-1'] 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'parent_overrides', 201s 'changelog_versions', 201s 'patch_state', 201s 'expected_refs', 201s ], 201s [ 201s ( 201s repo_builder.Repo(), 201s {}, 201s ['1-2', '1-1',], 201s PatchState.UNAPPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='import')], 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s ['refs/tags/importer/import/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec(name='reimport', mutate=1), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s [ 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='import')], 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s {}, 201s ['1-3', '1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s ['refs/tags/importer/import/1-1'], 201s ), 201s ( 201s repo_builder.Repo(), 201s {}, 201s ['1-2', '1-1',], 201s PatchState.APPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='applied')], 201s tags={'importer/applied/1-1': Placeholder('applied')}, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.APPLIED, 201s ['refs/tags/importer/applied/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec(name='reimport', mutate=1), 201s ], 201s tags={ 201s 'importer/applied/1-1': Placeholder('import'), 201s 'importer/reimport/applied/1-1/0': Placeholder('import'), 201s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.APPLIED, 201s [ 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='applied')], 201s tags={'importer/applied/1-1': Placeholder('applied')}, 201s ), 201s {}, 201s ['1-3', '1-2', '1-1'], 201s PatchState.APPLIED, 201s ['refs/tags/importer/applied/1-1'], 201s ), 201s ], 201s ) 201s def test_get_changelog_parent_commits( 201s repo, 201s input_repo, 201s parent_overrides, 201s changelog_versions, 201s patch_state, 201s expected_refs, 201s ): 201s """Test that get_changelog_parent_commits is generally correct 201s 201s This is the general parameterised test for the common case uses of 201s target.get_changelog_parent_commits. 201s 201s :param GitUbuntuRepository repo: fixture providing a temporary 201s GitUbuntuRepository instance to use 201s :param repo_builder.Repo input_repo: the input repository data to use that 201s will be populated into @repo before @repo is passed through to 201s get_changelog_parent_commits 201s :param dict parent_overrides: passed through to 201s get_changelog_parent_commits. 201s :param PatchState patch_state: passed through to 201s get_changelog_parent_commits 201s :param list(str) expected_refs: the expected return value of 201s get_changelog_parent_commits expressed using a list of reference names. 201s Since get_changelog_parent_commits returns a list of commit hash 201s strings, the reference names will need to be dereferenced before 201s comparison; this way the test parameters don't need to be opaque hash 201s strings. 201s """ 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:721: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmp3kmyac0n/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ test_get_changelog_parent_commits[input_repo2-parent_overrides2-changelog_versions2-PatchState.UNAPPLIED-expected_refs2] _ 201s 201s repo = 201s input_repo = 201s parent_overrides = {}, changelog_versions = ['1-2', '1-1'] 201s patch_state = 201s expected_refs = ['refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1'] 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'parent_overrides', 201s 'changelog_versions', 201s 'patch_state', 201s 'expected_refs', 201s ], 201s [ 201s ( 201s repo_builder.Repo(), 201s {}, 201s ['1-2', '1-1',], 201s PatchState.UNAPPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='import')], 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s ['refs/tags/importer/import/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec(name='reimport', mutate=1), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s [ 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='import')], 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s {}, 201s ['1-3', '1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s ['refs/tags/importer/import/1-1'], 201s ), 201s ( 201s repo_builder.Repo(), 201s {}, 201s ['1-2', '1-1',], 201s PatchState.APPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='applied')], 201s tags={'importer/applied/1-1': Placeholder('applied')}, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.APPLIED, 201s ['refs/tags/importer/applied/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec(name='reimport', mutate=1), 201s ], 201s tags={ 201s 'importer/applied/1-1': Placeholder('import'), 201s 'importer/reimport/applied/1-1/0': Placeholder('import'), 201s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.APPLIED, 201s [ 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='applied')], 201s tags={'importer/applied/1-1': Placeholder('applied')}, 201s ), 201s {}, 201s ['1-3', '1-2', '1-1'], 201s PatchState.APPLIED, 201s ['refs/tags/importer/applied/1-1'], 201s ), 201s ], 201s ) 201s def test_get_changelog_parent_commits( 201s repo, 201s input_repo, 201s parent_overrides, 201s changelog_versions, 201s patch_state, 201s expected_refs, 201s ): 201s """Test that get_changelog_parent_commits is generally correct 201s 201s This is the general parameterised test for the common case uses of 201s target.get_changelog_parent_commits. 201s 201s :param GitUbuntuRepository repo: fixture providing a temporary 201s GitUbuntuRepository instance to use 201s :param repo_builder.Repo input_repo: the input repository data to use that 201s will be populated into @repo before @repo is passed through to 201s get_changelog_parent_commits 201s :param dict parent_overrides: passed through to 201s get_changelog_parent_commits. 201s :param PatchState patch_state: passed through to 201s get_changelog_parent_commits 201s :param list(str) expected_refs: the expected return value of 201s get_changelog_parent_commits expressed using a list of reference names. 201s Since get_changelog_parent_commits returns a list of commit hash 201s strings, the reference names will need to be dereferenced before 201s comparison; this way the test parameters don't need to be opaque hash 201s strings. 201s """ 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:721: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmp014wir6y/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ test_get_changelog_parent_commits[input_repo3-parent_overrides3-changelog_versions3-PatchState.UNAPPLIED-expected_refs3] _ 201s 201s repo = 201s input_repo = 201s parent_overrides = {}, changelog_versions = ['1-3', '1-2', '1-1'] 201s patch_state = 201s expected_refs = ['refs/tags/importer/import/1-1'] 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'parent_overrides', 201s 'changelog_versions', 201s 'patch_state', 201s 'expected_refs', 201s ], 201s [ 201s ( 201s repo_builder.Repo(), 201s {}, 201s ['1-2', '1-1',], 201s PatchState.UNAPPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='import')], 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s ['refs/tags/importer/import/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec(name='reimport', mutate=1), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s [ 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='import')], 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s {}, 201s ['1-3', '1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s ['refs/tags/importer/import/1-1'], 201s ), 201s ( 201s repo_builder.Repo(), 201s {}, 201s ['1-2', '1-1',], 201s PatchState.APPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='applied')], 201s tags={'importer/applied/1-1': Placeholder('applied')}, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.APPLIED, 201s ['refs/tags/importer/applied/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec(name='reimport', mutate=1), 201s ], 201s tags={ 201s 'importer/applied/1-1': Placeholder('import'), 201s 'importer/reimport/applied/1-1/0': Placeholder('import'), 201s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.APPLIED, 201s [ 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='applied')], 201s tags={'importer/applied/1-1': Placeholder('applied')}, 201s ), 201s {}, 201s ['1-3', '1-2', '1-1'], 201s PatchState.APPLIED, 201s ['refs/tags/importer/applied/1-1'], 201s ), 201s ], 201s ) 201s def test_get_changelog_parent_commits( 201s repo, 201s input_repo, 201s parent_overrides, 201s changelog_versions, 201s patch_state, 201s expected_refs, 201s ): 201s """Test that get_changelog_parent_commits is generally correct 201s 201s This is the general parameterised test for the common case uses of 201s target.get_changelog_parent_commits. 201s 201s :param GitUbuntuRepository repo: fixture providing a temporary 201s GitUbuntuRepository instance to use 201s :param repo_builder.Repo input_repo: the input repository data to use that 201s will be populated into @repo before @repo is passed through to 201s get_changelog_parent_commits 201s :param dict parent_overrides: passed through to 201s get_changelog_parent_commits. 201s :param PatchState patch_state: passed through to 201s get_changelog_parent_commits 201s :param list(str) expected_refs: the expected return value of 201s get_changelog_parent_commits expressed using a list of reference names. 201s Since get_changelog_parent_commits returns a list of commit hash 201s strings, the reference names will need to be dereferenced before 201s comparison; this way the test parameters don't need to be opaque hash 201s strings. 201s """ 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:721: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpu9dyfh6c/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ test_get_changelog_parent_commits[input_repo5-parent_overrides5-changelog_versions5-PatchState.APPLIED-expected_refs5] _ 201s 201s repo = 201s input_repo = 201s parent_overrides = {}, changelog_versions = ['1-2', '1-1'] 201s patch_state = 201s expected_refs = ['refs/tags/importer/applied/1-1'] 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'parent_overrides', 201s 'changelog_versions', 201s 'patch_state', 201s 'expected_refs', 201s ], 201s [ 201s ( 201s repo_builder.Repo(), 201s {}, 201s ['1-2', '1-1',], 201s PatchState.UNAPPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='import')], 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s ['refs/tags/importer/import/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec(name='reimport', mutate=1), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s [ 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='import')], 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s {}, 201s ['1-3', '1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s ['refs/tags/importer/import/1-1'], 201s ), 201s ( 201s repo_builder.Repo(), 201s {}, 201s ['1-2', '1-1',], 201s PatchState.APPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='applied')], 201s tags={'importer/applied/1-1': Placeholder('applied')}, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.APPLIED, 201s ['refs/tags/importer/applied/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec(name='reimport', mutate=1), 201s ], 201s tags={ 201s 'importer/applied/1-1': Placeholder('import'), 201s 'importer/reimport/applied/1-1/0': Placeholder('import'), 201s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.APPLIED, 201s [ 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='applied')], 201s tags={'importer/applied/1-1': Placeholder('applied')}, 201s ), 201s {}, 201s ['1-3', '1-2', '1-1'], 201s PatchState.APPLIED, 201s ['refs/tags/importer/applied/1-1'], 201s ), 201s ], 201s ) 201s def test_get_changelog_parent_commits( 201s repo, 201s input_repo, 201s parent_overrides, 201s changelog_versions, 201s patch_state, 201s expected_refs, 201s ): 201s """Test that get_changelog_parent_commits is generally correct 201s 201s This is the general parameterised test for the common case uses of 201s target.get_changelog_parent_commits. 201s 201s :param GitUbuntuRepository repo: fixture providing a temporary 201s GitUbuntuRepository instance to use 201s :param repo_builder.Repo input_repo: the input repository data to use that 201s will be populated into @repo before @repo is passed through to 201s get_changelog_parent_commits 201s :param dict parent_overrides: passed through to 201s get_changelog_parent_commits. 201s :param PatchState patch_state: passed through to 201s get_changelog_parent_commits 201s :param list(str) expected_refs: the expected return value of 201s get_changelog_parent_commits expressed using a list of reference names. 201s Since get_changelog_parent_commits returns a list of commit hash 201s strings, the reference names will need to be dereferenced before 201s comparison; this way the test parameters don't need to be opaque hash 201s strings. 201s """ 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:721: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmprnuzb1ik/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ test_get_changelog_parent_commits[input_repo6-parent_overrides6-changelog_versions6-PatchState.APPLIED-expected_refs6] _ 201s 201s repo = 201s input_repo = 201s parent_overrides = {}, changelog_versions = ['1-2', '1-1'] 201s patch_state = 201s expected_refs = ['refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1'] 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'parent_overrides', 201s 'changelog_versions', 201s 'patch_state', 201s 'expected_refs', 201s ], 201s [ 201s ( 201s repo_builder.Repo(), 201s {}, 201s ['1-2', '1-1',], 201s PatchState.UNAPPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='import')], 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s ['refs/tags/importer/import/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec(name='reimport', mutate=1), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s [ 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='import')], 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s {}, 201s ['1-3', '1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s ['refs/tags/importer/import/1-1'], 201s ), 201s ( 201s repo_builder.Repo(), 201s {}, 201s ['1-2', '1-1',], 201s PatchState.APPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='applied')], 201s tags={'importer/applied/1-1': Placeholder('applied')}, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.APPLIED, 201s ['refs/tags/importer/applied/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec(name='reimport', mutate=1), 201s ], 201s tags={ 201s 'importer/applied/1-1': Placeholder('import'), 201s 'importer/reimport/applied/1-1/0': Placeholder('import'), 201s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.APPLIED, 201s [ 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='applied')], 201s tags={'importer/applied/1-1': Placeholder('applied')}, 201s ), 201s {}, 201s ['1-3', '1-2', '1-1'], 201s PatchState.APPLIED, 201s ['refs/tags/importer/applied/1-1'], 201s ), 201s ], 201s ) 201s def test_get_changelog_parent_commits( 201s repo, 201s input_repo, 201s parent_overrides, 201s changelog_versions, 201s patch_state, 201s expected_refs, 201s ): 201s """Test that get_changelog_parent_commits is generally correct 201s 201s This is the general parameterised test for the common case uses of 201s target.get_changelog_parent_commits. 201s 201s :param GitUbuntuRepository repo: fixture providing a temporary 201s GitUbuntuRepository instance to use 201s :param repo_builder.Repo input_repo: the input repository data to use that 201s will be populated into @repo before @repo is passed through to 201s get_changelog_parent_commits 201s :param dict parent_overrides: passed through to 201s get_changelog_parent_commits. 201s :param PatchState patch_state: passed through to 201s get_changelog_parent_commits 201s :param list(str) expected_refs: the expected return value of 201s get_changelog_parent_commits expressed using a list of reference names. 201s Since get_changelog_parent_commits returns a list of commit hash 201s strings, the reference names will need to be dereferenced before 201s comparison; this way the test parameters don't need to be opaque hash 201s strings. 201s """ 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:721: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpeqn8hg8m/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ test_get_changelog_parent_commits[input_repo7-parent_overrides7-changelog_versions7-PatchState.APPLIED-expected_refs7] _ 201s 201s repo = 201s input_repo = 201s parent_overrides = {}, changelog_versions = ['1-3', '1-2', '1-1'] 201s patch_state = 201s expected_refs = ['refs/tags/importer/applied/1-1'] 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'parent_overrides', 201s 'changelog_versions', 201s 'patch_state', 201s 'expected_refs', 201s ], 201s [ 201s ( 201s repo_builder.Repo(), 201s {}, 201s ['1-2', '1-1',], 201s PatchState.UNAPPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='import')], 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s ['refs/tags/importer/import/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec(name='reimport', mutate=1), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/reimport/import/1-1/0': Placeholder('import'), 201s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s [ 201s 'refs/tags/importer/reimport/import/1-1/0', 201s 'refs/tags/importer/reimport/import/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='import')], 201s tags={'importer/import/1-1': Placeholder('import')}, 201s ), 201s {}, 201s ['1-3', '1-2', '1-1'], 201s PatchState.UNAPPLIED, 201s ['refs/tags/importer/import/1-1'], 201s ), 201s ( 201s repo_builder.Repo(), 201s {}, 201s ['1-2', '1-1',], 201s PatchState.APPLIED, 201s [], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='applied')], 201s tags={'importer/applied/1-1': Placeholder('applied')}, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.APPLIED, 201s ['refs/tags/importer/applied/1-1'], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec(name='reimport', mutate=1), 201s ], 201s tags={ 201s 'importer/applied/1-1': Placeholder('import'), 201s 'importer/reimport/applied/1-1/0': Placeholder('import'), 201s 'importer/reimport/applied/1-1/1': Placeholder('reimport'), 201s }, 201s ), 201s {}, 201s ['1-2', '1-1'], 201s PatchState.APPLIED, 201s [ 201s 'refs/tags/importer/reimport/applied/1-1/0', 201s 'refs/tags/importer/reimport/applied/1-1/1', 201s ], 201s ), 201s ( 201s repo_builder.Repo( 201s commits=[repo_builder.Commit.from_spec(name='applied')], 201s tags={'importer/applied/1-1': Placeholder('applied')}, 201s ), 201s {}, 201s ['1-3', '1-2', '1-1'], 201s PatchState.APPLIED, 201s ['refs/tags/importer/applied/1-1'], 201s ), 201s ], 201s ) 201s def test_get_changelog_parent_commits( 201s repo, 201s input_repo, 201s parent_overrides, 201s changelog_versions, 201s patch_state, 201s expected_refs, 201s ): 201s """Test that get_changelog_parent_commits is generally correct 201s 201s This is the general parameterised test for the common case uses of 201s target.get_changelog_parent_commits. 201s 201s :param GitUbuntuRepository repo: fixture providing a temporary 201s GitUbuntuRepository instance to use 201s :param repo_builder.Repo input_repo: the input repository data to use that 201s will be populated into @repo before @repo is passed through to 201s get_changelog_parent_commits 201s :param dict parent_overrides: passed through to 201s get_changelog_parent_commits. 201s :param PatchState patch_state: passed through to 201s get_changelog_parent_commits 201s :param list(str) expected_refs: the expected return value of 201s get_changelog_parent_commits expressed using a list of reference names. 201s Since get_changelog_parent_commits returns a list of commit hash 201s strings, the reference names will need to be dereferenced before 201s comparison; this way the test parameters don't need to be opaque hash 201s strings. 201s """ 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:721: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpjql7_ly6/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _________ test_validate_rich_history[input_repo0-published_spec0-True] _________ 201s 201s repo = 201s input_repo = 201s published_spec = {'changelog_versions': ['1-2', '1-1']}, expected_result = True 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'published_spec', 201s 'expected_result', 201s ], 201s [ 201s ( 201s # Common case: upload tag has a changelog parent as an ancestor 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec( 201s name='upload', 201s changelog_versions=['1-2', '1-1'], 201s parents=[Placeholder('import')], 201s ), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-2': Placeholder('upload'), 201s }, 201s ), 201s {'changelog_versions': ['1-2', '1-1']}, 201s True, 201s ), 201s ( 201s # Upload tag is the first one, with no parents present 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec( 201s name='upload', 201s version='1-2', 201s ), 201s ], 201s tags={ 201s 'importer/upload/1-2': Placeholder('upload'), 201s }, 201s ), 201s {'changelog_versions': ['1-2']}, 201s True, 201s ), 201s ( 201s # Upload tag mismatches published tree but is otherwise correct 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec( 201s name='upload', 201s changelog_versions=['1-2', '1-1'], 201s parents=[Placeholder('import')], 201s mutate=True, 201s ), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-2': Placeholder('upload'), 201s }, 201s ), 201s {'changelog_versions': ['1-2', '1-1']}, 201s target.RichHistoryTreeMismatch, 201s ), 201s ( 201s # Upload tag doesn't have a changelog parent as an ancestor but is 201s # otherwise correct 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec( 201s name='upload', 201s changelog_versions=['1-2', '1-1'], 201s ), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-2': Placeholder('upload'), 201s }, 201s ), 201s {'changelog_versions': ['1-2', '1-1']}, 201s target.RichHistoryHasNoChangelogParentAncestor, 201s ), 201s ], 201s ) 201s def test_validate_rich_history( 201s repo, 201s input_repo, 201s published_spec, 201s expected_result, 201s ): 201s """ 201s General test for validate_rich_history(). 201s 201s This unit tests validate_rich_history() for various parameterized cases. 201s Given an input repository and the specification of a Launchpad publication 201s of a source package, we check that validate_rich_history() correctly 201s accepts or rejects the rich history corresponding to the upload tag named 201s 'importer/upload/1-2'. It is assumed that the package being imported is 201s always of version '1-2' for all parameter sets. 201s 201s Since the target function requires rich history, the case of there not 201s being rich history does not need to be tested here, as it wouldn't be 201s called in this case. 201s 201s validate_rich_history() is generic for all sourced rich history, not just 201s rich history sourced from an upload tag. But since it is independent of how 201s the rich history commit arrived, it is easiest to use upload tags to test 201s it; this results in coverage for all sources. 201s 201s :param GitUbuntuRepository repo: fixture providing a temporary 201s GitUbuntuRepository instance to use 201s :param repo_builder.Repo input_repo: input repository data 201s :param dict published_spec: the package simulated being imported from the 201s archive, specified as a dict to pass as **kwargs to 201s repo_builder.Commit.from_spec() 201s :param bool expected_result: the expected return value of, or exception 201s raised by, the call to validate_rich_history() 201s """ 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:910: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmp8__mc4_3/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _________ test_validate_rich_history[input_repo1-published_spec1-True] _________ 201s 201s repo = 201s input_repo = 201s published_spec = {'changelog_versions': ['1-2']}, expected_result = True 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'published_spec', 201s 'expected_result', 201s ], 201s [ 201s ( 201s # Common case: upload tag has a changelog parent as an ancestor 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec( 201s name='upload', 201s changelog_versions=['1-2', '1-1'], 201s parents=[Placeholder('import')], 201s ), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-2': Placeholder('upload'), 201s }, 201s ), 201s {'changelog_versions': ['1-2', '1-1']}, 201s True, 201s ), 201s ( 201s # Upload tag is the first one, with no parents present 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec( 201s name='upload', 201s version='1-2', 201s ), 201s ], 201s tags={ 201s 'importer/upload/1-2': Placeholder('upload'), 201s }, 201s ), 201s {'changelog_versions': ['1-2']}, 201s True, 201s ), 201s ( 201s # Upload tag mismatches published tree but is otherwise correct 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec( 201s name='upload', 201s changelog_versions=['1-2', '1-1'], 201s parents=[Placeholder('import')], 201s mutate=True, 201s ), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-2': Placeholder('upload'), 201s }, 201s ), 201s {'changelog_versions': ['1-2', '1-1']}, 201s target.RichHistoryTreeMismatch, 201s ), 201s ( 201s # Upload tag doesn't have a changelog parent as an ancestor but is 201s # otherwise correct 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec( 201s name='upload', 201s changelog_versions=['1-2', '1-1'], 201s ), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-2': Placeholder('upload'), 201s }, 201s ), 201s {'changelog_versions': ['1-2', '1-1']}, 201s target.RichHistoryHasNoChangelogParentAncestor, 201s ), 201s ], 201s ) 201s def test_validate_rich_history( 201s repo, 201s input_repo, 201s published_spec, 201s expected_result, 201s ): 201s """ 201s General test for validate_rich_history(). 201s 201s This unit tests validate_rich_history() for various parameterized cases. 201s Given an input repository and the specification of a Launchpad publication 201s of a source package, we check that validate_rich_history() correctly 201s accepts or rejects the rich history corresponding to the upload tag named 201s 'importer/upload/1-2'. It is assumed that the package being imported is 201s always of version '1-2' for all parameter sets. 201s 201s Since the target function requires rich history, the case of there not 201s being rich history does not need to be tested here, as it wouldn't be 201s called in this case. 201s 201s validate_rich_history() is generic for all sourced rich history, not just 201s rich history sourced from an upload tag. But since it is independent of how 201s the rich history commit arrived, it is easiest to use upload tags to test 201s it; this results in coverage for all sources. 201s 201s :param GitUbuntuRepository repo: fixture providing a temporary 201s GitUbuntuRepository instance to use 201s :param repo_builder.Repo input_repo: input repository data 201s :param dict published_spec: the package simulated being imported from the 201s archive, specified as a dict to pass as **kwargs to 201s repo_builder.Commit.from_spec() 201s :param bool expected_result: the expected return value of, or exception 201s raised by, the call to validate_rich_history() 201s """ 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:910: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmpnt14b2d2/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ test_validate_rich_history[input_repo2-published_spec2-RichHistoryTreeMismatch] _ 201s 201s repo = 201s input_repo = 201s published_spec = {'changelog_versions': ['1-2', '1-1']} 201s expected_result = 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'published_spec', 201s 'expected_result', 201s ], 201s [ 201s ( 201s # Common case: upload tag has a changelog parent as an ancestor 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec( 201s name='upload', 201s changelog_versions=['1-2', '1-1'], 201s parents=[Placeholder('import')], 201s ), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-2': Placeholder('upload'), 201s }, 201s ), 201s {'changelog_versions': ['1-2', '1-1']}, 201s True, 201s ), 201s ( 201s # Upload tag is the first one, with no parents present 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec( 201s name='upload', 201s version='1-2', 201s ), 201s ], 201s tags={ 201s 'importer/upload/1-2': Placeholder('upload'), 201s }, 201s ), 201s {'changelog_versions': ['1-2']}, 201s True, 201s ), 201s ( 201s # Upload tag mismatches published tree but is otherwise correct 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec( 201s name='upload', 201s changelog_versions=['1-2', '1-1'], 201s parents=[Placeholder('import')], 201s mutate=True, 201s ), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-2': Placeholder('upload'), 201s }, 201s ), 201s {'changelog_versions': ['1-2', '1-1']}, 201s target.RichHistoryTreeMismatch, 201s ), 201s ( 201s # Upload tag doesn't have a changelog parent as an ancestor but is 201s # otherwise correct 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec( 201s name='upload', 201s changelog_versions=['1-2', '1-1'], 201s ), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-2': Placeholder('upload'), 201s }, 201s ), 201s {'changelog_versions': ['1-2', '1-1']}, 201s target.RichHistoryHasNoChangelogParentAncestor, 201s ), 201s ], 201s ) 201s def test_validate_rich_history( 201s repo, 201s input_repo, 201s published_spec, 201s expected_result, 201s ): 201s """ 201s General test for validate_rich_history(). 201s 201s This unit tests validate_rich_history() for various parameterized cases. 201s Given an input repository and the specification of a Launchpad publication 201s of a source package, we check that validate_rich_history() correctly 201s accepts or rejects the rich history corresponding to the upload tag named 201s 'importer/upload/1-2'. It is assumed that the package being imported is 201s always of version '1-2' for all parameter sets. 201s 201s Since the target function requires rich history, the case of there not 201s being rich history does not need to be tested here, as it wouldn't be 201s called in this case. 201s 201s validate_rich_history() is generic for all sourced rich history, not just 201s rich history sourced from an upload tag. But since it is independent of how 201s the rich history commit arrived, it is easiest to use upload tags to test 201s it; this results in coverage for all sources. 201s 201s :param GitUbuntuRepository repo: fixture providing a temporary 201s GitUbuntuRepository instance to use 201s :param repo_builder.Repo input_repo: input repository data 201s :param dict published_spec: the package simulated being imported from the 201s archive, specified as a dict to pass as **kwargs to 201s repo_builder.Commit.from_spec() 201s :param bool expected_result: the expected return value of, or exception 201s raised by, the call to validate_rich_history() 201s """ 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:910: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmp1ynyrpmt/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s _ test_validate_rich_history[input_repo3-published_spec3-RichHistoryHasNoChangelogParentAncestor] _ 201s 201s repo = 201s input_repo = 201s published_spec = {'changelog_versions': ['1-2', '1-1']} 201s expected_result = 201s 201s @pytest.mark.parametrize( 201s [ 201s 'input_repo', 201s 'published_spec', 201s 'expected_result', 201s ], 201s [ 201s ( 201s # Common case: upload tag has a changelog parent as an ancestor 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec( 201s name='upload', 201s changelog_versions=['1-2', '1-1'], 201s parents=[Placeholder('import')], 201s ), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-2': Placeholder('upload'), 201s }, 201s ), 201s {'changelog_versions': ['1-2', '1-1']}, 201s True, 201s ), 201s ( 201s # Upload tag is the first one, with no parents present 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec( 201s name='upload', 201s version='1-2', 201s ), 201s ], 201s tags={ 201s 'importer/upload/1-2': Placeholder('upload'), 201s }, 201s ), 201s {'changelog_versions': ['1-2']}, 201s True, 201s ), 201s ( 201s # Upload tag mismatches published tree but is otherwise correct 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec( 201s name='upload', 201s changelog_versions=['1-2', '1-1'], 201s parents=[Placeholder('import')], 201s mutate=True, 201s ), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-2': Placeholder('upload'), 201s }, 201s ), 201s {'changelog_versions': ['1-2', '1-1']}, 201s target.RichHistoryTreeMismatch, 201s ), 201s ( 201s # Upload tag doesn't have a changelog parent as an ancestor but is 201s # otherwise correct 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='import'), 201s repo_builder.Commit.from_spec( 201s name='upload', 201s changelog_versions=['1-2', '1-1'], 201s ), 201s ], 201s tags={ 201s 'importer/import/1-1': Placeholder('import'), 201s 'importer/upload/1-2': Placeholder('upload'), 201s }, 201s ), 201s {'changelog_versions': ['1-2', '1-1']}, 201s target.RichHistoryHasNoChangelogParentAncestor, 201s ), 201s ], 201s ) 201s def test_validate_rich_history( 201s repo, 201s input_repo, 201s published_spec, 201s expected_result, 201s ): 201s """ 201s General test for validate_rich_history(). 201s 201s This unit tests validate_rich_history() for various parameterized cases. 201s Given an input repository and the specification of a Launchpad publication 201s of a source package, we check that validate_rich_history() correctly 201s accepts or rejects the rich history corresponding to the upload tag named 201s 'importer/upload/1-2'. It is assumed that the package being imported is 201s always of version '1-2' for all parameter sets. 201s 201s Since the target function requires rich history, the case of there not 201s being rich history does not need to be tested here, as it wouldn't be 201s called in this case. 201s 201s validate_rich_history() is generic for all sourced rich history, not just 201s rich history sourced from an upload tag. But since it is independent of how 201s the rich history commit arrived, it is easiest to use upload tags to test 201s it; this results in coverage for all sources. 201s 201s :param GitUbuntuRepository repo: fixture providing a temporary 201s GitUbuntuRepository instance to use 201s :param repo_builder.Repo input_repo: input repository data 201s :param dict published_spec: the package simulated being imported from the 201s archive, specified as a dict to pass as **kwargs to 201s repo_builder.Commit.from_spec() 201s :param bool expected_result: the expected return value of, or exception 201s raised by, the call to validate_rich_history() 201s """ 201s > input_repo.write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:910: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmp5wrqujlp/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s ----------------------------- Captured stderr call ----------------------------- 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s dpkg-source: warning: missing information for output field Standards-Version 201s ______________________ test_add_changelog_note_to_commit _______________________ 201s 201s repo = 201s 201s def test_add_changelog_note_to_commit(repo): 201s """add_changelog_note_to_commit should add the expected note""" 201s repo_builder.Repo( 201s commits=[ 201s repo_builder.Commit.from_spec(name='1-1'), 201s repo_builder.Commit.from_spec( 201s name='1-2', 201s changelog_versions=['1-1', '1-2'], 201s parents=[Placeholder('1-1')], 201s ), 201s ], 201s tags={'1-1': Placeholder('1-1'), '1-2': Placeholder('1-2')}, 201s > ).write(repo.raw_repo) 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:953: 201s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 201s 201s self = 201s repo = pygit2.Repository('/tmp/tmp6j7heeo7/.git/'), record = {} 201s 201s def write(self, repo, record=None): 201s replace_placeholders(self) 201s record = record or dict() 201s written_commits = [ 201s commit.write(repo=repo, record=record) 201s for commit 201s in self.commit_list 201s ] 201s for name, target in self.branches.items(): 201s repo.create_branch( 201s name, 201s repo.get(target.write(repo)).peel(pygit2.Commit), 201s ) 201s for name, target in self.tags.items(): 201s repo.create_tag( 201s name, 201s target.write(repo), 201s > pygit2.GIT_OBJ_COMMIT, 201s self.tagger.signature, 201s 'Tag message', 201s ) 201s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 201s 201s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 201s ----------------------------- Captured stdout call ----------------------------- 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 201s dpkg-source: info: using source format '3.0 (quilt)' 201s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 201s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s ____________________ test_add_changelog_note_to_commit_utf8 ____________________ 202s 202s repo = 202s 202s def test_add_changelog_note_to_commit_utf8(repo): 202s """A changelog file with non-UTF8 should have such characters substituted 202s 202s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 202s temporary output repository 202s """ 202s test_utf8_error_changelog_path = os.path.join( 202s pkg_resources.resource_filename('gitubuntu', 'changelog_tests'), 202s 'test_utf8_error', 202s ) 202s with open(test_utf8_error_changelog_path, 'rb') as f: 202s utf8_changelog_blob = f.read() 202s 202s # We only need an example child commit with a debian/changelog file since 202s # this is the only file accessed by add_changelog_note_to_commit(). 202s # Further, the parent need only exist and can be empty. 202s repo_builder.Repo( 202s commits=[ 202s repo_builder.Commit(name='parent'), 202s repo_builder.Commit( 202s tree=repo_builder.Tree({'debian': repo_builder.Tree( 202s {'changelog': repo_builder.Blob(utf8_changelog_blob)} 202s )}), 202s name='child', 202s ) 202s ], 202s tags={'parent': Placeholder('parent'), 'child': Placeholder('child')}, 202s > ).write(repo.raw_repo) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:1002: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmp8qk4w3qp/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s _________________ test_double_changelog_note_add_does_not_fail _________________ 202s 202s repo = 202s 202s def test_double_changelog_note_add_does_not_fail(repo): 202s """add_changelog_note_to_commit shouldn't fail if a note already exists""" 202s repo_builder.Repo( 202s commits=[ 202s repo_builder.Commit.from_spec(name='1-1'), 202s repo_builder.Commit.from_spec( 202s name='1-2', 202s changelog_versions=['1-1', '1-2'], 202s parents=[Placeholder('1-1')], 202s ), 202s ], 202s tags={'1-1': Placeholder('1-1'), '1-2': Placeholder('1-2')}, 202s > ).write(repo.raw_repo) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:1035: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmpmrt4c43d/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s ___________________________ test_create_import_note ____________________________ 202s 202s repo = 202s 202s def test_create_import_note(repo): 202s """create_import_note() should create a note in the correct ref""" 202s repo_builder.Repo( 202s commits=[repo_builder.Commit(name='root')], 202s tags={'root': repo_builder.Placeholder('root')}, 202s > ).write(repo.raw_repo) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:1066: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmpfqdv714l/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s ______________________ test_create_import_note_timestamp _______________________ 202s 202s repo = 202s 202s def test_create_import_note_timestamp(repo): 202s """create_import_note() should include the timestamp in the note""" 202s repo_builder.Repo( 202s commits=[repo_builder.Commit(name='root')], 202s tags={'root': repo_builder.Placeholder('root')}, 202s > ).write(repo.raw_repo) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:1082: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmpbeg3597r/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s _______________________ test_import_creates_import_note ________________________ 202s 202s repo = 202s 202s def test_import_creates_import_note(repo): 202s """When an import runs, the note should appear in the correct ref""" 202s with source_builder.Source() as dsc_pathname: 202s > target.import_unapplied_dsc( 202s repo=repo, 202s version='1-1', 202s namespace='importer', 202s dist='ubuntu', 202s dsc_pathname=dsc_pathname, 202s head_name='ubuntu/focal', 202s skip_orig=True, 202s parent_overrides={}, 202s ) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:1102: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 202s commit, tag = find_or_create_unapplied_commit( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 202s changelog_parents = get_unapplied_import_parents( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 202s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 202s changelog = self.get_changelog_from_treeish(treeish) 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 202s return Changelog.from_treeish( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:569: in from_treeish 202s blob = follow_symlinks_to_blob( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 202s return _follow_symlinks_to_blob( 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s repo = pygit2.Repository('/tmp/tmp2curgidu/.git/') 202s top_tree_object = 202s search_path = 'debian/changelog' 202s _rel_tree = 202s _rel_path = '' 202s 202s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 202s _rel_tree=None, _rel_path='' 202s ): 202s '''Recursively follow a path down a tree, following symlinks, to find blob 202s 202s repo: pygit2.Repository object 202s top_tree: pygit2.Tree object of the top of the tree structure 202s search_path: '/'-separated path string of blob to find 202s _rel_tree: (internal) which tree to look further into 202s _rel_path: (internal) the path we are in so far 202s ''' 202s 202s NORMAL_BLOB_MODES = set([ 202s pygit2.GIT_FILEMODE_BLOB, 202s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 202s ]) 202s 202s _rel_tree = _rel_tree or top_tree_object 202s head, tail = posixpath.split(search_path) 202s 202s # A traditional functional split would put a single entry in head with tail 202s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 202s # to make it appear to have traditional semantics. 202s if not head: 202s head = tail 202s tail = None 202s 202s entry = _rel_tree[head] 202s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s ___________________ test_import_unapplied_spi_quilt_patches ____________________ 202s 202s get_import_commit_msg_mock = 202s get_import_tag_msg_mock = 202s repo = 202s 202s @patch('gitubuntu.importer.get_import_tag_msg') 202s @patch('gitubuntu.importer.get_import_commit_msg') 202s def test_import_unapplied_spi_quilt_patches( 202s get_import_commit_msg_mock, 202s get_import_tag_msg_mock, 202s repo, 202s ): 202s """Test that a package with quilt patches is imported with correct 202s unapplied refs 202s 202s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 202s that determines the commit message to use for a given import 202s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 202s that determines the tag message to use for a given import 202s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 202s temporary output repository 202s """ 202s # Match the repo_builder objects 202s get_import_tag_msg_mock.return_value = 'Test tag' 202s get_import_commit_msg_mock.return_value = b'Test commit' 202s 202s publish_spec = source_builder.SourceSpec(has_patches=True) 202s 202s input_repo = repo_builder.Repo() 202s input_repo.write(repo.raw_repo) 202s expected_result = repo_builder.Repo( 202s commits=[ 202s repo_builder.Commit( 202s tree=repo_builder.SourceTree( 202s source_builder.Source(publish_spec) 202s ), 202s name='publish' 202s ), 202s ], 202s tags={'importer/import/1-1': Placeholder('publish')}, 202s branches={'importer/ubuntu/trusty': Placeholder('publish')}, 202s ) 202s 202s with source_builder.Source(publish_spec) as dsc_path: 202s # import_unapplied_spi currently assumes it is called from the 202s # repository directory (pristine-tar and other commands rely on 202s # this) 202s > target.import_unapplied_spi( 202s repo=repo, 202s spi=MockSPI(dsc_path, publish_spec.version), 202s namespace='importer', 202s skip_orig=False, 202s parent_overrides={}, 202s ) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:1222: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:2308: in import_unapplied_spi 202s import_unapplied_dsc( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 202s commit, tag = find_or_create_unapplied_commit( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 202s changelog_parents = get_unapplied_import_parents( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 202s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 202s changelog = self.get_changelog_from_treeish(treeish) 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 202s return Changelog.from_treeish( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:569: in from_treeish 202s blob = follow_symlinks_to_blob( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 202s return _follow_symlinks_to_blob( 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s repo = pygit2.Repository('/tmp/tmp69avj_y4/.git/') 202s top_tree_object = 202s search_path = 'debian/changelog' 202s _rel_tree = 202s _rel_path = '' 202s 202s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 202s _rel_tree=None, _rel_path='' 202s ): 202s '''Recursively follow a path down a tree, following symlinks, to find blob 202s 202s repo: pygit2.Repository object 202s top_tree: pygit2.Tree object of the top of the tree structure 202s search_path: '/'-separated path string of blob to find 202s _rel_tree: (internal) which tree to look further into 202s _rel_path: (internal) the path we are in so far 202s ''' 202s 202s NORMAL_BLOB_MODES = set([ 202s pygit2.GIT_FILEMODE_BLOB, 202s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 202s ]) 202s 202s _rel_tree = _rel_tree or top_tree_object 202s head, tail = posixpath.split(search_path) 202s 202s # A traditional functional split would put a single entry in head with tail 202s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 202s # to make it appear to have traditional semantics. 202s if not head: 202s head = tail 202s tail = None 202s 202s entry = _rel_tree[head] 202s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: using patch list from debian/patches/series 202s dpkg-source: info: applying a 202s dpkg-source: info: applying b 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: using patch list from debian/patches/series 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s _ test_import_unapplied_spi_parenting[input_repo0-changelog_versions0-validation_repo_delta0-validation_repo_expected_identical_refs0] _ 202s 202s get_import_commit_msg_mock = 202s get_import_tag_msg_mock = 202s repo = 202s input_repo = 202s changelog_versions = ['1-1'] 202s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-1': }} 202s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1'] 202s 202s @pytest.mark.parametrize( 202s [ 202s 'input_repo', 202s 'changelog_versions', 202s 'validation_repo_delta', 202s 'validation_repo_expected_identical_refs', 202s ], 202s [ 202s pytest.param( 202s repo_builder.Repo(), 202s ['1-1'], 202s { 202s 'add_commits': [ 202s repo_builder.Commit.from_spec(name='publish'), 202s ], 202s 'update_tags': {'importer/import/1-1': Placeholder('publish')}, 202s }, 202s [ 202s 'refs/tags/importer/import/1-1', 202s ] 202s ), 202s pytest.param( 202s repo_builder.Repo( 202s commits=[repo_builder.Commit.from_spec(name='import')], 202s tags={'importer/import/1-1': Placeholder('import')}, 202s ), 202s ['1-2', '1-1'], 202s { 202s 'add_commits': [ 202s repo_builder.Commit.from_spec( 202s name='publish', 202s parents=[Placeholder('import')], 202s changelog_versions=['1-2', '1-1'], 202s ), 202s ], 202s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 202s }, 202s [ 202s 'refs/tags/importer/import/1-1', 202s 'refs/tags/importer/import/1-2', 202s ], 202s ), 202s pytest.param( 202s repo_builder.Repo( 202s commits=[repo_builder.Commit.from_spec(name='import')], 202s tags={'importer/import/1-1': Placeholder('import')}, 202s ), 202s ['1-3', '1-2', '1-1'], 202s { 202s 'add_commits': [ 202s repo_builder.Commit.from_spec( 202s parents=[Placeholder('import')], 202s name='publish', 202s changelog_versions=['1-3', '1-2', '1-1'], 202s ), 202s ], 202s 'update_tags': {'importer/import/1-3': Placeholder('publish')}, 202s }, 202s [ 202s 'refs/tags/importer/import/1-1', 202s 'refs/tags/importer/import/1-3', 202s ], 202s ), 202s ( 202s repo_builder.Repo( 202s commits=[ 202s repo_builder.Commit.from_spec(name='import'), 202s repo_builder.Commit.from_spec( 202s name='reimport', 202s mutate='Reimport tag contents', 202s ), 202s ], 202s tags={ 202s 'importer/import/1-1': Placeholder('import'), 202s 'importer/reimport/import/1-1/0': Placeholder('import'), 202s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 202s }, 202s ), 202s ['1-2', '1-1'], 202s { 202s 'add_commits': [ 202s repo_builder.Commit.from_spec( 202s parents=[ 202s Placeholder('import'), 202s Placeholder('reimport'), 202s ], 202s name='publish', 202s changelog_versions=['1-2', '1-1'], 202s ), 202s ], 202s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 202s }, 202s [ 202s 'refs/tags/importer/import/1-1', 202s 'refs/tags/importer/reimport/import/1-1/0', 202s 'refs/tags/importer/reimport/import/1-1/1', 202s 'refs/tags/importer/import/1-2', 202s ], 202s ), 202s ] 202s ) 202s @patch('gitubuntu.importer.get_import_tag_msg') 202s @patch('gitubuntu.importer.get_import_commit_msg') 202s def test_import_unapplied_spi_parenting( 202s get_import_commit_msg_mock, 202s get_import_tag_msg_mock, 202s repo, 202s input_repo, 202s changelog_versions, 202s validation_repo_delta, 202s validation_repo_expected_identical_refs, 202s ): 202s """Test that unapplied import commits have the correct parents 202s 202s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 202s that determines the commit message to use for a given import 202s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 202s that determines the tag message to use for a given import 202s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 202s temporary output repository 202s :param repo_builder.Repo input_repo: input repository data 202s :param list(str) changelog_versions: the versions in the changelog of a 202s fake package to test import 202s :param dict validation_repo_delta: how to transform the input 202s repository into a "validation repository", expressed as a dict to 202s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 202s input repository. The validation repository is then used for the 202s purposes of comparison against the output repository. 202s :param list(str) validation_repo_expected_identical_refs: refs that must be 202s identical between the validation repository and the output repository 202s 202s Verify that if an import of a package is made into input_repo where the 202s package being imported has the given changelog_versions, then the output 202s repository has commits with the parents we expect. This is tested by 202s comparing specific output references against the validation repository. 202s """ 202s 202s # Match the repo_builder objects 202s get_import_tag_msg_mock.return_value = 'Test tag' 202s get_import_commit_msg_mock.return_value = b'Test commit' 202s 202s input_repo.write(repo.raw_repo) 202s 202s publish_spec = source_builder.SourceSpec( 202s changelog_versions=changelog_versions, 202s ) 202s 202s with source_builder.Source(publish_spec) as dsc_path: 202s # import_unapplied_spi currently assumes it is called from the 202s # repository directory (pristine-tar and other commands rely on 202s # this) 202s > target.import_unapplied_spi( 202s repo=repo, 202s spi=MockSPI(dsc_path, publish_spec.version), 202s namespace='importer', 202s skip_orig=False, 202s parent_overrides={}, 202s ) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:1391: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:2308: in import_unapplied_spi 202s import_unapplied_dsc( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 202s commit, tag = find_or_create_unapplied_commit( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 202s changelog_parents = get_unapplied_import_parents( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 202s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 202s changelog = self.get_changelog_from_treeish(treeish) 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 202s return Changelog.from_treeish( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:569: in from_treeish 202s blob = follow_symlinks_to_blob( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 202s return _follow_symlinks_to_blob( 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s repo = pygit2.Repository('/tmp/tmpan9q4vnl/.git/') 202s top_tree_object = 202s search_path = 'debian/changelog' 202s _rel_tree = 202s _rel_path = '' 202s 202s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 202s _rel_tree=None, _rel_path='' 202s ): 202s '''Recursively follow a path down a tree, following symlinks, to find blob 202s 202s repo: pygit2.Repository object 202s top_tree: pygit2.Tree object of the top of the tree structure 202s search_path: '/'-separated path string of blob to find 202s _rel_tree: (internal) which tree to look further into 202s _rel_path: (internal) the path we are in so far 202s ''' 202s 202s NORMAL_BLOB_MODES = set([ 202s pygit2.GIT_FILEMODE_BLOB, 202s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 202s ]) 202s 202s _rel_tree = _rel_tree or top_tree_object 202s head, tail = posixpath.split(search_path) 202s 202s # A traditional functional split would put a single entry in head with tail 202s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 202s # to make it appear to have traditional semantics. 202s if not head: 202s head = tail 202s tail = None 202s 202s entry = _rel_tree[head] 202s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s _ test_import_unapplied_spi_parenting[input_repo1-changelog_versions1-validation_repo_delta1-validation_repo_expected_identical_refs1] _ 202s 202s get_import_commit_msg_mock = 202s get_import_tag_msg_mock = 202s repo = 202s input_repo = 202s changelog_versions = ['1-2', '1-1'] 202s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-2': }} 202s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-2'] 202s 202s @pytest.mark.parametrize( 202s [ 202s 'input_repo', 202s 'changelog_versions', 202s 'validation_repo_delta', 202s 'validation_repo_expected_identical_refs', 202s ], 202s [ 202s pytest.param( 202s repo_builder.Repo(), 202s ['1-1'], 202s { 202s 'add_commits': [ 202s repo_builder.Commit.from_spec(name='publish'), 202s ], 202s 'update_tags': {'importer/import/1-1': Placeholder('publish')}, 202s }, 202s [ 202s 'refs/tags/importer/import/1-1', 202s ] 202s ), 202s pytest.param( 202s repo_builder.Repo( 202s commits=[repo_builder.Commit.from_spec(name='import')], 202s tags={'importer/import/1-1': Placeholder('import')}, 202s ), 202s ['1-2', '1-1'], 202s { 202s 'add_commits': [ 202s repo_builder.Commit.from_spec( 202s name='publish', 202s parents=[Placeholder('import')], 202s changelog_versions=['1-2', '1-1'], 202s ), 202s ], 202s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 202s }, 202s [ 202s 'refs/tags/importer/import/1-1', 202s 'refs/tags/importer/import/1-2', 202s ], 202s ), 202s pytest.param( 202s repo_builder.Repo( 202s commits=[repo_builder.Commit.from_spec(name='import')], 202s tags={'importer/import/1-1': Placeholder('import')}, 202s ), 202s ['1-3', '1-2', '1-1'], 202s { 202s 'add_commits': [ 202s repo_builder.Commit.from_spec( 202s parents=[Placeholder('import')], 202s name='publish', 202s changelog_versions=['1-3', '1-2', '1-1'], 202s ), 202s ], 202s 'update_tags': {'importer/import/1-3': Placeholder('publish')}, 202s }, 202s [ 202s 'refs/tags/importer/import/1-1', 202s 'refs/tags/importer/import/1-3', 202s ], 202s ), 202s ( 202s repo_builder.Repo( 202s commits=[ 202s repo_builder.Commit.from_spec(name='import'), 202s repo_builder.Commit.from_spec( 202s name='reimport', 202s mutate='Reimport tag contents', 202s ), 202s ], 202s tags={ 202s 'importer/import/1-1': Placeholder('import'), 202s 'importer/reimport/import/1-1/0': Placeholder('import'), 202s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 202s }, 202s ), 202s ['1-2', '1-1'], 202s { 202s 'add_commits': [ 202s repo_builder.Commit.from_spec( 202s parents=[ 202s Placeholder('import'), 202s Placeholder('reimport'), 202s ], 202s name='publish', 202s changelog_versions=['1-2', '1-1'], 202s ), 202s ], 202s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 202s }, 202s [ 202s 'refs/tags/importer/import/1-1', 202s 'refs/tags/importer/reimport/import/1-1/0', 202s 'refs/tags/importer/reimport/import/1-1/1', 202s 'refs/tags/importer/import/1-2', 202s ], 202s ), 202s ] 202s ) 202s @patch('gitubuntu.importer.get_import_tag_msg') 202s @patch('gitubuntu.importer.get_import_commit_msg') 202s def test_import_unapplied_spi_parenting( 202s get_import_commit_msg_mock, 202s get_import_tag_msg_mock, 202s repo, 202s input_repo, 202s changelog_versions, 202s validation_repo_delta, 202s validation_repo_expected_identical_refs, 202s ): 202s """Test that unapplied import commits have the correct parents 202s 202s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 202s that determines the commit message to use for a given import 202s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 202s that determines the tag message to use for a given import 202s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 202s temporary output repository 202s :param repo_builder.Repo input_repo: input repository data 202s :param list(str) changelog_versions: the versions in the changelog of a 202s fake package to test import 202s :param dict validation_repo_delta: how to transform the input 202s repository into a "validation repository", expressed as a dict to 202s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 202s input repository. The validation repository is then used for the 202s purposes of comparison against the output repository. 202s :param list(str) validation_repo_expected_identical_refs: refs that must be 202s identical between the validation repository and the output repository 202s 202s Verify that if an import of a package is made into input_repo where the 202s package being imported has the given changelog_versions, then the output 202s repository has commits with the parents we expect. This is tested by 202s comparing specific output references against the validation repository. 202s """ 202s 202s # Match the repo_builder objects 202s get_import_tag_msg_mock.return_value = 'Test tag' 202s get_import_commit_msg_mock.return_value = b'Test commit' 202s 202s > input_repo.write(repo.raw_repo) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:1381: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmpgq6z0o3s/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s _ test_import_unapplied_spi_parenting[input_repo2-changelog_versions2-validation_repo_delta2-validation_repo_expected_identical_refs2] _ 202s 202s get_import_commit_msg_mock = 202s get_import_tag_msg_mock = 202s repo = 202s input_repo = 202s changelog_versions = ['1-3', '1-2', '1-1'] 202s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-3': }} 202s validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-3'] 202s 202s @pytest.mark.parametrize( 202s [ 202s 'input_repo', 202s 'changelog_versions', 202s 'validation_repo_delta', 202s 'validation_repo_expected_identical_refs', 202s ], 202s [ 202s pytest.param( 202s repo_builder.Repo(), 202s ['1-1'], 202s { 202s 'add_commits': [ 202s repo_builder.Commit.from_spec(name='publish'), 202s ], 202s 'update_tags': {'importer/import/1-1': Placeholder('publish')}, 202s }, 202s [ 202s 'refs/tags/importer/import/1-1', 202s ] 202s ), 202s pytest.param( 202s repo_builder.Repo( 202s commits=[repo_builder.Commit.from_spec(name='import')], 202s tags={'importer/import/1-1': Placeholder('import')}, 202s ), 202s ['1-2', '1-1'], 202s { 202s 'add_commits': [ 202s repo_builder.Commit.from_spec( 202s name='publish', 202s parents=[Placeholder('import')], 202s changelog_versions=['1-2', '1-1'], 202s ), 202s ], 202s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 202s }, 202s [ 202s 'refs/tags/importer/import/1-1', 202s 'refs/tags/importer/import/1-2', 202s ], 202s ), 202s pytest.param( 202s repo_builder.Repo( 202s commits=[repo_builder.Commit.from_spec(name='import')], 202s tags={'importer/import/1-1': Placeholder('import')}, 202s ), 202s ['1-3', '1-2', '1-1'], 202s { 202s 'add_commits': [ 202s repo_builder.Commit.from_spec( 202s parents=[Placeholder('import')], 202s name='publish', 202s changelog_versions=['1-3', '1-2', '1-1'], 202s ), 202s ], 202s 'update_tags': {'importer/import/1-3': Placeholder('publish')}, 202s }, 202s [ 202s 'refs/tags/importer/import/1-1', 202s 'refs/tags/importer/import/1-3', 202s ], 202s ), 202s ( 202s repo_builder.Repo( 202s commits=[ 202s repo_builder.Commit.from_spec(name='import'), 202s repo_builder.Commit.from_spec( 202s name='reimport', 202s mutate='Reimport tag contents', 202s ), 202s ], 202s tags={ 202s 'importer/import/1-1': Placeholder('import'), 202s 'importer/reimport/import/1-1/0': Placeholder('import'), 202s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 202s }, 202s ), 202s ['1-2', '1-1'], 202s { 202s 'add_commits': [ 202s repo_builder.Commit.from_spec( 202s parents=[ 202s Placeholder('import'), 202s Placeholder('reimport'), 202s ], 202s name='publish', 202s changelog_versions=['1-2', '1-1'], 202s ), 202s ], 202s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 202s }, 202s [ 202s 'refs/tags/importer/import/1-1', 202s 'refs/tags/importer/reimport/import/1-1/0', 202s 'refs/tags/importer/reimport/import/1-1/1', 202s 'refs/tags/importer/import/1-2', 202s ], 202s ), 202s ] 202s ) 202s @patch('gitubuntu.importer.get_import_tag_msg') 202s @patch('gitubuntu.importer.get_import_commit_msg') 202s def test_import_unapplied_spi_parenting( 202s get_import_commit_msg_mock, 202s get_import_tag_msg_mock, 202s repo, 202s input_repo, 202s changelog_versions, 202s validation_repo_delta, 202s validation_repo_expected_identical_refs, 202s ): 202s """Test that unapplied import commits have the correct parents 202s 202s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 202s that determines the commit message to use for a given import 202s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 202s that determines the tag message to use for a given import 202s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 202s temporary output repository 202s :param repo_builder.Repo input_repo: input repository data 202s :param list(str) changelog_versions: the versions in the changelog of a 202s fake package to test import 202s :param dict validation_repo_delta: how to transform the input 202s repository into a "validation repository", expressed as a dict to 202s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 202s input repository. The validation repository is then used for the 202s purposes of comparison against the output repository. 202s :param list(str) validation_repo_expected_identical_refs: refs that must be 202s identical between the validation repository and the output repository 202s 202s Verify that if an import of a package is made into input_repo where the 202s package being imported has the given changelog_versions, then the output 202s repository has commits with the parents we expect. This is tested by 202s comparing specific output references against the validation repository. 202s """ 202s 202s # Match the repo_builder objects 202s get_import_tag_msg_mock.return_value = 'Test tag' 202s get_import_commit_msg_mock.return_value = b'Test commit' 202s 202s > input_repo.write(repo.raw_repo) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:1381: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmpfv91kdhf/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s _ test_import_unapplied_spi_parenting[input_repo3-changelog_versions3-validation_repo_delta3-validation_repo_expected_identical_refs3] _ 202s 202s get_import_commit_msg_mock = 202s get_import_tag_msg_mock = 202s repo = 202s input_repo = 202s changelog_versions = ['1-2', '1-1'] 202s validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-2': }} 202s 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'] 202s 202s @pytest.mark.parametrize( 202s [ 202s 'input_repo', 202s 'changelog_versions', 202s 'validation_repo_delta', 202s 'validation_repo_expected_identical_refs', 202s ], 202s [ 202s pytest.param( 202s repo_builder.Repo(), 202s ['1-1'], 202s { 202s 'add_commits': [ 202s repo_builder.Commit.from_spec(name='publish'), 202s ], 202s 'update_tags': {'importer/import/1-1': Placeholder('publish')}, 202s }, 202s [ 202s 'refs/tags/importer/import/1-1', 202s ] 202s ), 202s pytest.param( 202s repo_builder.Repo( 202s commits=[repo_builder.Commit.from_spec(name='import')], 202s tags={'importer/import/1-1': Placeholder('import')}, 202s ), 202s ['1-2', '1-1'], 202s { 202s 'add_commits': [ 202s repo_builder.Commit.from_spec( 202s name='publish', 202s parents=[Placeholder('import')], 202s changelog_versions=['1-2', '1-1'], 202s ), 202s ], 202s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 202s }, 202s [ 202s 'refs/tags/importer/import/1-1', 202s 'refs/tags/importer/import/1-2', 202s ], 202s ), 202s pytest.param( 202s repo_builder.Repo( 202s commits=[repo_builder.Commit.from_spec(name='import')], 202s tags={'importer/import/1-1': Placeholder('import')}, 202s ), 202s ['1-3', '1-2', '1-1'], 202s { 202s 'add_commits': [ 202s repo_builder.Commit.from_spec( 202s parents=[Placeholder('import')], 202s name='publish', 202s changelog_versions=['1-3', '1-2', '1-1'], 202s ), 202s ], 202s 'update_tags': {'importer/import/1-3': Placeholder('publish')}, 202s }, 202s [ 202s 'refs/tags/importer/import/1-1', 202s 'refs/tags/importer/import/1-3', 202s ], 202s ), 202s ( 202s repo_builder.Repo( 202s commits=[ 202s repo_builder.Commit.from_spec(name='import'), 202s repo_builder.Commit.from_spec( 202s name='reimport', 202s mutate='Reimport tag contents', 202s ), 202s ], 202s tags={ 202s 'importer/import/1-1': Placeholder('import'), 202s 'importer/reimport/import/1-1/0': Placeholder('import'), 202s 'importer/reimport/import/1-1/1': Placeholder('reimport'), 202s }, 202s ), 202s ['1-2', '1-1'], 202s { 202s 'add_commits': [ 202s repo_builder.Commit.from_spec( 202s parents=[ 202s Placeholder('import'), 202s Placeholder('reimport'), 202s ], 202s name='publish', 202s changelog_versions=['1-2', '1-1'], 202s ), 202s ], 202s 'update_tags': {'importer/import/1-2': Placeholder('publish')}, 202s }, 202s [ 202s 'refs/tags/importer/import/1-1', 202s 'refs/tags/importer/reimport/import/1-1/0', 202s 'refs/tags/importer/reimport/import/1-1/1', 202s 'refs/tags/importer/import/1-2', 202s ], 202s ), 202s ] 202s ) 202s @patch('gitubuntu.importer.get_import_tag_msg') 202s @patch('gitubuntu.importer.get_import_commit_msg') 202s def test_import_unapplied_spi_parenting( 202s get_import_commit_msg_mock, 202s get_import_tag_msg_mock, 202s repo, 202s input_repo, 202s changelog_versions, 202s validation_repo_delta, 202s validation_repo_expected_identical_refs, 202s ): 202s """Test that unapplied import commits have the correct parents 202s 202s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 202s that determines the commit message to use for a given import 202s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 202s that determines the tag message to use for a given import 202s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 202s temporary output repository 202s :param repo_builder.Repo input_repo: input repository data 202s :param list(str) changelog_versions: the versions in the changelog of a 202s fake package to test import 202s :param dict validation_repo_delta: how to transform the input 202s repository into a "validation repository", expressed as a dict to 202s provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the 202s input repository. The validation repository is then used for the 202s purposes of comparison against the output repository. 202s :param list(str) validation_repo_expected_identical_refs: refs that must be 202s identical between the validation repository and the output repository 202s 202s Verify that if an import of a package is made into input_repo where the 202s package being imported has the given changelog_versions, then the output 202s repository has commits with the parents we expect. This is tested by 202s comparing specific output references against the validation repository. 202s """ 202s 202s # Match the repo_builder objects 202s get_import_tag_msg_mock.return_value = 'Test tag' 202s get_import_commit_msg_mock.return_value = b'Test commit' 202s 202s > input_repo.write(repo.raw_repo) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:1381: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmplhnywuid/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s __________________ test_import_unapplied_spi_parent_override ___________________ 202s 202s get_import_commit_msg_mock = 202s get_import_tag_msg_mock = 202s repo = 202s 202s @patch('gitubuntu.importer.get_import_tag_msg') 202s @patch('gitubuntu.importer.get_import_commit_msg') 202s def test_import_unapplied_spi_parent_override( 202s get_import_commit_msg_mock, 202s get_import_tag_msg_mock, 202s repo, 202s ): 202s """Test import_unapplied_spi() parent_override functionality 202s 202s Test that if parent_overrides is used in the import_unapplied_spi call then 202s the resulting commit correctly uses the overridden parents specified. 202s 202s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 202s that determines the commit message to use for a given import 202s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 202s that determines the tag message to use for a given import 202s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 202s temporary output repository 202s :param repo_builder.Repo input_repo: input repository data 202s """ 202s # Match the repo_builder objects 202s get_import_tag_msg_mock.return_value = 'Test tag' 202s get_import_commit_msg_mock.return_value = b'Test commit' 202s 202s input_repo = repo_builder.Repo( 202s commits=[ 202s repo_builder.Commit.from_spec(name='import1-1', version='1-1'), 202s repo_builder.Commit.from_spec(name='import1-2', version='1-2'), 202s ], 202s tags={ 202s 'importer/import/1-1': Placeholder('import1-1'), 202s 'importer/import/1-2': Placeholder('import1-2'), 202s }, 202s ) 202s > input_repo.write(repo.raw_repo) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:1444: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmp2vv9cle7/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s ______________ test_import_unapplied_spi_parent_override_failure _______________ 202s 202s repo = 202s 202s def test_import_unapplied_spi_parent_override_failure(repo): 202s """ 202s Test override_parents ParentOverrideError raise 202s 202s When a parent override is specified but the specified version doesn't have 202s an import tag, an exception should be raised. 202s 202s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 202s temporary output repository 202s """ 202s repo_builder.Repo( 202s commits=[repo_builder.Commit.from_spec(name='import1-1')], 202s tags={'importer/import/1-1': Placeholder('import1-1')}, 202s > ).write(repo.raw_repo) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:1499: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmppwqqsw23/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s _ test_import_applied_spi_parenting[input_repo0-expected_ancestor_commits0-expected_parent_commits0] _ 202s 202s get_import_commit_msg_mock = 202s get_import_tag_msg_mock = 202s repo = 202s input_repo = 202s expected_ancestor_commits = ['refs/tags/importer/import/1-2'] 202s expected_parent_commits = ['refs/tags/importer/applied/1-1'] 202s 202s @pytest.mark.parametrize( 202s 'input_repo, expected_ancestor_commits, expected_parent_commits', [ 202s # In general, these tests do not set applied commit parents in the 202s # input repository since we have no mechanism to do that correctly, but 202s # this doesn't matter for the purposes of these tests. 202s 202s # if only one import tag exists, then it is the parent 202s pytest.param( 202s repo_builder.Repo( 202s commits=[ 202s repo_builder.Commit.from_spec( 202s name='unapplied1', 202s has_patches=True, 202s ), 202s repo_builder.Commit.from_spec( 202s parents=[Placeholder('unapplied1')], 202s name='unapplied2', 202s changelog_versions=['1-2', '1-1'], 202s has_patches=True, 202s ), 202s repo_builder.Commit.from_spec( 202s name='applied1', 202s patches_applied=True, 202s ), 202s ], 202s # no branches: technically not possible but branches are not 202s # relevant to the test 202s branches={}, 202s tags={ 202s 'importer/import/1-1': Placeholder('unapplied1'), 202s 'importer/import/1-2': Placeholder('unapplied2'), 202s 'importer/applied/1-1': Placeholder('applied1'), 202s }, 202s ), 202s ['refs/tags/importer/import/1-2'], 202s ['refs/tags/importer/applied/1-1'], 202s ), 202s 202s # if multiple import tags exist, then do they all end up as parents? 202s pytest.param( 202s repo_builder.Repo( 202s commits=[ 202s repo_builder.Commit.from_spec( 202s name='unapplied1', 202s has_patches=True, 202s ), 202s repo_builder.Commit.from_spec( 202s parents=[Placeholder('unapplied1')], 202s name='unapplied2', 202s changelog_versions=['1-2', '1-1'], 202s has_patches=True, 202s ), 202s repo_builder.Commit.from_spec( 202s parents=[Placeholder('unapplied1')], 202s name='unapplied2reimport', 202s changelog_versions=['1-2', '1-1'], 202s has_patches=True, 202s mutate='reimport tag', 202s ), 202s repo_builder.Commit.from_spec( 202s name='applied1', 202s patches_applied=True, 202s ), 202s ], 202s # no branches: technically not possible but branches are not 202s # relevant to the test 202s branches={}, 202s tags={ 202s 'importer/import/1-1': 202s Placeholder('unapplied1'), 202s 'importer/import/1-2': 202s Placeholder('unapplied2'), 202s 'importer/reimport/import/1-2/0': 202s Placeholder('unapplied2'), 202s 'importer/reimport/import/1-2/1': 202s Placeholder('unapplied2reimport'), 202s 'importer/applied/1-1': 202s Placeholder('applied1'), 202s }, 202s ), 202s [ 202s 'refs/tags/importer/reimport/import/1-2/0', 202s 'refs/tags/importer/reimport/import/1-2/1', 202s ], 202s [ 202s 'refs/tags/importer/applied/1-1', 202s ], 202s marks=pytest.mark.xfail(reason='LP: #1755247'), 202s ), 202s 202s # do we correctly create a reimport tag because a different import 202s # already exists? 202s pytest.param( 202s repo_builder.Repo( 202s commits=[ 202s repo_builder.Commit.from_spec( 202s name='unapplied1', 202s has_patches=True, 202s ), 202s repo_builder.Commit.from_spec( 202s name='unapplied1_reimport', 202s has_patches=True, 202s mutate='reimport contents', 202s ), 202s repo_builder.Commit.from_spec( 202s parents=[Placeholder('unapplied1')], 202s name='unapplied2', 202s changelog_versions=['1-2', '1-1'], 202s has_patches=True, 202s ), 202s repo_builder.Commit.from_spec( 202s name='applied1', 202s patches_applied=True, 202s ), 202s repo_builder.Commit.from_spec( 202s name='applied1_reimport', 202s patches_applied=True, 202s mutate='reimport contents', 202s ), 202s ], 202s # no branches: technically not possible but branches are not 202s # relevant to the test 202s branches={}, 202s tags={ 202s 'importer/import/1-1': 202s Placeholder('unapplied1'), 202s 'importer/reimport/import/1-1/0': 202s Placeholder('unapplied1'), 202s 'importer/reimport/import/1-1/1': 202s Placeholder('unapplied1_reimport'), 202s 'importer/import/1-2': 202s Placeholder('unapplied2'), 202s 'importer/applied/1-1': 202s Placeholder('applied1'), 202s 'importer/reimport/applied/1-1/0': 202s Placeholder('applied1'), 202s 'importer/reimport/applied/1-1/1': 202s Placeholder('applied1_reimport'), 202s }, 202s ), 202s [ 202s 'refs/tags/importer/reimport/import/1-2/0', 202s 'refs/tags/importer/reimport/import/1-2/1', 202s ], 202s [ 202s 'refs/tags/importer/reimport/applied/1-1/0', 202s 'refs/tags/importer/reimport/applied/1-1/1', 202s ], 202s marks=pytest.mark.xfail(reason='LP: #1755247'), 202s ), 202s ], 202s ) 202s @patch('gitubuntu.importer.get_import_tag_msg') 202s @patch('gitubuntu.importer.get_import_commit_msg') 202s def test_import_applied_spi_parenting( 202s get_import_commit_msg_mock, 202s get_import_tag_msg_mock, 202s repo, 202s input_repo, 202s expected_ancestor_commits, 202s expected_parent_commits, 202s ): 202s """Test that applied import commits have the right parents 202s 202s :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function 202s that determines the commit message to use for a given import 202s :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function 202s that determines the tag message to use for a given import 202s :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a 202s temporary output repository 202s :param repo_builder.Repo input_repo: input repository data 202s :param list(str) expected_ancestor_commits: list of commit-ish strings that 202s must be ancestors of the 'applied/1-2' tag following the applied import 202s :param list(str) expected_parent_commits: list of commit-ish strings that 202s must be parents of the 'applied/1-2' tag following the applied import. 202s 202s A fake package with version '1-2' that has a changelog parent of '1-1' is 202s imported on top of the provided input_repo. The test fails if any 202s of the expected_ancestor_commits or expected_parent_commits are not 202s present. 202s 202s This test is ugly because we do not yet have a programmatic way 202s to get the interstitial commits of the patch applications. 202s """ 202s # Match the repo_builder objects 202s get_import_tag_msg_mock.return_value = 'Test tag' 202s get_import_commit_msg_mock.return_value = b'Test commit' 202s 202s > input_repo.write(repo.raw_repo) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:1698: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmp91km4ihr/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: using patch list from debian/patches/series 202s dpkg-source: info: applying a 202s dpkg-source: info: applying b 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: using patch list from debian/patches/series 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: using patch list from debian/patches/series 202s dpkg-source: info: applying a 202s dpkg-source: info: applying b 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: using patch list from debian/patches/series 202s dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: using patch list from debian/patches/series 202s dpkg-source: info: applying a 202s dpkg-source: info: applying b 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: using patch list from debian/patches/series 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: using patch list from debian/patches/series 202s dpkg-source: info: applying a 202s dpkg-source: info: applying b 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: using patch list from debian/patches/series 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: using patch list from debian/patches/series 202s dpkg-source: info: applying a 202s dpkg-source: info: applying b 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: using patch list from debian/patches/series 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s _ test_authorship_date[False-Fri, 2 Feb 1971 12:34:56 +0100-expected_result0] __ 202s 202s repo = 202s override = False, input_string = 'Fri, 2 Feb 1971 12:34:56 +0100' 202s expected_result = (1971, 2, 2, 11, 34, 56, ...) 202s 202s @pytest.mark.parametrize(['override', 'input_string', 'expected_result'], [ 202s # Standard date that should parse and be used 202s (False, 'Fri, 2 Feb 1971 12:34:56 +0100', (1971, 2, 2, 11, 34, 56, 60)), 202s # Deliberately illegal date that cannot be parsed 202s (True, 'Failday, 30 Feb 1971 99:99:99 +9999', (1972, 3, 3, 12, 45, 57, 0)), 202s ]) 202s def test_authorship_date(repo, override, input_string, expected_result): 202s """Synthesized commit should use changelog or override when provided 202s 202s A synthesized commit should use the date of the changelog entry in the 202s usual case, or commit_date when an override is requested. 202s 202s :param GitUbuntuRepository repo: fixture providing a temporary 202s GitUbuntuRepository instance to use 202s :param bool override: whether a changelog date override should be requested 202s from import_unapplied_dsc() 202s :param str input_string: the timestamp part of the changelog entry to use 202s :param tuple expected_result: the expected author date of the synthesized 202s commit, specified as six parameters to datetime.datetime() followed by 202s the expected tz offset in minutes. 202s """ 202s spec = source_builder.SourceSpec(changelog_date=input_string) 202s with source_builder.Source(spec) as dsc_pathname: 202s > target.import_unapplied_dsc( 202s repo=repo, 202s version='1-1', 202s namespace='importer', 202s dist='ubuntu', 202s dsc_pathname=dsc_pathname, 202s head_name='ubuntu/focal', 202s skip_orig=True, 202s parent_overrides={}, 202s commit_date=datetime.datetime( 202s 1972, 202s 3, 202s 3, 202s 12, 202s 45, 202s 57, 202s tzinfo=datetime.timezone.utc, 202s ), 202s changelog_date_overrides=( 202s frozenset({'1-1'}) if override else frozenset() 202s ), 202s ) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:1815: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 202s commit, tag = find_or_create_unapplied_commit( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 202s changelog_parents = get_unapplied_import_parents( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 202s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 202s changelog = self.get_changelog_from_treeish(treeish) 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 202s return Changelog.from_treeish( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:569: in from_treeish 202s blob = follow_symlinks_to_blob( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 202s return _follow_symlinks_to_blob( 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s repo = pygit2.Repository('/tmp/tmp92hi3agx/.git/') 202s top_tree_object = 202s search_path = 'debian/changelog' 202s _rel_tree = 202s _rel_path = '' 202s 202s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 202s _rel_tree=None, _rel_path='' 202s ): 202s '''Recursively follow a path down a tree, following symlinks, to find blob 202s 202s repo: pygit2.Repository object 202s top_tree: pygit2.Tree object of the top of the tree structure 202s search_path: '/'-separated path string of blob to find 202s _rel_tree: (internal) which tree to look further into 202s _rel_path: (internal) the path we are in so far 202s ''' 202s 202s NORMAL_BLOB_MODES = set([ 202s pygit2.GIT_FILEMODE_BLOB, 202s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 202s ]) 202s 202s _rel_tree = _rel_tree or top_tree_object 202s head, tail = posixpath.split(search_path) 202s 202s # A traditional functional split would put a single entry in head with tail 202s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 202s # to make it appear to have traditional semantics. 202s if not head: 202s head = tail 202s tail = None 202s 202s entry = _rel_tree[head] 202s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s _ test_authorship_date[True-Failday, 30 Feb 1971 99:99:99 +9999-expected_result1] _ 202s 202s repo = 202s override = True, input_string = 'Failday, 30 Feb 1971 99:99:99 +9999' 202s expected_result = (1972, 3, 3, 12, 45, 57, ...) 202s 202s @pytest.mark.parametrize(['override', 'input_string', 'expected_result'], [ 202s # Standard date that should parse and be used 202s (False, 'Fri, 2 Feb 1971 12:34:56 +0100', (1971, 2, 2, 11, 34, 56, 60)), 202s # Deliberately illegal date that cannot be parsed 202s (True, 'Failday, 30 Feb 1971 99:99:99 +9999', (1972, 3, 3, 12, 45, 57, 0)), 202s ]) 202s def test_authorship_date(repo, override, input_string, expected_result): 202s """Synthesized commit should use changelog or override when provided 202s 202s A synthesized commit should use the date of the changelog entry in the 202s usual case, or commit_date when an override is requested. 202s 202s :param GitUbuntuRepository repo: fixture providing a temporary 202s GitUbuntuRepository instance to use 202s :param bool override: whether a changelog date override should be requested 202s from import_unapplied_dsc() 202s :param str input_string: the timestamp part of the changelog entry to use 202s :param tuple expected_result: the expected author date of the synthesized 202s commit, specified as six parameters to datetime.datetime() followed by 202s the expected tz offset in minutes. 202s """ 202s spec = source_builder.SourceSpec(changelog_date=input_string) 202s with source_builder.Source(spec) as dsc_pathname: 202s > target.import_unapplied_dsc( 202s repo=repo, 202s version='1-1', 202s namespace='importer', 202s dist='ubuntu', 202s dsc_pathname=dsc_pathname, 202s head_name='ubuntu/focal', 202s skip_orig=True, 202s parent_overrides={}, 202s commit_date=datetime.datetime( 202s 1972, 202s 3, 202s 3, 202s 12, 202s 45, 202s 57, 202s tzinfo=datetime.timezone.utc, 202s ), 202s changelog_date_overrides=( 202s frozenset({'1-1'}) if override else frozenset() 202s ), 202s ) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:1815: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:2230: in import_unapplied_dsc 202s commit, tag = find_or_create_unapplied_commit( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:2052: in find_or_create_unapplied_commit 202s changelog_parents = get_unapplied_import_parents( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer.py:1503: in get_unapplied_import_parents 202s import_tree_versions = repo.get_all_changelog_versions_from_treeish( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:2230: in get_all_changelog_versions_from_treeish 202s changelog = self.get_changelog_from_treeish(treeish) 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 202s return Changelog.from_treeish( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:569: in from_treeish 202s blob = follow_symlinks_to_blob( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 202s return _follow_symlinks_to_blob( 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s repo = pygit2.Repository('/tmp/tmpuplupzrv/.git/') 202s top_tree_object = 202s search_path = 'debian/changelog' 202s _rel_tree = 202s _rel_path = '' 202s 202s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 202s _rel_tree=None, _rel_path='' 202s ): 202s '''Recursively follow a path down a tree, following symlinks, to find blob 202s 202s repo: pygit2.Repository object 202s top_tree: pygit2.Tree object of the top of the tree structure 202s search_path: '/'-separated path string of blob to find 202s _rel_tree: (internal) which tree to look further into 202s _rel_path: (internal) the path we are in so far 202s ''' 202s 202s NORMAL_BLOB_MODES = set([ 202s pygit2.GIT_FILEMODE_BLOB, 202s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 202s ]) 202s 202s _rel_tree = _rel_tree or top_tree_object 202s head, tail = posixpath.split(search_path) 202s 202s # A traditional functional split would put a single entry in head with tail 202s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 202s # to make it appear to have traditional semantics. 202s if not head: 202s head = tail 202s tail = None 202s 202s entry = _rel_tree[head] 202s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: srcpkg/debian/changelog(l4): ignoring invalid week day 'Failday' 202s LINE: -- git ubuntu Failday, 30 Feb 1971 99:99:99 +9999 202s dpkg-source: warning: srcpkg/debian/changelog(l4): cannot parse non-conformant date '30 Feb 1971 99:99:99 +9999' 202s LINE: -- git ubuntu Failday, 30 Feb 1971 99:99:99 +9999 202s dpkg-source: warning: missing information for output field Standards-Version 202s __________________ test_fetch_rich_history_from_changes_file ___________________ 202s 202s repo = 202s pygit2_repo = pygit2.Repository('/tmp/tmpnb7elh38/.git/') 202s 202s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 202s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 202s def test_fetch_rich_history_from_changes_file(repo, pygit2_repo): 202s """Rich history specified in a changes file is found and validated""" 202s > rich_commit, parent_commit, import_tree = populate_rich_history( 202s import_repo=repo.raw_repo, 202s uploader_repo=pygit2_repo, 202s ) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:2111: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:2080: in populate_rich_history 202s ).write(import_repo) 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmp6jvev6nf/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s ________ test_fetch_rich_history_from_changes_file_fetch_failure_retry _________ 202s 202s repo = 202s pygit2_repo = pygit2.Repository('/tmp/tmpu328y4q2/.git/') 202s 202s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 202s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 202s def test_fetch_rich_history_from_changes_file_fetch_failure_retry( 202s repo, 202s pygit2_repo, 202s ): 202s """If rich history cannot be fetched once, it is retried""" 202s > rich_commit, parent_commit, import_tree = populate_rich_history( 202s import_repo=repo.raw_repo, 202s uploader_repo=pygit2_repo, 202s ) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:2204: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:2080: in populate_rich_history 202s ).write(import_repo) 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmp5ej3eh0o/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s ____________ test_fetch_rich_history_from_changes_file_missing_ref _____________ 202s 202s repo = 202s pygit2_repo = pygit2.Repository('/tmp/tmptpjhcyhx/.git/') 202s 202s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 202s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 202s def test_fetch_rich_history_from_changes_file_missing_ref( 202s repo, 202s pygit2_repo, 202s ): 202s """If rich history is specified but the ref cannot be found, a hard 202s exception is raised 202s """ 202s > rich_commit, _, _ = populate_rich_history( 202s import_repo=repo.raw_repo, 202s uploader_repo=pygit2_repo, 202s ) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:2243: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:2080: in populate_rich_history 202s ).write(import_repo) 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmp3ywkdfh8/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s ___________ test_fetch_rich_history_from_changes_file_missing_commit ___________ 202s 202s repo = 202s pygit2_repo = pygit2.Repository('/tmp/tmpgcm0f599/.git/') 202s 202s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 202s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 202s def test_fetch_rich_history_from_changes_file_missing_commit( 202s repo, 202s pygit2_repo, 202s ): 202s """If rich history is specified but the commit cannot be found, an 202s exception is raised 202s """ 202s > rich_commit, _, _ = populate_rich_history( 202s import_repo=repo.raw_repo, 202s uploader_repo=pygit2_repo, 202s ) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:2271: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:2080: in populate_rich_history 202s ).write(import_repo) 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmp5paw8brw/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s ____________ test_fetch_rich_history_from_changes_file_not_a_commit ____________ 202s 202s repo = 202s pygit2_repo = pygit2.Repository('/tmp/tmpla6pzjwr/.git/') 202s 202s @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') 202s @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) 202s def test_fetch_rich_history_from_changes_file_not_a_commit(repo, pygit2_repo): 202s """If rich history is specified but the commit hash resolves to something 202s other than a commit, an exception is raised 202s """ 202s > rich_commit, _, _ = populate_rich_history( 202s import_repo=repo.raw_repo, 202s uploader_repo=pygit2_repo, 202s ) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:2297: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/importer_test.py:2080: in populate_rich_history 202s ).write(import_repo) 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmpqfcay4kn/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s __________________________ test_reconstruct_changelog __________________________ 202s 202s pygit2_repo = pygit2.Repository('/tmp/tmp54vm7ur1/.git/') 202s monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x77b02ec2e510> 202s 202s @pytest.mark.skipif( 202s ENTRY_POINT_TYPE is None, 202s reason="Entry point testing not available", 202s ) 202s def test_reconstruct_changelog(pygit2_repo, monkeypatch): 202s '''The reconstruct-changelog endpoint should add the expected commit''' 202s monkeypatch.setenv('DEBFULLNAME', 'Test User') 202s monkeypatch.setenv('DEBEMAIL', 'test@example.com') 202s Repo( 202s commits=[ 202s Commit(tree=SourceTree(Source()), name='root'), 202s Commit( 202s tree=SourceTree(Source(spec=SourceSpec(mutate=1))), 202s message=' * Test changelog entry', 202s name='child', 202s parents=[Placeholder('root')], 202s ), 202s ], 202s tags={'root': Placeholder('root'), 'child': Placeholder('child')}, 202s > ).write(pygit2_repo) 202s 202s gitubuntu/integration_test.py:219: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmp54vm7ur1/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s gitubuntu/repo_builder.py:389: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s dpkg-source: warning: missing information for output field Standards-Version 202s ___________________ TestObjectCreation.testRepoBranchesTags ____________________ 202s 202s self = 202s 202s def testRepoBranchesTags(self): 202s graph = Repo( 202s commits=[ 202s Commit( 202s Tree({}), 202s parents=[Placeholder('parent')], 202s name='child', 202s ), 202s Commit(Tree({}), name='parent'), 202s ], 202s branches={ 202s 'branch1': Placeholder('parent'), 202s 'branch2': Commit(Tree({'foo': Blob(b'qux')})), 202s }, 202s tags={ 202s 'tag1': Placeholder('child'), 202s 'tag2': Commit(Tree({'foo': Blob(b'quz')})), 202s }, 202s ) 202s > child_ref = graph.write(self.repo) 202s 202s gitubuntu/repo_builder_test.py:154: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmpe0gl_qk9/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s gitubuntu/repo_builder.py:389: AttributeError 202s ______________________ TestObjectCreation.testRepoTagger _______________________ 202s 202s self = 202s 202s def testRepoTagger(self): 202s """The tagger parameter should make it through to the tag""" 202s input_repo = Repo( 202s commits=[Commit(name='root')], 202s tags={'root': Placeholder('root')}, 202s tagger=pygit2.Signature( 202s 'Test Tagger', 202s 'test@example.com', 202s 1, 202s 2, 202s ), 202s ) 202s > input_repo.write(self.repo) 202s 202s gitubuntu/repo_builder_test.py:178: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmp4tfnkwea/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s gitubuntu/repo_builder.py:389: AttributeError 202s _______________________________ test_source_tree _______________________________ 202s 202s pygit2_repo = pygit2.Repository('/tmp/tmpbam3u1yw/.git/') 202s 202s def test_source_tree(pygit2_repo): 202s commit_str = Commit(SourceTree(Source())).write(pygit2_repo) 202s commit = pygit2_repo.get(commit_str) 202s > assert gitubuntu.git_repository.follow_symlinks_to_blob( 202s repo=pygit2_repo, 202s treeish_object=commit, 202s path='debian/changelog', 202s ) 202s 202s gitubuntu/repo_builder_test.py:190: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 202s return _follow_symlinks_to_blob( 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s repo = pygit2.Repository('/tmp/tmpbam3u1yw/.git/') 202s top_tree_object = 202s search_path = 'debian/changelog' 202s _rel_tree = 202s _rel_path = '' 202s 202s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 202s _rel_tree=None, _rel_path='' 202s ): 202s '''Recursively follow a path down a tree, following symlinks, to find blob 202s 202s repo: pygit2.Repository object 202s top_tree: pygit2.Tree object of the top of the tree structure 202s search_path: '/'-separated path string of blob to find 202s _rel_tree: (internal) which tree to look further into 202s _rel_path: (internal) the path we are in so far 202s ''' 202s 202s NORMAL_BLOB_MODES = set([ 202s pygit2.GIT_FILEMODE_BLOB, 202s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 202s ]) 202s 202s _rel_tree = _rel_tree or top_tree_object 202s head, tail = posixpath.split(search_path) 202s 202s # A traditional functional split would put a single entry in head with tail 202s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 202s # to make it appear to have traditional semantics. 202s if not head: 202s head = tail 202s tail = None 202s 202s entry = _rel_tree[head] 202s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 202s 202s gitubuntu/git_repository.py:68: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s ______________________________ test_preservation _______________________________ 202s 202s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_preservation0') 202s repo = 202s 202s def test_preservation(tmpdir, repo): 202s """An export followed by an import should preserve rich history 202s 202s Given a minimal repository that should be able to have upload tags be 202s exported, when we import the export result into a similar repository with a 202s subtly different upload tag in which the rich history should still apply, 202s the result should be a correctly reconstructed upload tag. 202s 202s :param py.path tmpdir: the pytest standard tmpdir fixture. 202s :param repo: our standard repo fixture. 202s """ 202s Repo( 202s commits=[ 202s Commit( 202s name='1', 202s tree=Tree({ 202s 'a': Blob(b'a'), 202s }), 202s ), 202s Commit( 202s name='2', 202s parents=[Placeholder('1')], 202s tree=Tree({ 202s 'a': Blob(b'ab'), 202s }), 202s ), 202s Commit( 202s name='3', 202s parents=[Placeholder('2')], 202s tree=Tree({ 202s 'a': Blob(b'abc'), 202s }), 202s ), 202s ], 202s tags={ 202s 'importer/import/1': Placeholder('1'), 202s 'importer/upload/2': Placeholder('3'), 202s } 202s > ).write(repo.raw_repo) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/rich_history_test.py:51: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmpthg4qt5d/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s ______________________ test_preservation_multiple_parents ______________________ 202s 202s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_preservation_multiple_par0') 202s repo = 202s 202s def test_preservation_multiple_parents(tmpdir, repo): 202s """An export of rich history should omit multiple parent cases 202s 202s If an upload tag leads to multiple parents before we reach an import tag, 202s it should be excluded from the export as this type of upload tag is not 202s supported for rich history preservation. This test also serves to verify 202s code paths that handle the MultipleParentError exception in the export 202s code. 202s 202s :param py.path tmpdir: the pytest standard tmpdir fixture. 202s :param repo: our standard repo fixture. 202s """ 202s Repo( 202s commits=[ 202s Commit(name='1', message='a'), 202s Commit(name='2', message='b'), 202s Commit(name='child', parents=[Placeholder('1'), Placeholder('2')]), 202s ], 202s tags={ 202s 'importer/import/1': Placeholder('1'), 202s 'importer/upload/2': Placeholder('child'), 202s } 202s > ).write(repo.raw_repo) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/rich_history_test.py:102: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmpk6jto574/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s _________________________ test_preservation_no_parents _________________________ 202s 202s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_preservation_no_parents0') 202s repo = 202s 202s def test_preservation_no_parents(tmpdir, repo): 202s """An export of rich history should omit no parent cases 202s 202s If an upload tag leads to no parents before we reach an import tag, 202s it should be excluded from the export as this type of upload tag is not 202s supported for rich history preservation. This test also serves to verify 202s code paths that handle the NoParentError exception in the export 202s code. 202s 202s :param py.path tmpdir: the pytest standard tmpdir fixture. 202s :param repo: our standard repo fixture. 202s """ 202s Repo( 202s commits=[ 202s Commit(name='1', message='a'), 202s Commit(name='2', message='b'), 202s ], 202s tags={ 202s 'importer/import/1': Placeholder('1'), 202s 'importer/upload/2': Placeholder('2'), 202s } 202s > ).write(repo.raw_repo) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/rich_history_test.py:129: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmp0dxg76cw/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s _____________ test_input_edge_cases[before_export0-before_import0] _____________ 202s 202s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_input_edge_cases_before_e0') 202s repo = 202s before_export = {'commits': [, , 'importer/upload/2': }} 202s before_import = {'commits': [], 'tags': {'importer/import/1': }} 202s 202s @pytest.mark.parametrize(['before_export', 'before_import'], [ 202s ( 202s # Commit messages with patch-like contents should not fail 202s 202s # If a commit message in rich history contains text in a patch-like 202s # format (such as a diff of some file), it should not prevent correct 202s # round-tripping. "git format-patch" followed by "git am" fails this 202s # test, for example. 202s { 202s 'commits': [ 202s Commit(name='1', message='a', tree=Tree({'a': Blob(b'a')})), 202s Commit( 202s name='2', 202s message='''First line 202s 202s Inline patch that isn't part of the real patch starts here 202s 202s --- a/foo 202s +++ b/foo 202s @@ -1 +1,2 @@ 202s foo 202s +bar 202s ''', 202s tree=Tree({'a': Blob(b'ab')}), 202s parents=[Placeholder('1')], 202s ), 202s ], 202s 'tags': { 202s 'importer/import/1': Placeholder('1'), 202s 'importer/upload/2': Placeholder('2'), 202s } 202s }, 202s { 202s 'commits': [ 202s Commit(name='b1', message='c', tree=Tree({'a': Blob(b'a')})), 202s ], 202s 'tags': {'importer/import/1': Placeholder('b1')}, 202s }, 202s ), 202s ( 202s # Commits that have no changes should round trip 202s { 202s 'commits': [ 202s Commit( 202s name='1', 202s message='a', 202s ), 202s Commit( 202s name='2', 202s message='b', 202s parents=[Placeholder('1')], 202s ), 202s ], 202s 'tags': { 202s 'importer/import/1': Placeholder('1'), 202s 'importer/upload/2': Placeholder('2'), 202s }, 202s }, 202s { 202s 'commits': [Commit(name='b1', message='c')], 202s 'tags': {'importer/import/1': Placeholder('b1')}, 202s }, 202s ), 202s ( 202s # Commits that have no commit message should round trip 202s { 202s 'commits': [ 202s Commit( 202s name='1', 202s message='a', 202s ), 202s Commit( 202s name='2', 202s message='', 202s tree=Tree({'a': Blob(b'a')}), 202s parents=[Placeholder('1')], 202s ), 202s ], 202s 'tags': { 202s 'importer/import/1': Placeholder('1'), 202s 'importer/upload/2': Placeholder('2'), 202s } 202s }, 202s { 202s 'commits': [Commit(name='b1', message='c')], 202s 'tags': {'importer/import/1': Placeholder('b1')}, 202s }, 202s ), 202s ]) 202s def test_input_edge_cases(tmpdir, repo, before_export, before_import): 202s """ 202s Edge cases in input rich history should reimport without failure 202s 202s Check that rich history preservation completes without an exception in 202s various cases. Details of each case are described in comments in the test 202s parameters above. 202s 202s Since these tests generally cover the mutated case (where rich history has 202s to be ported forward because parent commits have mutated), we must remove 202s and recreate the 'importer/import/1' tag so that it is different before 202s attempting reimport. This is done by deleting all ('importer/*') tags and 202s then using the before_import parameter to recreate it again. 202s 202s :param py.path tmpdir: the pytest standard tmpdir fixture. 202s :param GitUbuntuRepository repo: our standard repo fixture. 202s :param dict before_export: the parameters to supply to Repo() to construct 202s the repository that will be exported. 202s :param dict before_import: the parametsrs to supply to Repo() to add to the 202s repository before attempting reimport. 202s """ 202s > Repo(**before_export).write(repo.raw_repo) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/rich_history_test.py:260: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmp_jdokk5r/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s _____________ test_input_edge_cases[before_export1-before_import1] _____________ 202s 202s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_input_edge_cases_before_e1') 202s repo = 202s before_export = {'commits': [, , 'importer/upload/2': }} 202s before_import = {'commits': [], 'tags': {'importer/import/1': }} 202s 202s @pytest.mark.parametrize(['before_export', 'before_import'], [ 202s ( 202s # Commit messages with patch-like contents should not fail 202s 202s # If a commit message in rich history contains text in a patch-like 202s # format (such as a diff of some file), it should not prevent correct 202s # round-tripping. "git format-patch" followed by "git am" fails this 202s # test, for example. 202s { 202s 'commits': [ 202s Commit(name='1', message='a', tree=Tree({'a': Blob(b'a')})), 202s Commit( 202s name='2', 202s message='''First line 202s 202s Inline patch that isn't part of the real patch starts here 202s 202s --- a/foo 202s +++ b/foo 202s @@ -1 +1,2 @@ 202s foo 202s +bar 202s ''', 202s tree=Tree({'a': Blob(b'ab')}), 202s parents=[Placeholder('1')], 202s ), 202s ], 202s 'tags': { 202s 'importer/import/1': Placeholder('1'), 202s 'importer/upload/2': Placeholder('2'), 202s } 202s }, 202s { 202s 'commits': [ 202s Commit(name='b1', message='c', tree=Tree({'a': Blob(b'a')})), 202s ], 202s 'tags': {'importer/import/1': Placeholder('b1')}, 202s }, 202s ), 202s ( 202s # Commits that have no changes should round trip 202s { 202s 'commits': [ 202s Commit( 202s name='1', 202s message='a', 202s ), 202s Commit( 202s name='2', 202s message='b', 202s parents=[Placeholder('1')], 202s ), 202s ], 202s 'tags': { 202s 'importer/import/1': Placeholder('1'), 202s 'importer/upload/2': Placeholder('2'), 202s }, 202s }, 202s { 202s 'commits': [Commit(name='b1', message='c')], 202s 'tags': {'importer/import/1': Placeholder('b1')}, 202s }, 202s ), 202s ( 202s # Commits that have no commit message should round trip 202s { 202s 'commits': [ 202s Commit( 202s name='1', 202s message='a', 202s ), 202s Commit( 202s name='2', 202s message='', 202s tree=Tree({'a': Blob(b'a')}), 202s parents=[Placeholder('1')], 202s ), 202s ], 202s 'tags': { 202s 'importer/import/1': Placeholder('1'), 202s 'importer/upload/2': Placeholder('2'), 202s } 202s }, 202s { 202s 'commits': [Commit(name='b1', message='c')], 202s 'tags': {'importer/import/1': Placeholder('b1')}, 202s }, 202s ), 202s ]) 202s def test_input_edge_cases(tmpdir, repo, before_export, before_import): 202s """ 202s Edge cases in input rich history should reimport without failure 202s 202s Check that rich history preservation completes without an exception in 202s various cases. Details of each case are described in comments in the test 202s parameters above. 202s 202s Since these tests generally cover the mutated case (where rich history has 202s to be ported forward because parent commits have mutated), we must remove 202s and recreate the 'importer/import/1' tag so that it is different before 202s attempting reimport. This is done by deleting all ('importer/*') tags and 202s then using the before_import parameter to recreate it again. 202s 202s :param py.path tmpdir: the pytest standard tmpdir fixture. 202s :param GitUbuntuRepository repo: our standard repo fixture. 202s :param dict before_export: the parameters to supply to Repo() to construct 202s the repository that will be exported. 202s :param dict before_import: the parametsrs to supply to Repo() to add to the 202s repository before attempting reimport. 202s """ 202s > Repo(**before_export).write(repo.raw_repo) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/rich_history_test.py:260: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmpjfbf5805/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s _____________ test_input_edge_cases[before_export2-before_import2] _____________ 202s 202s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_input_edge_cases_before_e2') 202s repo = 202s before_export = {'commits': [, , 'importer/upload/2': }} 202s before_import = {'commits': [], 'tags': {'importer/import/1': }} 202s 202s @pytest.mark.parametrize(['before_export', 'before_import'], [ 202s ( 202s # Commit messages with patch-like contents should not fail 202s 202s # If a commit message in rich history contains text in a patch-like 202s # format (such as a diff of some file), it should not prevent correct 202s # round-tripping. "git format-patch" followed by "git am" fails this 202s # test, for example. 202s { 202s 'commits': [ 202s Commit(name='1', message='a', tree=Tree({'a': Blob(b'a')})), 202s Commit( 202s name='2', 202s message='''First line 202s 202s Inline patch that isn't part of the real patch starts here 202s 202s --- a/foo 202s +++ b/foo 202s @@ -1 +1,2 @@ 202s foo 202s +bar 202s ''', 202s tree=Tree({'a': Blob(b'ab')}), 202s parents=[Placeholder('1')], 202s ), 202s ], 202s 'tags': { 202s 'importer/import/1': Placeholder('1'), 202s 'importer/upload/2': Placeholder('2'), 202s } 202s }, 202s { 202s 'commits': [ 202s Commit(name='b1', message='c', tree=Tree({'a': Blob(b'a')})), 202s ], 202s 'tags': {'importer/import/1': Placeholder('b1')}, 202s }, 202s ), 202s ( 202s # Commits that have no changes should round trip 202s { 202s 'commits': [ 202s Commit( 202s name='1', 202s message='a', 202s ), 202s Commit( 202s name='2', 202s message='b', 202s parents=[Placeholder('1')], 202s ), 202s ], 202s 'tags': { 202s 'importer/import/1': Placeholder('1'), 202s 'importer/upload/2': Placeholder('2'), 202s }, 202s }, 202s { 202s 'commits': [Commit(name='b1', message='c')], 202s 'tags': {'importer/import/1': Placeholder('b1')}, 202s }, 202s ), 202s ( 202s # Commits that have no commit message should round trip 202s { 202s 'commits': [ 202s Commit( 202s name='1', 202s message='a', 202s ), 202s Commit( 202s name='2', 202s message='', 202s tree=Tree({'a': Blob(b'a')}), 202s parents=[Placeholder('1')], 202s ), 202s ], 202s 'tags': { 202s 'importer/import/1': Placeholder('1'), 202s 'importer/upload/2': Placeholder('2'), 202s } 202s }, 202s { 202s 'commits': [Commit(name='b1', message='c')], 202s 'tags': {'importer/import/1': Placeholder('b1')}, 202s }, 202s ), 202s ]) 202s def test_input_edge_cases(tmpdir, repo, before_export, before_import): 202s """ 202s Edge cases in input rich history should reimport without failure 202s 202s Check that rich history preservation completes without an exception in 202s various cases. Details of each case are described in comments in the test 202s parameters above. 202s 202s Since these tests generally cover the mutated case (where rich history has 202s to be ported forward because parent commits have mutated), we must remove 202s and recreate the 'importer/import/1' tag so that it is different before 202s attempting reimport. This is done by deleting all ('importer/*') tags and 202s then using the before_import parameter to recreate it again. 202s 202s :param py.path tmpdir: the pytest standard tmpdir fixture. 202s :param GitUbuntuRepository repo: our standard repo fixture. 202s :param dict before_export: the parameters to supply to Repo() to construct 202s the repository that will be exported. 202s :param dict before_import: the parametsrs to supply to Repo() to add to the 202s repository before attempting reimport. 202s """ 202s > Repo(**before_export).write(repo.raw_repo) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/rich_history_test.py:260: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmp0st4s1ff/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s _______________________ test_preservation_fast_forwards ________________________ 202s 202s tmpdir = local('/tmp/pytest-of-ubuntu/pytest-0/test_preservation_fast_forward0') 202s repo = 202s 202s def test_preservation_fast_forwards(tmpdir, repo): 202s """Rich history that can be fast forwarded should not mutate 202s 202s :param py.path tmpdir: the pytest standard tmpdir fixture. 202s :param GitUbuntuRepository repo: our standard repo fixture. 202s """ 202s Repo( 202s commits=[ 202s Commit( 202s name='1', 202s message='a', 202s ), 202s Commit( 202s name='2', 202s message='', 202s tree=Tree({'a': Blob(b'a')}), 202s parents=[Placeholder('1')], 202s ), 202s ], 202s tags={ 202s 'importer/import/1': Placeholder('1'), 202s 'importer/upload/2': Placeholder('2'), 202s } 202s > ).write(repo.raw_repo) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/rich_history_test.py:294: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s self = 202s repo = pygit2.Repository('/tmp/tmp9myyaxh1/.git/'), record = {} 202s 202s def write(self, repo, record=None): 202s replace_placeholders(self) 202s record = record or dict() 202s written_commits = [ 202s commit.write(repo=repo, record=record) 202s for commit 202s in self.commit_list 202s ] 202s for name, target in self.branches.items(): 202s repo.create_branch( 202s name, 202s repo.get(target.write(repo)).peel(pygit2.Commit), 202s ) 202s for name, target in self.tags.items(): 202s repo.create_tag( 202s name, 202s target.write(repo), 202s > pygit2.GIT_OBJ_COMMIT, 202s self.tagger.signature, 202s 'Tag message', 202s ) 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/repo_builder.py:389: AttributeError 202s _______________________ test_source_create_with_version ________________________ 202s 202s repo = 202s 202s def test_source_create_with_version(repo): 202s > version = get_spec_changelog_version(repo, version='3', native=True) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/source_builder_test.py:57: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 202s changelog = repo.get_changelog_from_treeish(tree_hash) 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 202s return Changelog.from_treeish( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:569: in from_treeish 202s blob = follow_symlinks_to_blob( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 202s return _follow_symlinks_to_blob( 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s repo = pygit2.Repository('/tmp/tmp3zc3v2hu/.git/') 202s top_tree_object = 202s search_path = 'debian/changelog' 202s _rel_tree = 202s _rel_path = '' 202s 202s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 202s _rel_tree=None, _rel_path='' 202s ): 202s '''Recursively follow a path down a tree, following symlinks, to find blob 202s 202s repo: pygit2.Repository object 202s top_tree: pygit2.Tree object of the top of the tree structure 202s search_path: '/'-separated path string of blob to find 202s _rel_tree: (internal) which tree to look further into 202s _rel_path: (internal) the path we are in so far 202s ''' 202s 202s NORMAL_BLOB_MODES = set([ 202s pygit2.GIT_FILEMODE_BLOB, 202s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 202s ]) 202s 202s _rel_tree = _rel_tree or top_tree_object 202s head, tail = posixpath.split(search_path) 202s 202s # A traditional functional split would put a single entry in head with tail 202s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 202s # to make it appear to have traditional semantics. 202s if not head: 202s head = tail 202s tail = None 202s 202s entry = _rel_tree[head] 202s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (native)' 202s dpkg-source: info: building source-builder-package in source-builder-package_3.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_3.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s _______________________ test_source_create_with_versions _______________________ 202s 202s repo = 202s 202s def test_source_create_with_versions(repo): 202s source_spec = target.SourceSpec(changelog_versions=['3', '4'], native=True) 202s with target.Source(source_spec) as f: 202s tree_hash = importer.dsc_to_tree_hash(repo.raw_repo, f) 202s > changelog = repo.get_changelog_from_treeish(tree_hash) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/source_builder_test.py:65: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 202s return Changelog.from_treeish( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:569: in from_treeish 202s blob = follow_symlinks_to_blob( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 202s return _follow_symlinks_to_blob( 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s repo = pygit2.Repository('/tmp/tmptlvu0g_g/.git/') 202s top_tree_object = 202s search_path = 'debian/changelog' 202s _rel_tree = 202s _rel_path = '' 202s 202s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 202s _rel_tree=None, _rel_path='' 202s ): 202s '''Recursively follow a path down a tree, following symlinks, to find blob 202s 202s repo: pygit2.Repository object 202s top_tree: pygit2.Tree object of the top of the tree structure 202s search_path: '/'-separated path string of blob to find 202s _rel_tree: (internal) which tree to look further into 202s _rel_path: (internal) the path we are in so far 202s ''' 202s 202s NORMAL_BLOB_MODES = set([ 202s pygit2.GIT_FILEMODE_BLOB, 202s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 202s ]) 202s 202s _rel_tree = _rel_tree or top_tree_object 202s head, tail = posixpath.split(search_path) 202s 202s # A traditional functional split would put a single entry in head with tail 202s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 202s # to make it appear to have traditional semantics. 202s if not head: 202s head = tail 202s tail = None 202s 202s entry = _rel_tree[head] 202s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (native)' 202s dpkg-source: info: building source-builder-package in source-builder-package_3.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_3.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s ____________ test_source_native_source_format[True-3.0 (native)\n] _____________ 202s 202s repo = 202s native = True, expected = b'3.0 (native)\n' 202s 202s @pytest.mark.parametrize('native,expected', [ 202s (True, b"3.0 (native)\n"), 202s (False, b"3.0 (quilt)\n"), 202s ]) 202s def test_source_native_source_format(repo, native, expected): 202s with target.Source(target.SourceSpec(native=native)) as dsc_path: 202s > blob = git_repository.follow_symlinks_to_blob( 202s repo.raw_repo, 202s dsc_path_to_tree(repo, dsc_path), 202s 'debian/source/format', 202s ) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/source_builder_test.py:133: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 202s return _follow_symlinks_to_blob( 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s repo = pygit2.Repository('/tmp/tmp4hv9vgm6/.git/') 202s top_tree_object = 202s search_path = 'debian/source/format' 202s _rel_tree = 202s _rel_path = '' 202s 202s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 202s _rel_tree=None, _rel_path='' 202s ): 202s '''Recursively follow a path down a tree, following symlinks, to find blob 202s 202s repo: pygit2.Repository object 202s top_tree: pygit2.Tree object of the top of the tree structure 202s search_path: '/'-separated path string of blob to find 202s _rel_tree: (internal) which tree to look further into 202s _rel_path: (internal) the path we are in so far 202s ''' 202s 202s NORMAL_BLOB_MODES = set([ 202s pygit2.GIT_FILEMODE_BLOB, 202s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 202s ]) 202s 202s _rel_tree = _rel_tree or top_tree_object 202s head, tail = posixpath.split(search_path) 202s 202s # A traditional functional split would put a single entry in head with tail 202s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 202s # to make it appear to have traditional semantics. 202s if not head: 202s head = tail 202s tail = None 202s 202s entry = _rel_tree[head] 202s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (native)' 202s dpkg-source: info: building source-builder-package in source-builder-package_1.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s ____________ test_source_native_source_format[False-3.0 (quilt)\n] _____________ 202s 202s repo = 202s native = False, expected = b'3.0 (quilt)\n' 202s 202s @pytest.mark.parametrize('native,expected', [ 202s (True, b"3.0 (native)\n"), 202s (False, b"3.0 (quilt)\n"), 202s ]) 202s def test_source_native_source_format(repo, native, expected): 202s with target.Source(target.SourceSpec(native=native)) as dsc_path: 202s > blob = git_repository.follow_symlinks_to_blob( 202s repo.raw_repo, 202s dsc_path_to_tree(repo, dsc_path), 202s 'debian/source/format', 202s ) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/source_builder_test.py:133: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 202s return _follow_symlinks_to_blob( 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s repo = pygit2.Repository('/tmp/tmpuffg7xef/.git/') 202s top_tree_object = 202s search_path = 'debian/source/format' 202s _rel_tree = 202s _rel_path = '' 202s 202s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 202s _rel_tree=None, _rel_path='' 202s ): 202s '''Recursively follow a path down a tree, following symlinks, to find blob 202s 202s repo: pygit2.Repository object 202s top_tree: pygit2.Tree object of the top of the tree structure 202s search_path: '/'-separated path string of blob to find 202s _rel_tree: (internal) which tree to look further into 202s _rel_path: (internal) the path we are in so far 202s ''' 202s 202s NORMAL_BLOB_MODES = set([ 202s pygit2.GIT_FILEMODE_BLOB, 202s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 202s ]) 202s 202s _rel_tree = _rel_tree or top_tree_object 202s head, tail = posixpath.split(search_path) 202s 202s # A traditional functional split would put a single entry in head with tail 202s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 202s # to make it appear to have traditional semantics. 202s if not head: 202s head = tail 202s tail = None 202s 202s entry = _rel_tree[head] 202s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s _________________________ test_source_quilt_no_patches _________________________ 202s 202s repo = 202s 202s def test_source_quilt_no_patches(repo): 202s with target.Source(target.SourceSpec()) as dsc_path: 202s top = dsc_path_to_tree(repo, dsc_path) 202s debian_entry = top['debian'] 202s > assert debian_entry.type in [pygit2.GIT_OBJ_TREE, 'tree'] 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/source_builder_test.py:144: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s ________________________ test_source_quilt_with_patches ________________________ 202s 202s repo = 202s 202s def test_source_quilt_with_patches(repo): 202s spec = target.SourceSpec(has_patches=True) 202s with target.Source(spec) as dsc_path: 202s top = dsc_path_to_tree(repo, dsc_path) 202s expected_files = ['series', 'a', 'b'] 202s for basename in expected_files: 202s > assert git_repository.follow_symlinks_to_blob( 202s repo.raw_repo, 202s top, 202s 'debian/patches/%s' % basename, 202s ) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/source_builder_test.py:156: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 202s return _follow_symlinks_to_blob( 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s repo = pygit2.Repository('/tmp/tmp2qqz470j/.git/') 202s top_tree_object = 202s search_path = 'debian/patches/series' 202s _rel_tree = 202s _rel_path = '' 202s 202s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 202s _rel_tree=None, _rel_path='' 202s ): 202s '''Recursively follow a path down a tree, following symlinks, to find blob 202s 202s repo: pygit2.Repository object 202s top_tree: pygit2.Tree object of the top of the tree structure 202s search_path: '/'-separated path string of blob to find 202s _rel_tree: (internal) which tree to look further into 202s _rel_path: (internal) the path we are in so far 202s ''' 202s 202s NORMAL_BLOB_MODES = set([ 202s pygit2.GIT_FILEMODE_BLOB, 202s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 202s ]) 202s 202s _rel_tree = _rel_tree or top_tree_object 202s head, tail = posixpath.split(search_path) 202s 202s # A traditional functional split would put a single entry in head with tail 202s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 202s # to make it appear to have traditional semantics. 202s if not head: 202s head = tail 202s tail = None 202s 202s entry = _rel_tree[head] 202s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: using patch list from debian/patches/series 202s dpkg-source: info: applying a 202s dpkg-source: info: applying b 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: using patch list from debian/patches/series 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s ____________________ test_source_quilt_with_patches_applied ____________________ 202s 202s repo = 202s 202s def test_source_quilt_with_patches_applied(repo): 202s spec = target.SourceSpec(has_patches=True) 202s with target.Source(spec) as dsc_path: 202s top = dsc_path_to_tree(repo, dsc_path, patches_applied=True) 202s expected_files = [ 202s 'debian/patches/series', 202s 'debian/patches/a', 202s 'debian/patches/b', 202s 'a', 202s 'b', 202s ] 202s for filename in expected_files: 202s > assert git_repository.follow_symlinks_to_blob( 202s repo.raw_repo, 202s top, 202s filename, 202s ) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/source_builder_test.py:183: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 202s return _follow_symlinks_to_blob( 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s repo = pygit2.Repository('/tmp/tmpzd3kir2f/.git/') 202s top_tree_object = 202s search_path = 'debian/patches/series' 202s _rel_tree = 202s _rel_path = '' 202s 202s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 202s _rel_tree=None, _rel_path='' 202s ): 202s '''Recursively follow a path down a tree, following symlinks, to find blob 202s 202s repo: pygit2.Repository object 202s top_tree: pygit2.Tree object of the top of the tree structure 202s search_path: '/'-separated path string of blob to find 202s _rel_tree: (internal) which tree to look further into 202s _rel_path: (internal) the path we are in so far 202s ''' 202s 202s NORMAL_BLOB_MODES = set([ 202s pygit2.GIT_FILEMODE_BLOB, 202s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 202s ]) 202s 202s _rel_tree = _rel_tree or top_tree_object 202s head, tail = posixpath.split(search_path) 202s 202s # A traditional functional split would put a single entry in head with tail 202s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 202s # to make it appear to have traditional semantics. 202s if not head: 202s head = tail 202s tail = None 202s 202s entry = _rel_tree[head] 202s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: using patch list from debian/patches/series 202s dpkg-source: info: applying a 202s dpkg-source: info: applying b 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: using patch list from debian/patches/series 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s ______________________ test_source_version_native_default ______________________ 202s 202s repo = 202s 202s def test_source_version_native_default(repo): 202s """The default version string for a native package should not have a 202s '-' in it. 202s """ 202s > version = get_spec_changelog_version(repo, native=True) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/source_builder_test.py:194: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 202s changelog = repo.get_changelog_from_treeish(tree_hash) 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 202s return Changelog.from_treeish( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:569: in from_treeish 202s blob = follow_symlinks_to_blob( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 202s return _follow_symlinks_to_blob( 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s repo = pygit2.Repository('/tmp/tmpda_y20tj/.git/') 202s top_tree_object = 202s search_path = 'debian/changelog' 202s _rel_tree = 202s _rel_path = '' 202s 202s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 202s _rel_tree=None, _rel_path='' 202s ): 202s '''Recursively follow a path down a tree, following symlinks, to find blob 202s 202s repo: pygit2.Repository object 202s top_tree: pygit2.Tree object of the top of the tree structure 202s search_path: '/'-separated path string of blob to find 202s _rel_tree: (internal) which tree to look further into 202s _rel_path: (internal) the path we are in so far 202s ''' 202s 202s NORMAL_BLOB_MODES = set([ 202s pygit2.GIT_FILEMODE_BLOB, 202s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 202s ]) 202s 202s _rel_tree = _rel_tree or top_tree_object 202s head, tail = posixpath.split(search_path) 202s 202s # A traditional functional split would put a single entry in head with tail 202s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 202s # to make it appear to have traditional semantics. 202s if not head: 202s head = tail 202s tail = None 202s 202s entry = _rel_tree[head] 202s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (native)' 202s dpkg-source: info: building source-builder-package in source-builder-package_1.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s ____________________ test_source_version_non_native_default ____________________ 202s 202s repo = 202s 202s def test_source_version_non_native_default(repo): 202s """The default version string for a non-native package should have a 202s '-' in it. 202s """ 202s > version = get_spec_changelog_version(repo, native=False) 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/source_builder_test.py:202: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 202s changelog = repo.get_changelog_from_treeish(tree_hash) 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 202s return Changelog.from_treeish( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:569: in from_treeish 202s blob = follow_symlinks_to_blob( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 202s return _follow_symlinks_to_blob( 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s repo = pygit2.Repository('/tmp/tmp_9eorvf5/.git/') 202s top_tree_object = 202s search_path = 'debian/changelog' 202s _rel_tree = 202s _rel_path = '' 202s 202s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 202s _rel_tree=None, _rel_path='' 202s ): 202s '''Recursively follow a path down a tree, following symlinks, to find blob 202s 202s repo: pygit2.Repository object 202s top_tree: pygit2.Tree object of the top of the tree structure 202s search_path: '/'-separated path string of blob to find 202s _rel_tree: (internal) which tree to look further into 202s _rel_path: (internal) the path we are in so far 202s ''' 202s 202s NORMAL_BLOB_MODES = set([ 202s pygit2.GIT_FILEMODE_BLOB, 202s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 202s ]) 202s 202s _rel_tree = _rel_tree or top_tree_object 202s head, tail = posixpath.split(search_path) 202s 202s # A traditional functional split would put a single entry in head with tail 202s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 202s # to make it appear to have traditional semantics. 202s if not head: 202s head = tail 202s tail = None 202s 202s entry = _rel_tree[head] 202s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s _____________________ test_source_version_native_specific ______________________ 202s 202s repo = 202s 202s def test_source_version_native_specific(repo): 202s """We should be able to create a native package with a 202s native-looking version string. 202s """ 202s > version = get_spec_changelog_version(repo, native=True, version='1.0') 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/source_builder_test.py:210: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 202s changelog = repo.get_changelog_from_treeish(tree_hash) 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 202s return Changelog.from_treeish( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:569: in from_treeish 202s blob = follow_symlinks_to_blob( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 202s return _follow_symlinks_to_blob( 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s repo = pygit2.Repository('/tmp/tmpa38q93fm/.git/') 202s top_tree_object = 202s search_path = 'debian/changelog' 202s _rel_tree = 202s _rel_path = '' 202s 202s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 202s _rel_tree=None, _rel_path='' 202s ): 202s '''Recursively follow a path down a tree, following symlinks, to find blob 202s 202s repo: pygit2.Repository object 202s top_tree: pygit2.Tree object of the top of the tree structure 202s search_path: '/'-separated path string of blob to find 202s _rel_tree: (internal) which tree to look further into 202s _rel_path: (internal) the path we are in so far 202s ''' 202s 202s NORMAL_BLOB_MODES = set([ 202s pygit2.GIT_FILEMODE_BLOB, 202s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 202s ]) 202s 202s _rel_tree = _rel_tree or top_tree_object 202s head, tail = posixpath.split(search_path) 202s 202s # A traditional functional split would put a single entry in head with tail 202s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 202s # to make it appear to have traditional semantics. 202s if not head: 202s head = tail 202s tail = None 202s 202s entry = _rel_tree[head] 202s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (native)' 202s dpkg-source: info: building source-builder-package in source-builder-package_1.0.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1.0.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s ___________________ test_source_version_non_native_specific ____________________ 202s 202s repo = 202s 202s def test_source_version_non_native_specific(repo): 202s """We should be able to create a non-native package with a 202s non-native-looking version string. 202s """ 202s > version = get_spec_changelog_version(repo, native=False, version='1.0-1') 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/source_builder_test.py:218: 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version 202s changelog = repo.get_changelog_from_treeish(tree_hash) 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish 202s return Changelog.from_treeish( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:569: in from_treeish 202s blob = follow_symlinks_to_blob( 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob 202s return _follow_symlinks_to_blob( 202s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 202s 202s repo = pygit2.Repository('/tmp/tmp9ihpgxh5/.git/') 202s top_tree_object = 202s search_path = 'debian/changelog' 202s _rel_tree = 202s _rel_path = '' 202s 202s def _follow_symlinks_to_blob(repo, top_tree_object, search_path, 202s _rel_tree=None, _rel_path='' 202s ): 202s '''Recursively follow a path down a tree, following symlinks, to find blob 202s 202s repo: pygit2.Repository object 202s top_tree: pygit2.Tree object of the top of the tree structure 202s search_path: '/'-separated path string of blob to find 202s _rel_tree: (internal) which tree to look further into 202s _rel_path: (internal) the path we are in so far 202s ''' 202s 202s NORMAL_BLOB_MODES = set([ 202s pygit2.GIT_FILEMODE_BLOB, 202s pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, 202s ]) 202s 202s _rel_tree = _rel_tree or top_tree_object 202s head, tail = posixpath.split(search_path) 202s 202s # A traditional functional split would put a single entry in head with tail 202s # empty, but posixpath.split doesn't necessarily do this. Jiggle it round 202s # to make it appear to have traditional semantics. 202s if not head: 202s head = tail 202s tail = None 202s 202s entry = _rel_tree[head] 202s > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: 202s E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? 202s 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/git_repository.py:68: AttributeError 202s ----------------------------- Captured stdout call ----------------------------- 202s dpkg-source: info: using source format '3.0 (quilt)' 202s dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.0.orig.tar.gz 202s dpkg-source: info: building source-builder-package in source-builder-package_1.0-1.debian.tar.xz 202s dpkg-source: info: building source-builder-package in source-builder-package_1.0-1.dsc 202s ----------------------------- Captured stderr call ----------------------------- 202s dpkg-source: warning: missing information for output field Standards-Version 202s =============================== warnings summary =============================== 202s gitubuntu/__main__.py:7 202s /tmp/autopkgtest.QJfPOB/build.JpR/src/gitubuntu/__main__.py:7: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html 202s import pkg_resources 202s 202s ../../../../usr/lib/python3/dist-packages/pkg_resources/__init__.py:3154 202s /usr/lib/python3/dist-packages/pkg_resources/__init__.py:3154: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('logilab')`. 202s 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 202s declare_namespace(pkg) 202s 202s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html 202s 202s ---------- coverage: platform linux, python 3.12.7-final-0 ----------- 202s Name Stmts Miss Cover 202s --------------------------------------------------------------- 202s gitubuntu/__init__.py 0 0 100% 202s gitubuntu/__main__.py 103 94 9% 202s gitubuntu/build.py 185 131 29% 202s gitubuntu/cache.py 1 0 100% 202s gitubuntu/clone.py 70 54 23% 202s gitubuntu/dsc.py 65 16 75% 202s gitubuntu/exportorig.py 48 37 23% 202s gitubuntu/git_repository.py 1103 521 53% 202s gitubuntu/git_repository_test.py 316 40 87% 202s gitubuntu/importer.py 707 446 37% 202s gitubuntu/importer_service.py 215 22 90% 202s gitubuntu/importer_service_broker.py 60 49 18% 202s gitubuntu/importer_service_ipc.py 12 2 83% 202s gitubuntu/importer_service_poller.py 37 25 32% 202s gitubuntu/importer_service_test.py 147 0 100% 202s gitubuntu/importer_service_worker.py 87 64 26% 202s gitubuntu/importer_service_worker_test.py 18 0 100% 202s gitubuntu/importer_tag_test.py 47 20 57% 202s gitubuntu/importer_test.py 388 133 66% 202s gitubuntu/integration_test.py 67 26 61% 202s gitubuntu/logging.py 8 4 50% 202s gitubuntu/merge.py 219 192 12% 202s gitubuntu/patch_state.py 2 0 100% 202s gitubuntu/prepare_upload.py 86 3 97% 202s gitubuntu/prepare_upload_test.py 152 0 100% 202s gitubuntu/queue.py 174 148 15% 202s gitubuntu/remote.py 100 85 15% 202s gitubuntu/repo_builder.py 162 0 100% 202s gitubuntu/repo_builder_test.py 159 12 92% 202s gitubuntu/repo_comparator.py 32 25 22% 202s gitubuntu/rich_history.py 67 45 33% 202s gitubuntu/rich_history_test.py 53 31 42% 202s gitubuntu/run.py 72 12 83% 202s gitubuntu/scriptutils.py 11 0 100% 202s gitubuntu/source_builder.py 119 0 100% 202s gitubuntu/source_builder_test.py 105 18 83% 202s gitubuntu/source_information.py 339 133 61% 202s gitubuntu/source_information_test.py 78 3 96% 202s gitubuntu/spec.py 3 0 100% 202s gitubuntu/submit.py 103 86 17% 202s gitubuntu/tag.py 78 69 12% 202s gitubuntu/test_fixtures.py 29 5 83% 202s gitubuntu/test_util.py 5 0 100% 202s gitubuntu/version.py 1 0 100% 202s gitubuntu/versioning.py 124 16 87% 202s --------------------------------------------------------------- 202s TOTAL 5957 2567 57% 202s 202s =========================== short test summary info ============================ 202s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[0] 202s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[1] 202s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[2] 202s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[3] 202s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[4] 202s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob_not_found[tree1] 202s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob_not_found[tree2] 202s FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob_not_found[tree3] 202s FAILED gitubuntu/git_repository_test.py::test_git_escape_dir_to_tree - Attrib... 202s FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data1-debian/patches/series] 202s FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data2-debian/patches/series] 202s FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data3-debian/patches/debian.series] 202s FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data4-debian/patches/debian.series] 202s FAILED gitubuntu/git_repository_test.py::test_quilt_env - AttributeError: mod... 202s FAILED gitubuntu/git_repository_test.py::test_repo_quilt_env - AttributeError... 202s FAILED gitubuntu/git_repository_test.py::test_repo_quilt_env_from_treeish_str 202s 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] 202s 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] 202s 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] 202s FAILED gitubuntu/git_repository_test.py::test_commit_tree - AttributeError: m... 202s FAILED gitubuntu/git_repository_test.py::test_descendant_of[root-root-False] 202s FAILED gitubuntu/git_repository_test.py::test_descendant_of[child1-root-True] 202s FAILED gitubuntu/git_repository_test.py::test_descendant_of[root-child1-False] 202s FAILED gitubuntu/git_repository_test.py::test_descendant_of[grandchild1-root-True] 202s FAILED gitubuntu/git_repository_test.py::test_descendant_of[child1-child2-False] 202s FAILED gitubuntu/git_repository_test.py::test_descendant_of[root-disjoint-False] 202s FAILED gitubuntu/git_repository_test.py::test_create_tag - AttributeError: mo... 202s FAILED gitubuntu/git_repository_test.py::test_get_all_reimport_tags - Attribu... 202s FAILED gitubuntu/git_repository_test.py::test_get_head_info - AttributeError:... 202s 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] 202s 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] 202s 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] 202s 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] 202s 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] 202s 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] 202s 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] 202s 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] 202s FAILED gitubuntu/importer_tag_test.py::test_import_applied_spi_tags[input_repo0-validation_repo_delta0-validation_repo_expected_treewise_refs0-True] 202s FAILED gitubuntu/importer_tag_test.py::test_import_applied_spi_tags[input_repo2-validation_repo_delta2-validation_repo_expected_treewise_refs2-False] 202s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo1-PatchState.UNAPPLIED-expected1] 202s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo2-PatchState.UNAPPLIED-expected2] 202s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo4-PatchState.APPLIED-expected4] 202s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo5-PatchState.APPLIED-expected5] 202s FAILED gitubuntu/importer_test.py::test_get_existing_import_tags_ordering - A... 202s FAILED gitubuntu/importer_test.py::test_create_import_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] 202s FAILED gitubuntu/importer_test.py::test_create_import_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] 202s FAILED gitubuntu/importer_test.py::test_create_import_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] 202s FAILED gitubuntu/importer_test.py::test_create_import_tag_hash_stability_on_first_import 202s FAILED gitubuntu/importer_test.py::test_create_import_tag_hash_stability_on_reimport 202s FAILED gitubuntu/importer_test.py::test_create_applied_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] 202s FAILED gitubuntu/importer_test.py::test_create_applied_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] 202s FAILED gitubuntu/importer_test.py::test_create_applied_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] 202s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo1-parent_overrides1-changelog_versions1-PatchState.UNAPPLIED-expected_refs1] 202s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo2-parent_overrides2-changelog_versions2-PatchState.UNAPPLIED-expected_refs2] 202s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo3-parent_overrides3-changelog_versions3-PatchState.UNAPPLIED-expected_refs3] 202s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo5-parent_overrides5-changelog_versions5-PatchState.APPLIED-expected_refs5] 202s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo6-parent_overrides6-changelog_versions6-PatchState.APPLIED-expected_refs6] 202s FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo7-parent_overrides7-changelog_versions7-PatchState.APPLIED-expected_refs7] 202s FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo0-published_spec0-True] 202s FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo1-published_spec1-True] 202s FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo2-published_spec2-RichHistoryTreeMismatch] 202s FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo3-published_spec3-RichHistoryHasNoChangelogParentAncestor] 202s FAILED gitubuntu/importer_test.py::test_add_changelog_note_to_commit - Attrib... 202s FAILED gitubuntu/importer_test.py::test_add_changelog_note_to_commit_utf8 - A... 202s FAILED gitubuntu/importer_test.py::test_double_changelog_note_add_does_not_fail 202s FAILED gitubuntu/importer_test.py::test_create_import_note - AttributeError: ... 202s FAILED gitubuntu/importer_test.py::test_create_import_note_timestamp - Attrib... 202s FAILED gitubuntu/importer_test.py::test_import_creates_import_note - Attribut... 202s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_quilt_patches - ... 202s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo0-changelog_versions0-validation_repo_delta0-validation_repo_expected_identical_refs0] 202s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo1-changelog_versions1-validation_repo_delta1-validation_repo_expected_identical_refs1] 202s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo2-changelog_versions2-validation_repo_delta2-validation_repo_expected_identical_refs2] 202s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo3-changelog_versions3-validation_repo_delta3-validation_repo_expected_identical_refs3] 202s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parent_override 202s FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parent_override_failure 202s FAILED gitubuntu/importer_test.py::test_import_applied_spi_parenting[input_repo0-expected_ancestor_commits0-expected_parent_commits0] 202s FAILED gitubuntu/importer_test.py::test_authorship_date[False-Fri, 2 Feb 1971 12:34:56 +0100-expected_result0] 202s FAILED gitubuntu/importer_test.py::test_authorship_date[True-Failday, 30 Feb 1971 99:99:99 +9999-expected_result1] 202s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file 202s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_fetch_failure_retry 202s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_missing_ref 202s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_missing_commit 202s FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_not_a_commit 202s FAILED gitubuntu/integration_test.py::test_reconstruct_changelog - AttributeE... 202s FAILED gitubuntu/repo_builder_test.py::TestObjectCreation::testRepoBranchesTags 202s FAILED gitubuntu/repo_builder_test.py::TestObjectCreation::testRepoTagger - A... 202s FAILED gitubuntu/repo_builder_test.py::test_source_tree - AttributeError: mod... 202s FAILED gitubuntu/rich_history_test.py::test_preservation - AttributeError: mo... 202s FAILED gitubuntu/rich_history_test.py::test_preservation_multiple_parents - A... 202s FAILED gitubuntu/rich_history_test.py::test_preservation_no_parents - Attribu... 202s FAILED gitubuntu/rich_history_test.py::test_input_edge_cases[before_export0-before_import0] 202s FAILED gitubuntu/rich_history_test.py::test_input_edge_cases[before_export1-before_import1] 202s FAILED gitubuntu/rich_history_test.py::test_input_edge_cases[before_export2-before_import2] 202s FAILED gitubuntu/rich_history_test.py::test_preservation_fast_forwards - Attr... 202s FAILED gitubuntu/source_builder_test.py::test_source_create_with_version - At... 202s FAILED gitubuntu/source_builder_test.py::test_source_create_with_versions - A... 202s FAILED gitubuntu/source_builder_test.py::test_source_native_source_format[True-3.0 (native)\n] 202s FAILED gitubuntu/source_builder_test.py::test_source_native_source_format[False-3.0 (quilt)\n] 202s FAILED gitubuntu/source_builder_test.py::test_source_quilt_no_patches - Attri... 202s FAILED gitubuntu/source_builder_test.py::test_source_quilt_with_patches - Att... 202s FAILED gitubuntu/source_builder_test.py::test_source_quilt_with_patches_applied 202s FAILED gitubuntu/source_builder_test.py::test_source_version_native_default 202s FAILED gitubuntu/source_builder_test.py::test_source_version_non_native_default 202s FAILED gitubuntu/source_builder_test.py::test_source_version_native_specific 202s FAILED gitubuntu/source_builder_test.py::test_source_version_non_native_specific 202s = 105 failed, 348 passed, 3 skipped, 3 xfailed, 2 warnings in 62.32s (0:01:02) = 202s pytest failed; self test will fail 202s autopkgtest [10:41:18]: test self-test: -----------------------] 203s self-test FAIL non-zero exit status 1 203s autopkgtest [10:41:19]: test self-test: - - - - - - - - - - results - - - - - - - - - - 203s autopkgtest [10:41:19]: @@@@@@@@@@@@@@@@@@@@ summary 203s self-test FAIL non-zero exit status 1 215s nova [W] Skipping flock for amd64 215s Creating nova instance adt-plucky-amd64-git-ubuntu-20241125-092049-juju-7f2275-prod-proposed-migration-environment-20-bdaf9ab4-49d1-4485-a103-c188db8f9133 from image adt/ubuntu-plucky-amd64-server-20241119.img (UUID 2e5306de-7efa-448c-bc27-5518979e66f0)...