I: pbuilder: network access will be disabled during build I: Current time: Sun Oct 20 05:15:39 -12 2024 I: pbuilder-time-stamp: 1729444539 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/unstable-reproducible-base.tgz] I: copying local configuration W: --override-config is not set; not updating apt.conf Read the manpage for details. I: mounting /proc filesystem I: mounting /sys filesystem I: creating /{dev,run}/shm I: mounting /dev/pts filesystem I: redirecting /dev/ptmx to /dev/pts/ptmx I: policy-rc.d already exists I: using eatmydata during job I: Copying source file I: copying [git-ubuntu_1.1-1.dsc] I: copying [./git-ubuntu_1.1.orig.tar.xz] I: copying [./git-ubuntu_1.1-1.debian.tar.xz] I: Extracting source gpgv: Signature made Wed Jul 3 16:18:24 2024 gpgv: using RSA key A62D2CFBD50B9B5BF360D54B159EB5C4EFC8774C gpgv: Can't check signature: No public key dpkg-source: warning: cannot verify inline signature for ./git-ubuntu_1.1-1.dsc: no acceptable signature found dpkg-source: info: extracting git-ubuntu in git-ubuntu-1.1 dpkg-source: info: unpacking git-ubuntu_1.1.orig.tar.xz dpkg-source: info: unpacking git-ubuntu_1.1-1.debian.tar.xz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying Drop-unused-petname.patch dpkg-source: info: applying man-Fix-bad-whatis-entries.patch dpkg-source: info: applying test-call-dch-with-vendor-Ubuntu-in-reconstruct-changelog.patch dpkg-source: info: applying submit-fix-setting-commitish_string.patch dpkg-source: info: applying test-Always-set-ENTRY_POINT_DIR.patch I: Not using root during the build. I: Installing the build-deps I: user script /srv/workspace/pbuilder/10398/tmp/hooks/D02_print_environment starting I: set BUILDDIR='/build/reproducible-path' BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' BUILDUSERNAME='pbuilder1' BUILD_ARCH='i386' DEBIAN_FRONTEND='noninteractive' DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=6 ' DISTRIBUTION='unstable' HOME='/root' HOST_ARCH='i386' IFS=' ' INVOCATION_ID='61c84833d4b84ecf9c7fbb6be537294d' LANG='C' LANGUAGE='en_US:en' LC_ALL='C' LD_LIBRARY_PATH='/usr/lib/libeatmydata' LD_PRELOAD='libeatmydata.so' MAIL='/var/mail/root' OPTIND='1' PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' PBCURRENTCOMMANDLINEOPERATION='build' PBUILDER_OPERATION='build' PBUILDER_PKGDATADIR='/usr/share/pbuilder' PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' PBUILDER_SYSCONFDIR='/etc' PPID='10398' PS1='# ' PS2='> ' PS4='+ ' PWD='/' SHELL='/bin/bash' SHLVL='2' SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.WwXwquVh/pbuilderrc_1cax --distribution unstable --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.WwXwquVh/b1 --logfile b1/build.log git-ubuntu_1.1-1.dsc' SUDO_GID='111' SUDO_UID='104' SUDO_USER='jenkins' TERM='unknown' TZ='/usr/share/zoneinfo/Etc/GMT+12' USER='root' _='/usr/bin/systemd-run' I: uname -a Linux infom07-i386 6.1.0-26-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.112-1 (2024-09-30) x86_64 GNU/Linux I: ls -l /bin lrwxrwxrwx 1 root root 7 Aug 4 21:30 /bin -> usr/bin I: user script /srv/workspace/pbuilder/10398/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy Version: 0.invalid.0 Architecture: i386 Maintainer: Debian Pbuilder Team Description: Dummy package to satisfy dependencies with aptitude - created by pbuilder This package was created automatically by pbuilder to satisfy the build-dependencies of the package being currently built. Depends: bash-completion, debhelper-compat (= 13), debian-archive-keyring, dh-exec, dh-python, git, git-buildpackage, pristine-tar, python3 (>= 3.6), python3-cachetools, python3-keyring, python3-keyrings.alt, python3-pygit2, python3-pytest, python3-setuptools, python3-systemd, python3-tenacity, python3-ubuntutools, python3-zmq, quilt, ubuntu-dev-tools, ubuntu-keyring dpkg-deb: building package 'pbuilder-satisfydepends-dummy' in '/tmp/satisfydepends-aptitude/pbuilder-satisfydepends-dummy.deb'. Selecting previously unselected package pbuilder-satisfydepends-dummy. (Reading database ... 19931 files and directories currently installed.) Preparing to unpack .../pbuilder-satisfydepends-dummy.deb ... Unpacking pbuilder-satisfydepends-dummy (0.invalid.0) ... dpkg: pbuilder-satisfydepends-dummy: dependency problems, but configuring anyway as you requested: pbuilder-satisfydepends-dummy depends on bash-completion; however: Package bash-completion is not installed. pbuilder-satisfydepends-dummy depends on debhelper-compat (= 13); however: Package debhelper-compat is not installed. pbuilder-satisfydepends-dummy depends on dh-exec; however: Package dh-exec is not installed. pbuilder-satisfydepends-dummy depends on dh-python; however: Package dh-python is not installed. pbuilder-satisfydepends-dummy depends on git; however: Package git is not installed. pbuilder-satisfydepends-dummy depends on git-buildpackage; however: Package git-buildpackage is not installed. pbuilder-satisfydepends-dummy depends on pristine-tar; however: Package pristine-tar is not installed. pbuilder-satisfydepends-dummy depends on python3 (>= 3.6); however: Package python3 is not installed. pbuilder-satisfydepends-dummy depends on python3-cachetools; however: Package python3-cachetools is not installed. pbuilder-satisfydepends-dummy depends on python3-keyring; however: Package python3-keyring is not installed. pbuilder-satisfydepends-dummy depends on python3-keyrings.alt; however: Package python3-keyrings.alt is not installed. pbuilder-satisfydepends-dummy depends on python3-pygit2; however: Package python3-pygit2 is not installed. pbuilder-satisfydepends-dummy depends on python3-pytest; however: Package python3-pytest is not installed. pbuilder-satisfydepends-dummy depends on python3-setuptools; however: Package python3-setuptools is not installed. pbuilder-satisfydepends-dummy depends on python3-systemd; however: Package python3-systemd is not installed. pbuilder-satisfydepends-dummy depends on python3-tenacity; however: Package python3-tenacity is not installed. pbuilder-satisfydepends-dummy depends on python3-ubuntutools; however: Package python3-ubuntutools is not installed. pbuilder-satisfydepends-dummy depends on python3-zmq; however: Package python3-zmq is not installed. pbuilder-satisfydepends-dummy depends on quilt; however: Package quilt is not installed. pbuilder-satisfydepends-dummy depends on ubuntu-dev-tools; however: Package ubuntu-dev-tools is not installed. pbuilder-satisfydepends-dummy depends on ubuntu-keyring; however: Package ubuntu-keyring is not installed. Setting up pbuilder-satisfydepends-dummy (0.invalid.0) ... Reading package lists... Building dependency tree... Reading state information... Initializing package states... Writing extended state information... Building tag database... pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) The following NEW packages will be installed: autoconf{a} automake{a} autopoint{a} autotools-dev{a} bash-completion{a} bsdextrautils{a} ca-certificates{a} dctrl-tools{a} debhelper{a} devscripts{a} dh-autoreconf{a} dh-exec{a} dh-python{a} dh-strip-nondeterminism{a} diffstat{a} dirmngr{a} distro-info{a} distro-info-data{a} dput{a} dwz{a} ed{a} file{a} gettext{a} gettext-base{a} git{a} git-buildpackage{a} git-man{a} gnupg{a} gnupg-l10n{a} gpg{a} gpg-agent{a} gpgconf{a} gpgsm{a} groff-base{a} intltool-debian{a} libapparmor1{a} libarchive-zip-perl{a} libarchive13t64{a} libassuan9{a} libb-hooks-op-check-perl{a} libbrotli1{a} libclass-method-modifiers-perl{a} libclass-xsaccessor-perl{a} libclone-perl{a} libcom-err2{a} libcurl3t64-gnutls{a} libdebhelper-perl{a} libdevel-callchecker-perl{a} libdynaloader-functions-perl{a} libelf1t64{a} libencode-locale-perl{a} liberror-perl{a} libexpat1{a} libfile-dirlist-perl{a} libfile-homedir-perl{a} libfile-listing-perl{a} libfile-stripnondeterminism-perl{a} libfile-touch-perl{a} libfile-which-perl{a} libgit2-1.8{a} libglib2.0-0t64{a} libgpgme11t64{a} libgssapi-krb5-2{a} libhtml-parser-perl{a} libhtml-tagset-perl{a} libhtml-tree-perl{a} libhttp-cookies-perl{a} libhttp-date-perl{a} libhttp-message-perl{a} libhttp-negotiate-perl{a} libicu72{a} libimport-into-perl{a} libio-html-perl{a} libio-pty-perl{a} libio-socket-ssl-perl{a} libipc-run-perl{a} libk5crypto3{a} libkeyutils1{a} libkrb5-3{a} libkrb5support0{a} libksba8{a} libldap-2.5-0{a} libllhttp9.1{a} liblwp-mediatypes-perl{a} liblwp-protocol-https-perl{a} libmagic-mgc{a} libmagic1t64{a} libmbedcrypto16{a} libmbedtls21{a} libmbedx509-7{a} libmodule-runtime-perl{a} libmoo-perl{a} libnet-http-perl{a} libnet-ssleay-perl{a} libnghttp2-14{a} libnghttp3-9{a} libngtcp2-16{a} libngtcp2-crypto-gnutls8{a} libnorm1t64{a} libnpth0t64{a} libnsl2{a} libparams-classify-perl{a} libpgm-5.3-0t64{a} libpipeline1{a} libpsl5t64{a} libpython3-stdlib{a} libpython3.12-minimal{a} libpython3.12-stdlib{a} libreadline8t64{a} librole-tiny-perl{a} librtmp1{a} libsasl2-2{a} libsasl2-modules-db{a} libsodium23{a} libssh2-1t64{a} libsub-quote-perl{a} libsys-cpuaffinity-perl{a} libtimedate-perl{a} libtirpc-common{a} libtirpc3t64{a} libtool{a} libtry-tiny-perl{a} libuchardet0{a} liburi-perl{a} libwww-perl{a} libwww-robotrules-perl{a} libxdelta2t64{a} libxml2{a} libyaml-0-2{a} libzmq5{a} lsb-release{a} m4{a} man-db{a} media-types{a} netbase{a} openssl{a} patchutils{a} pbzip2{a} perl-openssl-defaults{a} pinentry-curses{a} pixz{a} po-debconf{a} pristine-tar{a} python-apt-common{a} python3{a} python3-apt{a} python3-autocommand{a} python3-bcrypt{a} python3-blinker{a} python3-cachetools{a} python3-certifi{a} python3-cffi-backend{a} python3-chardet{a} python3-charset-normalizer{a} python3-cryptography{a} python3-dateutil{a} python3-debian{a} python3-debianbts{a} python3-distro{a} python3-distro-info{a} python3-gpg{a} python3-httplib2{a} python3-idna{a} python3-importlib-metadata{a} python3-inflect{a} python3-iniconfig{a} python3-jaraco.classes{a} python3-jaraco.context{a} python3-jaraco.functools{a} python3-jeepney{a} python3-jwt{a} python3-keyring{a} python3-keyrings.alt{a} python3-launchpadlib{a} python3-launchpadlib-desktop{a} python3-lazr.restfulclient{a} python3-lazr.uri{a} python3-minimal{a} python3-more-itertools{a} python3-oauthlib{a} python3-packaging{a} python3-pkg-resources{a} python3-pluggy{a} python3-py{a} python3-pycryptodome{a} python3-pygit2{a} python3-pyparsing{a} python3-pytest{a} python3-requests{a} python3-secretstorage{a} python3-setuptools{a} python3-systemd{a} python3-tenacity{a} python3-typeguard{a} python3-typing-extensions{a} python3-ubuntutools{a} python3-urllib3{a} python3-wadllib{a} python3-xdg{a} python3-yaml{a} python3-zipp{a} python3-zmq{a} python3.12{a} python3.12-minimal{a} quilt{a} readline-common{a} sensible-utils{a} sudo{a} tzdata{a} ubuntu-dev-tools{a} ubuntu-keyring{a} wdiff{a} xdelta{a} xdelta3{a} The following packages are RECOMMENDED but will NOT be installed: arch-test cowbuilder curl debian-keyring debootstrap equivs genisoimage gnupg-utils gpg-wks-client iso-codes krb5-locales less libarchive-cpio-perl libdata-dump-perl libdistro-info-perl libgit-wrapper-perl libgitlab-api-v4-perl libglib2.0-data libhtml-form-perl libhtml-format-perl libhttp-daemon-perl libio-compress-brotli-perl libjson-perl libldap-common liblist-compare-perl libltdl-dev libmail-sendmail-perl libmailtools-perl libnamespace-clean-perl libsasl2-modules libsoap-lite-perl libstring-shellquote-perl libxstring-perl licensecheck lintian lynx openssh-client pbuilder publicsuffix python3-dns python3-magic python3-pygments python3-unidiff reportbug sbuild shared-mime-info strace unzip wget xdg-user-dirs zstd 0 packages upgraded, 214 newly installed, 0 to remove and 0 not upgraded. Need to get 64.0 MB of archives. After unpacking 247 MB will be used. Writing extended state information... Get: 1 http://deb.debian.org/debian unstable/main i386 libpython3.12-minimal i386 3.12.7-1 [813 kB] Get: 2 http://deb.debian.org/debian unstable/main i386 libexpat1 i386 2.6.3-1 [107 kB] Get: 3 http://deb.debian.org/debian unstable/main i386 python3.12-minimal i386 3.12.7-1 [2239 kB] Get: 4 http://deb.debian.org/debian unstable/main i386 python3-minimal i386 3.12.6-1 [26.7 kB] Get: 5 http://deb.debian.org/debian unstable/main i386 media-types all 10.1.0 [26.9 kB] Get: 6 http://deb.debian.org/debian unstable/main i386 netbase all 6.4 [12.8 kB] Get: 7 http://deb.debian.org/debian unstable/main i386 tzdata all 2024b-3 [255 kB] Get: 8 http://deb.debian.org/debian unstable/main i386 libkrb5support0 i386 1.21.3-3 [34.9 kB] Get: 9 http://deb.debian.org/debian unstable/main i386 libcom-err2 i386 1.47.1-1 [23.1 kB] Get: 10 http://deb.debian.org/debian unstable/main i386 libk5crypto3 i386 1.21.3-3 [83.6 kB] Get: 11 http://deb.debian.org/debian unstable/main i386 libkeyutils1 i386 1.6.3-3 [9432 B] Get: 12 http://deb.debian.org/debian unstable/main i386 libkrb5-3 i386 1.21.3-3 [350 kB] Get: 13 http://deb.debian.org/debian unstable/main i386 libgssapi-krb5-2 i386 1.21.3-3 [146 kB] Get: 14 http://deb.debian.org/debian unstable/main i386 libtirpc-common all 1.3.4+ds-1.3 [10.9 kB] Get: 15 http://deb.debian.org/debian unstable/main i386 libtirpc3t64 i386 1.3.4+ds-1.3 [90.2 kB] Get: 16 http://deb.debian.org/debian unstable/main i386 libnsl2 i386 1.3.0-3+b2 [42.4 kB] Get: 17 http://deb.debian.org/debian unstable/main i386 readline-common all 8.2-5 [69.3 kB] Get: 18 http://deb.debian.org/debian unstable/main i386 libreadline8t64 i386 8.2-5 [173 kB] Get: 19 http://deb.debian.org/debian unstable/main i386 libpython3.12-stdlib i386 3.12.7-1 [1966 kB] Get: 20 http://deb.debian.org/debian unstable/main i386 python3.12 i386 3.12.7-1 [671 kB] Get: 21 http://deb.debian.org/debian unstable/main i386 libpython3-stdlib i386 3.12.6-1 [9692 B] Get: 22 http://deb.debian.org/debian unstable/main i386 python3 i386 3.12.6-1 [27.8 kB] Get: 23 http://deb.debian.org/debian unstable/main i386 libapparmor1 i386 3.1.7-1+b1 [43.0 kB] Get: 24 http://deb.debian.org/debian unstable/main i386 sudo i386 1.9.15p5-3+b1 [2012 kB] Get: 25 http://deb.debian.org/debian unstable/main i386 sensible-utils all 0.0.24 [24.8 kB] Get: 26 http://deb.debian.org/debian unstable/main i386 bash-completion all 1:2.14.0-1 [305 kB] Get: 27 http://deb.debian.org/debian unstable/main i386 openssl i386 3.3.2-1 [1386 kB] Get: 28 http://deb.debian.org/debian unstable/main i386 ca-certificates all 20240203 [158 kB] Get: 29 http://deb.debian.org/debian unstable/main i386 libmagic-mgc i386 1:5.45-3 [314 kB] Get: 30 http://deb.debian.org/debian unstable/main i386 libmagic1t64 i386 1:5.45-3 [114 kB] Get: 31 http://deb.debian.org/debian unstable/main i386 file i386 1:5.45-3 [42.9 kB] Get: 32 http://deb.debian.org/debian unstable/main i386 gettext-base i386 0.22.5-2 [201 kB] Get: 33 http://deb.debian.org/debian unstable/main i386 libuchardet0 i386 0.0.8-1+b1 [69.1 kB] Get: 34 http://deb.debian.org/debian unstable/main i386 groff-base i386 1.23.0-5 [1196 kB] Get: 35 http://deb.debian.org/debian unstable/main i386 bsdextrautils i386 2.40.2-9 [102 kB] Get: 36 http://deb.debian.org/debian unstable/main i386 libpipeline1 i386 1.5.8-1 [41.2 kB] Get: 37 http://deb.debian.org/debian unstable/main i386 man-db i386 2.13.0-1 [1428 kB] Get: 38 http://deb.debian.org/debian unstable/main i386 m4 i386 1.4.19-4 [293 kB] Get: 39 http://deb.debian.org/debian unstable/main i386 autoconf all 2.72-3 [493 kB] Get: 40 http://deb.debian.org/debian unstable/main i386 autotools-dev all 20220109.1 [51.6 kB] Get: 41 http://deb.debian.org/debian unstable/main i386 automake all 1:1.16.5-1.3 [823 kB] Get: 42 http://deb.debian.org/debian unstable/main i386 autopoint all 0.22.5-2 [723 kB] Get: 43 http://deb.debian.org/debian unstable/main i386 dctrl-tools i386 2.24-3 [105 kB] Get: 44 http://deb.debian.org/debian unstable/main i386 libdebhelper-perl all 13.20 [89.7 kB] Get: 45 http://deb.debian.org/debian unstable/main i386 libtool all 2.4.7-7 [517 kB] Get: 46 http://deb.debian.org/debian unstable/main i386 dh-autoreconf all 20 [17.1 kB] Get: 47 http://deb.debian.org/debian unstable/main i386 libarchive-zip-perl all 1.68-1 [104 kB] Get: 48 http://deb.debian.org/debian unstable/main i386 libfile-stripnondeterminism-perl all 1.14.0-1 [19.5 kB] Get: 49 http://deb.debian.org/debian unstable/main i386 dh-strip-nondeterminism all 1.14.0-1 [8448 B] Get: 50 http://deb.debian.org/debian unstable/main i386 libelf1t64 i386 0.191-2 [194 kB] Get: 51 http://deb.debian.org/debian unstable/main i386 dwz i386 0.15-1+b1 [116 kB] Get: 52 http://deb.debian.org/debian unstable/main i386 libicu72 i386 72.1-5 [9550 kB] Get: 53 http://deb.debian.org/debian unstable/main i386 libxml2 i386 2.12.7+dfsg+really2.9.14-0.1 [733 kB] Get: 54 http://deb.debian.org/debian unstable/main i386 gettext i386 0.22.5-2 [1631 kB] Get: 55 http://deb.debian.org/debian unstable/main i386 intltool-debian all 0.35.0+20060710.6 [22.9 kB] Get: 56 http://deb.debian.org/debian unstable/main i386 po-debconf all 1.0.21+nmu1 [248 kB] Get: 57 http://deb.debian.org/debian unstable/main i386 debhelper all 13.20 [915 kB] Get: 58 http://deb.debian.org/debian unstable/main i386 libassuan9 i386 3.0.1-2 [62.4 kB] Get: 59 http://deb.debian.org/debian unstable/main i386 gpgconf i386 2.2.44-1 [127 kB] Get: 60 http://deb.debian.org/debian unstable/main i386 libksba8 i386 1.6.7-2 [138 kB] Get: 61 http://deb.debian.org/debian unstable/main i386 libsasl2-modules-db i386 2.1.28+dfsg1-8 [20.6 kB] Get: 62 http://deb.debian.org/debian unstable/main i386 libsasl2-2 i386 2.1.28+dfsg1-8 [61.0 kB] Get: 63 http://deb.debian.org/debian unstable/main i386 libldap-2.5-0 i386 2.5.18+dfsg-3+b1 [200 kB] Get: 64 http://deb.debian.org/debian unstable/main i386 libnpth0t64 i386 1.6-3.1 [18.0 kB] Get: 65 http://deb.debian.org/debian unstable/main i386 dirmngr i386 2.2.44-1 [395 kB] Get: 66 http://deb.debian.org/debian unstable/main i386 gnupg-l10n all 2.2.44-1 [700 kB] Get: 67 http://deb.debian.org/debian unstable/main i386 gpg i386 2.2.44-1 [569 kB] Get: 68 http://deb.debian.org/debian unstable/main i386 pinentry-curses i386 1.2.1-4+b1 [80.4 kB] Get: 69 http://deb.debian.org/debian unstable/main i386 gpg-agent i386 2.2.44-1 [268 kB] Get: 70 http://deb.debian.org/debian unstable/main i386 gpgsm i386 2.2.44-1 [273 kB] Get: 71 http://deb.debian.org/debian unstable/main i386 gnupg all 2.2.44-1 [375 kB] Get: 72 http://deb.debian.org/debian unstable/main i386 libfile-dirlist-perl all 0.05-3 [7600 B] Get: 73 http://deb.debian.org/debian unstable/main i386 libfile-which-perl all 1.27-2 [15.1 kB] Get: 74 http://deb.debian.org/debian unstable/main i386 libfile-homedir-perl all 1.006-2 [42.4 kB] Get: 75 http://deb.debian.org/debian unstable/main i386 libfile-touch-perl all 0.12-2 [8816 B] Get: 76 http://deb.debian.org/debian unstable/main i386 libio-pty-perl i386 1:1.20-1+b2 [35.8 kB] Get: 77 http://deb.debian.org/debian unstable/main i386 libipc-run-perl all 20231003.0-2 [101 kB] Get: 78 http://deb.debian.org/debian unstable/main i386 libclass-method-modifiers-perl all 2.15-1 [18.0 kB] Get: 79 http://deb.debian.org/debian unstable/main i386 libclass-xsaccessor-perl i386 1.19-4+b4 [37.5 kB] Get: 80 http://deb.debian.org/debian unstable/main i386 libb-hooks-op-check-perl i386 0.22-3+b2 [10.7 kB] Get: 81 http://deb.debian.org/debian unstable/main i386 libdynaloader-functions-perl all 0.004-1 [12.1 kB] Get: 82 http://deb.debian.org/debian unstable/main i386 libdevel-callchecker-perl i386 0.009-1+b1 [16.2 kB] Get: 83 http://deb.debian.org/debian unstable/main i386 libparams-classify-perl i386 0.015-2+b4 [23.1 kB] Get: 84 http://deb.debian.org/debian unstable/main i386 libmodule-runtime-perl all 0.016-2 [19.6 kB] Get: 85 http://deb.debian.org/debian unstable/main i386 libimport-into-perl all 1.002005-2 [11.3 kB] Get: 86 http://deb.debian.org/debian unstable/main i386 librole-tiny-perl all 2.002004-1 [21.4 kB] Get: 87 http://deb.debian.org/debian unstable/main i386 libsub-quote-perl all 2.006008-1 [21.8 kB] Get: 88 http://deb.debian.org/debian unstable/main i386 libmoo-perl all 2.005005-1 [58.0 kB] Get: 89 http://deb.debian.org/debian unstable/main i386 libencode-locale-perl all 1.05-3 [12.9 kB] Get: 90 http://deb.debian.org/debian unstable/main i386 libtimedate-perl all 2.3300-2 [39.3 kB] Get: 91 http://deb.debian.org/debian unstable/main i386 libhttp-date-perl all 6.06-1 [10.7 kB] Get: 92 http://deb.debian.org/debian unstable/main i386 libfile-listing-perl all 6.16-1 [12.4 kB] Get: 93 http://deb.debian.org/debian unstable/main i386 libhtml-tagset-perl all 3.24-1 [14.7 kB] Get: 94 http://deb.debian.org/debian unstable/main i386 liburi-perl all 5.30-1 [105 kB] Get: 95 http://deb.debian.org/debian unstable/main i386 libhtml-parser-perl i386 3.83-1+b1 [101 kB] Get: 96 http://deb.debian.org/debian unstable/main i386 libhtml-tree-perl all 5.07-3 [211 kB] Get: 97 http://deb.debian.org/debian unstable/main i386 libclone-perl i386 0.47-1+b1 [14.0 kB] Get: 98 http://deb.debian.org/debian unstable/main i386 libio-html-perl all 1.004-3 [16.2 kB] Get: 99 http://deb.debian.org/debian unstable/main i386 liblwp-mediatypes-perl all 6.04-2 [20.2 kB] Get: 100 http://deb.debian.org/debian unstable/main i386 libhttp-message-perl all 7.00-2 [79.8 kB] Get: 101 http://deb.debian.org/debian unstable/main i386 libhttp-cookies-perl all 6.11-1 [19.1 kB] Get: 102 http://deb.debian.org/debian unstable/main i386 libhttp-negotiate-perl all 6.01-2 [13.1 kB] Get: 103 http://deb.debian.org/debian unstable/main i386 perl-openssl-defaults i386 7+b2 [6720 B] Get: 104 http://deb.debian.org/debian unstable/main i386 libnet-ssleay-perl i386 1.94-1+b2 [339 kB] Get: 105 http://deb.debian.org/debian unstable/main i386 libio-socket-ssl-perl all 2.089-1 [223 kB] Get: 106 http://deb.debian.org/debian unstable/main i386 libnet-http-perl all 6.23-1 [23.9 kB] Get: 107 http://deb.debian.org/debian unstable/main i386 liblwp-protocol-https-perl all 6.14-1 [10.8 kB] Get: 108 http://deb.debian.org/debian unstable/main i386 libtry-tiny-perl all 0.32-1 [22.9 kB] Get: 109 http://deb.debian.org/debian unstable/main i386 libwww-robotrules-perl all 6.02-1 [12.9 kB] Get: 110 http://deb.debian.org/debian unstable/main i386 libwww-perl all 6.77-1 [183 kB] Get: 111 http://deb.debian.org/debian unstable/main i386 patchutils i386 0.4.2-1 [79.6 kB] Get: 112 http://deb.debian.org/debian unstable/main i386 wdiff i386 1.2.2-6 [120 kB] Get: 113 http://deb.debian.org/debian unstable/main i386 devscripts all 2.24.1 [1071 kB] Get: 114 http://deb.debian.org/debian unstable/main i386 dh-exec i386 0.30 [26.2 kB] Get: 115 http://deb.debian.org/debian unstable/main i386 python3-autocommand all 2.2.2-3 [13.6 kB] Get: 116 http://deb.debian.org/debian unstable/main i386 python3-more-itertools all 10.5.0-1 [63.8 kB] Get: 117 http://deb.debian.org/debian unstable/main i386 python3-typing-extensions all 4.12.2-2 [73.0 kB] Get: 118 http://deb.debian.org/debian unstable/main i386 python3-zipp all 3.20.2-1 [10.3 kB] Get: 119 http://deb.debian.org/debian unstable/main i386 python3-importlib-metadata all 8.5.0-1 [21.0 kB] Get: 120 http://deb.debian.org/debian unstable/main i386 python3-typeguard all 4.3.0-1 [36.5 kB] Get: 121 http://deb.debian.org/debian unstable/main i386 python3-inflect all 7.3.1-2 [32.4 kB] Get: 122 http://deb.debian.org/debian unstable/main i386 python3-jaraco.context all 6.0.0-1 [7984 B] Get: 123 http://deb.debian.org/debian unstable/main i386 python3-jaraco.functools all 4.1.0-1 [12.0 kB] Get: 124 http://deb.debian.org/debian unstable/main i386 python3-pkg-resources all 74.1.2-2 [213 kB] Get: 125 http://deb.debian.org/debian unstable/main i386 python3-setuptools all 74.1.2-2 [736 kB] Get: 126 http://deb.debian.org/debian unstable/main i386 dh-python all 6.20240824 [109 kB] Get: 127 http://deb.debian.org/debian unstable/main i386 diffstat i386 1.66-1 [34.7 kB] Get: 128 http://deb.debian.org/debian unstable/main i386 distro-info-data all 0.63 [6408 B] Get: 129 http://deb.debian.org/debian unstable/main i386 distro-info i386 1.12 [19.3 kB] Get: 130 http://deb.debian.org/debian unstable/main i386 python3-chardet all 5.2.0+dfsg-1 [107 kB] Get: 131 http://deb.debian.org/debian unstable/main i386 python3-debian all 0.1.49 [115 kB] Get: 132 http://deb.debian.org/debian unstable/main i386 libgpgme11t64 i386 1.18.0-6+b1 [309 kB] Get: 133 http://deb.debian.org/debian unstable/main i386 python3-gpg i386 1.18.0-6+b1 [355 kB] Get: 134 http://deb.debian.org/debian unstable/main i386 python3-xdg all 0.28-2 [40.5 kB] Get: 135 http://deb.debian.org/debian unstable/main i386 dput all 1.2.2 [45.0 kB] Get: 136 http://deb.debian.org/debian unstable/main i386 ed i386 1.20.2-2 [61.8 kB] Get: 137 http://deb.debian.org/debian unstable/main i386 libbrotli1 i386 1.1.0-2+b4 [309 kB] Get: 138 http://deb.debian.org/debian unstable/main i386 libnghttp2-14 i386 1.63.0-1 [82.7 kB] Get: 139 http://deb.debian.org/debian unstable/main i386 libnghttp3-9 i386 1.4.0-1 [74.3 kB] Get: 140 http://deb.debian.org/debian unstable/main i386 libngtcp2-16 i386 1.6.0-1 [154 kB] Get: 141 http://deb.debian.org/debian unstable/main i386 libngtcp2-crypto-gnutls8 i386 1.6.0-1 [20.2 kB] Get: 142 http://deb.debian.org/debian unstable/main i386 libpsl5t64 i386 0.21.2-1.1 [57.4 kB] Get: 143 http://deb.debian.org/debian unstable/main i386 librtmp1 i386 2.4+20151223.gitfa8646d.1-2+b4 [62.0 kB] Get: 144 http://deb.debian.org/debian unstable/main i386 libssh2-1t64 i386 1.11.1-1 [256 kB] Get: 145 http://deb.debian.org/debian unstable/main i386 libcurl3t64-gnutls i386 8.10.1-2 [400 kB] Get: 146 http://deb.debian.org/debian unstable/main i386 liberror-perl all 0.17029-2 [29.0 kB] Get: 147 http://deb.debian.org/debian unstable/main i386 git-man all 1:2.45.2-1 [2158 kB] Get: 148 http://deb.debian.org/debian unstable/main i386 git i386 1:2.45.2-1 [9166 kB] Get: 149 http://deb.debian.org/debian unstable/main i386 python3-dateutil all 2.9.0-3 [79.3 kB] Get: 150 http://deb.debian.org/debian unstable/main i386 libyaml-0-2 i386 0.2.5-1+b1 [55.2 kB] Get: 151 http://deb.debian.org/debian unstable/main i386 python3-yaml i386 6.0.2-1 [134 kB] Get: 152 http://deb.debian.org/debian unstable/main i386 git-buildpackage all 0.9.35 [812 kB] Get: 153 http://deb.debian.org/debian unstable/main i386 libarchive13t64 i386 3.7.4-1 [390 kB] Get: 154 http://deb.debian.org/debian unstable/main i386 libllhttp9.1 i386 9.2.1~5.28.4+dfsg1+~cs23.12.11-2 [48.9 kB] Get: 155 http://deb.debian.org/debian unstable/main i386 libmbedcrypto16 i386 3.6.0-3 [373 kB] Get: 156 http://deb.debian.org/debian unstable/main i386 libmbedx509-7 i386 3.6.0-3 [146 kB] Get: 157 http://deb.debian.org/debian unstable/main i386 libmbedtls21 i386 3.6.0-3 [236 kB] Get: 158 http://deb.debian.org/debian unstable/main i386 libgit2-1.8 i386 1.8.2~rc1+ds2-1+b1 [583 kB] Get: 159 http://deb.debian.org/debian unstable/main i386 libglib2.0-0t64 i386 2.82.2-1 [1572 kB] Get: 160 http://deb.debian.org/debian unstable/main i386 libnorm1t64 i386 1.5.9+dfsg-3.1 [237 kB] Get: 161 http://deb.debian.org/debian unstable/main i386 libpgm-5.3-0t64 i386 5.3.128~dfsg-2.1 [167 kB] Get: 162 http://deb.debian.org/debian unstable/main i386 libsodium23 i386 1.0.18-1+b1 [185 kB] Get: 163 http://deb.debian.org/debian unstable/main i386 libsys-cpuaffinity-perl i386 1.13~03-2+b4 [32.8 kB] Get: 164 http://deb.debian.org/debian unstable/main i386 libxdelta2t64 i386 1.1.3-10.7 [50.9 kB] Get: 165 http://deb.debian.org/debian unstable/main i386 libzmq5 i386 4.3.5-1+b2 [306 kB] Get: 166 http://deb.debian.org/debian unstable/main i386 lsb-release all 12.1-1 [5912 B] Get: 167 http://deb.debian.org/debian unstable/main i386 pbzip2 i386 1.1.13-1 [47.4 kB] Get: 168 http://deb.debian.org/debian unstable/main i386 pixz i386 1.0.7-3 [22.7 kB] Get: 169 http://deb.debian.org/debian unstable/main i386 xdelta i386 1.1.3-10.7 [27.0 kB] Get: 170 http://deb.debian.org/debian unstable/main i386 xdelta3 i386 3.0.11-dfsg-1.2 [76.2 kB] Get: 171 http://deb.debian.org/debian unstable/main i386 pristine-tar i386 1.50+nmu2 [104 kB] Get: 172 http://deb.debian.org/debian unstable/main i386 python-apt-common all 2.9.0 [66.2 kB] Get: 173 http://deb.debian.org/debian unstable/main i386 python3-apt i386 2.9.0+b1 [169 kB] Get: 174 http://deb.debian.org/debian unstable/main i386 python3-bcrypt i386 4.2.0-2 [222 kB] Get: 175 http://deb.debian.org/debian unstable/main i386 python3-blinker all 1.8.2-1 [13.1 kB] Get: 176 http://deb.debian.org/debian unstable/main i386 python3-cachetools all 5.3.3-1 [13.2 kB] Get: 177 http://deb.debian.org/debian unstable/main i386 python3-certifi all 2024.8.30+dfsg-1 [9576 B] Get: 178 http://deb.debian.org/debian unstable/main i386 python3-cffi-backend i386 1.17.1-1 [89.9 kB] Get: 179 http://deb.debian.org/debian unstable/main i386 python3-charset-normalizer i386 3.3.2-4 [118 kB] Get: 180 http://deb.debian.org/debian unstable/main i386 python3-cryptography i386 43.0.0-1 [975 kB] Get: 181 http://deb.debian.org/debian unstable/main i386 python3-debianbts all 4.1.1 [12.4 kB] Get: 182 http://deb.debian.org/debian unstable/main i386 python3-distro all 1.9.0-1 [20.3 kB] Get: 183 http://deb.debian.org/debian unstable/main i386 python3-distro-info all 1.12 [7688 B] Get: 184 http://deb.debian.org/debian unstable/main i386 python3-pyparsing all 3.1.2-1 [146 kB] Get: 185 http://deb.debian.org/debian unstable/main i386 python3-httplib2 all 0.22.0-1 [36.1 kB] Get: 186 http://deb.debian.org/debian unstable/main i386 python3-idna all 3.8-2 [41.6 kB] Get: 187 http://deb.debian.org/debian unstable/main i386 python3-iniconfig all 1.1.1-2 [6396 B] Get: 188 http://deb.debian.org/debian unstable/main i386 python3-jaraco.classes all 3.4.0-1 [7728 B] Get: 189 http://deb.debian.org/debian unstable/main i386 python3-jeepney all 0.8.0-3 [34.0 kB] Get: 190 http://deb.debian.org/debian unstable/main i386 python3-jwt all 2.7.0-1 [29.7 kB] Get: 191 http://deb.debian.org/debian unstable/main i386 python3-secretstorage all 3.3.3-3 [16.1 kB] Get: 192 http://deb.debian.org/debian unstable/main i386 python3-keyring all 25.4.1-1 [54.6 kB] Get: 193 http://deb.debian.org/debian unstable/main i386 python3-pycryptodome i386 3.20.0+dfsg-3 [1085 kB] Get: 194 http://deb.debian.org/debian unstable/main i386 python3-keyrings.alt all 5.0.2-1 [17.7 kB] Get: 195 http://deb.debian.org/debian unstable/main i386 python3-lazr.uri all 1.0.6-4 [13.8 kB] Get: 196 http://deb.debian.org/debian unstable/main i386 python3-wadllib all 2.0.0-1 [37.9 kB] Get: 197 http://deb.debian.org/debian unstable/main i386 python3-oauthlib all 3.2.2-2 [95.5 kB] Get: 198 http://deb.debian.org/debian unstable/main i386 python3-lazr.restfulclient all 0.14.6-2 [50.7 kB] Get: 199 http://deb.debian.org/debian unstable/main i386 python3-launchpadlib all 2.0.0-1 [136 kB] Get: 200 http://deb.debian.org/debian unstable/main i386 python3-launchpadlib-desktop all 2.0.0-1 [8684 B] Get: 201 http://deb.debian.org/debian unstable/main i386 python3-packaging all 24.1-1 [45.8 kB] Get: 202 http://deb.debian.org/debian unstable/main i386 python3-pluggy all 1.5.0-1 [26.9 kB] Get: 203 http://deb.debian.org/debian unstable/main i386 python3-py all 1.11.0-2 [88.7 kB] Get: 204 http://deb.debian.org/debian unstable/main i386 python3-pygit2 i386 1.16.0-1 [176 kB] Get: 205 http://deb.debian.org/debian unstable/main i386 python3-pytest all 8.3.3-1 [249 kB] Get: 206 http://deb.debian.org/debian unstable/main i386 python3-urllib3 all 2.0.7-2 [111 kB] Get: 207 http://deb.debian.org/debian unstable/main i386 python3-requests all 2.32.3+dfsg-1 [71.9 kB] Get: 208 http://deb.debian.org/debian unstable/main i386 python3-systemd i386 235-1+b4 [40.6 kB] Get: 209 http://deb.debian.org/debian unstable/main i386 python3-tenacity all 8.4.2+really8.4.1-1 [46.0 kB] Get: 210 http://deb.debian.org/debian unstable/main i386 python3-ubuntutools all 0.202 [66.3 kB] Get: 211 http://deb.debian.org/debian unstable/main i386 python3-zmq i386 24.0.1-5+b2 [276 kB] Get: 212 http://deb.debian.org/debian unstable/main i386 quilt all 0.68-1 [437 kB] Get: 213 http://deb.debian.org/debian unstable/main i386 ubuntu-dev-tools all 0.202 [98.9 kB] Get: 214 http://deb.debian.org/debian unstable/main i386 ubuntu-keyring all 2023.11.28.1-0.2 [14.1 kB] Fetched 64.0 MB in 1s (53.8 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libpython3.12-minimal:i386. (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 ... 19931 files and directories currently installed.) Preparing to unpack .../libpython3.12-minimal_3.12.7-1_i386.deb ... Unpacking libpython3.12-minimal:i386 (3.12.7-1) ... Selecting previously unselected package libexpat1:i386. Preparing to unpack .../libexpat1_2.6.3-1_i386.deb ... Unpacking libexpat1:i386 (2.6.3-1) ... Selecting previously unselected package python3.12-minimal. Preparing to unpack .../python3.12-minimal_3.12.7-1_i386.deb ... Unpacking python3.12-minimal (3.12.7-1) ... Setting up libpython3.12-minimal:i386 (3.12.7-1) ... Setting up libexpat1:i386 (2.6.3-1) ... Setting up python3.12-minimal (3.12.7-1) ... Selecting previously unselected package python3-minimal. (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 ... 20251 files and directories currently installed.) Preparing to unpack .../00-python3-minimal_3.12.6-1_i386.deb ... Unpacking python3-minimal (3.12.6-1) ... Selecting previously unselected package media-types. Preparing to unpack .../01-media-types_10.1.0_all.deb ... Unpacking media-types (10.1.0) ... Selecting previously unselected package netbase. Preparing to unpack .../02-netbase_6.4_all.deb ... Unpacking netbase (6.4) ... Selecting previously unselected package tzdata. Preparing to unpack .../03-tzdata_2024b-3_all.deb ... Unpacking tzdata (2024b-3) ... Selecting previously unselected package libkrb5support0:i386. Preparing to unpack .../04-libkrb5support0_1.21.3-3_i386.deb ... Unpacking libkrb5support0:i386 (1.21.3-3) ... Selecting previously unselected package libcom-err2:i386. Preparing to unpack .../05-libcom-err2_1.47.1-1_i386.deb ... Unpacking libcom-err2:i386 (1.47.1-1) ... Selecting previously unselected package libk5crypto3:i386. Preparing to unpack .../06-libk5crypto3_1.21.3-3_i386.deb ... Unpacking libk5crypto3:i386 (1.21.3-3) ... Selecting previously unselected package libkeyutils1:i386. Preparing to unpack .../07-libkeyutils1_1.6.3-3_i386.deb ... Unpacking libkeyutils1:i386 (1.6.3-3) ... Selecting previously unselected package libkrb5-3:i386. Preparing to unpack .../08-libkrb5-3_1.21.3-3_i386.deb ... Unpacking libkrb5-3:i386 (1.21.3-3) ... Selecting previously unselected package libgssapi-krb5-2:i386. Preparing to unpack .../09-libgssapi-krb5-2_1.21.3-3_i386.deb ... Unpacking libgssapi-krb5-2:i386 (1.21.3-3) ... Selecting previously unselected package libtirpc-common. Preparing to unpack .../10-libtirpc-common_1.3.4+ds-1.3_all.deb ... Unpacking libtirpc-common (1.3.4+ds-1.3) ... Selecting previously unselected package libtirpc3t64:i386. Preparing to unpack .../11-libtirpc3t64_1.3.4+ds-1.3_i386.deb ... Adding 'diversion of /lib/i386-linux-gnu/libtirpc.so.3 to /lib/i386-linux-gnu/libtirpc.so.3.usr-is-merged by libtirpc3t64' Adding 'diversion of /lib/i386-linux-gnu/libtirpc.so.3.0.0 to /lib/i386-linux-gnu/libtirpc.so.3.0.0.usr-is-merged by libtirpc3t64' Unpacking libtirpc3t64:i386 (1.3.4+ds-1.3) ... Selecting previously unselected package libnsl2:i386. Preparing to unpack .../12-libnsl2_1.3.0-3+b2_i386.deb ... Unpacking libnsl2:i386 (1.3.0-3+b2) ... Selecting previously unselected package readline-common. Preparing to unpack .../13-readline-common_8.2-5_all.deb ... Unpacking readline-common (8.2-5) ... Selecting previously unselected package libreadline8t64:i386. Preparing to unpack .../14-libreadline8t64_8.2-5_i386.deb ... Adding 'diversion of /lib/i386-linux-gnu/libhistory.so.8 to /lib/i386-linux-gnu/libhistory.so.8.usr-is-merged by libreadline8t64' Adding 'diversion of /lib/i386-linux-gnu/libhistory.so.8.2 to /lib/i386-linux-gnu/libhistory.so.8.2.usr-is-merged by libreadline8t64' Adding 'diversion of /lib/i386-linux-gnu/libreadline.so.8 to /lib/i386-linux-gnu/libreadline.so.8.usr-is-merged by libreadline8t64' Adding 'diversion of /lib/i386-linux-gnu/libreadline.so.8.2 to /lib/i386-linux-gnu/libreadline.so.8.2.usr-is-merged by libreadline8t64' Unpacking libreadline8t64:i386 (8.2-5) ... Selecting previously unselected package libpython3.12-stdlib:i386. Preparing to unpack .../15-libpython3.12-stdlib_3.12.7-1_i386.deb ... Unpacking libpython3.12-stdlib:i386 (3.12.7-1) ... Selecting previously unselected package python3.12. Preparing to unpack .../16-python3.12_3.12.7-1_i386.deb ... Unpacking python3.12 (3.12.7-1) ... Selecting previously unselected package libpython3-stdlib:i386. Preparing to unpack .../17-libpython3-stdlib_3.12.6-1_i386.deb ... Unpacking libpython3-stdlib:i386 (3.12.6-1) ... Setting up python3-minimal (3.12.6-1) ... Selecting previously unselected package python3. (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 ... 21311 files and directories currently installed.) Preparing to unpack .../000-python3_3.12.6-1_i386.deb ... Unpacking python3 (3.12.6-1) ... Selecting previously unselected package libapparmor1:i386. Preparing to unpack .../001-libapparmor1_3.1.7-1+b1_i386.deb ... Unpacking libapparmor1:i386 (3.1.7-1+b1) ... Selecting previously unselected package sudo. Preparing to unpack .../002-sudo_1.9.15p5-3+b1_i386.deb ... Unpacking sudo (1.9.15p5-3+b1) ... Selecting previously unselected package sensible-utils. Preparing to unpack .../003-sensible-utils_0.0.24_all.deb ... Unpacking sensible-utils (0.0.24) ... Selecting previously unselected package bash-completion. Preparing to unpack .../004-bash-completion_1%3a2.14.0-1_all.deb ... Unpacking bash-completion (1:2.14.0-1) ... Selecting previously unselected package openssl. Preparing to unpack .../005-openssl_3.3.2-1_i386.deb ... Unpacking openssl (3.3.2-1) ... Selecting previously unselected package ca-certificates. Preparing to unpack .../006-ca-certificates_20240203_all.deb ... Unpacking ca-certificates (20240203) ... Selecting previously unselected package libmagic-mgc. Preparing to unpack .../007-libmagic-mgc_1%3a5.45-3_i386.deb ... Unpacking libmagic-mgc (1:5.45-3) ... Selecting previously unselected package libmagic1t64:i386. Preparing to unpack .../008-libmagic1t64_1%3a5.45-3_i386.deb ... Unpacking libmagic1t64:i386 (1:5.45-3) ... Selecting previously unselected package file. Preparing to unpack .../009-file_1%3a5.45-3_i386.deb ... Unpacking file (1:5.45-3) ... Selecting previously unselected package gettext-base. Preparing to unpack .../010-gettext-base_0.22.5-2_i386.deb ... Unpacking gettext-base (0.22.5-2) ... Selecting previously unselected package libuchardet0:i386. Preparing to unpack .../011-libuchardet0_0.0.8-1+b1_i386.deb ... Unpacking libuchardet0:i386 (0.0.8-1+b1) ... Selecting previously unselected package groff-base. Preparing to unpack .../012-groff-base_1.23.0-5_i386.deb ... Unpacking groff-base (1.23.0-5) ... Selecting previously unselected package bsdextrautils. Preparing to unpack .../013-bsdextrautils_2.40.2-9_i386.deb ... Unpacking bsdextrautils (2.40.2-9) ... Selecting previously unselected package libpipeline1:i386. Preparing to unpack .../014-libpipeline1_1.5.8-1_i386.deb ... Unpacking libpipeline1:i386 (1.5.8-1) ... Selecting previously unselected package man-db. Preparing to unpack .../015-man-db_2.13.0-1_i386.deb ... Unpacking man-db (2.13.0-1) ... Selecting previously unselected package m4. Preparing to unpack .../016-m4_1.4.19-4_i386.deb ... Unpacking m4 (1.4.19-4) ... Selecting previously unselected package autoconf. Preparing to unpack .../017-autoconf_2.72-3_all.deb ... Unpacking autoconf (2.72-3) ... Selecting previously unselected package autotools-dev. Preparing to unpack .../018-autotools-dev_20220109.1_all.deb ... Unpacking autotools-dev (20220109.1) ... Selecting previously unselected package automake. Preparing to unpack .../019-automake_1%3a1.16.5-1.3_all.deb ... Unpacking automake (1:1.16.5-1.3) ... Selecting previously unselected package autopoint. Preparing to unpack .../020-autopoint_0.22.5-2_all.deb ... Unpacking autopoint (0.22.5-2) ... Selecting previously unselected package dctrl-tools. Preparing to unpack .../021-dctrl-tools_2.24-3_i386.deb ... Unpacking dctrl-tools (2.24-3) ... Selecting previously unselected package libdebhelper-perl. Preparing to unpack .../022-libdebhelper-perl_13.20_all.deb ... Unpacking libdebhelper-perl (13.20) ... Selecting previously unselected package libtool. Preparing to unpack .../023-libtool_2.4.7-7_all.deb ... Unpacking libtool (2.4.7-7) ... Selecting previously unselected package dh-autoreconf. Preparing to unpack .../024-dh-autoreconf_20_all.deb ... Unpacking dh-autoreconf (20) ... Selecting previously unselected package libarchive-zip-perl. Preparing to unpack .../025-libarchive-zip-perl_1.68-1_all.deb ... Unpacking libarchive-zip-perl (1.68-1) ... Selecting previously unselected package libfile-stripnondeterminism-perl. Preparing to unpack .../026-libfile-stripnondeterminism-perl_1.14.0-1_all.deb ... Unpacking libfile-stripnondeterminism-perl (1.14.0-1) ... Selecting previously unselected package dh-strip-nondeterminism. Preparing to unpack .../027-dh-strip-nondeterminism_1.14.0-1_all.deb ... Unpacking dh-strip-nondeterminism (1.14.0-1) ... Selecting previously unselected package libelf1t64:i386. Preparing to unpack .../028-libelf1t64_0.191-2_i386.deb ... Unpacking libelf1t64:i386 (0.191-2) ... Selecting previously unselected package dwz. Preparing to unpack .../029-dwz_0.15-1+b1_i386.deb ... Unpacking dwz (0.15-1+b1) ... Selecting previously unselected package libicu72:i386. Preparing to unpack .../030-libicu72_72.1-5_i386.deb ... Unpacking libicu72:i386 (72.1-5) ... Selecting previously unselected package libxml2:i386. Preparing to unpack .../031-libxml2_2.12.7+dfsg+really2.9.14-0.1_i386.deb ... Unpacking libxml2:i386 (2.12.7+dfsg+really2.9.14-0.1) ... Selecting previously unselected package gettext. Preparing to unpack .../032-gettext_0.22.5-2_i386.deb ... Unpacking gettext (0.22.5-2) ... Selecting previously unselected package intltool-debian. Preparing to unpack .../033-intltool-debian_0.35.0+20060710.6_all.deb ... Unpacking intltool-debian (0.35.0+20060710.6) ... Selecting previously unselected package po-debconf. Preparing to unpack .../034-po-debconf_1.0.21+nmu1_all.deb ... Unpacking po-debconf (1.0.21+nmu1) ... Selecting previously unselected package debhelper. Preparing to unpack .../035-debhelper_13.20_all.deb ... Unpacking debhelper (13.20) ... Selecting previously unselected package libassuan9:i386. Preparing to unpack .../036-libassuan9_3.0.1-2_i386.deb ... Unpacking libassuan9:i386 (3.0.1-2) ... Selecting previously unselected package gpgconf. Preparing to unpack .../037-gpgconf_2.2.44-1_i386.deb ... Unpacking gpgconf (2.2.44-1) ... Selecting previously unselected package libksba8:i386. Preparing to unpack .../038-libksba8_1.6.7-2_i386.deb ... Unpacking libksba8:i386 (1.6.7-2) ... Selecting previously unselected package libsasl2-modules-db:i386. Preparing to unpack .../039-libsasl2-modules-db_2.1.28+dfsg1-8_i386.deb ... Unpacking libsasl2-modules-db:i386 (2.1.28+dfsg1-8) ... Selecting previously unselected package libsasl2-2:i386. Preparing to unpack .../040-libsasl2-2_2.1.28+dfsg1-8_i386.deb ... Unpacking libsasl2-2:i386 (2.1.28+dfsg1-8) ... Selecting previously unselected package libldap-2.5-0:i386. Preparing to unpack .../041-libldap-2.5-0_2.5.18+dfsg-3+b1_i386.deb ... Unpacking libldap-2.5-0:i386 (2.5.18+dfsg-3+b1) ... Selecting previously unselected package libnpth0t64:i386. Preparing to unpack .../042-libnpth0t64_1.6-3.1_i386.deb ... Unpacking libnpth0t64:i386 (1.6-3.1) ... Selecting previously unselected package dirmngr. Preparing to unpack .../043-dirmngr_2.2.44-1_i386.deb ... Unpacking dirmngr (2.2.44-1) ... Selecting previously unselected package gnupg-l10n. Preparing to unpack .../044-gnupg-l10n_2.2.44-1_all.deb ... Unpacking gnupg-l10n (2.2.44-1) ... Selecting previously unselected package gpg. Preparing to unpack .../045-gpg_2.2.44-1_i386.deb ... Unpacking gpg (2.2.44-1) ... Selecting previously unselected package pinentry-curses. Preparing to unpack .../046-pinentry-curses_1.2.1-4+b1_i386.deb ... Unpacking pinentry-curses (1.2.1-4+b1) ... Selecting previously unselected package gpg-agent. Preparing to unpack .../047-gpg-agent_2.2.44-1_i386.deb ... Unpacking gpg-agent (2.2.44-1) ... Selecting previously unselected package gpgsm. Preparing to unpack .../048-gpgsm_2.2.44-1_i386.deb ... Unpacking gpgsm (2.2.44-1) ... Selecting previously unselected package gnupg. Preparing to unpack .../049-gnupg_2.2.44-1_all.deb ... Unpacking gnupg (2.2.44-1) ... Selecting previously unselected package libfile-dirlist-perl. Preparing to unpack .../050-libfile-dirlist-perl_0.05-3_all.deb ... Unpacking libfile-dirlist-perl (0.05-3) ... Selecting previously unselected package libfile-which-perl. Preparing to unpack .../051-libfile-which-perl_1.27-2_all.deb ... Unpacking libfile-which-perl (1.27-2) ... Selecting previously unselected package libfile-homedir-perl. Preparing to unpack .../052-libfile-homedir-perl_1.006-2_all.deb ... Unpacking libfile-homedir-perl (1.006-2) ... Selecting previously unselected package libfile-touch-perl. Preparing to unpack .../053-libfile-touch-perl_0.12-2_all.deb ... Unpacking libfile-touch-perl (0.12-2) ... Selecting previously unselected package libio-pty-perl. Preparing to unpack .../054-libio-pty-perl_1%3a1.20-1+b2_i386.deb ... Unpacking libio-pty-perl (1:1.20-1+b2) ... Selecting previously unselected package libipc-run-perl. Preparing to unpack .../055-libipc-run-perl_20231003.0-2_all.deb ... Unpacking libipc-run-perl (20231003.0-2) ... Selecting previously unselected package libclass-method-modifiers-perl. Preparing to unpack .../056-libclass-method-modifiers-perl_2.15-1_all.deb ... Unpacking libclass-method-modifiers-perl (2.15-1) ... Selecting previously unselected package libclass-xsaccessor-perl. Preparing to unpack .../057-libclass-xsaccessor-perl_1.19-4+b4_i386.deb ... Unpacking libclass-xsaccessor-perl (1.19-4+b4) ... Selecting previously unselected package libb-hooks-op-check-perl:i386. Preparing to unpack .../058-libb-hooks-op-check-perl_0.22-3+b2_i386.deb ... Unpacking libb-hooks-op-check-perl:i386 (0.22-3+b2) ... Selecting previously unselected package libdynaloader-functions-perl. Preparing to unpack .../059-libdynaloader-functions-perl_0.004-1_all.deb ... Unpacking libdynaloader-functions-perl (0.004-1) ... Selecting previously unselected package libdevel-callchecker-perl:i386. Preparing to unpack .../060-libdevel-callchecker-perl_0.009-1+b1_i386.deb ... Unpacking libdevel-callchecker-perl:i386 (0.009-1+b1) ... Selecting previously unselected package libparams-classify-perl:i386. Preparing to unpack .../061-libparams-classify-perl_0.015-2+b4_i386.deb ... Unpacking libparams-classify-perl:i386 (0.015-2+b4) ... Selecting previously unselected package libmodule-runtime-perl. Preparing to unpack .../062-libmodule-runtime-perl_0.016-2_all.deb ... Unpacking libmodule-runtime-perl (0.016-2) ... Selecting previously unselected package libimport-into-perl. Preparing to unpack .../063-libimport-into-perl_1.002005-2_all.deb ... Unpacking libimport-into-perl (1.002005-2) ... Selecting previously unselected package librole-tiny-perl. Preparing to unpack .../064-librole-tiny-perl_2.002004-1_all.deb ... Unpacking librole-tiny-perl (2.002004-1) ... Selecting previously unselected package libsub-quote-perl. Preparing to unpack .../065-libsub-quote-perl_2.006008-1_all.deb ... Unpacking libsub-quote-perl (2.006008-1) ... Selecting previously unselected package libmoo-perl. Preparing to unpack .../066-libmoo-perl_2.005005-1_all.deb ... Unpacking libmoo-perl (2.005005-1) ... Selecting previously unselected package libencode-locale-perl. Preparing to unpack .../067-libencode-locale-perl_1.05-3_all.deb ... Unpacking libencode-locale-perl (1.05-3) ... Selecting previously unselected package libtimedate-perl. Preparing to unpack .../068-libtimedate-perl_2.3300-2_all.deb ... Unpacking libtimedate-perl (2.3300-2) ... Selecting previously unselected package libhttp-date-perl. Preparing to unpack .../069-libhttp-date-perl_6.06-1_all.deb ... Unpacking libhttp-date-perl (6.06-1) ... Selecting previously unselected package libfile-listing-perl. Preparing to unpack .../070-libfile-listing-perl_6.16-1_all.deb ... Unpacking libfile-listing-perl (6.16-1) ... Selecting previously unselected package libhtml-tagset-perl. Preparing to unpack .../071-libhtml-tagset-perl_3.24-1_all.deb ... Unpacking libhtml-tagset-perl (3.24-1) ... Selecting previously unselected package liburi-perl. Preparing to unpack .../072-liburi-perl_5.30-1_all.deb ... Unpacking liburi-perl (5.30-1) ... Selecting previously unselected package libhtml-parser-perl:i386. Preparing to unpack .../073-libhtml-parser-perl_3.83-1+b1_i386.deb ... Unpacking libhtml-parser-perl:i386 (3.83-1+b1) ... Selecting previously unselected package libhtml-tree-perl. Preparing to unpack .../074-libhtml-tree-perl_5.07-3_all.deb ... Unpacking libhtml-tree-perl (5.07-3) ... Selecting previously unselected package libclone-perl:i386. Preparing to unpack .../075-libclone-perl_0.47-1+b1_i386.deb ... Unpacking libclone-perl:i386 (0.47-1+b1) ... Selecting previously unselected package libio-html-perl. Preparing to unpack .../076-libio-html-perl_1.004-3_all.deb ... Unpacking libio-html-perl (1.004-3) ... Selecting previously unselected package liblwp-mediatypes-perl. Preparing to unpack .../077-liblwp-mediatypes-perl_6.04-2_all.deb ... Unpacking liblwp-mediatypes-perl (6.04-2) ... Selecting previously unselected package libhttp-message-perl. Preparing to unpack .../078-libhttp-message-perl_7.00-2_all.deb ... Unpacking libhttp-message-perl (7.00-2) ... Selecting previously unselected package libhttp-cookies-perl. Preparing to unpack .../079-libhttp-cookies-perl_6.11-1_all.deb ... Unpacking libhttp-cookies-perl (6.11-1) ... Selecting previously unselected package libhttp-negotiate-perl. Preparing to unpack .../080-libhttp-negotiate-perl_6.01-2_all.deb ... Unpacking libhttp-negotiate-perl (6.01-2) ... Selecting previously unselected package perl-openssl-defaults:i386. Preparing to unpack .../081-perl-openssl-defaults_7+b2_i386.deb ... Unpacking perl-openssl-defaults:i386 (7+b2) ... Selecting previously unselected package libnet-ssleay-perl:i386. Preparing to unpack .../082-libnet-ssleay-perl_1.94-1+b2_i386.deb ... Unpacking libnet-ssleay-perl:i386 (1.94-1+b2) ... Selecting previously unselected package libio-socket-ssl-perl. Preparing to unpack .../083-libio-socket-ssl-perl_2.089-1_all.deb ... Unpacking libio-socket-ssl-perl (2.089-1) ... Selecting previously unselected package libnet-http-perl. Preparing to unpack .../084-libnet-http-perl_6.23-1_all.deb ... Unpacking libnet-http-perl (6.23-1) ... Selecting previously unselected package liblwp-protocol-https-perl. Preparing to unpack .../085-liblwp-protocol-https-perl_6.14-1_all.deb ... Unpacking liblwp-protocol-https-perl (6.14-1) ... Selecting previously unselected package libtry-tiny-perl. Preparing to unpack .../086-libtry-tiny-perl_0.32-1_all.deb ... Unpacking libtry-tiny-perl (0.32-1) ... Selecting previously unselected package libwww-robotrules-perl. Preparing to unpack .../087-libwww-robotrules-perl_6.02-1_all.deb ... Unpacking libwww-robotrules-perl (6.02-1) ... Selecting previously unselected package libwww-perl. Preparing to unpack .../088-libwww-perl_6.77-1_all.deb ... Unpacking libwww-perl (6.77-1) ... Selecting previously unselected package patchutils. Preparing to unpack .../089-patchutils_0.4.2-1_i386.deb ... Unpacking patchutils (0.4.2-1) ... Selecting previously unselected package wdiff. Preparing to unpack .../090-wdiff_1.2.2-6_i386.deb ... Unpacking wdiff (1.2.2-6) ... Selecting previously unselected package devscripts. Preparing to unpack .../091-devscripts_2.24.1_all.deb ... Unpacking devscripts (2.24.1) ... Selecting previously unselected package dh-exec. Preparing to unpack .../092-dh-exec_0.30_i386.deb ... Unpacking dh-exec (0.30) ... Selecting previously unselected package python3-autocommand. Preparing to unpack .../093-python3-autocommand_2.2.2-3_all.deb ... Unpacking python3-autocommand (2.2.2-3) ... Selecting previously unselected package python3-more-itertools. Preparing to unpack .../094-python3-more-itertools_10.5.0-1_all.deb ... Unpacking python3-more-itertools (10.5.0-1) ... Selecting previously unselected package python3-typing-extensions. Preparing to unpack .../095-python3-typing-extensions_4.12.2-2_all.deb ... Unpacking python3-typing-extensions (4.12.2-2) ... Selecting previously unselected package python3-zipp. Preparing to unpack .../096-python3-zipp_3.20.2-1_all.deb ... Unpacking python3-zipp (3.20.2-1) ... Selecting previously unselected package python3-importlib-metadata. Preparing to unpack .../097-python3-importlib-metadata_8.5.0-1_all.deb ... Unpacking python3-importlib-metadata (8.5.0-1) ... Selecting previously unselected package python3-typeguard. Preparing to unpack .../098-python3-typeguard_4.3.0-1_all.deb ... Unpacking python3-typeguard (4.3.0-1) ... Selecting previously unselected package python3-inflect. Preparing to unpack .../099-python3-inflect_7.3.1-2_all.deb ... Unpacking python3-inflect (7.3.1-2) ... Selecting previously unselected package python3-jaraco.context. Preparing to unpack .../100-python3-jaraco.context_6.0.0-1_all.deb ... Unpacking python3-jaraco.context (6.0.0-1) ... Selecting previously unselected package python3-jaraco.functools. Preparing to unpack .../101-python3-jaraco.functools_4.1.0-1_all.deb ... Unpacking python3-jaraco.functools (4.1.0-1) ... Selecting previously unselected package python3-pkg-resources. Preparing to unpack .../102-python3-pkg-resources_74.1.2-2_all.deb ... Unpacking python3-pkg-resources (74.1.2-2) ... Selecting previously unselected package python3-setuptools. Preparing to unpack .../103-python3-setuptools_74.1.2-2_all.deb ... Unpacking python3-setuptools (74.1.2-2) ... Selecting previously unselected package dh-python. Preparing to unpack .../104-dh-python_6.20240824_all.deb ... Unpacking dh-python (6.20240824) ... Selecting previously unselected package diffstat. Preparing to unpack .../105-diffstat_1.66-1_i386.deb ... Unpacking diffstat (1.66-1) ... Selecting previously unselected package distro-info-data. Preparing to unpack .../106-distro-info-data_0.63_all.deb ... Unpacking distro-info-data (0.63) ... Selecting previously unselected package distro-info. Preparing to unpack .../107-distro-info_1.12_i386.deb ... Unpacking distro-info (1.12) ... Selecting previously unselected package python3-chardet. Preparing to unpack .../108-python3-chardet_5.2.0+dfsg-1_all.deb ... Unpacking python3-chardet (5.2.0+dfsg-1) ... Selecting previously unselected package python3-debian. Preparing to unpack .../109-python3-debian_0.1.49_all.deb ... Unpacking python3-debian (0.1.49) ... Selecting previously unselected package libgpgme11t64:i386. Preparing to unpack .../110-libgpgme11t64_1.18.0-6+b1_i386.deb ... Unpacking libgpgme11t64:i386 (1.18.0-6+b1) ... Selecting previously unselected package python3-gpg. Preparing to unpack .../111-python3-gpg_1.18.0-6+b1_i386.deb ... Unpacking python3-gpg (1.18.0-6+b1) ... Selecting previously unselected package python3-xdg. Preparing to unpack .../112-python3-xdg_0.28-2_all.deb ... Unpacking python3-xdg (0.28-2) ... Selecting previously unselected package dput. Preparing to unpack .../113-dput_1.2.2_all.deb ... Unpacking dput (1.2.2) ... Selecting previously unselected package ed. Preparing to unpack .../114-ed_1.20.2-2_i386.deb ... Unpacking ed (1.20.2-2) ... Selecting previously unselected package libbrotli1:i386. Preparing to unpack .../115-libbrotli1_1.1.0-2+b4_i386.deb ... Unpacking libbrotli1:i386 (1.1.0-2+b4) ... Selecting previously unselected package libnghttp2-14:i386. Preparing to unpack .../116-libnghttp2-14_1.63.0-1_i386.deb ... Unpacking libnghttp2-14:i386 (1.63.0-1) ... Selecting previously unselected package libnghttp3-9:i386. Preparing to unpack .../117-libnghttp3-9_1.4.0-1_i386.deb ... Unpacking libnghttp3-9:i386 (1.4.0-1) ... Selecting previously unselected package libngtcp2-16:i386. Preparing to unpack .../118-libngtcp2-16_1.6.0-1_i386.deb ... Unpacking libngtcp2-16:i386 (1.6.0-1) ... Selecting previously unselected package libngtcp2-crypto-gnutls8:i386. Preparing to unpack .../119-libngtcp2-crypto-gnutls8_1.6.0-1_i386.deb ... Unpacking libngtcp2-crypto-gnutls8:i386 (1.6.0-1) ... Selecting previously unselected package libpsl5t64:i386. Preparing to unpack .../120-libpsl5t64_0.21.2-1.1_i386.deb ... Unpacking libpsl5t64:i386 (0.21.2-1.1) ... Selecting previously unselected package librtmp1:i386. Preparing to unpack .../121-librtmp1_2.4+20151223.gitfa8646d.1-2+b4_i386.deb ... Unpacking librtmp1:i386 (2.4+20151223.gitfa8646d.1-2+b4) ... Selecting previously unselected package libssh2-1t64:i386. Preparing to unpack .../122-libssh2-1t64_1.11.1-1_i386.deb ... Unpacking libssh2-1t64:i386 (1.11.1-1) ... Selecting previously unselected package libcurl3t64-gnutls:i386. Preparing to unpack .../123-libcurl3t64-gnutls_8.10.1-2_i386.deb ... Unpacking libcurl3t64-gnutls:i386 (8.10.1-2) ... Selecting previously unselected package liberror-perl. Preparing to unpack .../124-liberror-perl_0.17029-2_all.deb ... Unpacking liberror-perl (0.17029-2) ... Selecting previously unselected package git-man. Preparing to unpack .../125-git-man_1%3a2.45.2-1_all.deb ... Unpacking git-man (1:2.45.2-1) ... Selecting previously unselected package git. Preparing to unpack .../126-git_1%3a2.45.2-1_i386.deb ... Unpacking git (1:2.45.2-1) ... Selecting previously unselected package python3-dateutil. Preparing to unpack .../127-python3-dateutil_2.9.0-3_all.deb ... Unpacking python3-dateutil (2.9.0-3) ... Selecting previously unselected package libyaml-0-2:i386. Preparing to unpack .../128-libyaml-0-2_0.2.5-1+b1_i386.deb ... Unpacking libyaml-0-2:i386 (0.2.5-1+b1) ... Selecting previously unselected package python3-yaml. Preparing to unpack .../129-python3-yaml_6.0.2-1_i386.deb ... Unpacking python3-yaml (6.0.2-1) ... Selecting previously unselected package git-buildpackage. Preparing to unpack .../130-git-buildpackage_0.9.35_all.deb ... Unpacking git-buildpackage (0.9.35) ... Selecting previously unselected package libarchive13t64:i386. Preparing to unpack .../131-libarchive13t64_3.7.4-1_i386.deb ... Unpacking libarchive13t64:i386 (3.7.4-1) ... Selecting previously unselected package libllhttp9.1. Preparing to unpack .../132-libllhttp9.1_9.2.1~5.28.4+dfsg1+~cs23.12.11-2_i386.deb ... Unpacking libllhttp9.1 (9.2.1~5.28.4+dfsg1+~cs23.12.11-2) ... Selecting previously unselected package libmbedcrypto16:i386. Preparing to unpack .../133-libmbedcrypto16_3.6.0-3_i386.deb ... Unpacking libmbedcrypto16:i386 (3.6.0-3) ... Selecting previously unselected package libmbedx509-7:i386. Preparing to unpack .../134-libmbedx509-7_3.6.0-3_i386.deb ... Unpacking libmbedx509-7:i386 (3.6.0-3) ... Selecting previously unselected package libmbedtls21:i386. Preparing to unpack .../135-libmbedtls21_3.6.0-3_i386.deb ... Unpacking libmbedtls21:i386 (3.6.0-3) ... Selecting previously unselected package libgit2-1.8:i386. Preparing to unpack .../136-libgit2-1.8_1.8.2~rc1+ds2-1+b1_i386.deb ... Unpacking libgit2-1.8:i386 (1.8.2~rc1+ds2-1+b1) ... Selecting previously unselected package libglib2.0-0t64:i386. Preparing to unpack .../137-libglib2.0-0t64_2.82.2-1_i386.deb ... Unpacking libglib2.0-0t64:i386 (2.82.2-1) ... Selecting previously unselected package libnorm1t64:i386. Preparing to unpack .../138-libnorm1t64_1.5.9+dfsg-3.1_i386.deb ... Unpacking libnorm1t64:i386 (1.5.9+dfsg-3.1) ... Selecting previously unselected package libpgm-5.3-0t64:i386. Preparing to unpack .../139-libpgm-5.3-0t64_5.3.128~dfsg-2.1_i386.deb ... Unpacking libpgm-5.3-0t64:i386 (5.3.128~dfsg-2.1) ... Selecting previously unselected package libsodium23:i386. Preparing to unpack .../140-libsodium23_1.0.18-1+b1_i386.deb ... Unpacking libsodium23:i386 (1.0.18-1+b1) ... Selecting previously unselected package libsys-cpuaffinity-perl. Preparing to unpack .../141-libsys-cpuaffinity-perl_1.13~03-2+b4_i386.deb ... Unpacking libsys-cpuaffinity-perl (1.13~03-2+b4) ... Selecting previously unselected package libxdelta2t64:i386. Preparing to unpack .../142-libxdelta2t64_1.1.3-10.7_i386.deb ... Unpacking libxdelta2t64:i386 (1.1.3-10.7) ... Selecting previously unselected package libzmq5:i386. Preparing to unpack .../143-libzmq5_4.3.5-1+b2_i386.deb ... Unpacking libzmq5:i386 (4.3.5-1+b2) ... Selecting previously unselected package lsb-release. Preparing to unpack .../144-lsb-release_12.1-1_all.deb ... Unpacking lsb-release (12.1-1) ... Selecting previously unselected package pbzip2. Preparing to unpack .../145-pbzip2_1.1.13-1_i386.deb ... Unpacking pbzip2 (1.1.13-1) ... Selecting previously unselected package pixz. Preparing to unpack .../146-pixz_1.0.7-3_i386.deb ... Unpacking pixz (1.0.7-3) ... Selecting previously unselected package xdelta. Preparing to unpack .../147-xdelta_1.1.3-10.7_i386.deb ... Unpacking xdelta (1.1.3-10.7) ... Selecting previously unselected package xdelta3. Preparing to unpack .../148-xdelta3_3.0.11-dfsg-1.2_i386.deb ... Unpacking xdelta3 (3.0.11-dfsg-1.2) ... Selecting previously unselected package pristine-tar. Preparing to unpack .../149-pristine-tar_1.50+nmu2_i386.deb ... Unpacking pristine-tar (1.50+nmu2) ... Selecting previously unselected package python-apt-common. Preparing to unpack .../150-python-apt-common_2.9.0_all.deb ... Unpacking python-apt-common (2.9.0) ... Selecting previously unselected package python3-apt. Preparing to unpack .../151-python3-apt_2.9.0+b1_i386.deb ... Unpacking python3-apt (2.9.0+b1) ... Selecting previously unselected package python3-bcrypt. Preparing to unpack .../152-python3-bcrypt_4.2.0-2_i386.deb ... Unpacking python3-bcrypt (4.2.0-2) ... Selecting previously unselected package python3-blinker. Preparing to unpack .../153-python3-blinker_1.8.2-1_all.deb ... Unpacking python3-blinker (1.8.2-1) ... Selecting previously unselected package python3-cachetools. Preparing to unpack .../154-python3-cachetools_5.3.3-1_all.deb ... Unpacking python3-cachetools (5.3.3-1) ... Selecting previously unselected package python3-certifi. Preparing to unpack .../155-python3-certifi_2024.8.30+dfsg-1_all.deb ... Unpacking python3-certifi (2024.8.30+dfsg-1) ... Selecting previously unselected package python3-cffi-backend:i386. Preparing to unpack .../156-python3-cffi-backend_1.17.1-1_i386.deb ... Unpacking python3-cffi-backend:i386 (1.17.1-1) ... Selecting previously unselected package python3-charset-normalizer. Preparing to unpack .../157-python3-charset-normalizer_3.3.2-4_i386.deb ... Unpacking python3-charset-normalizer (3.3.2-4) ... Selecting previously unselected package python3-cryptography. Preparing to unpack .../158-python3-cryptography_43.0.0-1_i386.deb ... Unpacking python3-cryptography (43.0.0-1) ... Selecting previously unselected package python3-debianbts. Preparing to unpack .../159-python3-debianbts_4.1.1_all.deb ... Unpacking python3-debianbts (4.1.1) ... Selecting previously unselected package python3-distro. Preparing to unpack .../160-python3-distro_1.9.0-1_all.deb ... Unpacking python3-distro (1.9.0-1) ... Selecting previously unselected package python3-distro-info. Preparing to unpack .../161-python3-distro-info_1.12_all.deb ... Unpacking python3-distro-info (1.12) ... Selecting previously unselected package python3-pyparsing. Preparing to unpack .../162-python3-pyparsing_3.1.2-1_all.deb ... Unpacking python3-pyparsing (3.1.2-1) ... Selecting previously unselected package python3-httplib2. Preparing to unpack .../163-python3-httplib2_0.22.0-1_all.deb ... Unpacking python3-httplib2 (0.22.0-1) ... Selecting previously unselected package python3-idna. Preparing to unpack .../164-python3-idna_3.8-2_all.deb ... Unpacking python3-idna (3.8-2) ... Selecting previously unselected package python3-iniconfig. Preparing to unpack .../165-python3-iniconfig_1.1.1-2_all.deb ... Unpacking python3-iniconfig (1.1.1-2) ... Selecting previously unselected package python3-jaraco.classes. Preparing to unpack .../166-python3-jaraco.classes_3.4.0-1_all.deb ... Unpacking python3-jaraco.classes (3.4.0-1) ... Selecting previously unselected package python3-jeepney. Preparing to unpack .../167-python3-jeepney_0.8.0-3_all.deb ... Unpacking python3-jeepney (0.8.0-3) ... Selecting previously unselected package python3-jwt. Preparing to unpack .../168-python3-jwt_2.7.0-1_all.deb ... Unpacking python3-jwt (2.7.0-1) ... Selecting previously unselected package python3-secretstorage. Preparing to unpack .../169-python3-secretstorage_3.3.3-3_all.deb ... Unpacking python3-secretstorage (3.3.3-3) ... Selecting previously unselected package python3-keyring. Preparing to unpack .../170-python3-keyring_25.4.1-1_all.deb ... Unpacking python3-keyring (25.4.1-1) ... Selecting previously unselected package python3-pycryptodome. Preparing to unpack .../171-python3-pycryptodome_3.20.0+dfsg-3_i386.deb ... Unpacking python3-pycryptodome (3.20.0+dfsg-3) ... Selecting previously unselected package python3-keyrings.alt. Preparing to unpack .../172-python3-keyrings.alt_5.0.2-1_all.deb ... Unpacking python3-keyrings.alt (5.0.2-1) ... Selecting previously unselected package python3-lazr.uri. Preparing to unpack .../173-python3-lazr.uri_1.0.6-4_all.deb ... Unpacking python3-lazr.uri (1.0.6-4) ... Selecting previously unselected package python3-wadllib. Preparing to unpack .../174-python3-wadllib_2.0.0-1_all.deb ... Unpacking python3-wadllib (2.0.0-1) ... Selecting previously unselected package python3-oauthlib. Preparing to unpack .../175-python3-oauthlib_3.2.2-2_all.deb ... Unpacking python3-oauthlib (3.2.2-2) ... Selecting previously unselected package python3-lazr.restfulclient. Preparing to unpack .../176-python3-lazr.restfulclient_0.14.6-2_all.deb ... Unpacking python3-lazr.restfulclient (0.14.6-2) ... Selecting previously unselected package python3-launchpadlib. Preparing to unpack .../177-python3-launchpadlib_2.0.0-1_all.deb ... Unpacking python3-launchpadlib (2.0.0-1) ... Selecting previously unselected package python3-launchpadlib-desktop. Preparing to unpack .../178-python3-launchpadlib-desktop_2.0.0-1_all.deb ... Unpacking python3-launchpadlib-desktop (2.0.0-1) ... Selecting previously unselected package python3-packaging. Preparing to unpack .../179-python3-packaging_24.1-1_all.deb ... Unpacking python3-packaging (24.1-1) ... Selecting previously unselected package python3-pluggy. Preparing to unpack .../180-python3-pluggy_1.5.0-1_all.deb ... Unpacking python3-pluggy (1.5.0-1) ... Selecting previously unselected package python3-py. Preparing to unpack .../181-python3-py_1.11.0-2_all.deb ... Unpacking python3-py (1.11.0-2) ... Selecting previously unselected package python3-pygit2. Preparing to unpack .../182-python3-pygit2_1.16.0-1_i386.deb ... Unpacking python3-pygit2 (1.16.0-1) ... Selecting previously unselected package python3-pytest. Preparing to unpack .../183-python3-pytest_8.3.3-1_all.deb ... Unpacking python3-pytest (8.3.3-1) ... Selecting previously unselected package python3-urllib3. Preparing to unpack .../184-python3-urllib3_2.0.7-2_all.deb ... Unpacking python3-urllib3 (2.0.7-2) ... Selecting previously unselected package python3-requests. Preparing to unpack .../185-python3-requests_2.32.3+dfsg-1_all.deb ... Unpacking python3-requests (2.32.3+dfsg-1) ... Selecting previously unselected package python3-systemd. Preparing to unpack .../186-python3-systemd_235-1+b4_i386.deb ... Unpacking python3-systemd (235-1+b4) ... Selecting previously unselected package python3-tenacity. Preparing to unpack .../187-python3-tenacity_8.4.2+really8.4.1-1_all.deb ... Unpacking python3-tenacity (8.4.2+really8.4.1-1) ... Selecting previously unselected package python3-ubuntutools. Preparing to unpack .../188-python3-ubuntutools_0.202_all.deb ... Unpacking python3-ubuntutools (0.202) ... Selecting previously unselected package python3-zmq. Preparing to unpack .../189-python3-zmq_24.0.1-5+b2_i386.deb ... Unpacking python3-zmq (24.0.1-5+b2) ... Selecting previously unselected package quilt. Preparing to unpack .../190-quilt_0.68-1_all.deb ... Unpacking quilt (0.68-1) ... Selecting previously unselected package ubuntu-dev-tools. Preparing to unpack .../191-ubuntu-dev-tools_0.202_all.deb ... Unpacking ubuntu-dev-tools (0.202) ... Selecting previously unselected package ubuntu-keyring. Preparing to unpack .../192-ubuntu-keyring_2023.11.28.1-0.2_all.deb ... Unpacking ubuntu-keyring (2023.11.28.1-0.2) ... Setting up libksba8:i386 (1.6.7-2) ... Setting up media-types (10.1.0) ... Setting up libpipeline1:i386 (1.5.8-1) ... Setting up libnorm1t64:i386 (1.5.9+dfsg-3.1) ... Setting up wdiff (1.2.2-6) ... Setting up libfile-which-perl (1.27-2) ... Setting up libnpth0t64:i386 (1.6-3.1) ... Setting up libkeyutils1:i386 (1.6.3-3) ... Setting up libapparmor1:i386 (3.1.7-1+b1) ... Setting up libsodium23:i386 (1.0.18-1+b1) ... Setting up libicu72:i386 (72.1-5) ... Setting up bsdextrautils (2.40.2-9) ... Setting up libsys-cpuaffinity-perl (1.13~03-2+b4) ... Setting up libdynaloader-functions-perl (0.004-1) ... Setting up libclass-method-modifiers-perl (2.15-1) ... Setting up libio-pty-perl (1:1.20-1+b2) ... Setting up libmagic-mgc (1:5.45-3) ... Setting up libclone-perl:i386 (0.47-1+b1) ... Setting up libarchive-zip-perl (1.68-1) ... Setting up libyaml-0-2:i386 (0.2.5-1+b1) ... Setting up distro-info-data (0.63) ... Setting up libtirpc-common (1.3.4+ds-1.3) ... Setting up libhtml-tagset-perl (3.24-1) ... Setting up libdebhelper-perl (13.20) ... Setting up libbrotli1:i386 (1.1.0-2+b4) ... Setting up liblwp-mediatypes-perl (6.04-2) ... Setting up libmagic1t64:i386 (1:5.45-3) ... Setting up libtry-tiny-perl (0.32-1) ... Setting up libpsl5t64:i386 (0.21.2-1.1) ... Setting up libnghttp2-14:i386 (1.63.0-1) ... Setting up perl-openssl-defaults:i386 (7+b2) ... Setting up gettext-base (0.22.5-2) ... Setting up m4 (1.4.19-4) ... Setting up libencode-locale-perl (1.05-3) ... Setting up libcom-err2:i386 (1.47.1-1) ... Setting up file (1:5.45-3) ... Setting up ubuntu-keyring (2023.11.28.1-0.2) ... Setting up pbzip2 (1.1.13-1) ... Setting up libelf1t64:i386 (0.191-2) ... Setting up libkrb5support0:i386 (1.21.3-3) ... Setting up libsasl2-modules-db:i386 (2.1.28+dfsg1-8) ... Setting up tzdata (2024b-3) ... Current default time zone: 'Etc/UTC' Local time is now: Sun Oct 20 17:16:06 UTC 2024. Universal Time is now: Sun Oct 20 17:16:06 UTC 2024. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up liberror-perl (0.17029-2) ... Setting up libpgm-5.3-0t64:i386 (5.3.128~dfsg-2.1) ... Setting up autotools-dev (20220109.1) ... Setting up libglib2.0-0t64:i386 (2.82.2-1) ... No schema files found: doing nothing. Setting up gnupg-l10n (2.2.44-1) ... Setting up ed (1.20.2-2) ... Setting up librtmp1:i386 (2.4+20151223.gitfa8646d.1-2+b4) ... Setting up bash-completion (1:2.14.0-1) ... Setting up diffstat (1.66-1) ... Setting up libio-html-perl (1.004-3) ... Setting up autopoint (0.22.5-2) ... Setting up libb-hooks-op-check-perl:i386 (0.22-3+b2) ... Setting up sudo (1.9.15p5-3+b1) ... invoke-rc.d: could not determine current runlevel invoke-rc.d: policy-rc.d denied execution of start. Setting up libipc-run-perl (20231003.0-2) ... Setting up libk5crypto3:i386 (1.21.3-3) ... Setting up libsasl2-2:i386 (2.1.28+dfsg1-8) ... Setting up autoconf (2.72-3) ... Setting up libnghttp3-9:i386 (1.4.0-1) ... Setting up libtimedate-perl (2.3300-2) ... Setting up dwz (0.15-1+b1) ... Setting up python-apt-common (2.9.0) ... Setting up sensible-utils (0.0.24) ... Setting up xdelta3 (3.0.11-dfsg-1.2) ... Setting up libuchardet0:i386 (0.0.8-1+b1) ... Setting up libassuan9:i386 (3.0.1-2) ... Setting up libllhttp9.1 (9.2.1~5.28.4+dfsg1+~cs23.12.11-2) ... Setting up librole-tiny-perl (2.002004-1) ... Setting up git-man (1:2.45.2-1) ... Setting up netbase (6.4) ... Setting up libngtcp2-16:i386 (1.6.0-1) ... Setting up libsub-quote-perl (2.006008-1) ... Setting up libclass-xsaccessor-perl (1.19-4+b4) ... Setting up libkrb5-3:i386 (1.21.3-3) ... Setting up libmbedcrypto16:i386 (3.6.0-3) ... Setting up libssh2-1t64:i386 (1.11.1-1) ... Setting up libfile-dirlist-perl (0.05-3) ... Setting up lsb-release (12.1-1) ... Setting up libfile-homedir-perl (1.006-2) ... Setting up openssl (3.3.2-1) ... Setting up readline-common (8.2-5) ... Setting up libxml2:i386 (2.12.7+dfsg+really2.9.14-0.1) ... Setting up liburi-perl (5.30-1) ... Setting up libfile-touch-perl (0.12-2) ... Setting up libngtcp2-crypto-gnutls8:i386 (1.6.0-1) ... Setting up dctrl-tools (2.24-3) ... Setting up libnet-ssleay-perl:i386 (1.94-1+b2) ... Setting up automake (1:1.16.5-1.3) ... update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode Setting up pinentry-curses (1.2.1-4+b1) ... Setting up libfile-stripnondeterminism-perl (1.14.0-1) ... Setting up distro-info (1.12) ... Setting up libhttp-date-perl (6.06-1) ... Setting up gettext (0.22.5-2) ... Setting up libxdelta2t64:i386 (1.1.3-10.7) ... Setting up libfile-listing-perl (6.16-1) ... Setting up xdelta (1.1.3-10.7) ... Setting up libtool (2.4.7-7) ... Setting up libnet-http-perl (6.23-1) ... Setting up quilt (0.68-1) ... Setting up libdevel-callchecker-perl:i386 (0.009-1+b1) ... Setting up libldap-2.5-0:i386 (2.5.18+dfsg-3+b1) ... Setting up intltool-debian (0.35.0+20060710.6) ... Setting up dh-autoreconf (20) ... Setting up patchutils (0.4.2-1) ... Setting up ca-certificates (20240203) ... Updating certificates in /etc/ssl/certs... 146 added, 0 removed; done. Setting up libmbedx509-7:i386 (3.6.0-3) ... Setting up libgssapi-krb5-2:i386 (1.21.3-3) ... Setting up libmbedtls21:i386 (3.6.0-3) ... Setting up libreadline8t64:i386 (8.2-5) ... Setting up dh-strip-nondeterminism (1.14.0-1) ... Setting up libwww-robotrules-perl (6.02-1) ... Setting up groff-base (1.23.0-5) ... Setting up libhtml-parser-perl:i386 (3.83-1+b1) ... Setting up gpgconf (2.2.44-1) ... Setting up libarchive13t64:i386 (3.7.4-1) ... Setting up libio-socket-ssl-perl (2.089-1) ... Setting up gpg (2.2.44-1) ... Setting up libhttp-message-perl (7.00-2) ... Setting up libhttp-negotiate-perl (6.01-2) ... Setting up gpg-agent (2.2.44-1) ... Setting up libzmq5:i386 (4.3.5-1+b2) ... Setting up libtirpc3t64:i386 (1.3.4+ds-1.3) ... Setting up libhttp-cookies-perl (6.11-1) ... Setting up po-debconf (1.0.21+nmu1) ... Setting up libhtml-tree-perl (5.07-3) ... Setting up libparams-classify-perl:i386 (0.015-2+b4) ... Setting up gpgsm (2.2.44-1) ... Setting up libcurl3t64-gnutls:i386 (8.10.1-2) ... Setting up man-db (2.13.0-1) ... Not building database; man-db/auto-update is not 'true'. Setting up dirmngr (2.2.44-1) ... Setting up libmodule-runtime-perl (0.016-2) ... Setting up libgit2-1.8:i386 (1.8.2~rc1+ds2-1+b1) ... Setting up git (1:2.45.2-1) ... Setting up libnsl2:i386 (1.3.0-3+b2) ... Setting up pixz (1.0.7-3) ... Setting up gnupg (2.2.44-1) ... Setting up libgpgme11t64:i386 (1.18.0-6+b1) ... Setting up pristine-tar (1.50+nmu2) ... Setting up libpython3.12-stdlib:i386 (3.12.7-1) ... Setting up libimport-into-perl (1.002005-2) ... Setting up libmoo-perl (2.005005-1) ... Setting up python3.12 (3.12.7-1) ... Setting up debhelper (13.20) ... Setting up dh-exec (0.30) ... Setting up libpython3-stdlib:i386 (3.12.6-1) ... Setting up python3 (3.12.6-1) ... Setting up python3-zipp (3.20.2-1) ... Setting up python3-xdg (0.28-2) ... Setting up python3-autocommand (2.2.2-3) ... Setting up python3-packaging (24.1-1) ... Setting up python3-pyparsing (3.1.2-1) ... Setting up python3-gpg (1.18.0-6+b1) ... Setting up python3-certifi (2024.8.30+dfsg-1) ... Setting up python3-idna (3.8-2) ... Setting up python3-typing-extensions (4.12.2-2) ... Setting up python3-jeepney (0.8.0-3) ... Setting up python3-urllib3 (2.0.7-2) ... Setting up python3-pluggy (1.5.0-1) ... Setting up python3-httplib2 (0.22.0-1) ... Setting up python3-dateutil (2.9.0-3) ... Setting up python3-distro-info (1.12) ... Setting up python3-systemd (235-1+b4) ... Setting up python3-cffi-backend:i386 (1.17.1-1) ... Setting up python3-blinker (1.8.2-1) ... Setting up python3-more-itertools (10.5.0-1) ... Setting up python3-iniconfig (1.1.1-2) ... Setting up python3-jaraco.classes (3.4.0-1) ... Setting up python3-importlib-metadata (8.5.0-1) ... Setting up python3-jaraco.functools (4.1.0-1) ... Setting up python3-distro (1.9.0-1) ... Setting up python3-jaraco.context (6.0.0-1) ... Setting up python3-jwt (2.7.0-1) ... Setting up python3-cachetools (5.3.3-1) ... Setting up python3-debianbts (4.1.1) ... Setting up python3-apt (2.9.0+b1) ... Setting up python3-charset-normalizer (3.3.2-4) ... Setting up python3-pygit2 (1.16.0-1) ... Setting up python3-pytest (8.3.3-1) ... Setting up python3-pycryptodome (3.20.0+dfsg-3) ... Setting up python3-tenacity (8.4.2+really8.4.1-1) ... Setting up python3-bcrypt (4.2.0-2) ... Setting up python3-typeguard (4.3.0-1) ... Setting up python3-yaml (6.0.2-1) ... Setting up python3-inflect (7.3.1-2) ... Setting up python3-cryptography (43.0.0-1) ... Setting up python3-pkg-resources (74.1.2-2) ... Setting up python3-setuptools (74.1.2-2) ... Setting up python3-py (1.11.0-2) ... Setting up python3-lazr.uri (1.0.6-4) ... Setting up python3-oauthlib (3.2.2-2) ... Setting up python3-chardet (5.2.0+dfsg-1) ... Setting up python3-secretstorage (3.3.3-3) ... Setting up python3-zmq (24.0.1-5+b2) ... Setting up python3-wadllib (2.0.0-1) ... Setting up python3-debian (0.1.49) ... Setting up python3-requests (2.32.3+dfsg-1) ... Setting up python3-keyring (25.4.1-1) ... Setting up python3-lazr.restfulclient (0.14.6-2) ... Setting up dh-python (6.20240824) ... Setting up python3-launchpadlib (2.0.0-1) ... Setting up dput (1.2.2) ... Setting up python3-launchpadlib-desktop (2.0.0-1) ... Setting up python3-keyrings.alt (5.0.2-1) ... Setting up python3-ubuntutools (0.202) ... Setting up libwww-perl (6.77-1) ... Setting up devscripts (2.24.1) ... Setting up git-buildpackage (0.9.35) ... Setting up liblwp-protocol-https-perl (6.14-1) ... Setting up ubuntu-dev-tools (0.202) ... Processing triggers for libc-bin (2.40-3) ... Processing triggers for ca-certificates (20240203) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. Reading package lists... Building dependency tree... Reading state information... Reading extended state information... Initializing package states... Writing extended state information... Building tag database... -> Finished parsing the build-deps I: Building the package I: Running cd /build/reproducible-path/git-ubuntu-1.1/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../git-ubuntu_1.1-1_source.changes dpkg-buildpackage: info: source package git-ubuntu dpkg-buildpackage: info: source version 1.1-1 dpkg-buildpackage: info: source distribution unstable dpkg-buildpackage: info: source changed by Benjamin Drung dpkg-source --before-build . dpkg-buildpackage: info: host architecture i386 debian/rules clean dh clean --with bash-completion,python3 --buildsystem=pybuild dh_auto_clean -O--buildsystem=pybuild I: pybuild base:311: python3.12 setup.py clean running clean removing '/build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build' (and everything under it) 'build/bdist.linux-i686' does not exist -- can't clean it 'build/scripts-3.12' does not exist -- can't clean it dh_autoreconf_clean -O--buildsystem=pybuild dh_clean -O--buildsystem=pybuild debian/rules binary dh binary --with bash-completion,python3 --buildsystem=pybuild dh_update_autotools_config -O--buildsystem=pybuild dh_autoreconf -O--buildsystem=pybuild dh_auto_configure -O--buildsystem=pybuild I: pybuild base:311: python3.12 setup.py config running config dh_auto_build -O--buildsystem=pybuild I: pybuild base:311: /usr/bin/python3 setup.py build running build running build_py creating /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/importer_service_ipc.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/submit.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/tag.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/test_util.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/run.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/importer_service_test.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/clone.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/dsc.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/source_information.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/importer_service_poller.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/source_builder_test.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/patch_state.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/rich_history_test.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/importer.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/importer_service_worker.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/source_builder.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/versioning.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/__init__.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/prepare_upload_test.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/build.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/prepare_upload.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/importer_tag_test.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/importer_service_worker_test.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/cache.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/queue.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/git_repository.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/merge.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/repo_builder_test.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/logging.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/importer_test.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/importer_service.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/remote.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/repo_builder.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/importer_service_broker.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/__main__.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/exportorig.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/repo_comparator.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/git_repository_test.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/rich_history.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/source_information_test.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/test_fixtures.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/scriptutils.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/spec.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/version.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/integration_test.py -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu running egg_info creating gitubuntu.egg-info writing gitubuntu.egg-info/PKG-INFO writing dependency_links to gitubuntu.egg-info/dependency_links.txt writing entry points to gitubuntu.egg-info/entry_points.txt writing requirements to gitubuntu.egg-info/requires.txt writing top-level names to gitubuntu.egg-info/top_level.txt writing manifest file 'gitubuntu.egg-info/SOURCES.txt' reading manifest file 'gitubuntu.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no directories found matching 'gitubuntu/apt_repo_test' adding license file 'COPYING' adding license file 'AUTHORS' writing manifest file 'gitubuntu.egg-info/SOURCES.txt' /usr/lib/python3/dist-packages/setuptools/command/build_py.py:218: _Warning: Package 'gitubuntu.changelog_tests' is absent from the `packages` configuration. !! ******************************************************************************** ############################ # Package would be ignored # ############################ Python recognizes 'gitubuntu.changelog_tests' as an importable package[^1], but it is absent from setuptools' `packages` configuration. This leads to an ambiguous overall configuration. If you want to distribute this package, please make sure that 'gitubuntu.changelog_tests' is explicitly added to the `packages` configuration field. Alternatively, you can also rely on setuptools' discovery methods (for example by using `find_namespace_packages(...)`/`find_namespace:` instead of `find_packages(...)`/`find:`). You can read more about "package discovery" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html If you don't want 'gitubuntu.changelog_tests' to be distributed and are already explicitly excluding 'gitubuntu.changelog_tests' via `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`, you can try to use `exclude_package_data`, or `include-package-data=False` in combination with a more fine grained `package-data` configuration. You can read more about "package data files" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/datafiles.html [^1]: For Python, any directory (with suitable naming) can be imported, even if it does not contain any `.py` files. On the other hand, currently there is no concept of package data directory, all directories are treated like packages. ******************************************************************************** !! check.warn(importable) /usr/lib/python3/dist-packages/setuptools/command/build_py.py:218: _Warning: Package 'gitubuntu.hooks' is absent from the `packages` configuration. !! ******************************************************************************** ############################ # Package would be ignored # ############################ Python recognizes 'gitubuntu.hooks' as an importable package[^1], but it is absent from setuptools' `packages` configuration. This leads to an ambiguous overall configuration. If you want to distribute this package, please make sure that 'gitubuntu.hooks' is explicitly added to the `packages` configuration field. Alternatively, you can also rely on setuptools' discovery methods (for example by using `find_namespace_packages(...)`/`find_namespace:` instead of `find_packages(...)`/`find:`). You can read more about "package discovery" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html If you don't want 'gitubuntu.hooks' to be distributed and are already explicitly excluding 'gitubuntu.hooks' via `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`, you can try to use `exclude_package_data`, or `include-package-data=False` in combination with a more fine grained `package-data` configuration. You can read more about "package data files" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/datafiles.html [^1]: For Python, any directory (with suitable naming) can be imported, even if it does not contain any `.py` files. On the other hand, currently there is no concept of package data directory, all directories are treated like packages. ******************************************************************************** !! check.warn(importable) copying gitubuntu/changelog_date_overrides.txt -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/parent_overrides.txt -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/pull_overrides.txt -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu copying gitubuntu/source-package-denylist.txt -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu creating /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/duplicate-version-with-extra -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/maintainer_name_inner_space -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/maintainer_name_leading_space -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/maintainer_name_trailing_space -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/test_date_1 -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/test_date_2 -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/test_distribution -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/test_distribution_source_1 -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/test_distribution_source_2 -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/test_distribution_source_3 -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/test_distribution_source_4 -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/test_maintainer_1 -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/test_maintainer_2 -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/test_maintainer_3 -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/test_multiple_angle_brackets -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/test_utf8_error -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/test_versions_1 -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/test_versions_2 -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/test_versions_3 -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests copying gitubuntu/changelog_tests/test_versions_unknown -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/changelog_tests creating /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/hooks copying gitubuntu/hooks/post-checkout -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/hooks copying gitubuntu/hooks/pre-commit -> /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/hooks dh_auto_test -O--buildsystem=pybuild I: pybuild base:311: cd /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build; python3.12 -m pytest ============================= test session starts ============================== platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0 rootdir: /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build configfile: pytest.ini plugins: typeguard-4.3.0 collected 407 items gitubuntu/git_repository_test.py ....................................... [ 9%] ...FFFFF.FFF...........................F.FFFFFFF.FFF.......FFFFFFFFFF [ 26%] gitubuntu/importer_service_test.py ..................................... [ 35%] ..... [ 36%] gitubuntu/importer_service_worker_test.py ... [ 37%] gitubuntu/importer_tag_test.py FFFFFFFFFxF [ 40%] gitubuntu/importer_test.py .......FF.FFFFFFFFFFF.FFF.FFF..FFFFFFFFFFFFFF [ 51%] FFFFxx..FF.................................................F....FFFF. [ 68%] gitubuntu/integration_test.py ...............ssss [ 72%] gitubuntu/prepare_upload_test.py .............. [ 76%] gitubuntu/repo_builder_test.py .........FF.F................ [ 83%] gitubuntu/rich_history_test.py FFF.FFFF [ 85%] gitubuntu/source_builder_test.py .FF.......FFFFFFFFF.. [ 90%] gitubuntu/source_information_test.py ................................... [ 99%] ... [100%] =================================== FAILURES =================================== ___________________ test_follow_symlinks_to_blob[0] ____________________ pygit2_repo = pygit2.Repository('/tmp/tmpv07eygtp/.git/') tree_func = at 0xf53f3848> @pytest.mark.parametrize('tree_func', [ # The tree_func parameter is a function that accepts a mock Blob that is to # represent the changelog blob itself and returns a mock Tree with the mock # Blob embedded somewhere within it. The test function can then ensure that # follow_symlinks_to_blob can correctly find the changelog Blob given the # Tree. # Of course this is only expected to work if, after checking out the Tree, # "cat debian/changelog" would work. But this allows us to test the various # permutations of symlink following in Trees that _are_ valid. # Simple case lambda b: Tree({ 'debian': Tree({'changelog': b}), }), # Symlink in debian/ lambda b: Tree({ 'debian': Tree({ 'changelog.real': b, 'changelog': Symlink('changelog.real'), }), }), # Symlink to parent directory lambda b: Tree({ 'changelog': b, 'debian': Tree({ 'changelog': Symlink('../changelog'), }) }), # Symlink to subdirectory lambda b: Tree({ 'debian': Tree({ 'changelog': Symlink('subdirectory/changelog'), 'subdirectory': Tree({'changelog': b}), }) }), # debian/ itself is a symlink to a different directory lambda b: Tree({ 'pkg': Tree({'changelog': b}), 'debian': Symlink('pkg'), }) ]) def test_follow_symlinks_to_blob(pygit2_repo, tree_func): blob = Blob(b'') blob_id = blob.write(pygit2_repo) tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) > result_blob = target.follow_symlinks_to_blob( pygit2_repo, tree, 'debian/changelog', ) gitubuntu/git_repository_test.py:342: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmpv07eygtp/.git/') top_tree_object = search_path = 'debian/changelog' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? gitubuntu/git_repository.py:68: AttributeError ___________________ test_follow_symlinks_to_blob[1] ____________________ pygit2_repo = pygit2.Repository('/tmp/tmpt369wsoa/.git/') tree_func = at 0xf53f3898> @pytest.mark.parametrize('tree_func', [ # The tree_func parameter is a function that accepts a mock Blob that is to # represent the changelog blob itself and returns a mock Tree with the mock # Blob embedded somewhere within it. The test function can then ensure that # follow_symlinks_to_blob can correctly find the changelog Blob given the # Tree. # Of course this is only expected to work if, after checking out the Tree, # "cat debian/changelog" would work. But this allows us to test the various # permutations of symlink following in Trees that _are_ valid. # Simple case lambda b: Tree({ 'debian': Tree({'changelog': b}), }), # Symlink in debian/ lambda b: Tree({ 'debian': Tree({ 'changelog.real': b, 'changelog': Symlink('changelog.real'), }), }), # Symlink to parent directory lambda b: Tree({ 'changelog': b, 'debian': Tree({ 'changelog': Symlink('../changelog'), }) }), # Symlink to subdirectory lambda b: Tree({ 'debian': Tree({ 'changelog': Symlink('subdirectory/changelog'), 'subdirectory': Tree({'changelog': b}), }) }), # debian/ itself is a symlink to a different directory lambda b: Tree({ 'pkg': Tree({'changelog': b}), 'debian': Symlink('pkg'), }) ]) def test_follow_symlinks_to_blob(pygit2_repo, tree_func): blob = Blob(b'') blob_id = blob.write(pygit2_repo) tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) > result_blob = target.follow_symlinks_to_blob( pygit2_repo, tree, 'debian/changelog', ) gitubuntu/git_repository_test.py:342: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmpt369wsoa/.git/') top_tree_object = search_path = 'debian/changelog' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? gitubuntu/git_repository.py:68: AttributeError ___________________ test_follow_symlinks_to_blob[2] ____________________ pygit2_repo = pygit2.Repository('/tmp/tmpggo1p2xn/.git/') tree_func = at 0xf53f38e8> @pytest.mark.parametrize('tree_func', [ # The tree_func parameter is a function that accepts a mock Blob that is to # represent the changelog blob itself and returns a mock Tree with the mock # Blob embedded somewhere within it. The test function can then ensure that # follow_symlinks_to_blob can correctly find the changelog Blob given the # Tree. # Of course this is only expected to work if, after checking out the Tree, # "cat debian/changelog" would work. But this allows us to test the various # permutations of symlink following in Trees that _are_ valid. # Simple case lambda b: Tree({ 'debian': Tree({'changelog': b}), }), # Symlink in debian/ lambda b: Tree({ 'debian': Tree({ 'changelog.real': b, 'changelog': Symlink('changelog.real'), }), }), # Symlink to parent directory lambda b: Tree({ 'changelog': b, 'debian': Tree({ 'changelog': Symlink('../changelog'), }) }), # Symlink to subdirectory lambda b: Tree({ 'debian': Tree({ 'changelog': Symlink('subdirectory/changelog'), 'subdirectory': Tree({'changelog': b}), }) }), # debian/ itself is a symlink to a different directory lambda b: Tree({ 'pkg': Tree({'changelog': b}), 'debian': Symlink('pkg'), }) ]) def test_follow_symlinks_to_blob(pygit2_repo, tree_func): blob = Blob(b'') blob_id = blob.write(pygit2_repo) tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) > result_blob = target.follow_symlinks_to_blob( pygit2_repo, tree, 'debian/changelog', ) gitubuntu/git_repository_test.py:342: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmpggo1p2xn/.git/') top_tree_object = search_path = 'debian/changelog' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? gitubuntu/git_repository.py:68: AttributeError ___________________ test_follow_symlinks_to_blob[3] ____________________ pygit2_repo = pygit2.Repository('/tmp/tmpu8r9a2gc/.git/') tree_func = at 0xf53f3938> @pytest.mark.parametrize('tree_func', [ # The tree_func parameter is a function that accepts a mock Blob that is to # represent the changelog blob itself and returns a mock Tree with the mock # Blob embedded somewhere within it. The test function can then ensure that # follow_symlinks_to_blob can correctly find the changelog Blob given the # Tree. # Of course this is only expected to work if, after checking out the Tree, # "cat debian/changelog" would work. But this allows us to test the various # permutations of symlink following in Trees that _are_ valid. # Simple case lambda b: Tree({ 'debian': Tree({'changelog': b}), }), # Symlink in debian/ lambda b: Tree({ 'debian': Tree({ 'changelog.real': b, 'changelog': Symlink('changelog.real'), }), }), # Symlink to parent directory lambda b: Tree({ 'changelog': b, 'debian': Tree({ 'changelog': Symlink('../changelog'), }) }), # Symlink to subdirectory lambda b: Tree({ 'debian': Tree({ 'changelog': Symlink('subdirectory/changelog'), 'subdirectory': Tree({'changelog': b}), }) }), # debian/ itself is a symlink to a different directory lambda b: Tree({ 'pkg': Tree({'changelog': b}), 'debian': Symlink('pkg'), }) ]) def test_follow_symlinks_to_blob(pygit2_repo, tree_func): blob = Blob(b'') blob_id = blob.write(pygit2_repo) tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) > result_blob = target.follow_symlinks_to_blob( pygit2_repo, tree, 'debian/changelog', ) gitubuntu/git_repository_test.py:342: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmpu8r9a2gc/.git/') top_tree_object = search_path = 'debian/changelog' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? gitubuntu/git_repository.py:68: AttributeError ___________________ test_follow_symlinks_to_blob[4] ____________________ pygit2_repo = pygit2.Repository('/tmp/tmptxumg_sw/.git/') tree_func = at 0xf53f3988> @pytest.mark.parametrize('tree_func', [ # The tree_func parameter is a function that accepts a mock Blob that is to # represent the changelog blob itself and returns a mock Tree with the mock # Blob embedded somewhere within it. The test function can then ensure that # follow_symlinks_to_blob can correctly find the changelog Blob given the # Tree. # Of course this is only expected to work if, after checking out the Tree, # "cat debian/changelog" would work. But this allows us to test the various # permutations of symlink following in Trees that _are_ valid. # Simple case lambda b: Tree({ 'debian': Tree({'changelog': b}), }), # Symlink in debian/ lambda b: Tree({ 'debian': Tree({ 'changelog.real': b, 'changelog': Symlink('changelog.real'), }), }), # Symlink to parent directory lambda b: Tree({ 'changelog': b, 'debian': Tree({ 'changelog': Symlink('../changelog'), }) }), # Symlink to subdirectory lambda b: Tree({ 'debian': Tree({ 'changelog': Symlink('subdirectory/changelog'), 'subdirectory': Tree({'changelog': b}), }) }), # debian/ itself is a symlink to a different directory lambda b: Tree({ 'pkg': Tree({'changelog': b}), 'debian': Symlink('pkg'), }) ]) def test_follow_symlinks_to_blob(pygit2_repo, tree_func): blob = Blob(b'') blob_id = blob.write(pygit2_repo) tree = pygit2_repo.get(tree_func(blob).write(pygit2_repo)) > result_blob = target.follow_symlinks_to_blob( pygit2_repo, tree, 'debian/changelog', ) gitubuntu/git_repository_test.py:342: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmptxumg_sw/.git/') top_tree_object = search_path = 'debian/changelog' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? gitubuntu/git_repository.py:68: AttributeError ________________ test_follow_symlinks_to_blob_not_found[tree1] _________________ pygit2_repo = pygit2.Repository('/tmp/tmp7r_4rb9m/.git/') tree = @pytest.mark.parametrize('tree', [ Tree({}), Tree({'debian': Tree({})}), Tree({'debian': Tree({'changelog': Symlink('other')})}), Tree({'debian': Tree({'changelog': Symlink('../other')})}), ]) def test_follow_symlinks_to_blob_not_found(pygit2_repo, tree): pygit2_tree = pygit2_repo.get(tree.write(pygit2_repo)) with pytest.raises(KeyError): > target.follow_symlinks_to_blob( pygit2_repo, pygit2_tree, 'debian/changelog', ) gitubuntu/git_repository_test.py:359: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmp7r_4rb9m/.git/') top_tree_object = search_path = 'debian/changelog' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? gitubuntu/git_repository.py:68: AttributeError ________________ test_follow_symlinks_to_blob_not_found[tree2] _________________ pygit2_repo = pygit2.Repository('/tmp/tmpru9aeisc/.git/') tree = @pytest.mark.parametrize('tree', [ Tree({}), Tree({'debian': Tree({})}), Tree({'debian': Tree({'changelog': Symlink('other')})}), Tree({'debian': Tree({'changelog': Symlink('../other')})}), ]) def test_follow_symlinks_to_blob_not_found(pygit2_repo, tree): pygit2_tree = pygit2_repo.get(tree.write(pygit2_repo)) with pytest.raises(KeyError): > target.follow_symlinks_to_blob( pygit2_repo, pygit2_tree, 'debian/changelog', ) gitubuntu/git_repository_test.py:359: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmpru9aeisc/.git/') top_tree_object = search_path = 'debian/changelog' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? gitubuntu/git_repository.py:68: AttributeError ________________ test_follow_symlinks_to_blob_not_found[tree3] _________________ pygit2_repo = pygit2.Repository('/tmp/tmptmqjfmlj/.git/') tree = @pytest.mark.parametrize('tree', [ Tree({}), Tree({'debian': Tree({})}), Tree({'debian': Tree({'changelog': Symlink('other')})}), Tree({'debian': Tree({'changelog': Symlink('../other')})}), ]) def test_follow_symlinks_to_blob_not_found(pygit2_repo, tree): pygit2_tree = pygit2_repo.get(tree.write(pygit2_repo)) with pytest.raises(KeyError): > target.follow_symlinks_to_blob( pygit2_repo, pygit2_tree, 'debian/changelog', ) gitubuntu/git_repository_test.py:359: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmptmqjfmlj/.git/') top_tree_object = search_path = 'debian/changelog' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? gitubuntu/git_repository.py:68: AttributeError _________________________ test_git_escape_dir_to_tree __________________________ pygit2_repo = pygit2.Repository('/tmp/tmpgpnp0iw7/.git/') tmpdir = local('/tmp/pytest-of-pbuilder1/pytest-0/test_git_escape_dir_to_tree0') def test_git_escape_dir_to_tree(pygit2_repo, tmpdir): tmpdir.mkdir('.git') > tree_hash = target.GitUbuntuRepository.dir_to_tree( pygit2_repo, str(tmpdir), escape=True, ) gitubuntu/git_repository_test.py:668: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ gitubuntu/git_repository.py:2463: in dir_to_tree replacement_oid = cls._add_missing_tree_dirs( gitubuntu/git_repository.py:2397: in _add_missing_tree_dirs tree_builder = cls._create_replacement_tree_builder( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = repo = pygit2.Repository('/tmp/tmpgpnp0iw7/.git/') treeish = sub_path = '' @classmethod def _create_replacement_tree_builder(cls, repo, treeish, sub_path): '''Create a replacement TreeBuilder Create a TreeBuilder based on an existing repository, top-level tree-ish and path inside that tree. A sub_path of '' is taken to mean a request for a replacement TreeBuilder for the top level tree. Returns a TreeBuilder object pre-populated with the previous contents. If the path did not previously exist in the tree-ish, then return an empty TreeBuilder instead. ''' > tree = treeish.peel(pygit2.GIT_OBJ_TREE) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? gitubuntu/git_repository.py:2331: AttributeError ______ test_determine_quilt_series_path[tree_data1-debian/patches/series] ______ pygit2_repo = pygit2.Repository('/tmp/tmpj2zmxd88/.git/') tree_data = expected_path = 'debian/patches/series' @pytest.mark.parametrize('tree_data,expected_path', [ # Empty tree -> default (Tree({}), 'debian/patches/series'), # Empty debian/patches directory -> default (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), # Only debian/patches/series -> that one ( Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 'debian/patches/series', ), # Only debian/patches/debian.series -> that one ( Tree({'debian': Tree({'patches': Tree({ 'debian.series': Blob(b'') })})}), 'debian/patches/debian.series', ), # Both -> debian.series ( Tree({'debian': Tree({'patches': Tree({ 'debian.series': Blob(b''), 'series': Blob(b''), })})}), 'debian/patches/debian.series', ), ]) def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) gitubuntu/git_repository_test.py:708: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ gitubuntu/git_repository.py:991: in determine_quilt_series_path blob = follow_symlinks_to_blob( gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmpj2zmxd88/.git/') top_tree_object = search_path = 'debian/patches/debian.series' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? gitubuntu/git_repository.py:68: AttributeError ______ test_determine_quilt_series_path[tree_data2-debian/patches/series] ______ pygit2_repo = pygit2.Repository('/tmp/tmphxsafndg/.git/') tree_data = expected_path = 'debian/patches/series' @pytest.mark.parametrize('tree_data,expected_path', [ # Empty tree -> default (Tree({}), 'debian/patches/series'), # Empty debian/patches directory -> default (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), # Only debian/patches/series -> that one ( Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 'debian/patches/series', ), # Only debian/patches/debian.series -> that one ( Tree({'debian': Tree({'patches': Tree({ 'debian.series': Blob(b'') })})}), 'debian/patches/debian.series', ), # Both -> debian.series ( Tree({'debian': Tree({'patches': Tree({ 'debian.series': Blob(b''), 'series': Blob(b''), })})}), 'debian/patches/debian.series', ), ]) def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) gitubuntu/git_repository_test.py:708: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ gitubuntu/git_repository.py:991: in determine_quilt_series_path blob = follow_symlinks_to_blob( gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmphxsafndg/.git/') top_tree_object = search_path = 'debian/patches/debian.series' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? gitubuntu/git_repository.py:68: AttributeError __ test_determine_quilt_series_path[tree_data3-debian/patches/debian.series] ___ pygit2_repo = pygit2.Repository('/tmp/tmpagp1iglb/.git/') tree_data = expected_path = 'debian/patches/debian.series' @pytest.mark.parametrize('tree_data,expected_path', [ # Empty tree -> default (Tree({}), 'debian/patches/series'), # Empty debian/patches directory -> default (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), # Only debian/patches/series -> that one ( Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 'debian/patches/series', ), # Only debian/patches/debian.series -> that one ( Tree({'debian': Tree({'patches': Tree({ 'debian.series': Blob(b'') })})}), 'debian/patches/debian.series', ), # Both -> debian.series ( Tree({'debian': Tree({'patches': Tree({ 'debian.series': Blob(b''), 'series': Blob(b''), })})}), 'debian/patches/debian.series', ), ]) def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) gitubuntu/git_repository_test.py:708: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ gitubuntu/git_repository.py:991: in determine_quilt_series_path blob = follow_symlinks_to_blob( gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmpagp1iglb/.git/') top_tree_object = search_path = 'debian/patches/debian.series' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? gitubuntu/git_repository.py:68: AttributeError __ test_determine_quilt_series_path[tree_data4-debian/patches/debian.series] ___ pygit2_repo = pygit2.Repository('/tmp/tmpdavsezff/.git/') tree_data = expected_path = 'debian/patches/debian.series' @pytest.mark.parametrize('tree_data,expected_path', [ # Empty tree -> default (Tree({}), 'debian/patches/series'), # Empty debian/patches directory -> default (Tree({'debian': Tree({'patches': Tree({})})}), 'debian/patches/series'), # Only debian/patches/series -> that one ( Tree({'debian': Tree({'patches': Tree({'series': Blob(b'')})})}), 'debian/patches/series', ), # Only debian/patches/debian.series -> that one ( Tree({'debian': Tree({'patches': Tree({ 'debian.series': Blob(b'') })})}), 'debian/patches/debian.series', ), # Both -> debian.series ( Tree({'debian': Tree({'patches': Tree({ 'debian.series': Blob(b''), 'series': Blob(b''), })})}), 'debian/patches/debian.series', ), ]) def test_determine_quilt_series_path(pygit2_repo, tree_data, expected_path): tree_obj = pygit2_repo.get(tree_data.write(pygit2_repo)) > path = target.determine_quilt_series_path(pygit2_repo, tree_obj) gitubuntu/git_repository_test.py:708: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ gitubuntu/git_repository.py:991: in determine_quilt_series_path blob = follow_symlinks_to_blob( gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmpdavsezff/.git/') top_tree_object = search_path = 'debian/patches/debian.series' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? gitubuntu/git_repository.py:68: AttributeError ________________________________ test_quilt_env ________________________________ pygit2_repo = pygit2.Repository('/tmp/tmplw43ymi6/.git/') def test_quilt_env(pygit2_repo): tree_builder = Tree({'debian': Tree({'patches': Tree({'debian.series': Blob(b'')})}) }) tree_obj = pygit2_repo.get(tree_builder.write(pygit2_repo)) > env = target.quilt_env(pygit2_repo, tree_obj) gitubuntu/git_repository_test.py:717: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ gitubuntu/git_repository.py:1022: in quilt_env 'QUILT_SERIES': determine_quilt_series_path(pygit2_repo, treeish), gitubuntu/git_repository.py:991: in determine_quilt_series_path blob = follow_symlinks_to_blob( gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmplw43ymi6/.git/') top_tree_object = search_path = 'debian/patches/debian.series' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? gitubuntu/git_repository.py:68: AttributeError _____________________________ test_repo_quilt_env ______________________________ repo = def test_repo_quilt_env(repo): tree_builder = Tree({'debian': Tree({'patches': Tree({'debian.series': Blob(b'')})}) }) tree_obj = repo.raw_repo.get(tree_builder.write(repo.raw_repo)) > env = repo.quilt_env(tree_obj) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository_test.py:732: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:2575: in quilt_env env.update(quilt_env(self.raw_repo, treeish)) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1022: in quilt_env 'QUILT_SERIES': determine_quilt_series_path(pygit2_repo, treeish), /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:991: in determine_quilt_series_path blob = follow_symlinks_to_blob( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmpaldspcjc/.git/') top_tree_object = search_path = 'debian/patches/debian.series' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:68: AttributeError _____________________ test_repo_quilt_env_from_treeish_str _____________________ repo = def test_repo_quilt_env_from_treeish_str(repo): tree_builder = Tree({'debian': Tree({'patches': Tree({'debian.series': Blob(b'')})}) }) tree_obj = repo.raw_repo.get(tree_builder.write(repo.raw_repo)) > env = repo.quilt_env_from_treeish_str(str(tree_obj.id)) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository_test.py:757: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:2589: in quilt_env_from_treeish_str return self.quilt_env(self.raw_repo.get(treeish_str)) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:2575: in quilt_env env.update(quilt_env(self.raw_repo, treeish)) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1022: in quilt_env 'QUILT_SERIES': determine_quilt_series_path(pygit2_repo, treeish), /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:991: in determine_quilt_series_path blob = follow_symlinks_to_blob( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmpwm95dcnd/.git/') top_tree_object = search_path = 'debian/patches/debian.series' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:68: AttributeError _ test_repo_find_ubuntu_merge[Common case-input_data0-pkg/import/1-1ubuntu1-pkg/import/2-1-pkg/import/1-1] _ description = 'Common case' repo = input_data = old_ubuntu = 'pkg/import/1-1ubuntu1', new_debian = 'pkg/import/2-1' expected = 'pkg/import/1-1' @pytest.mark.parametrize( 'description, input_data, old_ubuntu, new_debian, expected', [ ( 'Common case', Repo( commits=[ Commit.from_spec( name='old/debian' ), Commit.from_spec( parents=[Placeholder('old/debian')], name='old/ubuntu', changelog_versions=['1-1ubuntu1', '1-1'], ), Commit.from_spec( parents=[Placeholder('old/debian')], name='new/debian', changelog_versions=['2-1', '1-1'], ), ], tags={ 'pkg/import/1-1': Placeholder('old/debian'), 'pkg/import/1-1ubuntu1': Placeholder('old/ubuntu'), 'pkg/import/2-1': Placeholder('new/debian'), }, ), 'pkg/import/1-1ubuntu1', 'pkg/import/2-1', 'pkg/import/1-1', ), ( 'Ubuntu delta based on a NMU', Repo( commits=[ Commit.from_spec( name='fork_point' ), Commit.from_spec( parents=[Placeholder('fork_point')], name='old/debian', changelog_versions=['1-1.1', '1-1'], ), Commit.from_spec( parents=[Placeholder('old/debian')], name='old/ubuntu', changelog_versions=['1-1.1ubuntu1', '1-1.1', '1-1'], ), Commit.from_spec( parents=[Placeholder('fork_point')], name='new/debian', changelog_versions=['2-1', '1-1'], ), ], tags={ 'pkg/import/1-1': Placeholder('fork_point'), 'pkg/import/1-1.1': Placeholder('old/debian'), 'pkg/import/1-1.1ubuntu1': Placeholder('old/ubuntu'), 'pkg/import/2-1': Placeholder('new/debian'), }, ), 'pkg/import/1-1.1ubuntu1', 'pkg/import/2-1', 'pkg/import/1-1.1', ), ( 'Ubuntu upstream version head of Debian', Repo( commits=[ Commit.from_spec( name='old/debian' ), Commit.from_spec( parents=[Placeholder('old/debian')], name='mid_ubuntu', changelog_versions=['1-1ubuntu1', '1-1'], ), Commit.from_spec( parents=[Placeholder('mid_ubuntu')], name='old/ubuntu', changelog_versions=['2-0ubuntu1', '1-1ubuntu1', '1-1'], ), Commit.from_spec( parents=[Placeholder('old/debian')], name='new/debian', changelog_versions=['3-1', '1-1'], ), ], tags={ 'pkg/import/1-1': Placeholder('old/debian'), 'pkg/import/1-1ubuntu1': Placeholder('mid_ubuntu'), 'pkg/import/2-0ubuntu1': Placeholder('old/ubuntu'), 'pkg/import/3-1': Placeholder('new/debian'), }, ), 'pkg/import/2-0ubuntu1', 'pkg/import/3-1', 'pkg/import/1-1', ), ], ) def test_repo_find_ubuntu_merge( description, repo, input_data, old_ubuntu, new_debian, expected, ): > input_data.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository_test.py:889: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmps5nnrzkk/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_2.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_2-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_2-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ 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] _ description = 'Ubuntu delta based on a NMU' repo = input_data = old_ubuntu = 'pkg/import/1-1.1ubuntu1', new_debian = 'pkg/import/2-1' expected = 'pkg/import/1-1.1' @pytest.mark.parametrize( 'description, input_data, old_ubuntu, new_debian, expected', [ ( 'Common case', Repo( commits=[ Commit.from_spec( name='old/debian' ), Commit.from_spec( parents=[Placeholder('old/debian')], name='old/ubuntu', changelog_versions=['1-1ubuntu1', '1-1'], ), Commit.from_spec( parents=[Placeholder('old/debian')], name='new/debian', changelog_versions=['2-1', '1-1'], ), ], tags={ 'pkg/import/1-1': Placeholder('old/debian'), 'pkg/import/1-1ubuntu1': Placeholder('old/ubuntu'), 'pkg/import/2-1': Placeholder('new/debian'), }, ), 'pkg/import/1-1ubuntu1', 'pkg/import/2-1', 'pkg/import/1-1', ), ( 'Ubuntu delta based on a NMU', Repo( commits=[ Commit.from_spec( name='fork_point' ), Commit.from_spec( parents=[Placeholder('fork_point')], name='old/debian', changelog_versions=['1-1.1', '1-1'], ), Commit.from_spec( parents=[Placeholder('old/debian')], name='old/ubuntu', changelog_versions=['1-1.1ubuntu1', '1-1.1', '1-1'], ), Commit.from_spec( parents=[Placeholder('fork_point')], name='new/debian', changelog_versions=['2-1', '1-1'], ), ], tags={ 'pkg/import/1-1': Placeholder('fork_point'), 'pkg/import/1-1.1': Placeholder('old/debian'), 'pkg/import/1-1.1ubuntu1': Placeholder('old/ubuntu'), 'pkg/import/2-1': Placeholder('new/debian'), }, ), 'pkg/import/1-1.1ubuntu1', 'pkg/import/2-1', 'pkg/import/1-1.1', ), ( 'Ubuntu upstream version head of Debian', Repo( commits=[ Commit.from_spec( name='old/debian' ), Commit.from_spec( parents=[Placeholder('old/debian')], name='mid_ubuntu', changelog_versions=['1-1ubuntu1', '1-1'], ), Commit.from_spec( parents=[Placeholder('mid_ubuntu')], name='old/ubuntu', changelog_versions=['2-0ubuntu1', '1-1ubuntu1', '1-1'], ), Commit.from_spec( parents=[Placeholder('old/debian')], name='new/debian', changelog_versions=['3-1', '1-1'], ), ], tags={ 'pkg/import/1-1': Placeholder('old/debian'), 'pkg/import/1-1ubuntu1': Placeholder('mid_ubuntu'), 'pkg/import/2-0ubuntu1': Placeholder('old/ubuntu'), 'pkg/import/3-1': Placeholder('new/debian'), }, ), 'pkg/import/2-0ubuntu1', 'pkg/import/3-1', 'pkg/import/1-1', ), ], ) def test_repo_find_ubuntu_merge( description, repo, input_data, old_ubuntu, new_debian, expected, ): > input_data.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository_test.py:889: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp7lr_iu7g/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.1ubuntu1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.1ubuntu1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_2.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_2-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_2-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ 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] _ description = 'Ubuntu upstream version head of Debian' repo = input_data = old_ubuntu = 'pkg/import/2-0ubuntu1', new_debian = 'pkg/import/3-1' expected = 'pkg/import/1-1' @pytest.mark.parametrize( 'description, input_data, old_ubuntu, new_debian, expected', [ ( 'Common case', Repo( commits=[ Commit.from_spec( name='old/debian' ), Commit.from_spec( parents=[Placeholder('old/debian')], name='old/ubuntu', changelog_versions=['1-1ubuntu1', '1-1'], ), Commit.from_spec( parents=[Placeholder('old/debian')], name='new/debian', changelog_versions=['2-1', '1-1'], ), ], tags={ 'pkg/import/1-1': Placeholder('old/debian'), 'pkg/import/1-1ubuntu1': Placeholder('old/ubuntu'), 'pkg/import/2-1': Placeholder('new/debian'), }, ), 'pkg/import/1-1ubuntu1', 'pkg/import/2-1', 'pkg/import/1-1', ), ( 'Ubuntu delta based on a NMU', Repo( commits=[ Commit.from_spec( name='fork_point' ), Commit.from_spec( parents=[Placeholder('fork_point')], name='old/debian', changelog_versions=['1-1.1', '1-1'], ), Commit.from_spec( parents=[Placeholder('old/debian')], name='old/ubuntu', changelog_versions=['1-1.1ubuntu1', '1-1.1', '1-1'], ), Commit.from_spec( parents=[Placeholder('fork_point')], name='new/debian', changelog_versions=['2-1', '1-1'], ), ], tags={ 'pkg/import/1-1': Placeholder('fork_point'), 'pkg/import/1-1.1': Placeholder('old/debian'), 'pkg/import/1-1.1ubuntu1': Placeholder('old/ubuntu'), 'pkg/import/2-1': Placeholder('new/debian'), }, ), 'pkg/import/1-1.1ubuntu1', 'pkg/import/2-1', 'pkg/import/1-1.1', ), ( 'Ubuntu upstream version head of Debian', Repo( commits=[ Commit.from_spec( name='old/debian' ), Commit.from_spec( parents=[Placeholder('old/debian')], name='mid_ubuntu', changelog_versions=['1-1ubuntu1', '1-1'], ), Commit.from_spec( parents=[Placeholder('mid_ubuntu')], name='old/ubuntu', changelog_versions=['2-0ubuntu1', '1-1ubuntu1', '1-1'], ), Commit.from_spec( parents=[Placeholder('old/debian')], name='new/debian', changelog_versions=['3-1', '1-1'], ), ], tags={ 'pkg/import/1-1': Placeholder('old/debian'), 'pkg/import/1-1ubuntu1': Placeholder('mid_ubuntu'), 'pkg/import/2-0ubuntu1': Placeholder('old/ubuntu'), 'pkg/import/3-1': Placeholder('new/debian'), }, ), 'pkg/import/2-0ubuntu1', 'pkg/import/3-1', 'pkg/import/1-1', ), ], ) def test_repo_find_ubuntu_merge( description, repo, input_data, old_ubuntu, new_debian, expected, ): > input_data.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository_test.py:889: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpu18efz8a/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_2.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_2-0ubuntu1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_2-0ubuntu1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1ubuntu1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_3.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_3-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_3-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _______________________________ test_commit_tree _______________________________ repo = def test_commit_tree(repo): # Construct a repository with an initial commit on the master branch so # that we can verify later parentage and lack of branch movement parent_commit_oid = Repo( commits=[Commit(name='master')], branches={'master': Placeholder('master')} ).write(repo.raw_repo) repo.raw_repo.lookup_reference('HEAD').set_target('refs/heads/master') # Construct a tree inside the repository with a debian/changelog in it to # feed to the method under test test_changelog_path = os.path.join( pkg_resources.resource_filename('gitubuntu', 'changelog_tests'), 'test_date_1', ) with open(test_changelog_path, 'rb') as f: test_changelog_bytes = f.read() test_changelog_blob = Blob(test_changelog_bytes) source_tree = Tree({'debian': Tree({'changelog': test_changelog_blob})}) source_tree_oid = source_tree.write(repo.raw_repo) # Call the method under test > commit_oid = repo.commit_source_tree( tree=source_tree_oid, parents=[parent_commit_oid], log_message='test_commit_msg', commit_date=datetime.datetime( 1971, # year 2, # month 3, # day 4, # hours 5, # minutes 6, # seconds 7, # milliseconds (this should get truncated down to 0) datetime.timezone(datetime.timedelta(hours=-8)) ), ) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository_test.py:993: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:2299: in commit_source_tree changelog = self.get_changelog_from_treeish(str(tree)) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish return Changelog.from_treeish( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:569: in from_treeish blob = follow_symlinks_to_blob( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmpxiqvrxld/.git/') top_tree_object = search_path = 'debian/changelog' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:68: AttributeError _____________________ test_descendant_of[root-root-False] ______________________ pygit2_repo = pygit2.Repository('/tmp/tmpnpggxlm5/.git/'), a = 'root' b = 'root', expected = False @pytest.mark.parametrize(['a', 'b', 'expected'], [ ('root', 'root', False), ('child1', 'root', True), ('root', 'child1', False), ('grandchild1', 'root', True), ('child1', 'child2', False), ('root', 'disjoint', False), ] ) def test_descendant_of(pygit2_repo, a, b, expected): """ General test for pygit2.Repository.descendant_of(). This test was formerly for a temporary alternative implementation of pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for use until we updated our pinning to use a newer version of pygit2 that included the pygit2.Repository.descendant_of() method. After the pinning was removed and this implementation replacement took place, we kept the test to ensure that actual behaviour did not change. This unit tests validate_upload_tag() for various parameterized cases. The paramater sets assume the repository structure encoded in the Repo() call below. :param pygit2.Repository pygit2_repo: fixture providing a temporary pygit2.Repository instance to use :param str a: tag name of the first commit to pass to descendant_of() :param str b: tag name of the second commit to pass to descendant_of() :param bool expected: the expected result of descendant_of() """ Repo( # Unique message parameters are used in each entry here in order to # ensure that otherwise-identical commits do not end up being the same # commit (with the same hash, etc). commits=[ Commit(name='root', message='1'), Commit(name='child1', parents=[Placeholder('root')], message='2'), Commit(name='child2', parents=[Placeholder('root')], message='3'), Commit( name='grandchild1', parents=[Placeholder('child1')], message='4' ), Commit(name='disjoint', message='5'), ], tags={ 'root': Placeholder('root'), 'child1': Placeholder('child1'), 'child2': Placeholder('child2'), 'grandchild1': Placeholder('grandchild1'), 'disjoint': Placeholder('disjoint'), } > ).write(pygit2_repo) gitubuntu/git_repository_test.py:1099: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpnpggxlm5/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? gitubuntu/repo_builder.py:389: AttributeError _____________________ test_descendant_of[child1-root-True] _____________________ pygit2_repo = pygit2.Repository('/tmp/tmp13yxjvg8/.git/'), a = 'child1' b = 'root', expected = True @pytest.mark.parametrize(['a', 'b', 'expected'], [ ('root', 'root', False), ('child1', 'root', True), ('root', 'child1', False), ('grandchild1', 'root', True), ('child1', 'child2', False), ('root', 'disjoint', False), ] ) def test_descendant_of(pygit2_repo, a, b, expected): """ General test for pygit2.Repository.descendant_of(). This test was formerly for a temporary alternative implementation of pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for use until we updated our pinning to use a newer version of pygit2 that included the pygit2.Repository.descendant_of() method. After the pinning was removed and this implementation replacement took place, we kept the test to ensure that actual behaviour did not change. This unit tests validate_upload_tag() for various parameterized cases. The paramater sets assume the repository structure encoded in the Repo() call below. :param pygit2.Repository pygit2_repo: fixture providing a temporary pygit2.Repository instance to use :param str a: tag name of the first commit to pass to descendant_of() :param str b: tag name of the second commit to pass to descendant_of() :param bool expected: the expected result of descendant_of() """ Repo( # Unique message parameters are used in each entry here in order to # ensure that otherwise-identical commits do not end up being the same # commit (with the same hash, etc). commits=[ Commit(name='root', message='1'), Commit(name='child1', parents=[Placeholder('root')], message='2'), Commit(name='child2', parents=[Placeholder('root')], message='3'), Commit( name='grandchild1', parents=[Placeholder('child1')], message='4' ), Commit(name='disjoint', message='5'), ], tags={ 'root': Placeholder('root'), 'child1': Placeholder('child1'), 'child2': Placeholder('child2'), 'grandchild1': Placeholder('grandchild1'), 'disjoint': Placeholder('disjoint'), } > ).write(pygit2_repo) gitubuntu/git_repository_test.py:1099: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp13yxjvg8/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? gitubuntu/repo_builder.py:389: AttributeError ____________________ test_descendant_of[root-child1-False] _____________________ pygit2_repo = pygit2.Repository('/tmp/tmptvlp294z/.git/'), a = 'root' b = 'child1', expected = False @pytest.mark.parametrize(['a', 'b', 'expected'], [ ('root', 'root', False), ('child1', 'root', True), ('root', 'child1', False), ('grandchild1', 'root', True), ('child1', 'child2', False), ('root', 'disjoint', False), ] ) def test_descendant_of(pygit2_repo, a, b, expected): """ General test for pygit2.Repository.descendant_of(). This test was formerly for a temporary alternative implementation of pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for use until we updated our pinning to use a newer version of pygit2 that included the pygit2.Repository.descendant_of() method. After the pinning was removed and this implementation replacement took place, we kept the test to ensure that actual behaviour did not change. This unit tests validate_upload_tag() for various parameterized cases. The paramater sets assume the repository structure encoded in the Repo() call below. :param pygit2.Repository pygit2_repo: fixture providing a temporary pygit2.Repository instance to use :param str a: tag name of the first commit to pass to descendant_of() :param str b: tag name of the second commit to pass to descendant_of() :param bool expected: the expected result of descendant_of() """ Repo( # Unique message parameters are used in each entry here in order to # ensure that otherwise-identical commits do not end up being the same # commit (with the same hash, etc). commits=[ Commit(name='root', message='1'), Commit(name='child1', parents=[Placeholder('root')], message='2'), Commit(name='child2', parents=[Placeholder('root')], message='3'), Commit( name='grandchild1', parents=[Placeholder('child1')], message='4' ), Commit(name='disjoint', message='5'), ], tags={ 'root': Placeholder('root'), 'child1': Placeholder('child1'), 'child2': Placeholder('child2'), 'grandchild1': Placeholder('grandchild1'), 'disjoint': Placeholder('disjoint'), } > ).write(pygit2_repo) gitubuntu/git_repository_test.py:1099: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmptvlp294z/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? gitubuntu/repo_builder.py:389: AttributeError __________________ test_descendant_of[grandchild1-root-True] ___________________ pygit2_repo = pygit2.Repository('/tmp/tmp45vmoyfn/.git/'), a = 'grandchild1' b = 'root', expected = True @pytest.mark.parametrize(['a', 'b', 'expected'], [ ('root', 'root', False), ('child1', 'root', True), ('root', 'child1', False), ('grandchild1', 'root', True), ('child1', 'child2', False), ('root', 'disjoint', False), ] ) def test_descendant_of(pygit2_repo, a, b, expected): """ General test for pygit2.Repository.descendant_of(). This test was formerly for a temporary alternative implementation of pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for use until we updated our pinning to use a newer version of pygit2 that included the pygit2.Repository.descendant_of() method. After the pinning was removed and this implementation replacement took place, we kept the test to ensure that actual behaviour did not change. This unit tests validate_upload_tag() for various parameterized cases. The paramater sets assume the repository structure encoded in the Repo() call below. :param pygit2.Repository pygit2_repo: fixture providing a temporary pygit2.Repository instance to use :param str a: tag name of the first commit to pass to descendant_of() :param str b: tag name of the second commit to pass to descendant_of() :param bool expected: the expected result of descendant_of() """ Repo( # Unique message parameters are used in each entry here in order to # ensure that otherwise-identical commits do not end up being the same # commit (with the same hash, etc). commits=[ Commit(name='root', message='1'), Commit(name='child1', parents=[Placeholder('root')], message='2'), Commit(name='child2', parents=[Placeholder('root')], message='3'), Commit( name='grandchild1', parents=[Placeholder('child1')], message='4' ), Commit(name='disjoint', message='5'), ], tags={ 'root': Placeholder('root'), 'child1': Placeholder('child1'), 'child2': Placeholder('child2'), 'grandchild1': Placeholder('grandchild1'), 'disjoint': Placeholder('disjoint'), } > ).write(pygit2_repo) gitubuntu/git_repository_test.py:1099: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp45vmoyfn/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? gitubuntu/repo_builder.py:389: AttributeError ___________________ test_descendant_of[child1-child2-False] ____________________ pygit2_repo = pygit2.Repository('/tmp/tmpx0xi3jc4/.git/'), a = 'child1' b = 'child2', expected = False @pytest.mark.parametrize(['a', 'b', 'expected'], [ ('root', 'root', False), ('child1', 'root', True), ('root', 'child1', False), ('grandchild1', 'root', True), ('child1', 'child2', False), ('root', 'disjoint', False), ] ) def test_descendant_of(pygit2_repo, a, b, expected): """ General test for pygit2.Repository.descendant_of(). This test was formerly for a temporary alternative implementation of pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for use until we updated our pinning to use a newer version of pygit2 that included the pygit2.Repository.descendant_of() method. After the pinning was removed and this implementation replacement took place, we kept the test to ensure that actual behaviour did not change. This unit tests validate_upload_tag() for various parameterized cases. The paramater sets assume the repository structure encoded in the Repo() call below. :param pygit2.Repository pygit2_repo: fixture providing a temporary pygit2.Repository instance to use :param str a: tag name of the first commit to pass to descendant_of() :param str b: tag name of the second commit to pass to descendant_of() :param bool expected: the expected result of descendant_of() """ Repo( # Unique message parameters are used in each entry here in order to # ensure that otherwise-identical commits do not end up being the same # commit (with the same hash, etc). commits=[ Commit(name='root', message='1'), Commit(name='child1', parents=[Placeholder('root')], message='2'), Commit(name='child2', parents=[Placeholder('root')], message='3'), Commit( name='grandchild1', parents=[Placeholder('child1')], message='4' ), Commit(name='disjoint', message='5'), ], tags={ 'root': Placeholder('root'), 'child1': Placeholder('child1'), 'child2': Placeholder('child2'), 'grandchild1': Placeholder('grandchild1'), 'disjoint': Placeholder('disjoint'), } > ).write(pygit2_repo) gitubuntu/git_repository_test.py:1099: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpx0xi3jc4/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? gitubuntu/repo_builder.py:389: AttributeError ___________________ test_descendant_of[root-disjoint-False] ____________________ pygit2_repo = pygit2.Repository('/tmp/tmpi1b8e1u_/.git/'), a = 'root' b = 'disjoint', expected = False @pytest.mark.parametrize(['a', 'b', 'expected'], [ ('root', 'root', False), ('child1', 'root', True), ('root', 'child1', False), ('grandchild1', 'root', True), ('child1', 'child2', False), ('root', 'disjoint', False), ] ) def test_descendant_of(pygit2_repo, a, b, expected): """ General test for pygit2.Repository.descendant_of(). This test was formerly for a temporary alternative implementation of pygit2.Repository.descendant_of() in our GitUbuntuRepository wrapper for use until we updated our pinning to use a newer version of pygit2 that included the pygit2.Repository.descendant_of() method. After the pinning was removed and this implementation replacement took place, we kept the test to ensure that actual behaviour did not change. This unit tests validate_upload_tag() for various parameterized cases. The paramater sets assume the repository structure encoded in the Repo() call below. :param pygit2.Repository pygit2_repo: fixture providing a temporary pygit2.Repository instance to use :param str a: tag name of the first commit to pass to descendant_of() :param str b: tag name of the second commit to pass to descendant_of() :param bool expected: the expected result of descendant_of() """ Repo( # Unique message parameters are used in each entry here in order to # ensure that otherwise-identical commits do not end up being the same # commit (with the same hash, etc). commits=[ Commit(name='root', message='1'), Commit(name='child1', parents=[Placeholder('root')], message='2'), Commit(name='child2', parents=[Placeholder('root')], message='3'), Commit( name='grandchild1', parents=[Placeholder('child1')], message='4' ), Commit(name='disjoint', message='5'), ], tags={ 'root': Placeholder('root'), 'child1': Placeholder('child1'), 'child2': Placeholder('child2'), 'grandchild1': Placeholder('grandchild1'), 'disjoint': Placeholder('disjoint'), } > ).write(pygit2_repo) gitubuntu/git_repository_test.py:1099: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpi1b8e1u_/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? gitubuntu/repo_builder.py:389: AttributeError _______________________________ test_create_tag ________________________________ repo = def test_create_tag(repo): """create_tag() should create a tag :param GitUbuntuRepository repo: fixture providing a temporary GitUbuntuRepository instance to use """ Repo( commits=[Commit(name='root')], tags={'root': Placeholder('root')}, > ).write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository_test.py:1127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmphzhqi5i5/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError __________________________ test_get_all_reimport_tags __________________________ repo = def test_get_all_reimport_tags(repo): """get_all_reimport_tags() should return only matching reimport tags :param GitUbuntuRepository repo: fixture providing a temporary GitUbuntuRepository instance to use """ Repo( commits=[Commit(name='root')], tags={ 'importer/reimport/import/1/0': Placeholder('root'), 'importer/reimport/import/1/1': Placeholder('root'), # This entry must not be identified as one of version 1's reimport # tags, even though it shares the same base prefix. 'importer/reimport/import/11/0': Placeholder('root'), }, > ).write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository_test.py:1165: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp_pqkpviy/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ______________________________ test_get_head_info ______________________________ repo = def test_get_head_info(repo): """get_head_info() extracts expected commit and version info from the head commit """ Repo( commits=[ Commit(name='foo', tree=SourceTree(source=Source())), ], branches={ 'importer/ubuntu/foo': Placeholder('foo'), 'importer/debian/bar': Placeholder('foo'), 'other/ubuntu/baz': Placeholder('foo'), }, ).write(repo.raw_repo) foo_commit_id = ( repo.raw_repo .lookup_reference('refs/heads/importer/ubuntu/foo') .peel(pygit2.Commit).id ) > assert repo.get_head_info('ubuntu', 'importer') == { 'importer/ubuntu/foo': HeadInfoItem( version='1-1', commit_time=0, commit_id=foo_commit_id, ), } /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository_test.py:1193: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1952: in get_head_info self.get_changelog_versions_from_treeish(str(head.peel().id)) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1888: in get_changelog_versions_from_treeish changelog = self.get_changelog_from_treeish(treeish_string) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish return Changelog.from_treeish( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:569: in from_treeish blob = follow_symlinks_to_blob( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmpl9ot_crc/.git/') top_tree_object = search_path = 'debian/changelog' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:68: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_import_unapplied_spi_tags[input_repo0-expected_output_refs0-validation_repo_delta0-validation_repo_expected_identical_refs0-True] _ get_import_commit_msg_mock = get_import_tag_msg_mock = repo = input_repo = 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'] validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }} validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty-proposed', 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1'] reuse = True @pytest.mark.parametrize( [ 'input_repo', 'expected_output_refs', 'validation_repo_delta', 'validation_repo_expected_identical_refs', 'reuse', ], [ # 1) An existing import tag (or reimport tag) with the same Git tree # - Reuse import tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='import')], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={'importer/import/1-1': Placeholder('import')}, ), # 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', ], # validation_repo_delta: { 'update_branches': { 'importer/ubuntu/trusty': Placeholder('import'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty-proposed', 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', ], # reuse: True, ), pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='import tag contents', ), Commit.from_spec(name='reimport'), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), # 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', ], # validation_repo_delta: { 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: True, ), # 2) An existing import tag with a different Git tree and an existing # upload tag with the same Git tree # - Reuse upload tag, create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), Commit.from_spec(name='upload'), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-1': Placeholder('upload'), }, ), # 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', ], # validation_repo_delta: { 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('upload'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('upload'), }, }, # 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', ], # reuse: True, ), # 3) An existing import tag with a different Git tree and an existing # upload tag with a different Git tree # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), Commit.from_spec( name='upload', mutate='The upload tag contents', ), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-1': Placeholder('upload'), }, ), # 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', ], # validation_repo_delta: { 'add_commits': [Commit.from_spec( name='reimport', message='Test commit (new)', )], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: False, ), # 4) An existing import tag with a different Git tree and no upload tag # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={'importer/import/1-1': Placeholder('import')}, ), # 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', ], # validation_repo_delta: { 'add_commits': [Commit.from_spec( name='reimport', message='Test commit (new)', )], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: False, ), # 5) No import tag and an existing upload tag with the same Git tree # - Reuse upload tag, create import tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='upload')], tags={'importer/upload/1-1': Placeholder('upload')}, ), # 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', ], # validation_repo_delta: { 'update_tags': { 'importer/import/1-1': Placeholder('upload'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('upload'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', ], # reuse: True, ), # 6) No import tag and an existing upload tag with a different Git tree # - Create import tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='upload', mutate='The upload tag contents', ), ], tags={'importer/upload/1-1': Placeholder('upload')}, ), # 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', ], # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='publish', message='Test commit (new)', ), ], 'update_tags': { 'importer/import/1-1': Placeholder('publish'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('publish'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', ], # reuse: False, ), # 7) No import tags or upload tags # - Create import tag pytest.param( # input_repo: repo_builder.Repo(), # 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', ], # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='publish', message='Test commit (new)', ), ], 'update_tags': { 'importer/import/1-1': Placeholder('publish'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('publish'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1' ], # reuse: False, ), ] ) @patch('gitubuntu.importer.get_import_tag_msg') @patch('gitubuntu.importer.get_import_commit_msg') def test_import_unapplied_spi_tags( get_import_commit_msg_mock, get_import_tag_msg_mock, repo, input_repo, expected_output_refs, validation_repo_delta, validation_repo_expected_identical_refs, reuse, ): """Test that unapplied tags are correctly created, adjusted and/or reused :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function that determines the commit message to use for a given import :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function that determines the tag message to use for a given import :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param list(str) expected_output_refs: refs that must exist in the output repository :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository :param bool reuse: if set, the output ref importer/ubuntu/trusty must be one supplied by the input repository (assumed to have a commit message of "Test commit") and not one created by the importer in this run (arranged by this test to have a different commit message) The input repository data is written into the output repository and then a fake non-native source package publication of version 1-1 in the Trusty release pocket is imported into it by calling import_unapplied_spi() directly. expected_output_refs, validation_repo_expected_identical_refs and reuse are then asserted. It is further asserted that no other refs exist in the output repository except for those listed in expected_output_refs and validation_repo_expected_identical_refs. """ # Match the repo_builder objects get_import_tag_msg_mock.return_value = 'Test tag' # Importantly, the following commit message must not be the same as the # commit messages used by the test input repository commits, so that we can # later detect the difference between commits that were already there and # new commits created by the importer for the purposes of asserting the # reuse parameter correctly. get_import_commit_msg_mock.return_value = b'Test commit (new)' > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_tag_test.py:463: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpj7xl7p08/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_import_unapplied_spi_tags[input_repo1-expected_output_refs1-validation_repo_delta1-validation_repo_expected_identical_refs1-True] _ get_import_commit_msg_mock = get_import_tag_msg_mock = repo = input_repo = 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'] validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }} 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'] reuse = True @pytest.mark.parametrize( [ 'input_repo', 'expected_output_refs', 'validation_repo_delta', 'validation_repo_expected_identical_refs', 'reuse', ], [ # 1) An existing import tag (or reimport tag) with the same Git tree # - Reuse import tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='import')], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={'importer/import/1-1': Placeholder('import')}, ), # 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', ], # validation_repo_delta: { 'update_branches': { 'importer/ubuntu/trusty': Placeholder('import'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty-proposed', 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', ], # reuse: True, ), pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='import tag contents', ), Commit.from_spec(name='reimport'), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), # 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', ], # validation_repo_delta: { 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: True, ), # 2) An existing import tag with a different Git tree and an existing # upload tag with the same Git tree # - Reuse upload tag, create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), Commit.from_spec(name='upload'), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-1': Placeholder('upload'), }, ), # 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', ], # validation_repo_delta: { 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('upload'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('upload'), }, }, # 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', ], # reuse: True, ), # 3) An existing import tag with a different Git tree and an existing # upload tag with a different Git tree # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), Commit.from_spec( name='upload', mutate='The upload tag contents', ), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-1': Placeholder('upload'), }, ), # 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', ], # validation_repo_delta: { 'add_commits': [Commit.from_spec( name='reimport', message='Test commit (new)', )], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: False, ), # 4) An existing import tag with a different Git tree and no upload tag # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={'importer/import/1-1': Placeholder('import')}, ), # 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', ], # validation_repo_delta: { 'add_commits': [Commit.from_spec( name='reimport', message='Test commit (new)', )], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: False, ), # 5) No import tag and an existing upload tag with the same Git tree # - Reuse upload tag, create import tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='upload')], tags={'importer/upload/1-1': Placeholder('upload')}, ), # 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', ], # validation_repo_delta: { 'update_tags': { 'importer/import/1-1': Placeholder('upload'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('upload'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', ], # reuse: True, ), # 6) No import tag and an existing upload tag with a different Git tree # - Create import tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='upload', mutate='The upload tag contents', ), ], tags={'importer/upload/1-1': Placeholder('upload')}, ), # 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', ], # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='publish', message='Test commit (new)', ), ], 'update_tags': { 'importer/import/1-1': Placeholder('publish'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('publish'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', ], # reuse: False, ), # 7) No import tags or upload tags # - Create import tag pytest.param( # input_repo: repo_builder.Repo(), # 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', ], # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='publish', message='Test commit (new)', ), ], 'update_tags': { 'importer/import/1-1': Placeholder('publish'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('publish'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1' ], # reuse: False, ), ] ) @patch('gitubuntu.importer.get_import_tag_msg') @patch('gitubuntu.importer.get_import_commit_msg') def test_import_unapplied_spi_tags( get_import_commit_msg_mock, get_import_tag_msg_mock, repo, input_repo, expected_output_refs, validation_repo_delta, validation_repo_expected_identical_refs, reuse, ): """Test that unapplied tags are correctly created, adjusted and/or reused :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function that determines the commit message to use for a given import :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function that determines the tag message to use for a given import :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param list(str) expected_output_refs: refs that must exist in the output repository :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository :param bool reuse: if set, the output ref importer/ubuntu/trusty must be one supplied by the input repository (assumed to have a commit message of "Test commit") and not one created by the importer in this run (arranged by this test to have a different commit message) The input repository data is written into the output repository and then a fake non-native source package publication of version 1-1 in the Trusty release pocket is imported into it by calling import_unapplied_spi() directly. expected_output_refs, validation_repo_expected_identical_refs and reuse are then asserted. It is further asserted that no other refs exist in the output repository except for those listed in expected_output_refs and validation_repo_expected_identical_refs. """ # Match the repo_builder objects get_import_tag_msg_mock.return_value = 'Test tag' # Importantly, the following commit message must not be the same as the # commit messages used by the test input repository commits, so that we can # later detect the difference between commits that were already there and # new commits created by the importer for the purposes of asserting the # reuse parameter correctly. get_import_commit_msg_mock.return_value = b'Test commit (new)' > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_tag_test.py:463: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp_jnyusau/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_import_unapplied_spi_tags[input_repo2-expected_output_refs2-validation_repo_delta2-validation_repo_expected_identical_refs2-True] _ get_import_commit_msg_mock = get_import_tag_msg_mock = repo = input_repo = 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'] validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }, 'update_tag...er object at 0xf4cbba20>, 'importer/reimport/import/1-1/1': }} 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'] reuse = True @pytest.mark.parametrize( [ 'input_repo', 'expected_output_refs', 'validation_repo_delta', 'validation_repo_expected_identical_refs', 'reuse', ], [ # 1) An existing import tag (or reimport tag) with the same Git tree # - Reuse import tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='import')], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={'importer/import/1-1': Placeholder('import')}, ), # 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', ], # validation_repo_delta: { 'update_branches': { 'importer/ubuntu/trusty': Placeholder('import'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty-proposed', 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', ], # reuse: True, ), pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='import tag contents', ), Commit.from_spec(name='reimport'), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), # 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', ], # validation_repo_delta: { 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: True, ), # 2) An existing import tag with a different Git tree and an existing # upload tag with the same Git tree # - Reuse upload tag, create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), Commit.from_spec(name='upload'), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-1': Placeholder('upload'), }, ), # 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', ], # validation_repo_delta: { 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('upload'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('upload'), }, }, # 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', ], # reuse: True, ), # 3) An existing import tag with a different Git tree and an existing # upload tag with a different Git tree # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), Commit.from_spec( name='upload', mutate='The upload tag contents', ), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-1': Placeholder('upload'), }, ), # 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', ], # validation_repo_delta: { 'add_commits': [Commit.from_spec( name='reimport', message='Test commit (new)', )], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: False, ), # 4) An existing import tag with a different Git tree and no upload tag # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={'importer/import/1-1': Placeholder('import')}, ), # 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', ], # validation_repo_delta: { 'add_commits': [Commit.from_spec( name='reimport', message='Test commit (new)', )], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: False, ), # 5) No import tag and an existing upload tag with the same Git tree # - Reuse upload tag, create import tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='upload')], tags={'importer/upload/1-1': Placeholder('upload')}, ), # 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', ], # validation_repo_delta: { 'update_tags': { 'importer/import/1-1': Placeholder('upload'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('upload'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', ], # reuse: True, ), # 6) No import tag and an existing upload tag with a different Git tree # - Create import tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='upload', mutate='The upload tag contents', ), ], tags={'importer/upload/1-1': Placeholder('upload')}, ), # 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', ], # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='publish', message='Test commit (new)', ), ], 'update_tags': { 'importer/import/1-1': Placeholder('publish'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('publish'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', ], # reuse: False, ), # 7) No import tags or upload tags # - Create import tag pytest.param( # input_repo: repo_builder.Repo(), # 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', ], # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='publish', message='Test commit (new)', ), ], 'update_tags': { 'importer/import/1-1': Placeholder('publish'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('publish'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1' ], # reuse: False, ), ] ) @patch('gitubuntu.importer.get_import_tag_msg') @patch('gitubuntu.importer.get_import_commit_msg') def test_import_unapplied_spi_tags( get_import_commit_msg_mock, get_import_tag_msg_mock, repo, input_repo, expected_output_refs, validation_repo_delta, validation_repo_expected_identical_refs, reuse, ): """Test that unapplied tags are correctly created, adjusted and/or reused :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function that determines the commit message to use for a given import :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function that determines the tag message to use for a given import :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param list(str) expected_output_refs: refs that must exist in the output repository :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository :param bool reuse: if set, the output ref importer/ubuntu/trusty must be one supplied by the input repository (assumed to have a commit message of "Test commit") and not one created by the importer in this run (arranged by this test to have a different commit message) The input repository data is written into the output repository and then a fake non-native source package publication of version 1-1 in the Trusty release pocket is imported into it by calling import_unapplied_spi() directly. expected_output_refs, validation_repo_expected_identical_refs and reuse are then asserted. It is further asserted that no other refs exist in the output repository except for those listed in expected_output_refs and validation_repo_expected_identical_refs. """ # Match the repo_builder objects get_import_tag_msg_mock.return_value = 'Test tag' # Importantly, the following commit message must not be the same as the # commit messages used by the test input repository commits, so that we can # later detect the difference between commits that were already there and # new commits created by the importer for the purposes of asserting the # reuse parameter correctly. get_import_commit_msg_mock.return_value = b'Test commit (new)' > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_tag_test.py:463: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp_6ao3dyl/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_import_unapplied_spi_tags[input_repo3-expected_output_refs3-validation_repo_delta3-validation_repo_expected_identical_refs3-False] _ get_import_commit_msg_mock = get_import_tag_msg_mock = repo = input_repo = 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'] validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trusty': ...er object at 0xf4cbbd20>, 'importer/reimport/import/1-1/1': }} 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'] reuse = False @pytest.mark.parametrize( [ 'input_repo', 'expected_output_refs', 'validation_repo_delta', 'validation_repo_expected_identical_refs', 'reuse', ], [ # 1) An existing import tag (or reimport tag) with the same Git tree # - Reuse import tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='import')], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={'importer/import/1-1': Placeholder('import')}, ), # 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', ], # validation_repo_delta: { 'update_branches': { 'importer/ubuntu/trusty': Placeholder('import'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty-proposed', 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', ], # reuse: True, ), pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='import tag contents', ), Commit.from_spec(name='reimport'), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), # 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', ], # validation_repo_delta: { 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: True, ), # 2) An existing import tag with a different Git tree and an existing # upload tag with the same Git tree # - Reuse upload tag, create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), Commit.from_spec(name='upload'), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-1': Placeholder('upload'), }, ), # 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', ], # validation_repo_delta: { 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('upload'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('upload'), }, }, # 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', ], # reuse: True, ), # 3) An existing import tag with a different Git tree and an existing # upload tag with a different Git tree # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), Commit.from_spec( name='upload', mutate='The upload tag contents', ), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-1': Placeholder('upload'), }, ), # 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', ], # validation_repo_delta: { 'add_commits': [Commit.from_spec( name='reimport', message='Test commit (new)', )], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: False, ), # 4) An existing import tag with a different Git tree and no upload tag # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={'importer/import/1-1': Placeholder('import')}, ), # 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', ], # validation_repo_delta: { 'add_commits': [Commit.from_spec( name='reimport', message='Test commit (new)', )], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: False, ), # 5) No import tag and an existing upload tag with the same Git tree # - Reuse upload tag, create import tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='upload')], tags={'importer/upload/1-1': Placeholder('upload')}, ), # 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', ], # validation_repo_delta: { 'update_tags': { 'importer/import/1-1': Placeholder('upload'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('upload'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', ], # reuse: True, ), # 6) No import tag and an existing upload tag with a different Git tree # - Create import tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='upload', mutate='The upload tag contents', ), ], tags={'importer/upload/1-1': Placeholder('upload')}, ), # 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', ], # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='publish', message='Test commit (new)', ), ], 'update_tags': { 'importer/import/1-1': Placeholder('publish'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('publish'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', ], # reuse: False, ), # 7) No import tags or upload tags # - Create import tag pytest.param( # input_repo: repo_builder.Repo(), # 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', ], # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='publish', message='Test commit (new)', ), ], 'update_tags': { 'importer/import/1-1': Placeholder('publish'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('publish'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1' ], # reuse: False, ), ] ) @patch('gitubuntu.importer.get_import_tag_msg') @patch('gitubuntu.importer.get_import_commit_msg') def test_import_unapplied_spi_tags( get_import_commit_msg_mock, get_import_tag_msg_mock, repo, input_repo, expected_output_refs, validation_repo_delta, validation_repo_expected_identical_refs, reuse, ): """Test that unapplied tags are correctly created, adjusted and/or reused :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function that determines the commit message to use for a given import :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function that determines the tag message to use for a given import :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param list(str) expected_output_refs: refs that must exist in the output repository :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository :param bool reuse: if set, the output ref importer/ubuntu/trusty must be one supplied by the input repository (assumed to have a commit message of "Test commit") and not one created by the importer in this run (arranged by this test to have a different commit message) The input repository data is written into the output repository and then a fake non-native source package publication of version 1-1 in the Trusty release pocket is imported into it by calling import_unapplied_spi() directly. expected_output_refs, validation_repo_expected_identical_refs and reuse are then asserted. It is further asserted that no other refs exist in the output repository except for those listed in expected_output_refs and validation_repo_expected_identical_refs. """ # Match the repo_builder objects get_import_tag_msg_mock.return_value = 'Test tag' # Importantly, the following commit message must not be the same as the # commit messages used by the test input repository commits, so that we can # later detect the difference between commits that were already there and # new commits created by the importer for the purposes of asserting the # reuse parameter correctly. get_import_commit_msg_mock.return_value = b'Test commit (new)' > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_tag_test.py:463: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp8pvf60mo/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_import_unapplied_spi_tags[input_repo4-expected_output_refs4-validation_repo_delta4-validation_repo_expected_identical_refs4-False] _ get_import_commit_msg_mock = get_import_tag_msg_mock = repo = input_repo = 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'] validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trusty': ...er object at 0xf4cbbfa8>, 'importer/reimport/import/1-1/1': }} 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'] reuse = False @pytest.mark.parametrize( [ 'input_repo', 'expected_output_refs', 'validation_repo_delta', 'validation_repo_expected_identical_refs', 'reuse', ], [ # 1) An existing import tag (or reimport tag) with the same Git tree # - Reuse import tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='import')], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={'importer/import/1-1': Placeholder('import')}, ), # 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', ], # validation_repo_delta: { 'update_branches': { 'importer/ubuntu/trusty': Placeholder('import'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty-proposed', 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', ], # reuse: True, ), pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='import tag contents', ), Commit.from_spec(name='reimport'), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), # 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', ], # validation_repo_delta: { 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: True, ), # 2) An existing import tag with a different Git tree and an existing # upload tag with the same Git tree # - Reuse upload tag, create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), Commit.from_spec(name='upload'), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-1': Placeholder('upload'), }, ), # 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', ], # validation_repo_delta: { 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('upload'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('upload'), }, }, # 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', ], # reuse: True, ), # 3) An existing import tag with a different Git tree and an existing # upload tag with a different Git tree # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), Commit.from_spec( name='upload', mutate='The upload tag contents', ), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-1': Placeholder('upload'), }, ), # 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', ], # validation_repo_delta: { 'add_commits': [Commit.from_spec( name='reimport', message='Test commit (new)', )], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: False, ), # 4) An existing import tag with a different Git tree and no upload tag # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={'importer/import/1-1': Placeholder('import')}, ), # 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', ], # validation_repo_delta: { 'add_commits': [Commit.from_spec( name='reimport', message='Test commit (new)', )], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: False, ), # 5) No import tag and an existing upload tag with the same Git tree # - Reuse upload tag, create import tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='upload')], tags={'importer/upload/1-1': Placeholder('upload')}, ), # 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', ], # validation_repo_delta: { 'update_tags': { 'importer/import/1-1': Placeholder('upload'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('upload'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', ], # reuse: True, ), # 6) No import tag and an existing upload tag with a different Git tree # - Create import tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='upload', mutate='The upload tag contents', ), ], tags={'importer/upload/1-1': Placeholder('upload')}, ), # 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', ], # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='publish', message='Test commit (new)', ), ], 'update_tags': { 'importer/import/1-1': Placeholder('publish'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('publish'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', ], # reuse: False, ), # 7) No import tags or upload tags # - Create import tag pytest.param( # input_repo: repo_builder.Repo(), # 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', ], # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='publish', message='Test commit (new)', ), ], 'update_tags': { 'importer/import/1-1': Placeholder('publish'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('publish'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1' ], # reuse: False, ), ] ) @patch('gitubuntu.importer.get_import_tag_msg') @patch('gitubuntu.importer.get_import_commit_msg') def test_import_unapplied_spi_tags( get_import_commit_msg_mock, get_import_tag_msg_mock, repo, input_repo, expected_output_refs, validation_repo_delta, validation_repo_expected_identical_refs, reuse, ): """Test that unapplied tags are correctly created, adjusted and/or reused :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function that determines the commit message to use for a given import :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function that determines the tag message to use for a given import :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param list(str) expected_output_refs: refs that must exist in the output repository :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository :param bool reuse: if set, the output ref importer/ubuntu/trusty must be one supplied by the input repository (assumed to have a commit message of "Test commit") and not one created by the importer in this run (arranged by this test to have a different commit message) The input repository data is written into the output repository and then a fake non-native source package publication of version 1-1 in the Trusty release pocket is imported into it by calling import_unapplied_spi() directly. expected_output_refs, validation_repo_expected_identical_refs and reuse are then asserted. It is further asserted that no other refs exist in the output repository except for those listed in expected_output_refs and validation_repo_expected_identical_refs. """ # Match the repo_builder objects get_import_tag_msg_mock.return_value = 'Test tag' # Importantly, the following commit message must not be the same as the # commit messages used by the test input repository commits, so that we can # later detect the difference between commits that were already there and # new commits created by the importer for the purposes of asserting the # reuse parameter correctly. get_import_commit_msg_mock.return_value = b'Test commit (new)' > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_tag_test.py:463: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpftg2cgcq/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_import_unapplied_spi_tags[input_repo5-expected_output_refs5-validation_repo_delta5-validation_repo_expected_identical_refs5-True] _ get_import_commit_msg_mock = get_import_tag_msg_mock = repo = input_repo = 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'] validation_repo_delta = {'update_branches': {'importer/ubuntu/trusty': }, 'update_tags': {'importer/import/1-1': }} validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1'] reuse = True @pytest.mark.parametrize( [ 'input_repo', 'expected_output_refs', 'validation_repo_delta', 'validation_repo_expected_identical_refs', 'reuse', ], [ # 1) An existing import tag (or reimport tag) with the same Git tree # - Reuse import tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='import')], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={'importer/import/1-1': Placeholder('import')}, ), # 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', ], # validation_repo_delta: { 'update_branches': { 'importer/ubuntu/trusty': Placeholder('import'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty-proposed', 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', ], # reuse: True, ), pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='import tag contents', ), Commit.from_spec(name='reimport'), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), # 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', ], # validation_repo_delta: { 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: True, ), # 2) An existing import tag with a different Git tree and an existing # upload tag with the same Git tree # - Reuse upload tag, create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), Commit.from_spec(name='upload'), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-1': Placeholder('upload'), }, ), # 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', ], # validation_repo_delta: { 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('upload'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('upload'), }, }, # 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', ], # reuse: True, ), # 3) An existing import tag with a different Git tree and an existing # upload tag with a different Git tree # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), Commit.from_spec( name='upload', mutate='The upload tag contents', ), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-1': Placeholder('upload'), }, ), # 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', ], # validation_repo_delta: { 'add_commits': [Commit.from_spec( name='reimport', message='Test commit (new)', )], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: False, ), # 4) An existing import tag with a different Git tree and no upload tag # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={'importer/import/1-1': Placeholder('import')}, ), # 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', ], # validation_repo_delta: { 'add_commits': [Commit.from_spec( name='reimport', message='Test commit (new)', )], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: False, ), # 5) No import tag and an existing upload tag with the same Git tree # - Reuse upload tag, create import tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='upload')], tags={'importer/upload/1-1': Placeholder('upload')}, ), # 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', ], # validation_repo_delta: { 'update_tags': { 'importer/import/1-1': Placeholder('upload'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('upload'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', ], # reuse: True, ), # 6) No import tag and an existing upload tag with a different Git tree # - Create import tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='upload', mutate='The upload tag contents', ), ], tags={'importer/upload/1-1': Placeholder('upload')}, ), # 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', ], # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='publish', message='Test commit (new)', ), ], 'update_tags': { 'importer/import/1-1': Placeholder('publish'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('publish'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', ], # reuse: False, ), # 7) No import tags or upload tags # - Create import tag pytest.param( # input_repo: repo_builder.Repo(), # 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', ], # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='publish', message='Test commit (new)', ), ], 'update_tags': { 'importer/import/1-1': Placeholder('publish'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('publish'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1' ], # reuse: False, ), ] ) @patch('gitubuntu.importer.get_import_tag_msg') @patch('gitubuntu.importer.get_import_commit_msg') def test_import_unapplied_spi_tags( get_import_commit_msg_mock, get_import_tag_msg_mock, repo, input_repo, expected_output_refs, validation_repo_delta, validation_repo_expected_identical_refs, reuse, ): """Test that unapplied tags are correctly created, adjusted and/or reused :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function that determines the commit message to use for a given import :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function that determines the tag message to use for a given import :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param list(str) expected_output_refs: refs that must exist in the output repository :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository :param bool reuse: if set, the output ref importer/ubuntu/trusty must be one supplied by the input repository (assumed to have a commit message of "Test commit") and not one created by the importer in this run (arranged by this test to have a different commit message) The input repository data is written into the output repository and then a fake non-native source package publication of version 1-1 in the Trusty release pocket is imported into it by calling import_unapplied_spi() directly. expected_output_refs, validation_repo_expected_identical_refs and reuse are then asserted. It is further asserted that no other refs exist in the output repository except for those listed in expected_output_refs and validation_repo_expected_identical_refs. """ # Match the repo_builder objects get_import_tag_msg_mock.return_value = 'Test tag' # Importantly, the following commit message must not be the same as the # commit messages used by the test input repository commits, so that we can # later detect the difference between commits that were already there and # new commits created by the importer for the purposes of asserting the # reuse parameter correctly. get_import_commit_msg_mock.return_value = b'Test commit (new)' > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_tag_test.py:463: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpaz_yn2rp/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_import_unapplied_spi_tags[input_repo6-expected_output_refs6-validation_repo_delta6-validation_repo_expected_identical_refs6-False] _ get_import_commit_msg_mock = get_import_tag_msg_mock = repo = input_repo = 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'] validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trusty': ...ect at 0xf4cbe2e8>}, 'update_tags': {'importer/import/1-1': }} validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1'] reuse = False @pytest.mark.parametrize( [ 'input_repo', 'expected_output_refs', 'validation_repo_delta', 'validation_repo_expected_identical_refs', 'reuse', ], [ # 1) An existing import tag (or reimport tag) with the same Git tree # - Reuse import tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='import')], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={'importer/import/1-1': Placeholder('import')}, ), # 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', ], # validation_repo_delta: { 'update_branches': { 'importer/ubuntu/trusty': Placeholder('import'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty-proposed', 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', ], # reuse: True, ), pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='import tag contents', ), Commit.from_spec(name='reimport'), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), # 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', ], # validation_repo_delta: { 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: True, ), # 2) An existing import tag with a different Git tree and an existing # upload tag with the same Git tree # - Reuse upload tag, create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), Commit.from_spec(name='upload'), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-1': Placeholder('upload'), }, ), # 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', ], # validation_repo_delta: { 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('upload'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('upload'), }, }, # 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', ], # reuse: True, ), # 3) An existing import tag with a different Git tree and an existing # upload tag with a different Git tree # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), Commit.from_spec( name='upload', mutate='The upload tag contents', ), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-1': Placeholder('upload'), }, ), # 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', ], # validation_repo_delta: { 'add_commits': [Commit.from_spec( name='reimport', message='Test commit (new)', )], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: False, ), # 4) An existing import tag with a different Git tree and no upload tag # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={'importer/import/1-1': Placeholder('import')}, ), # 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', ], # validation_repo_delta: { 'add_commits': [Commit.from_spec( name='reimport', message='Test commit (new)', )], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: False, ), # 5) No import tag and an existing upload tag with the same Git tree # - Reuse upload tag, create import tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='upload')], tags={'importer/upload/1-1': Placeholder('upload')}, ), # 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', ], # validation_repo_delta: { 'update_tags': { 'importer/import/1-1': Placeholder('upload'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('upload'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', ], # reuse: True, ), # 6) No import tag and an existing upload tag with a different Git tree # - Create import tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='upload', mutate='The upload tag contents', ), ], tags={'importer/upload/1-1': Placeholder('upload')}, ), # 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', ], # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='publish', message='Test commit (new)', ), ], 'update_tags': { 'importer/import/1-1': Placeholder('publish'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('publish'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', ], # reuse: False, ), # 7) No import tags or upload tags # - Create import tag pytest.param( # input_repo: repo_builder.Repo(), # 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', ], # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='publish', message='Test commit (new)', ), ], 'update_tags': { 'importer/import/1-1': Placeholder('publish'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('publish'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1' ], # reuse: False, ), ] ) @patch('gitubuntu.importer.get_import_tag_msg') @patch('gitubuntu.importer.get_import_commit_msg') def test_import_unapplied_spi_tags( get_import_commit_msg_mock, get_import_tag_msg_mock, repo, input_repo, expected_output_refs, validation_repo_delta, validation_repo_expected_identical_refs, reuse, ): """Test that unapplied tags are correctly created, adjusted and/or reused :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function that determines the commit message to use for a given import :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function that determines the tag message to use for a given import :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param list(str) expected_output_refs: refs that must exist in the output repository :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository :param bool reuse: if set, the output ref importer/ubuntu/trusty must be one supplied by the input repository (assumed to have a commit message of "Test commit") and not one created by the importer in this run (arranged by this test to have a different commit message) The input repository data is written into the output repository and then a fake non-native source package publication of version 1-1 in the Trusty release pocket is imported into it by calling import_unapplied_spi() directly. expected_output_refs, validation_repo_expected_identical_refs and reuse are then asserted. It is further asserted that no other refs exist in the output repository except for those listed in expected_output_refs and validation_repo_expected_identical_refs. """ # Match the repo_builder objects get_import_tag_msg_mock.return_value = 'Test tag' # Importantly, the following commit message must not be the same as the # commit messages used by the test input repository commits, so that we can # later detect the difference between commits that were already there and # new commits created by the importer for the purposes of asserting the # reuse parameter correctly. get_import_commit_msg_mock.return_value = b'Test commit (new)' > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_tag_test.py:463: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpy69dpkew/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_import_unapplied_spi_tags[input_repo7-expected_output_refs7-validation_repo_delta7-validation_repo_expected_identical_refs7-False] _ repo = dsc = {'Format': '3.0 (quilt)', 'Source': 'source-builder-package', 'Binary': 'source-builder-package', 'Architecture': 'all...'}, {'md5sum': '6277ba0650104b4f3e329b42e855e558', 'size': '528', 'name': 'source-builder-package_1-1.debian.tar.xz'}]} namespace = 'importer', version = '1-1', dist = 'ubuntu' def import_dsc(repo, dsc, namespace, version, dist): """Imports the dsc file to importer/{debian,ubuntu}/dsc Arguments: spi - A GitUbuntuSourcePackageInformation instance """ # Add DSC file to the appropriate branch dsc_branch_name = '%s/importer/%s/dsc' % (namespace, dist) dsc_ref_name = 'refs/heads/%s' % dsc_branch_name try: repo.raw_repo.lookup_reference(dsc_ref_name) except KeyError: runq(['git', 'checkout', '--orphan', dsc_branch_name], env=repo.env) runq(['git', 'reset', '--hard'], env=repo.env) else: runq(['git', 'checkout', dsc_branch_name], env=repo.env) # It is possible the same-named DSC is published multiple times # with different contents, e.g. on epoch bumps local_dir = os.path.join(repo.local_dir, version) os.makedirs(local_dir, exist_ok=True) shutil.copy(dsc.dsc_path, local_dir) repo.git_run(['add', repo.local_dir]) try: # Anything to commit? (this will be 0 if, for instance, the # same dsc is being imported again) > runq(['git', 'diff', '--exit-code', 'HEAD'], env=repo.env) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:735: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:31: in runq return run(*args, **kwargs) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:87: in run raise e /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:64: in run cp = subprocess.run( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['git', 'diff', '--exit-code', 'HEAD'],) kwargs = {'env': {'ASFLAGS': '', 'ASFLAGS_FOR_BUILD': '', 'BUILDUSERGECOS': 'first user,first room,first work-phone,first home-phone,first other', 'BUILDUSERNAME': 'pbuilder1', ...}, 'shell': False, 'stderr': -3, 'stdin': -3, ...} process = stdout = None, stderr = None, retcode = 128 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['git', 'diff', '--exit-code', 'HEAD']' returned non-zero exit status 128. /usr/lib/python3.12/subprocess.py:571: CalledProcessError During handling of the above exception, another exception occurred: get_import_commit_msg_mock = get_import_tag_msg_mock = repo = input_repo = 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'] validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/ubuntu/trusty': ...ect at 0xf4cbe420>}, 'update_tags': {'importer/import/1-1': }} validation_repo_expected_identical_refs = ['refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1'] reuse = False @pytest.mark.parametrize( [ 'input_repo', 'expected_output_refs', 'validation_repo_delta', 'validation_repo_expected_identical_refs', 'reuse', ], [ # 1) An existing import tag (or reimport tag) with the same Git tree # - Reuse import tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='import')], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={'importer/import/1-1': Placeholder('import')}, ), # 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', ], # validation_repo_delta: { 'update_branches': { 'importer/ubuntu/trusty': Placeholder('import'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty-proposed', 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', ], # reuse: True, ), pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='import tag contents', ), Commit.from_spec(name='reimport'), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), # 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', ], # validation_repo_delta: { 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: True, ), # 2) An existing import tag with a different Git tree and an existing # upload tag with the same Git tree # - Reuse upload tag, create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), Commit.from_spec(name='upload'), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-1': Placeholder('upload'), }, ), # 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', ], # validation_repo_delta: { 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('upload'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('upload'), }, }, # 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', ], # reuse: True, ), # 3) An existing import tag with a different Git tree and an existing # upload tag with a different Git tree # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), Commit.from_spec( name='upload', mutate='The upload tag contents', ), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-1': Placeholder('upload'), }, ), # 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', ], # validation_repo_delta: { 'add_commits': [Commit.from_spec( name='reimport', message='Test commit (new)', )], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: False, ), # 4) An existing import tag with a different Git tree and no upload tag # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='import', mutate='The import tag contents', ), ], branches={ 'importer/ubuntu/trusty-proposed': Placeholder('import'), }, tags={'importer/import/1-1': Placeholder('import')}, ), # 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', ], # validation_repo_delta: { 'add_commits': [Commit.from_spec( name='reimport', message='Test commit (new)', )], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('reimport'), }, }, # 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', ], # reuse: False, ), # 5) No import tag and an existing upload tag with the same Git tree # - Reuse upload tag, create import tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='upload')], tags={'importer/upload/1-1': Placeholder('upload')}, ), # 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', ], # validation_repo_delta: { 'update_tags': { 'importer/import/1-1': Placeholder('upload'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('upload'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', ], # reuse: True, ), # 6) No import tag and an existing upload tag with a different Git tree # - Create import tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='upload', mutate='The upload tag contents', ), ], tags={'importer/upload/1-1': Placeholder('upload')}, ), # 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', ], # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='publish', message='Test commit (new)', ), ], 'update_tags': { 'importer/import/1-1': Placeholder('publish'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('publish'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1', 'refs/tags/importer/upload/1-1', ], # reuse: False, ), # 7) No import tags or upload tags # - Create import tag pytest.param( # input_repo: repo_builder.Repo(), # 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', ], # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='publish', message='Test commit (new)', ), ], 'update_tags': { 'importer/import/1-1': Placeholder('publish'), }, 'update_branches': { 'importer/ubuntu/trusty': Placeholder('publish'), }, }, # validation_repo_expected_identical_refs: [ 'refs/heads/importer/ubuntu/trusty', 'refs/tags/importer/import/1-1' ], # reuse: False, ), ] ) @patch('gitubuntu.importer.get_import_tag_msg') @patch('gitubuntu.importer.get_import_commit_msg') def test_import_unapplied_spi_tags( get_import_commit_msg_mock, get_import_tag_msg_mock, repo, input_repo, expected_output_refs, validation_repo_delta, validation_repo_expected_identical_refs, reuse, ): """Test that unapplied tags are correctly created, adjusted and/or reused :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function that determines the commit message to use for a given import :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function that determines the tag message to use for a given import :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param list(str) expected_output_refs: refs that must exist in the output repository :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository :param bool reuse: if set, the output ref importer/ubuntu/trusty must be one supplied by the input repository (assumed to have a commit message of "Test commit") and not one created by the importer in this run (arranged by this test to have a different commit message) The input repository data is written into the output repository and then a fake non-native source package publication of version 1-1 in the Trusty release pocket is imported into it by calling import_unapplied_spi() directly. expected_output_refs, validation_repo_expected_identical_refs and reuse are then asserted. It is further asserted that no other refs exist in the output repository except for those listed in expected_output_refs and validation_repo_expected_identical_refs. """ # Match the repo_builder objects get_import_tag_msg_mock.return_value = 'Test tag' # Importantly, the following commit message must not be the same as the # commit messages used by the test input repository commits, so that we can # later detect the difference between commits that were already there and # new commits created by the importer for the purposes of asserting the # reuse parameter correctly. get_import_commit_msg_mock.return_value = b'Test commit (new)' input_repo.write(repo.raw_repo) publish_spec = source_builder.SourceSpec( version='1-1', native=False, ) with source_builder.Source(publish_spec) as dsc_path: > target.import_unapplied_spi( repo=repo, spi=MockSPI(dsc_path, publish_spec.version), namespace='importer', skip_orig=False, parent_overrides={}, ) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_tag_test.py:471: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:2308: in import_unapplied_spi import_unapplied_dsc( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:2197: in import_unapplied_dsc import_dsc( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:737: in import_dsc repo.git_run(['commit', '-m', 'DSC file for %s' % version]) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1841: in git_run return git_run( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:267: in git_run return run(['git'] + list(args), env=env, **kwargs) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:87: in run raise e /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:64: in run cp = subprocess.run( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['git', 'commit', '-m', 'DSC file for 1-1'],) kwargs = {'env': {'ASFLAGS': '', 'ASFLAGS_FOR_BUILD': '', 'BUILDUSERGECOS': 'first user,first room,first work-phone,first home-phone,first other', 'BUILDUSERNAME': 'pbuilder1', ...}, 'shell': False, 'stderr': -1, 'stdin': -3, ...} process = stdout = b'' stderr = b'Author identity unknown\n\n*** Please tell me who you are.\n\nRun\n\n git config --global user.email "you@example.c...-global to set the identity only in this repository.\n\nfatal: empty ident name (for ) not allowed\n' retcode = 128 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['git', 'commit', '-m', 'DSC file for 1-1']' returned non-zero exit status 128. /usr/lib/python3.12/subprocess.py:571: CalledProcessError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version ------------------------------ Captured log call ------------------------------- ERROR root:run.py:78 Command exited 128: git commit -m "DSC file for 1-1" ERROR root:run.py:79 stdout: ERROR root:run.py:83 stderr: Author identity unknown *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for ) not allowed _ test_import_applied_spi_tags[input_repo0-validation_repo_delta0-validation_repo_expected_treewise_refs0-True] _ get_import_commit_msg_mock = get_import_tag_msg_mock = repo = input_repo = validation_repo_delta = {} 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'] reuse = True @pytest.mark.parametrize( [ 'input_repo', 'validation_repo_delta', 'validation_repo_expected_treewise_refs', 'reuse', ], [ # 1) An existing applied tag (or reimport tag) with the same Git tree # - Reuse applied tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec(name='unapplied', has_patches=True), Commit.from_spec(name='applied', patches_applied=True), ], branches={ 'importer/ubuntu/trusty': Placeholder('unapplied'), 'importer/applied/ubuntu/trusty': Placeholder('applied'), }, tags={ 'importer/import/1-1': Placeholder('unapplied'), 'importer/applied/1-1': Placeholder('applied'), }, ), # validation_repo_delta: { # no output repository delta }, # 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', ], # reuse: True, ), # 2) An existing applied tag with a different Git tree # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='unapplied', has_patches=True, mutate='import tag contents', ), Commit.from_spec( name='unapplied_reimport', has_patches=True, ), Commit.from_spec( name='applied', patches_applied=True, mutate='import tag contents', ) ], branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, tags={ 'importer/import/1-1': Placeholder('unapplied'), 'importer/reimport/import/1-1/0': Placeholder('unapplied'), 'importer/reimport/import/1-1/1': Placeholder('unapplied_reimport'), 'importer/applied/1-1': Placeholder('applied'), }, ), # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='applied_reimport', patches_applied=True, parents=[Placeholder('unapplied_reimport')], ), ], 'update_tags': { 'importer/reimport/applied/1-1/0': Placeholder('applied'), 'importer/reimport/applied/1-1/1': Placeholder('applied_reimport'), }, 'update_branches': { 'importer/applied/ubuntu/trusty': Placeholder('applied_reimport'), }, }, # 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/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1', 'refs/tags/importer/applied/1-1', 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1', ], # reuse: False, marks=pytest.mark.xfail(reason='LP: #1755247'), ), # 3) No applied tags # - Create applied tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='unapplied', has_patches=True)], branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, tags={'importer/import/1-1': Placeholder('unapplied')}, ), # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='applied', patches_applied=True, parents=[Placeholder('unapplied')], ), ], 'update_tags': { 'importer/applied/1-1': Placeholder('applied') }, 'update_branches': { 'importer/applied/ubuntu/trusty': Placeholder('applied'), }, }, # 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' ], # reuse: False, ), ] ) @patch('gitubuntu.importer.get_import_tag_msg') @patch('gitubuntu.importer.get_import_commit_msg') def test_import_applied_spi_tags( get_import_commit_msg_mock, get_import_tag_msg_mock, repo, input_repo, validation_repo_delta, validation_repo_expected_treewise_refs, reuse, ): """Test that applied tags are correctly created, adjusted and/or reused :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function that determines the commit message to use for a given import :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function that determines the tag message to use for a given import :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_treewise_refs: refs whose trees must be identical between the validation repository and the output repository :param bool reuse: if set, the output ref importer/ubuntu/trusty must be one supplied by the input repository (assumed to have a commit message of "Test commit") and not one created by the importer in this run (arranged by this test to have a different commit message) The input repository data is written into the output repository and then a fake non-native source package publication of version 1-1 in the Trusty release pocket is imported into it by calling import_applied_spi() directly. reuse and validation_repo_expected_treewise_refs are then asserted. This is similar to test_unapplied_spi_tags except that it calls import_applied_spi() instead of import_unapplied_spi() and only treewise ref comparisons are made. """ # Match the repo_builder objects get_import_tag_msg_mock.return_value = 'Test tag' # Importantly, the following commit message must not be the same as the # commit messages used by the test input repository commits, so that we can # later detect the difference between commits that were already there and # new commits created by the importer for the purposes of asserting the # reuse parameter correctly. get_import_commit_msg_mock.return_value = b'Test commit (new)' > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_tag_test.py:711: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpsneicbhi/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying a dpkg-source: info: applying b dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying a dpkg-source: info: applying b dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying a dpkg-source: info: applying b dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying a dpkg-source: info: applying b dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying a dpkg-source: info: applying b dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_import_applied_spi_tags[input_repo2-validation_repo_delta2-validation_repo_expected_treewise_refs2-False] _ get_import_commit_msg_mock = get_import_tag_msg_mock = repo = input_repo = validation_repo_delta = {'add_commits': [], 'update_branches': {'importer/applied/ubuntu/t...ct at 0xf4cbedb0>}, 'update_tags': {'importer/applied/1-1': }} 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'] reuse = False @pytest.mark.parametrize( [ 'input_repo', 'validation_repo_delta', 'validation_repo_expected_treewise_refs', 'reuse', ], [ # 1) An existing applied tag (or reimport tag) with the same Git tree # - Reuse applied tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec(name='unapplied', has_patches=True), Commit.from_spec(name='applied', patches_applied=True), ], branches={ 'importer/ubuntu/trusty': Placeholder('unapplied'), 'importer/applied/ubuntu/trusty': Placeholder('applied'), }, tags={ 'importer/import/1-1': Placeholder('unapplied'), 'importer/applied/1-1': Placeholder('applied'), }, ), # validation_repo_delta: { # no output repository delta }, # 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', ], # reuse: True, ), # 2) An existing applied tag with a different Git tree # - Create reimport tag pytest.param( # input_repo: repo_builder.Repo( commits=[ Commit.from_spec( name='unapplied', has_patches=True, mutate='import tag contents', ), Commit.from_spec( name='unapplied_reimport', has_patches=True, ), Commit.from_spec( name='applied', patches_applied=True, mutate='import tag contents', ) ], branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, tags={ 'importer/import/1-1': Placeholder('unapplied'), 'importer/reimport/import/1-1/0': Placeholder('unapplied'), 'importer/reimport/import/1-1/1': Placeholder('unapplied_reimport'), 'importer/applied/1-1': Placeholder('applied'), }, ), # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='applied_reimport', patches_applied=True, parents=[Placeholder('unapplied_reimport')], ), ], 'update_tags': { 'importer/reimport/applied/1-1/0': Placeholder('applied'), 'importer/reimport/applied/1-1/1': Placeholder('applied_reimport'), }, 'update_branches': { 'importer/applied/ubuntu/trusty': Placeholder('applied_reimport'), }, }, # 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/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1', 'refs/tags/importer/applied/1-1', 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1', ], # reuse: False, marks=pytest.mark.xfail(reason='LP: #1755247'), ), # 3) No applied tags # - Create applied tag pytest.param( # input_repo: repo_builder.Repo( commits=[Commit.from_spec(name='unapplied', has_patches=True)], branches={'importer/ubuntu/trusty': Placeholder('unapplied')}, tags={'importer/import/1-1': Placeholder('unapplied')}, ), # validation_repo_delta: { 'add_commits': [ Commit.from_spec( name='applied', patches_applied=True, parents=[Placeholder('unapplied')], ), ], 'update_tags': { 'importer/applied/1-1': Placeholder('applied') }, 'update_branches': { 'importer/applied/ubuntu/trusty': Placeholder('applied'), }, }, # 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' ], # reuse: False, ), ] ) @patch('gitubuntu.importer.get_import_tag_msg') @patch('gitubuntu.importer.get_import_commit_msg') def test_import_applied_spi_tags( get_import_commit_msg_mock, get_import_tag_msg_mock, repo, input_repo, validation_repo_delta, validation_repo_expected_treewise_refs, reuse, ): """Test that applied tags are correctly created, adjusted and/or reused :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function that determines the commit message to use for a given import :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function that determines the tag message to use for a given import :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_treewise_refs: refs whose trees must be identical between the validation repository and the output repository :param bool reuse: if set, the output ref importer/ubuntu/trusty must be one supplied by the input repository (assumed to have a commit message of "Test commit") and not one created by the importer in this run (arranged by this test to have a different commit message) The input repository data is written into the output repository and then a fake non-native source package publication of version 1-1 in the Trusty release pocket is imported into it by calling import_applied_spi() directly. reuse and validation_repo_expected_treewise_refs are then asserted. This is similar to test_unapplied_spi_tags except that it calls import_applied_spi() instead of import_unapplied_spi() and only treewise ref comparisons are made. """ # Match the repo_builder objects get_import_tag_msg_mock.return_value = 'Test tag' # Importantly, the following commit message must not be the same as the # commit messages used by the test input repository commits, so that we can # later detect the difference between commits that were already there and # new commits created by the importer for the purposes of asserting the # reuse parameter correctly. get_import_commit_msg_mock.return_value = b'Test commit (new)' > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_tag_test.py:711: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpulan5wys/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying a dpkg-source: info: applying b dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying a dpkg-source: info: applying b dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying a dpkg-source: info: applying b dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version __ test_get_existing_import_tags[input_repo1-PatchState.UNAPPLIED-expected1] ___ repo = patch_state = input_repo = expected = ['refs/tags/importer/import/1-1'] @pytest.mark.parametrize( 'input_repo, patch_state, expected', [ ( repo_builder.Repo(), PatchState.UNAPPLIED, [], ), ( repo_builder.Repo( tags={'importer/import/1-1': repo_builder.Commit()}, ), PatchState.UNAPPLIED, ['refs/tags/importer/import/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit(name='import'), repo_builder.Commit(name='reimport1'), ], tags={ 'importer/import/1-1': repo_builder.Commit(), 'importer/reimport/import/1-1/0': repo_builder.Commit(), 'importer/reimport/import/1-1/1': repo_builder.Commit(), }, ), PatchState.UNAPPLIED, [ 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1', ], ), ( repo_builder.Repo(), PatchState.APPLIED, [], ), ( repo_builder.Repo( tags={'importer/applied/1-1': repo_builder.Commit()}, ), PatchState.APPLIED, ['refs/tags/importer/applied/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit(name='applied'), repo_builder.Commit(name='reimport1'), ], tags={ 'importer/applied/1-1': repo_builder.Commit(), 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 'importer/reimport/applied/1-1/1': repo_builder.Commit(), }, ), PatchState.APPLIED, [ 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1', ], ), ], ) def test_get_existing_import_tags(repo, patch_state, input_repo, expected): """Test that get_existing_import_tags is generally correct This is the general parameterised test for the common case uses of target.get_existing_import_tags. :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param PatchState patch_state: passed through to get_existing_import_tags :param repo_builder.Repo input_repo: input repository data :param list(str) expected: the names of the references that are expected to be returned, in order. """ > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:214: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpkc1_gvrh/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError __ test_get_existing_import_tags[input_repo2-PatchState.UNAPPLIED-expected2] ___ repo = patch_state = input_repo = expected = ['refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1'] @pytest.mark.parametrize( 'input_repo, patch_state, expected', [ ( repo_builder.Repo(), PatchState.UNAPPLIED, [], ), ( repo_builder.Repo( tags={'importer/import/1-1': repo_builder.Commit()}, ), PatchState.UNAPPLIED, ['refs/tags/importer/import/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit(name='import'), repo_builder.Commit(name='reimport1'), ], tags={ 'importer/import/1-1': repo_builder.Commit(), 'importer/reimport/import/1-1/0': repo_builder.Commit(), 'importer/reimport/import/1-1/1': repo_builder.Commit(), }, ), PatchState.UNAPPLIED, [ 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1', ], ), ( repo_builder.Repo(), PatchState.APPLIED, [], ), ( repo_builder.Repo( tags={'importer/applied/1-1': repo_builder.Commit()}, ), PatchState.APPLIED, ['refs/tags/importer/applied/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit(name='applied'), repo_builder.Commit(name='reimport1'), ], tags={ 'importer/applied/1-1': repo_builder.Commit(), 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 'importer/reimport/applied/1-1/1': repo_builder.Commit(), }, ), PatchState.APPLIED, [ 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1', ], ), ], ) def test_get_existing_import_tags(repo, patch_state, input_repo, expected): """Test that get_existing_import_tags is generally correct This is the general parameterised test for the common case uses of target.get_existing_import_tags. :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param PatchState patch_state: passed through to get_existing_import_tags :param repo_builder.Repo input_repo: input repository data :param list(str) expected: the names of the references that are expected to be returned, in order. """ > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:214: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpd8dwn1ls/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ___ test_get_existing_import_tags[input_repo4-PatchState.APPLIED-expected4] ____ repo = patch_state = input_repo = expected = ['refs/tags/importer/applied/1-1'] @pytest.mark.parametrize( 'input_repo, patch_state, expected', [ ( repo_builder.Repo(), PatchState.UNAPPLIED, [], ), ( repo_builder.Repo( tags={'importer/import/1-1': repo_builder.Commit()}, ), PatchState.UNAPPLIED, ['refs/tags/importer/import/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit(name='import'), repo_builder.Commit(name='reimport1'), ], tags={ 'importer/import/1-1': repo_builder.Commit(), 'importer/reimport/import/1-1/0': repo_builder.Commit(), 'importer/reimport/import/1-1/1': repo_builder.Commit(), }, ), PatchState.UNAPPLIED, [ 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1', ], ), ( repo_builder.Repo(), PatchState.APPLIED, [], ), ( repo_builder.Repo( tags={'importer/applied/1-1': repo_builder.Commit()}, ), PatchState.APPLIED, ['refs/tags/importer/applied/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit(name='applied'), repo_builder.Commit(name='reimport1'), ], tags={ 'importer/applied/1-1': repo_builder.Commit(), 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 'importer/reimport/applied/1-1/1': repo_builder.Commit(), }, ), PatchState.APPLIED, [ 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1', ], ), ], ) def test_get_existing_import_tags(repo, patch_state, input_repo, expected): """Test that get_existing_import_tags is generally correct This is the general parameterised test for the common case uses of target.get_existing_import_tags. :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param PatchState patch_state: passed through to get_existing_import_tags :param repo_builder.Repo input_repo: input repository data :param list(str) expected: the names of the references that are expected to be returned, in order. """ > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:214: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp6l55hf2f/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ___ test_get_existing_import_tags[input_repo5-PatchState.APPLIED-expected5] ____ repo = patch_state = input_repo = expected = ['refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1'] @pytest.mark.parametrize( 'input_repo, patch_state, expected', [ ( repo_builder.Repo(), PatchState.UNAPPLIED, [], ), ( repo_builder.Repo( tags={'importer/import/1-1': repo_builder.Commit()}, ), PatchState.UNAPPLIED, ['refs/tags/importer/import/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit(name='import'), repo_builder.Commit(name='reimport1'), ], tags={ 'importer/import/1-1': repo_builder.Commit(), 'importer/reimport/import/1-1/0': repo_builder.Commit(), 'importer/reimport/import/1-1/1': repo_builder.Commit(), }, ), PatchState.UNAPPLIED, [ 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1', ], ), ( repo_builder.Repo(), PatchState.APPLIED, [], ), ( repo_builder.Repo( tags={'importer/applied/1-1': repo_builder.Commit()}, ), PatchState.APPLIED, ['refs/tags/importer/applied/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit(name='applied'), repo_builder.Commit(name='reimport1'), ], tags={ 'importer/applied/1-1': repo_builder.Commit(), 'importer/reimport/applied/1-1/0': repo_builder.Commit(), 'importer/reimport/applied/1-1/1': repo_builder.Commit(), }, ), PatchState.APPLIED, [ 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1', ], ), ], ) def test_get_existing_import_tags(repo, patch_state, input_repo, expected): """Test that get_existing_import_tags is generally correct This is the general parameterised test for the common case uses of target.get_existing_import_tags. :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param PatchState patch_state: passed through to get_existing_import_tags :param repo_builder.Repo input_repo: input repository data :param list(str) expected: the names of the references that are expected to be returned, in order. """ > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:214: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpok8r2tfj/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ____________________ test_get_existing_import_tags_ordering ____________________ repo = def test_get_existing_import_tags_ordering(repo): """Test that get_existing_import_tags returns results in the correct order To maintain hash stability, the spec defines that multiple changelog parents must appear in the order that they were published. For this to work, get_existing_import_tags must return the tags in the correct order even if the underlying git repository tags appear in an arbitrary order. :param GitUbuntuRepository repo: fixture of a temporary repository to use """ # Construct a synthetic git repository containing tags repo_builder.Repo( tags={ 'importer/import/1-1': repo_builder.Commit(), 'importer/reimport/import/1-1/0': repo_builder.Commit(), 'importer/reimport/import/1-1/1': repo_builder.Commit(), } > ).write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:240: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp4mcc2zd3/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError _ test_create_import_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] _ repo = input_repo = validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-1': }} validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1'] @pytest.mark.parametrize( [ 'input_repo', 'validation_repo_delta', 'validation_repo_expected_identical_refs', ], [ ( repo_builder.Repo(), { 'add_commits': [ repo_builder.Commit(name='import'), ], 'update_tags': { 'importer/import/1-1': Placeholder('import'), }, }, [ 'refs/tags/importer/import/1-1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), { 'add_commits': [ repo_builder.Commit(name='reimport'), ], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, }, [ 'refs/tags/importer/import/1-1', 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1', ], ), ( repo_builder.Repo( commits=[ repo_builder.Commit(name='import'), repo_builder.Commit(name='reimport1'), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport1'), }, ), { 'add_commits': [ repo_builder.Commit(name='reimport2'), ], 'update_tags': { 'importer/reimport/import/1-1/2': Placeholder('reimport2'), }, }, [ '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', ], ), ], ) def test_create_import_tag( repo, input_repo, validation_repo_delta, validation_repo_expected_identical_refs, ): """ Unit test that create_import_tag creates the correct import tag :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository """ publish_commit = repo.raw_repo.get( repo_builder.Commit().write(repo.raw_repo) ).peel(pygit2.Commit) input_repo.write(repo.raw_repo) > target.create_import_tag(repo, publish_commit, '1-1', 'importer') /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:370: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:1379: in create_import_tag repo.create_tag( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = commit_hash = '240dd844a69653244edb52c57c42d709512d64cd' tag_name = 'importer/import/1-1', tag_msg = 'git-ubuntu import' tagger = pygit2.Signature('git-ubuntu importer', 'ubuntu-devel-discuss@lists.ubuntu.com', 0, 0, None) def create_tag(self, commit_hash, tag_name, tag_msg, tagger=None, ): """Create a tag in the repository :param str commit_hash: the commit hash the tag will point to. :param str tag_name: the name of the tag to be created. :param str tag_msg: the text of the tag annotation. :param pygit2.Signature tagger: if supplied, use this signature in the created tag's "tagger" metadata. If not supplied, an arbitrary name and email address is used with the current time. :returns: None """ if not tagger: tagger_time, tagger_offset = datetime_to_signature_spec( datetime.datetime.now(), ) tagger = pygit2.Signature( gitubuntu.spec.SYNTHESIZED_COMMITTER_NAME, gitubuntu.spec.SYNTHESIZED_COMMITTER_EMAIL, tagger_time, tagger_offset, ) logging.debug("Creating tag %s pointing to %s", tag_name, commit_hash) self.raw_repo.create_tag( tag_name, pygit2.Oid(hex=commit_hash), > pygit2.GIT_OBJ_COMMIT, tagger, tag_msg, ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:2114: AttributeError _ test_create_import_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] _ repo = input_repo = validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/import/1-1/...er object at 0xf537c3a8>, 'importer/reimport/import/1-1/1': }} 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'] @pytest.mark.parametrize( [ 'input_repo', 'validation_repo_delta', 'validation_repo_expected_identical_refs', ], [ ( repo_builder.Repo(), { 'add_commits': [ repo_builder.Commit(name='import'), ], 'update_tags': { 'importer/import/1-1': Placeholder('import'), }, }, [ 'refs/tags/importer/import/1-1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), { 'add_commits': [ repo_builder.Commit(name='reimport'), ], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, }, [ 'refs/tags/importer/import/1-1', 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1', ], ), ( repo_builder.Repo( commits=[ repo_builder.Commit(name='import'), repo_builder.Commit(name='reimport1'), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport1'), }, ), { 'add_commits': [ repo_builder.Commit(name='reimport2'), ], 'update_tags': { 'importer/reimport/import/1-1/2': Placeholder('reimport2'), }, }, [ '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', ], ), ], ) def test_create_import_tag( repo, input_repo, validation_repo_delta, validation_repo_expected_identical_refs, ): """ Unit test that create_import_tag creates the correct import tag :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository """ publish_commit = repo.raw_repo.get( repo_builder.Commit().write(repo.raw_repo) ).peel(pygit2.Commit) > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:368: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpe_t65r6v/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError _ test_create_import_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] _ repo = input_repo = validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/import/1-1/2': }} 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'] @pytest.mark.parametrize( [ 'input_repo', 'validation_repo_delta', 'validation_repo_expected_identical_refs', ], [ ( repo_builder.Repo(), { 'add_commits': [ repo_builder.Commit(name='import'), ], 'update_tags': { 'importer/import/1-1': Placeholder('import'), }, }, [ 'refs/tags/importer/import/1-1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), { 'add_commits': [ repo_builder.Commit(name='reimport'), ], 'update_tags': { 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, }, [ 'refs/tags/importer/import/1-1', 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1', ], ), ( repo_builder.Repo( commits=[ repo_builder.Commit(name='import'), repo_builder.Commit(name='reimport1'), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport1'), }, ), { 'add_commits': [ repo_builder.Commit(name='reimport2'), ], 'update_tags': { 'importer/reimport/import/1-1/2': Placeholder('reimport2'), }, }, [ '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', ], ), ], ) def test_create_import_tag( repo, input_repo, validation_repo_delta, validation_repo_expected_identical_refs, ): """ Unit test that create_import_tag creates the correct import tag :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository """ publish_commit = repo.raw_repo.get( repo_builder.Commit().write(repo.raw_repo) ).peel(pygit2.Commit) > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:368: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpvzf3zmqb/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ____________ test_create_import_tag_hash_stability_on_first_import _____________ repo = def test_create_import_tag_hash_stability_on_first_import(repo): """Created import tags should be hash stable on first import :param GitUbuntuRepository repo: fixture providing a temporary GitUbuntuRepository instance to use """ publish_commit = repo.raw_repo.get( repo_builder.Commit( author=pygit2.Signature( 'Hash stability test author', 'newauthor@example.com', 1, 2, ), committer=pygit2.Signature( 'Hash stability test committer', 'newcommitter@example.com', 3, 4, ), ).write(repo.raw_repo) ).peel(pygit2.Commit) > target.create_import_tag(repo, publish_commit, '1-1', 'importer') /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:1379: in create_import_tag repo.create_tag( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = commit_hash = '65729a1dca101328820bf4f49fbca4e9571a772a' tag_name = 'importer/import/1-1', tag_msg = 'git-ubuntu import' tagger = pygit2.Signature('git-ubuntu importer', 'ubuntu-devel-discuss@lists.ubuntu.com', 3, 4, None) def create_tag(self, commit_hash, tag_name, tag_msg, tagger=None, ): """Create a tag in the repository :param str commit_hash: the commit hash the tag will point to. :param str tag_name: the name of the tag to be created. :param str tag_msg: the text of the tag annotation. :param pygit2.Signature tagger: if supplied, use this signature in the created tag's "tagger" metadata. If not supplied, an arbitrary name and email address is used with the current time. :returns: None """ if not tagger: tagger_time, tagger_offset = datetime_to_signature_spec( datetime.datetime.now(), ) tagger = pygit2.Signature( gitubuntu.spec.SYNTHESIZED_COMMITTER_NAME, gitubuntu.spec.SYNTHESIZED_COMMITTER_EMAIL, tagger_time, tagger_offset, ) logging.debug("Creating tag %s pointing to %s", tag_name, commit_hash) self.raw_repo.create_tag( tag_name, pygit2.Oid(hex=commit_hash), > pygit2.GIT_OBJ_COMMIT, tagger, tag_msg, ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:2114: AttributeError ______________ test_create_import_tag_hash_stability_on_reimport _______________ repo = def test_create_import_tag_hash_stability_on_reimport(repo): """Created import tags should be hash stable on reimport This includes both the /0 duplicate reimport tag of the original import tag as well as the /1 reimport tag being created. :param GitUbuntuRepository repo: fixture providing a temporary GitUbuntuRepository instance to use """ repo_builder.Repo( commits=[ repo_builder.Commit( name='root', author=pygit2.Signature( 'Hash stability test author', 'author@example.com', 1, 2, ), committer=pygit2.Signature( 'Hash stability test committer', 'committer@example.com', 3, 4, ), ), ], tags={ 'importer/import/1-1': Placeholder('root'), }, tagger=pygit2.Signature( 'Hash stability test name', 'stability@example.com', 5, 6, ), > ).write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:449: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpl_pa11_s/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError _ test_create_applied_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] _ repo = input_repo = validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/applied/1-1': }} validation_repo_expected_identical_refs = ['refs/tags/importer/applied/1-1'] @pytest.mark.parametrize( [ 'input_repo', 'validation_repo_delta', 'validation_repo_expected_identical_refs', ], [ ( repo_builder.Repo(), { 'add_commits': [repo_builder.Commit(name='import')], 'update_tags': {'importer/applied/1-1': Placeholder('import')}, }, [ 'refs/tags/importer/applied/1-1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit(name='import')], tags={'importer/applied/1-1': Placeholder('import')}, ), { 'add_commits': [repo_builder.Commit(name='reimport')], 'update_tags': { 'importer/reimport/applied/1-1/0': Placeholder('import'), 'importer/reimport/applied/1-1/1': Placeholder('reimport'), }, }, [ 'refs/tags/importer/applied/1-1', 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1', ], ), ( repo_builder.Repo( commits=[ repo_builder.Commit(name='import'), repo_builder.Commit(name='reimport1'), ], tags={ 'importer/applied/1-1': Placeholder('import'), 'importer/reimport/applied/1-1/0': Placeholder('import'), 'importer/reimport/applied/1-1/1': Placeholder('reimport1'), }, ), { 'add_commits': [ repo_builder.Commit(name='reimport2') ], 'update_tags': { 'importer/reimport/applied/1-1/2': Placeholder('reimport2'), }, }, [ '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', ], ), ], ) def test_create_applied_tag( repo, input_repo, validation_repo_delta, validation_repo_expected_identical_refs, ): """ Unit test that create_applied_tag creates the correct import tag :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository """ publish_commit_str = str( repo.raw_repo.get( repo_builder.Commit().write(repo.raw_repo) ).peel(pygit2.Commit).id ) input_repo.write(repo.raw_repo) > target.create_applied_tag(repo, publish_commit_str, '1-1', 'importer') /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:577: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:1309: in create_applied_tag repo.create_tag( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = commit_hash = '240dd844a69653244edb52c57c42d709512d64cd' tag_name = 'importer/applied/1-1', tag_msg = 'git-ubuntu import' tagger = pygit2.Signature('git-ubuntu importer', 'ubuntu-devel-discuss@lists.ubuntu.com', 1729444618, 0, None) def create_tag(self, commit_hash, tag_name, tag_msg, tagger=None, ): """Create a tag in the repository :param str commit_hash: the commit hash the tag will point to. :param str tag_name: the name of the tag to be created. :param str tag_msg: the text of the tag annotation. :param pygit2.Signature tagger: if supplied, use this signature in the created tag's "tagger" metadata. If not supplied, an arbitrary name and email address is used with the current time. :returns: None """ if not tagger: tagger_time, tagger_offset = datetime_to_signature_spec( datetime.datetime.now(), ) tagger = pygit2.Signature( gitubuntu.spec.SYNTHESIZED_COMMITTER_NAME, gitubuntu.spec.SYNTHESIZED_COMMITTER_EMAIL, tagger_time, tagger_offset, ) logging.debug("Creating tag %s pointing to %s", tag_name, commit_hash) self.raw_repo.create_tag( tag_name, pygit2.Oid(hex=commit_hash), > pygit2.GIT_OBJ_COMMIT, tagger, tag_msg, ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:2114: AttributeError _ test_create_applied_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] _ repo = input_repo = validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/applied/1-1...r object at 0xf5362ca8>, 'importer/reimport/applied/1-1/1': }} 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'] @pytest.mark.parametrize( [ 'input_repo', 'validation_repo_delta', 'validation_repo_expected_identical_refs', ], [ ( repo_builder.Repo(), { 'add_commits': [repo_builder.Commit(name='import')], 'update_tags': {'importer/applied/1-1': Placeholder('import')}, }, [ 'refs/tags/importer/applied/1-1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit(name='import')], tags={'importer/applied/1-1': Placeholder('import')}, ), { 'add_commits': [repo_builder.Commit(name='reimport')], 'update_tags': { 'importer/reimport/applied/1-1/0': Placeholder('import'), 'importer/reimport/applied/1-1/1': Placeholder('reimport'), }, }, [ 'refs/tags/importer/applied/1-1', 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1', ], ), ( repo_builder.Repo( commits=[ repo_builder.Commit(name='import'), repo_builder.Commit(name='reimport1'), ], tags={ 'importer/applied/1-1': Placeholder('import'), 'importer/reimport/applied/1-1/0': Placeholder('import'), 'importer/reimport/applied/1-1/1': Placeholder('reimport1'), }, ), { 'add_commits': [ repo_builder.Commit(name='reimport2') ], 'update_tags': { 'importer/reimport/applied/1-1/2': Placeholder('reimport2'), }, }, [ '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', ], ), ], ) def test_create_applied_tag( repo, input_repo, validation_repo_delta, validation_repo_expected_identical_refs, ): """ Unit test that create_applied_tag creates the correct import tag :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository """ publish_commit_str = str( repo.raw_repo.get( repo_builder.Commit().write(repo.raw_repo) ).peel(pygit2.Commit).id ) > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:575: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpy_q7dl80/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError _ test_create_applied_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] _ repo = input_repo = validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/reimport/applied/1-1/2': }} 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'] @pytest.mark.parametrize( [ 'input_repo', 'validation_repo_delta', 'validation_repo_expected_identical_refs', ], [ ( repo_builder.Repo(), { 'add_commits': [repo_builder.Commit(name='import')], 'update_tags': {'importer/applied/1-1': Placeholder('import')}, }, [ 'refs/tags/importer/applied/1-1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit(name='import')], tags={'importer/applied/1-1': Placeholder('import')}, ), { 'add_commits': [repo_builder.Commit(name='reimport')], 'update_tags': { 'importer/reimport/applied/1-1/0': Placeholder('import'), 'importer/reimport/applied/1-1/1': Placeholder('reimport'), }, }, [ 'refs/tags/importer/applied/1-1', 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1', ], ), ( repo_builder.Repo( commits=[ repo_builder.Commit(name='import'), repo_builder.Commit(name='reimport1'), ], tags={ 'importer/applied/1-1': Placeholder('import'), 'importer/reimport/applied/1-1/0': Placeholder('import'), 'importer/reimport/applied/1-1/1': Placeholder('reimport1'), }, ), { 'add_commits': [ repo_builder.Commit(name='reimport2') ], 'update_tags': { 'importer/reimport/applied/1-1/2': Placeholder('reimport2'), }, }, [ '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', ], ), ], ) def test_create_applied_tag( repo, input_repo, validation_repo_delta, validation_repo_expected_identical_refs, ): """ Unit test that create_applied_tag creates the correct import tag :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository """ publish_commit_str = str( repo.raw_repo.get( repo_builder.Commit().write(repo.raw_repo) ).peel(pygit2.Commit).id ) > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:575: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpky6ygesc/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError _ test_get_changelog_parent_commits[input_repo1-parent_overrides1-changelog_versions1-PatchState.UNAPPLIED-expected_refs1] _ repo = input_repo = parent_overrides = {}, changelog_versions = ['1-2', '1-1'] patch_state = expected_refs = ['refs/tags/importer/import/1-1'] @pytest.mark.parametrize( [ 'input_repo', 'parent_overrides', 'changelog_versions', 'patch_state', 'expected_refs', ], [ ( repo_builder.Repo(), {}, ['1-2', '1-1',], PatchState.UNAPPLIED, [], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), {}, ['1-2', '1-1'], PatchState.UNAPPLIED, ['refs/tags/importer/import/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec(name='reimport', mutate=1), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), {}, ['1-2', '1-1'], PatchState.UNAPPLIED, [ 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), {}, ['1-3', '1-2', '1-1'], PatchState.UNAPPLIED, ['refs/tags/importer/import/1-1'], ), ( repo_builder.Repo(), {}, ['1-2', '1-1',], PatchState.APPLIED, [], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='applied')], tags={'importer/applied/1-1': Placeholder('applied')}, ), {}, ['1-2', '1-1'], PatchState.APPLIED, ['refs/tags/importer/applied/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec(name='reimport', mutate=1), ], tags={ 'importer/applied/1-1': Placeholder('import'), 'importer/reimport/applied/1-1/0': Placeholder('import'), 'importer/reimport/applied/1-1/1': Placeholder('reimport'), }, ), {}, ['1-2', '1-1'], PatchState.APPLIED, [ 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='applied')], tags={'importer/applied/1-1': Placeholder('applied')}, ), {}, ['1-3', '1-2', '1-1'], PatchState.APPLIED, ['refs/tags/importer/applied/1-1'], ), ], ) def test_get_changelog_parent_commits( repo, input_repo, parent_overrides, changelog_versions, patch_state, expected_refs, ): """Test that get_changelog_parent_commits is generally correct This is the general parameterised test for the common case uses of target.get_changelog_parent_commits. :param GitUbuntuRepository repo: fixture providing a temporary GitUbuntuRepository instance to use :param repo_builder.Repo input_repo: the input repository data to use that will be populated into @repo before @repo is passed through to get_changelog_parent_commits :param dict parent_overrides: passed through to get_changelog_parent_commits. :param PatchState patch_state: passed through to get_changelog_parent_commits :param list(str) expected_refs: the expected return value of get_changelog_parent_commits expressed using a list of reference names. Since get_changelog_parent_commits returns a list of commit hash strings, the reference names will need to be dereferenced before comparison; this way the test parameters don't need to be opaque hash strings. """ > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:721: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp787c6pft/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_get_changelog_parent_commits[input_repo2-parent_overrides2-changelog_versions2-PatchState.UNAPPLIED-expected_refs2] _ repo = input_repo = parent_overrides = {}, changelog_versions = ['1-2', '1-1'] patch_state = expected_refs = ['refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1'] @pytest.mark.parametrize( [ 'input_repo', 'parent_overrides', 'changelog_versions', 'patch_state', 'expected_refs', ], [ ( repo_builder.Repo(), {}, ['1-2', '1-1',], PatchState.UNAPPLIED, [], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), {}, ['1-2', '1-1'], PatchState.UNAPPLIED, ['refs/tags/importer/import/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec(name='reimport', mutate=1), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), {}, ['1-2', '1-1'], PatchState.UNAPPLIED, [ 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), {}, ['1-3', '1-2', '1-1'], PatchState.UNAPPLIED, ['refs/tags/importer/import/1-1'], ), ( repo_builder.Repo(), {}, ['1-2', '1-1',], PatchState.APPLIED, [], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='applied')], tags={'importer/applied/1-1': Placeholder('applied')}, ), {}, ['1-2', '1-1'], PatchState.APPLIED, ['refs/tags/importer/applied/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec(name='reimport', mutate=1), ], tags={ 'importer/applied/1-1': Placeholder('import'), 'importer/reimport/applied/1-1/0': Placeholder('import'), 'importer/reimport/applied/1-1/1': Placeholder('reimport'), }, ), {}, ['1-2', '1-1'], PatchState.APPLIED, [ 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='applied')], tags={'importer/applied/1-1': Placeholder('applied')}, ), {}, ['1-3', '1-2', '1-1'], PatchState.APPLIED, ['refs/tags/importer/applied/1-1'], ), ], ) def test_get_changelog_parent_commits( repo, input_repo, parent_overrides, changelog_versions, patch_state, expected_refs, ): """Test that get_changelog_parent_commits is generally correct This is the general parameterised test for the common case uses of target.get_changelog_parent_commits. :param GitUbuntuRepository repo: fixture providing a temporary GitUbuntuRepository instance to use :param repo_builder.Repo input_repo: the input repository data to use that will be populated into @repo before @repo is passed through to get_changelog_parent_commits :param dict parent_overrides: passed through to get_changelog_parent_commits. :param PatchState patch_state: passed through to get_changelog_parent_commits :param list(str) expected_refs: the expected return value of get_changelog_parent_commits expressed using a list of reference names. Since get_changelog_parent_commits returns a list of commit hash strings, the reference names will need to be dereferenced before comparison; this way the test parameters don't need to be opaque hash strings. """ > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:721: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp0ppw8k6k/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_get_changelog_parent_commits[input_repo3-parent_overrides3-changelog_versions3-PatchState.UNAPPLIED-expected_refs3] _ repo = input_repo = parent_overrides = {}, changelog_versions = ['1-3', '1-2', '1-1'] patch_state = expected_refs = ['refs/tags/importer/import/1-1'] @pytest.mark.parametrize( [ 'input_repo', 'parent_overrides', 'changelog_versions', 'patch_state', 'expected_refs', ], [ ( repo_builder.Repo(), {}, ['1-2', '1-1',], PatchState.UNAPPLIED, [], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), {}, ['1-2', '1-1'], PatchState.UNAPPLIED, ['refs/tags/importer/import/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec(name='reimport', mutate=1), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), {}, ['1-2', '1-1'], PatchState.UNAPPLIED, [ 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), {}, ['1-3', '1-2', '1-1'], PatchState.UNAPPLIED, ['refs/tags/importer/import/1-1'], ), ( repo_builder.Repo(), {}, ['1-2', '1-1',], PatchState.APPLIED, [], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='applied')], tags={'importer/applied/1-1': Placeholder('applied')}, ), {}, ['1-2', '1-1'], PatchState.APPLIED, ['refs/tags/importer/applied/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec(name='reimport', mutate=1), ], tags={ 'importer/applied/1-1': Placeholder('import'), 'importer/reimport/applied/1-1/0': Placeholder('import'), 'importer/reimport/applied/1-1/1': Placeholder('reimport'), }, ), {}, ['1-2', '1-1'], PatchState.APPLIED, [ 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='applied')], tags={'importer/applied/1-1': Placeholder('applied')}, ), {}, ['1-3', '1-2', '1-1'], PatchState.APPLIED, ['refs/tags/importer/applied/1-1'], ), ], ) def test_get_changelog_parent_commits( repo, input_repo, parent_overrides, changelog_versions, patch_state, expected_refs, ): """Test that get_changelog_parent_commits is generally correct This is the general parameterised test for the common case uses of target.get_changelog_parent_commits. :param GitUbuntuRepository repo: fixture providing a temporary GitUbuntuRepository instance to use :param repo_builder.Repo input_repo: the input repository data to use that will be populated into @repo before @repo is passed through to get_changelog_parent_commits :param dict parent_overrides: passed through to get_changelog_parent_commits. :param PatchState patch_state: passed through to get_changelog_parent_commits :param list(str) expected_refs: the expected return value of get_changelog_parent_commits expressed using a list of reference names. Since get_changelog_parent_commits returns a list of commit hash strings, the reference names will need to be dereferenced before comparison; this way the test parameters don't need to be opaque hash strings. """ > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:721: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpvimx5w6d/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_get_changelog_parent_commits[input_repo5-parent_overrides5-changelog_versions5-PatchState.APPLIED-expected_refs5] _ repo = input_repo = parent_overrides = {}, changelog_versions = ['1-2', '1-1'] patch_state = expected_refs = ['refs/tags/importer/applied/1-1'] @pytest.mark.parametrize( [ 'input_repo', 'parent_overrides', 'changelog_versions', 'patch_state', 'expected_refs', ], [ ( repo_builder.Repo(), {}, ['1-2', '1-1',], PatchState.UNAPPLIED, [], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), {}, ['1-2', '1-1'], PatchState.UNAPPLIED, ['refs/tags/importer/import/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec(name='reimport', mutate=1), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), {}, ['1-2', '1-1'], PatchState.UNAPPLIED, [ 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), {}, ['1-3', '1-2', '1-1'], PatchState.UNAPPLIED, ['refs/tags/importer/import/1-1'], ), ( repo_builder.Repo(), {}, ['1-2', '1-1',], PatchState.APPLIED, [], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='applied')], tags={'importer/applied/1-1': Placeholder('applied')}, ), {}, ['1-2', '1-1'], PatchState.APPLIED, ['refs/tags/importer/applied/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec(name='reimport', mutate=1), ], tags={ 'importer/applied/1-1': Placeholder('import'), 'importer/reimport/applied/1-1/0': Placeholder('import'), 'importer/reimport/applied/1-1/1': Placeholder('reimport'), }, ), {}, ['1-2', '1-1'], PatchState.APPLIED, [ 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='applied')], tags={'importer/applied/1-1': Placeholder('applied')}, ), {}, ['1-3', '1-2', '1-1'], PatchState.APPLIED, ['refs/tags/importer/applied/1-1'], ), ], ) def test_get_changelog_parent_commits( repo, input_repo, parent_overrides, changelog_versions, patch_state, expected_refs, ): """Test that get_changelog_parent_commits is generally correct This is the general parameterised test for the common case uses of target.get_changelog_parent_commits. :param GitUbuntuRepository repo: fixture providing a temporary GitUbuntuRepository instance to use :param repo_builder.Repo input_repo: the input repository data to use that will be populated into @repo before @repo is passed through to get_changelog_parent_commits :param dict parent_overrides: passed through to get_changelog_parent_commits. :param PatchState patch_state: passed through to get_changelog_parent_commits :param list(str) expected_refs: the expected return value of get_changelog_parent_commits expressed using a list of reference names. Since get_changelog_parent_commits returns a list of commit hash strings, the reference names will need to be dereferenced before comparison; this way the test parameters don't need to be opaque hash strings. """ > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:721: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpahzh7_m6/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_get_changelog_parent_commits[input_repo6-parent_overrides6-changelog_versions6-PatchState.APPLIED-expected_refs6] _ repo = input_repo = parent_overrides = {}, changelog_versions = ['1-2', '1-1'] patch_state = expected_refs = ['refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1'] @pytest.mark.parametrize( [ 'input_repo', 'parent_overrides', 'changelog_versions', 'patch_state', 'expected_refs', ], [ ( repo_builder.Repo(), {}, ['1-2', '1-1',], PatchState.UNAPPLIED, [], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), {}, ['1-2', '1-1'], PatchState.UNAPPLIED, ['refs/tags/importer/import/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec(name='reimport', mutate=1), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), {}, ['1-2', '1-1'], PatchState.UNAPPLIED, [ 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), {}, ['1-3', '1-2', '1-1'], PatchState.UNAPPLIED, ['refs/tags/importer/import/1-1'], ), ( repo_builder.Repo(), {}, ['1-2', '1-1',], PatchState.APPLIED, [], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='applied')], tags={'importer/applied/1-1': Placeholder('applied')}, ), {}, ['1-2', '1-1'], PatchState.APPLIED, ['refs/tags/importer/applied/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec(name='reimport', mutate=1), ], tags={ 'importer/applied/1-1': Placeholder('import'), 'importer/reimport/applied/1-1/0': Placeholder('import'), 'importer/reimport/applied/1-1/1': Placeholder('reimport'), }, ), {}, ['1-2', '1-1'], PatchState.APPLIED, [ 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='applied')], tags={'importer/applied/1-1': Placeholder('applied')}, ), {}, ['1-3', '1-2', '1-1'], PatchState.APPLIED, ['refs/tags/importer/applied/1-1'], ), ], ) def test_get_changelog_parent_commits( repo, input_repo, parent_overrides, changelog_versions, patch_state, expected_refs, ): """Test that get_changelog_parent_commits is generally correct This is the general parameterised test for the common case uses of target.get_changelog_parent_commits. :param GitUbuntuRepository repo: fixture providing a temporary GitUbuntuRepository instance to use :param repo_builder.Repo input_repo: the input repository data to use that will be populated into @repo before @repo is passed through to get_changelog_parent_commits :param dict parent_overrides: passed through to get_changelog_parent_commits. :param PatchState patch_state: passed through to get_changelog_parent_commits :param list(str) expected_refs: the expected return value of get_changelog_parent_commits expressed using a list of reference names. Since get_changelog_parent_commits returns a list of commit hash strings, the reference names will need to be dereferenced before comparison; this way the test parameters don't need to be opaque hash strings. """ > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:721: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmphhqkl0rp/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_get_changelog_parent_commits[input_repo7-parent_overrides7-changelog_versions7-PatchState.APPLIED-expected_refs7] _ repo = input_repo = parent_overrides = {}, changelog_versions = ['1-3', '1-2', '1-1'] patch_state = expected_refs = ['refs/tags/importer/applied/1-1'] @pytest.mark.parametrize( [ 'input_repo', 'parent_overrides', 'changelog_versions', 'patch_state', 'expected_refs', ], [ ( repo_builder.Repo(), {}, ['1-2', '1-1',], PatchState.UNAPPLIED, [], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), {}, ['1-2', '1-1'], PatchState.UNAPPLIED, ['refs/tags/importer/import/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec(name='reimport', mutate=1), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), {}, ['1-2', '1-1'], PatchState.UNAPPLIED, [ 'refs/tags/importer/reimport/import/1-1/0', 'refs/tags/importer/reimport/import/1-1/1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), {}, ['1-3', '1-2', '1-1'], PatchState.UNAPPLIED, ['refs/tags/importer/import/1-1'], ), ( repo_builder.Repo(), {}, ['1-2', '1-1',], PatchState.APPLIED, [], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='applied')], tags={'importer/applied/1-1': Placeholder('applied')}, ), {}, ['1-2', '1-1'], PatchState.APPLIED, ['refs/tags/importer/applied/1-1'], ), ( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec(name='reimport', mutate=1), ], tags={ 'importer/applied/1-1': Placeholder('import'), 'importer/reimport/applied/1-1/0': Placeholder('import'), 'importer/reimport/applied/1-1/1': Placeholder('reimport'), }, ), {}, ['1-2', '1-1'], PatchState.APPLIED, [ 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1', ], ), ( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='applied')], tags={'importer/applied/1-1': Placeholder('applied')}, ), {}, ['1-3', '1-2', '1-1'], PatchState.APPLIED, ['refs/tags/importer/applied/1-1'], ), ], ) def test_get_changelog_parent_commits( repo, input_repo, parent_overrides, changelog_versions, patch_state, expected_refs, ): """Test that get_changelog_parent_commits is generally correct This is the general parameterised test for the common case uses of target.get_changelog_parent_commits. :param GitUbuntuRepository repo: fixture providing a temporary GitUbuntuRepository instance to use :param repo_builder.Repo input_repo: the input repository data to use that will be populated into @repo before @repo is passed through to get_changelog_parent_commits :param dict parent_overrides: passed through to get_changelog_parent_commits. :param PatchState patch_state: passed through to get_changelog_parent_commits :param list(str) expected_refs: the expected return value of get_changelog_parent_commits expressed using a list of reference names. Since get_changelog_parent_commits returns a list of commit hash strings, the reference names will need to be dereferenced before comparison; this way the test parameters don't need to be opaque hash strings. """ > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:721: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmptc8bsljh/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _________ test_validate_rich_history[input_repo0-published_spec0-True] _________ repo = input_repo = published_spec = {'changelog_versions': ['1-2', '1-1']}, expected_result = True @pytest.mark.parametrize( [ 'input_repo', 'published_spec', 'expected_result', ], [ ( # Common case: upload tag has a changelog parent as an ancestor repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec( name='upload', changelog_versions=['1-2', '1-1'], parents=[Placeholder('import')], ), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-2': Placeholder('upload'), }, ), {'changelog_versions': ['1-2', '1-1']}, True, ), ( # Upload tag is the first one, with no parents present repo_builder.Repo( commits=[ repo_builder.Commit.from_spec( name='upload', version='1-2', ), ], tags={ 'importer/upload/1-2': Placeholder('upload'), }, ), {'changelog_versions': ['1-2']}, True, ), ( # Upload tag mismatches published tree but is otherwise correct repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec( name='upload', changelog_versions=['1-2', '1-1'], parents=[Placeholder('import')], mutate=True, ), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-2': Placeholder('upload'), }, ), {'changelog_versions': ['1-2', '1-1']}, target.RichHistoryTreeMismatch, ), ( # Upload tag doesn't have a changelog parent as an ancestor but is # otherwise correct repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec( name='upload', changelog_versions=['1-2', '1-1'], ), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-2': Placeholder('upload'), }, ), {'changelog_versions': ['1-2', '1-1']}, target.RichHistoryHasNoChangelogParentAncestor, ), ], ) def test_validate_rich_history( repo, input_repo, published_spec, expected_result, ): """ General test for validate_rich_history(). This unit tests validate_rich_history() for various parameterized cases. Given an input repository and the specification of a Launchpad publication of a source package, we check that validate_rich_history() correctly accepts or rejects the rich history corresponding to the upload tag named 'importer/upload/1-2'. It is assumed that the package being imported is always of version '1-2' for all parameter sets. Since the target function requires rich history, the case of there not being rich history does not need to be tested here, as it wouldn't be called in this case. validate_rich_history() is generic for all sourced rich history, not just rich history sourced from an upload tag. But since it is independent of how the rich history commit arrived, it is easiest to use upload tags to test it; this results in coverage for all sources. :param GitUbuntuRepository repo: fixture providing a temporary GitUbuntuRepository instance to use :param repo_builder.Repo input_repo: input repository data :param dict published_spec: the package simulated being imported from the archive, specified as a dict to pass as **kwargs to repo_builder.Commit.from_spec() :param bool expected_result: the expected return value of, or exception raised by, the call to validate_rich_history() """ > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:910: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp3cryvnyh/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _________ test_validate_rich_history[input_repo1-published_spec1-True] _________ repo = input_repo = published_spec = {'changelog_versions': ['1-2']}, expected_result = True @pytest.mark.parametrize( [ 'input_repo', 'published_spec', 'expected_result', ], [ ( # Common case: upload tag has a changelog parent as an ancestor repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec( name='upload', changelog_versions=['1-2', '1-1'], parents=[Placeholder('import')], ), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-2': Placeholder('upload'), }, ), {'changelog_versions': ['1-2', '1-1']}, True, ), ( # Upload tag is the first one, with no parents present repo_builder.Repo( commits=[ repo_builder.Commit.from_spec( name='upload', version='1-2', ), ], tags={ 'importer/upload/1-2': Placeholder('upload'), }, ), {'changelog_versions': ['1-2']}, True, ), ( # Upload tag mismatches published tree but is otherwise correct repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec( name='upload', changelog_versions=['1-2', '1-1'], parents=[Placeholder('import')], mutate=True, ), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-2': Placeholder('upload'), }, ), {'changelog_versions': ['1-2', '1-1']}, target.RichHistoryTreeMismatch, ), ( # Upload tag doesn't have a changelog parent as an ancestor but is # otherwise correct repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec( name='upload', changelog_versions=['1-2', '1-1'], ), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-2': Placeholder('upload'), }, ), {'changelog_versions': ['1-2', '1-1']}, target.RichHistoryHasNoChangelogParentAncestor, ), ], ) def test_validate_rich_history( repo, input_repo, published_spec, expected_result, ): """ General test for validate_rich_history(). This unit tests validate_rich_history() for various parameterized cases. Given an input repository and the specification of a Launchpad publication of a source package, we check that validate_rich_history() correctly accepts or rejects the rich history corresponding to the upload tag named 'importer/upload/1-2'. It is assumed that the package being imported is always of version '1-2' for all parameter sets. Since the target function requires rich history, the case of there not being rich history does not need to be tested here, as it wouldn't be called in this case. validate_rich_history() is generic for all sourced rich history, not just rich history sourced from an upload tag. But since it is independent of how the rich history commit arrived, it is easiest to use upload tags to test it; this results in coverage for all sources. :param GitUbuntuRepository repo: fixture providing a temporary GitUbuntuRepository instance to use :param repo_builder.Repo input_repo: input repository data :param dict published_spec: the package simulated being imported from the archive, specified as a dict to pass as **kwargs to repo_builder.Commit.from_spec() :param bool expected_result: the expected return value of, or exception raised by, the call to validate_rich_history() """ > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:910: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpazb2f0jw/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_validate_rich_history[input_repo2-published_spec2-RichHistoryTreeMismatch] _ repo = input_repo = published_spec = {'changelog_versions': ['1-2', '1-1']} expected_result = @pytest.mark.parametrize( [ 'input_repo', 'published_spec', 'expected_result', ], [ ( # Common case: upload tag has a changelog parent as an ancestor repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec( name='upload', changelog_versions=['1-2', '1-1'], parents=[Placeholder('import')], ), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-2': Placeholder('upload'), }, ), {'changelog_versions': ['1-2', '1-1']}, True, ), ( # Upload tag is the first one, with no parents present repo_builder.Repo( commits=[ repo_builder.Commit.from_spec( name='upload', version='1-2', ), ], tags={ 'importer/upload/1-2': Placeholder('upload'), }, ), {'changelog_versions': ['1-2']}, True, ), ( # Upload tag mismatches published tree but is otherwise correct repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec( name='upload', changelog_versions=['1-2', '1-1'], parents=[Placeholder('import')], mutate=True, ), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-2': Placeholder('upload'), }, ), {'changelog_versions': ['1-2', '1-1']}, target.RichHistoryTreeMismatch, ), ( # Upload tag doesn't have a changelog parent as an ancestor but is # otherwise correct repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec( name='upload', changelog_versions=['1-2', '1-1'], ), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-2': Placeholder('upload'), }, ), {'changelog_versions': ['1-2', '1-1']}, target.RichHistoryHasNoChangelogParentAncestor, ), ], ) def test_validate_rich_history( repo, input_repo, published_spec, expected_result, ): """ General test for validate_rich_history(). This unit tests validate_rich_history() for various parameterized cases. Given an input repository and the specification of a Launchpad publication of a source package, we check that validate_rich_history() correctly accepts or rejects the rich history corresponding to the upload tag named 'importer/upload/1-2'. It is assumed that the package being imported is always of version '1-2' for all parameter sets. Since the target function requires rich history, the case of there not being rich history does not need to be tested here, as it wouldn't be called in this case. validate_rich_history() is generic for all sourced rich history, not just rich history sourced from an upload tag. But since it is independent of how the rich history commit arrived, it is easiest to use upload tags to test it; this results in coverage for all sources. :param GitUbuntuRepository repo: fixture providing a temporary GitUbuntuRepository instance to use :param repo_builder.Repo input_repo: input repository data :param dict published_spec: the package simulated being imported from the archive, specified as a dict to pass as **kwargs to repo_builder.Commit.from_spec() :param bool expected_result: the expected return value of, or exception raised by, the call to validate_rich_history() """ > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:910: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpri3ko22d/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_validate_rich_history[input_repo3-published_spec3-RichHistoryHasNoChangelogParentAncestor] _ repo = input_repo = published_spec = {'changelog_versions': ['1-2', '1-1']} expected_result = @pytest.mark.parametrize( [ 'input_repo', 'published_spec', 'expected_result', ], [ ( # Common case: upload tag has a changelog parent as an ancestor repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec( name='upload', changelog_versions=['1-2', '1-1'], parents=[Placeholder('import')], ), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-2': Placeholder('upload'), }, ), {'changelog_versions': ['1-2', '1-1']}, True, ), ( # Upload tag is the first one, with no parents present repo_builder.Repo( commits=[ repo_builder.Commit.from_spec( name='upload', version='1-2', ), ], tags={ 'importer/upload/1-2': Placeholder('upload'), }, ), {'changelog_versions': ['1-2']}, True, ), ( # Upload tag mismatches published tree but is otherwise correct repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec( name='upload', changelog_versions=['1-2', '1-1'], parents=[Placeholder('import')], mutate=True, ), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-2': Placeholder('upload'), }, ), {'changelog_versions': ['1-2', '1-1']}, target.RichHistoryTreeMismatch, ), ( # Upload tag doesn't have a changelog parent as an ancestor but is # otherwise correct repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec( name='upload', changelog_versions=['1-2', '1-1'], ), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/upload/1-2': Placeholder('upload'), }, ), {'changelog_versions': ['1-2', '1-1']}, target.RichHistoryHasNoChangelogParentAncestor, ), ], ) def test_validate_rich_history( repo, input_repo, published_spec, expected_result, ): """ General test for validate_rich_history(). This unit tests validate_rich_history() for various parameterized cases. Given an input repository and the specification of a Launchpad publication of a source package, we check that validate_rich_history() correctly accepts or rejects the rich history corresponding to the upload tag named 'importer/upload/1-2'. It is assumed that the package being imported is always of version '1-2' for all parameter sets. Since the target function requires rich history, the case of there not being rich history does not need to be tested here, as it wouldn't be called in this case. validate_rich_history() is generic for all sourced rich history, not just rich history sourced from an upload tag. But since it is independent of how the rich history commit arrived, it is easiest to use upload tags to test it; this results in coverage for all sources. :param GitUbuntuRepository repo: fixture providing a temporary GitUbuntuRepository instance to use :param repo_builder.Repo input_repo: input repository data :param dict published_spec: the package simulated being imported from the archive, specified as a dict to pass as **kwargs to repo_builder.Commit.from_spec() :param bool expected_result: the expected return value of, or exception raised by, the call to validate_rich_history() """ > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:910: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp2oan6j53/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version ______________________ test_add_changelog_note_to_commit _______________________ repo = def test_add_changelog_note_to_commit(repo): """add_changelog_note_to_commit should add the expected note""" repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='1-1'), repo_builder.Commit.from_spec( name='1-2', changelog_versions=['1-1', '1-2'], parents=[Placeholder('1-1')], ), ], tags={'1-1': Placeholder('1-1'), '1-2': Placeholder('1-2')}, > ).write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:953: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpi0rdpn20/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version ____________________ test_add_changelog_note_to_commit_utf8 ____________________ repo = def test_add_changelog_note_to_commit_utf8(repo): """A changelog file with non-UTF8 should have such characters substituted :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository """ test_utf8_error_changelog_path = os.path.join( pkg_resources.resource_filename('gitubuntu', 'changelog_tests'), 'test_utf8_error', ) with open(test_utf8_error_changelog_path, 'rb') as f: utf8_changelog_blob = f.read() # We only need an example child commit with a debian/changelog file since # this is the only file accessed by add_changelog_note_to_commit(). # Further, the parent need only exist and can be empty. repo_builder.Repo( commits=[ repo_builder.Commit(name='parent'), repo_builder.Commit( tree=repo_builder.Tree({'debian': repo_builder.Tree( {'changelog': repo_builder.Blob(utf8_changelog_blob)} )}), name='child', ) ], tags={'parent': Placeholder('parent'), 'child': Placeholder('child')}, > ).write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:1002: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpbhb0t3za/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError _________________ test_double_changelog_note_add_does_not_fail _________________ repo = def test_double_changelog_note_add_does_not_fail(repo): """add_changelog_note_to_commit shouldn't fail if a note already exists""" repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='1-1'), repo_builder.Commit.from_spec( name='1-2', changelog_versions=['1-1', '1-2'], parents=[Placeholder('1-1')], ), ], tags={'1-1': Placeholder('1-1'), '1-2': Placeholder('1-2')}, > ).write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:1035: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpuy95d4er/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version ___________________________ test_create_import_note ____________________________ repo = def test_create_import_note(repo): """create_import_note() should create a note in the correct ref""" repo_builder.Repo( commits=[repo_builder.Commit(name='root')], tags={'root': repo_builder.Placeholder('root')}, > ).write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:1066: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp0vf6v4wj/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ______________________ test_create_import_note_timestamp _______________________ repo = def test_create_import_note_timestamp(repo): """create_import_note() should include the timestamp in the note""" repo_builder.Repo( commits=[repo_builder.Commit(name='root')], tags={'root': repo_builder.Placeholder('root')}, > ).write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:1082: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp0xga5jko/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError _______________________ test_import_creates_import_note ________________________ repo = dsc = {'Format': '3.0 (quilt)', 'Source': 'source-builder-package', 'Binary': 'source-builder-package', 'Architecture': 'all...'}, {'md5sum': '6277ba0650104b4f3e329b42e855e558', 'size': '528', 'name': 'source-builder-package_1-1.debian.tar.xz'}]} namespace = 'importer', version = '1-1', dist = 'ubuntu' def import_dsc(repo, dsc, namespace, version, dist): """Imports the dsc file to importer/{debian,ubuntu}/dsc Arguments: spi - A GitUbuntuSourcePackageInformation instance """ # Add DSC file to the appropriate branch dsc_branch_name = '%s/importer/%s/dsc' % (namespace, dist) dsc_ref_name = 'refs/heads/%s' % dsc_branch_name try: repo.raw_repo.lookup_reference(dsc_ref_name) except KeyError: runq(['git', 'checkout', '--orphan', dsc_branch_name], env=repo.env) runq(['git', 'reset', '--hard'], env=repo.env) else: runq(['git', 'checkout', dsc_branch_name], env=repo.env) # It is possible the same-named DSC is published multiple times # with different contents, e.g. on epoch bumps local_dir = os.path.join(repo.local_dir, version) os.makedirs(local_dir, exist_ok=True) shutil.copy(dsc.dsc_path, local_dir) repo.git_run(['add', repo.local_dir]) try: # Anything to commit? (this will be 0 if, for instance, the # same dsc is being imported again) > runq(['git', 'diff', '--exit-code', 'HEAD'], env=repo.env) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:735: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:31: in runq return run(*args, **kwargs) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:87: in run raise e /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:64: in run cp = subprocess.run( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['git', 'diff', '--exit-code', 'HEAD'],) kwargs = {'env': {'ASFLAGS': '', 'ASFLAGS_FOR_BUILD': '', 'BUILDUSERGECOS': 'first user,first room,first work-phone,first home-phone,first other', 'BUILDUSERNAME': 'pbuilder1', ...}, 'shell': False, 'stderr': -3, 'stdin': -3, ...} process = stdout = None, stderr = None, retcode = 128 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['git', 'diff', '--exit-code', 'HEAD']' returned non-zero exit status 128. /usr/lib/python3.12/subprocess.py:571: CalledProcessError During handling of the above exception, another exception occurred: repo = def test_import_creates_import_note(repo): """When an import runs, the note should appear in the correct ref""" with source_builder.Source() as dsc_pathname: > target.import_unapplied_dsc( repo=repo, version='1-1', namespace='importer', dist='ubuntu', dsc_pathname=dsc_pathname, head_name='ubuntu/focal', skip_orig=True, parent_overrides={}, ) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:1102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:2197: in import_unapplied_dsc import_dsc( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:737: in import_dsc repo.git_run(['commit', '-m', 'DSC file for %s' % version]) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1841: in git_run return git_run( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:267: in git_run return run(['git'] + list(args), env=env, **kwargs) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:87: in run raise e /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:64: in run cp = subprocess.run( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['git', 'commit', '-m', 'DSC file for 1-1'],) kwargs = {'env': {'ASFLAGS': '', 'ASFLAGS_FOR_BUILD': '', 'BUILDUSERGECOS': 'first user,first room,first work-phone,first home-phone,first other', 'BUILDUSERNAME': 'pbuilder1', ...}, 'shell': False, 'stderr': -1, 'stdin': -3, ...} process = stdout = b'' stderr = b'Author identity unknown\n\n*** Please tell me who you are.\n\nRun\n\n git config --global user.email "you@example.c...-global to set the identity only in this repository.\n\nfatal: empty ident name (for ) not allowed\n' retcode = 128 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['git', 'commit', '-m', 'DSC file for 1-1']' returned non-zero exit status 128. /usr/lib/python3.12/subprocess.py:571: CalledProcessError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version ------------------------------ Captured log call ------------------------------- ERROR root:run.py:78 Command exited 128: git commit -m "DSC file for 1-1" ERROR root:run.py:79 stdout: ERROR root:run.py:83 stderr: Author identity unknown *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for ) not allowed ___________________ test_import_unapplied_spi_quilt_patches ____________________ repo = dsc = {'Format': '3.0 (quilt)', 'Source': 'source-builder-package', 'Binary': 'source-builder-package', 'Architecture': 'all...'}, {'md5sum': '02fa18f407af7561c7ece62b3bb065de', 'size': '616', 'name': 'source-builder-package_1-1.debian.tar.xz'}]} namespace = 'importer', version = '1-1', dist = 'ubuntu' def import_dsc(repo, dsc, namespace, version, dist): """Imports the dsc file to importer/{debian,ubuntu}/dsc Arguments: spi - A GitUbuntuSourcePackageInformation instance """ # Add DSC file to the appropriate branch dsc_branch_name = '%s/importer/%s/dsc' % (namespace, dist) dsc_ref_name = 'refs/heads/%s' % dsc_branch_name try: repo.raw_repo.lookup_reference(dsc_ref_name) except KeyError: runq(['git', 'checkout', '--orphan', dsc_branch_name], env=repo.env) runq(['git', 'reset', '--hard'], env=repo.env) else: runq(['git', 'checkout', dsc_branch_name], env=repo.env) # It is possible the same-named DSC is published multiple times # with different contents, e.g. on epoch bumps local_dir = os.path.join(repo.local_dir, version) os.makedirs(local_dir, exist_ok=True) shutil.copy(dsc.dsc_path, local_dir) repo.git_run(['add', repo.local_dir]) try: # Anything to commit? (this will be 0 if, for instance, the # same dsc is being imported again) > runq(['git', 'diff', '--exit-code', 'HEAD'], env=repo.env) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:735: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:31: in runq return run(*args, **kwargs) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:87: in run raise e /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:64: in run cp = subprocess.run( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['git', 'diff', '--exit-code', 'HEAD'],) kwargs = {'env': {'ASFLAGS': '', 'ASFLAGS_FOR_BUILD': '', 'BUILDUSERGECOS': 'first user,first room,first work-phone,first home-phone,first other', 'BUILDUSERNAME': 'pbuilder1', ...}, 'shell': False, 'stderr': -3, 'stdin': -3, ...} process = stdout = None, stderr = None, retcode = 128 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['git', 'diff', '--exit-code', 'HEAD']' returned non-zero exit status 128. /usr/lib/python3.12/subprocess.py:571: CalledProcessError During handling of the above exception, another exception occurred: get_import_commit_msg_mock = get_import_tag_msg_mock = repo = @patch('gitubuntu.importer.get_import_tag_msg') @patch('gitubuntu.importer.get_import_commit_msg') def test_import_unapplied_spi_quilt_patches( get_import_commit_msg_mock, get_import_tag_msg_mock, repo, ): """Test that a package with quilt patches is imported with correct unapplied refs :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function that determines the commit message to use for a given import :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function that determines the tag message to use for a given import :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository """ # Match the repo_builder objects get_import_tag_msg_mock.return_value = 'Test tag' get_import_commit_msg_mock.return_value = b'Test commit' publish_spec = source_builder.SourceSpec(has_patches=True) input_repo = repo_builder.Repo() input_repo.write(repo.raw_repo) expected_result = repo_builder.Repo( commits=[ repo_builder.Commit( tree=repo_builder.SourceTree( source_builder.Source(publish_spec) ), name='publish' ), ], tags={'importer/import/1-1': Placeholder('publish')}, branches={'importer/ubuntu/trusty': Placeholder('publish')}, ) with source_builder.Source(publish_spec) as dsc_path: # import_unapplied_spi currently assumes it is called from the # repository directory (pristine-tar and other commands rely on # this) > target.import_unapplied_spi( repo=repo, spi=MockSPI(dsc_path, publish_spec.version), namespace='importer', skip_orig=False, parent_overrides={}, ) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:1222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:2308: in import_unapplied_spi import_unapplied_dsc( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:2197: in import_unapplied_dsc import_dsc( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:737: in import_dsc repo.git_run(['commit', '-m', 'DSC file for %s' % version]) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1841: in git_run return git_run( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:267: in git_run return run(['git'] + list(args), env=env, **kwargs) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:87: in run raise e /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:64: in run cp = subprocess.run( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['git', 'commit', '-m', 'DSC file for 1-1'],) kwargs = {'env': {'ASFLAGS': '', 'ASFLAGS_FOR_BUILD': '', 'BUILDUSERGECOS': 'first user,first room,first work-phone,first home-phone,first other', 'BUILDUSERNAME': 'pbuilder1', ...}, 'shell': False, 'stderr': -1, 'stdin': -3, ...} process = stdout = b'' stderr = b'Author identity unknown\n\n*** Please tell me who you are.\n\nRun\n\n git config --global user.email "you@example.c...-global to set the identity only in this repository.\n\nfatal: empty ident name (for ) not allowed\n' retcode = 128 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['git', 'commit', '-m', 'DSC file for 1-1']' returned non-zero exit status 128. /usr/lib/python3.12/subprocess.py:571: CalledProcessError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying a dpkg-source: info: applying b dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version ------------------------------ Captured log call ------------------------------- ERROR root:run.py:78 Command exited 128: git commit -m "DSC file for 1-1" ERROR root:run.py:79 stdout: ERROR root:run.py:83 stderr: Author identity unknown *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for ) not allowed _ test_import_unapplied_spi_parenting[input_repo0-changelog_versions0-validation_repo_delta0-validation_repo_expected_identical_refs0] _ repo = dsc = {'Format': '3.0 (quilt)', 'Source': 'source-builder-package', 'Binary': 'source-builder-package', 'Architecture': 'all...'}, {'md5sum': '6277ba0650104b4f3e329b42e855e558', 'size': '528', 'name': 'source-builder-package_1-1.debian.tar.xz'}]} namespace = 'importer', version = '1-1', dist = 'ubuntu' def import_dsc(repo, dsc, namespace, version, dist): """Imports the dsc file to importer/{debian,ubuntu}/dsc Arguments: spi - A GitUbuntuSourcePackageInformation instance """ # Add DSC file to the appropriate branch dsc_branch_name = '%s/importer/%s/dsc' % (namespace, dist) dsc_ref_name = 'refs/heads/%s' % dsc_branch_name try: repo.raw_repo.lookup_reference(dsc_ref_name) except KeyError: runq(['git', 'checkout', '--orphan', dsc_branch_name], env=repo.env) runq(['git', 'reset', '--hard'], env=repo.env) else: runq(['git', 'checkout', dsc_branch_name], env=repo.env) # It is possible the same-named DSC is published multiple times # with different contents, e.g. on epoch bumps local_dir = os.path.join(repo.local_dir, version) os.makedirs(local_dir, exist_ok=True) shutil.copy(dsc.dsc_path, local_dir) repo.git_run(['add', repo.local_dir]) try: # Anything to commit? (this will be 0 if, for instance, the # same dsc is being imported again) > runq(['git', 'diff', '--exit-code', 'HEAD'], env=repo.env) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:735: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:31: in runq return run(*args, **kwargs) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:87: in run raise e /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:64: in run cp = subprocess.run( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['git', 'diff', '--exit-code', 'HEAD'],) kwargs = {'env': {'ASFLAGS': '', 'ASFLAGS_FOR_BUILD': '', 'BUILDUSERGECOS': 'first user,first room,first work-phone,first home-phone,first other', 'BUILDUSERNAME': 'pbuilder1', ...}, 'shell': False, 'stderr': -3, 'stdin': -3, ...} process = stdout = None, stderr = None, retcode = 128 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['git', 'diff', '--exit-code', 'HEAD']' returned non-zero exit status 128. /usr/lib/python3.12/subprocess.py:571: CalledProcessError During handling of the above exception, another exception occurred: get_import_commit_msg_mock = get_import_tag_msg_mock = repo = input_repo = changelog_versions = ['1-1'] validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-1': }} validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1'] @pytest.mark.parametrize( [ 'input_repo', 'changelog_versions', 'validation_repo_delta', 'validation_repo_expected_identical_refs', ], [ pytest.param( repo_builder.Repo(), ['1-1'], { 'add_commits': [ repo_builder.Commit.from_spec(name='publish'), ], 'update_tags': {'importer/import/1-1': Placeholder('publish')}, }, [ 'refs/tags/importer/import/1-1', ] ), pytest.param( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), ['1-2', '1-1'], { 'add_commits': [ repo_builder.Commit.from_spec( name='publish', parents=[Placeholder('import')], changelog_versions=['1-2', '1-1'], ), ], 'update_tags': {'importer/import/1-2': Placeholder('publish')}, }, [ 'refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-2', ], ), pytest.param( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), ['1-3', '1-2', '1-1'], { 'add_commits': [ repo_builder.Commit.from_spec( parents=[Placeholder('import')], name='publish', changelog_versions=['1-3', '1-2', '1-1'], ), ], 'update_tags': {'importer/import/1-3': Placeholder('publish')}, }, [ 'refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-3', ], ), ( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec( name='reimport', mutate='Reimport tag contents', ), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), ['1-2', '1-1'], { 'add_commits': [ repo_builder.Commit.from_spec( parents=[ Placeholder('import'), Placeholder('reimport'), ], name='publish', changelog_versions=['1-2', '1-1'], ), ], 'update_tags': {'importer/import/1-2': Placeholder('publish')}, }, [ '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', ], ), ] ) @patch('gitubuntu.importer.get_import_tag_msg') @patch('gitubuntu.importer.get_import_commit_msg') def test_import_unapplied_spi_parenting( get_import_commit_msg_mock, get_import_tag_msg_mock, repo, input_repo, changelog_versions, validation_repo_delta, validation_repo_expected_identical_refs, ): """Test that unapplied import commits have the correct parents :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function that determines the commit message to use for a given import :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function that determines the tag message to use for a given import :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param list(str) changelog_versions: the versions in the changelog of a fake package to test import :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository Verify that if an import of a package is made into input_repo where the package being imported has the given changelog_versions, then the output repository has commits with the parents we expect. This is tested by comparing specific output references against the validation repository. """ # Match the repo_builder objects get_import_tag_msg_mock.return_value = 'Test tag' get_import_commit_msg_mock.return_value = b'Test commit' input_repo.write(repo.raw_repo) publish_spec = source_builder.SourceSpec( changelog_versions=changelog_versions, ) with source_builder.Source(publish_spec) as dsc_path: # import_unapplied_spi currently assumes it is called from the # repository directory (pristine-tar and other commands rely on # this) > target.import_unapplied_spi( repo=repo, spi=MockSPI(dsc_path, publish_spec.version), namespace='importer', skip_orig=False, parent_overrides={}, ) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:1391: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:2308: in import_unapplied_spi import_unapplied_dsc( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:2197: in import_unapplied_dsc import_dsc( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:737: in import_dsc repo.git_run(['commit', '-m', 'DSC file for %s' % version]) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1841: in git_run return git_run( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:267: in git_run return run(['git'] + list(args), env=env, **kwargs) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:87: in run raise e /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:64: in run cp = subprocess.run( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['git', 'commit', '-m', 'DSC file for 1-1'],) kwargs = {'env': {'ASFLAGS': '', 'ASFLAGS_FOR_BUILD': '', 'BUILDUSERGECOS': 'first user,first room,first work-phone,first home-phone,first other', 'BUILDUSERNAME': 'pbuilder1', ...}, 'shell': False, 'stderr': -1, 'stdin': -3, ...} process = stdout = b'' stderr = b'Author identity unknown\n\n*** Please tell me who you are.\n\nRun\n\n git config --global user.email "you@example.c...-global to set the identity only in this repository.\n\nfatal: empty ident name (for ) not allowed\n' retcode = 128 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['git', 'commit', '-m', 'DSC file for 1-1']' returned non-zero exit status 128. /usr/lib/python3.12/subprocess.py:571: CalledProcessError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version ------------------------------ Captured log call ------------------------------- ERROR root:run.py:78 Command exited 128: git commit -m "DSC file for 1-1" ERROR root:run.py:79 stdout: ERROR root:run.py:83 stderr: Author identity unknown *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for ) not allowed _ test_import_unapplied_spi_parenting[input_repo1-changelog_versions1-validation_repo_delta1-validation_repo_expected_identical_refs1] _ get_import_commit_msg_mock = get_import_tag_msg_mock = repo = input_repo = changelog_versions = ['1-2', '1-1'] validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-2': }} validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-2'] @pytest.mark.parametrize( [ 'input_repo', 'changelog_versions', 'validation_repo_delta', 'validation_repo_expected_identical_refs', ], [ pytest.param( repo_builder.Repo(), ['1-1'], { 'add_commits': [ repo_builder.Commit.from_spec(name='publish'), ], 'update_tags': {'importer/import/1-1': Placeholder('publish')}, }, [ 'refs/tags/importer/import/1-1', ] ), pytest.param( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), ['1-2', '1-1'], { 'add_commits': [ repo_builder.Commit.from_spec( name='publish', parents=[Placeholder('import')], changelog_versions=['1-2', '1-1'], ), ], 'update_tags': {'importer/import/1-2': Placeholder('publish')}, }, [ 'refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-2', ], ), pytest.param( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), ['1-3', '1-2', '1-1'], { 'add_commits': [ repo_builder.Commit.from_spec( parents=[Placeholder('import')], name='publish', changelog_versions=['1-3', '1-2', '1-1'], ), ], 'update_tags': {'importer/import/1-3': Placeholder('publish')}, }, [ 'refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-3', ], ), ( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec( name='reimport', mutate='Reimport tag contents', ), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), ['1-2', '1-1'], { 'add_commits': [ repo_builder.Commit.from_spec( parents=[ Placeholder('import'), Placeholder('reimport'), ], name='publish', changelog_versions=['1-2', '1-1'], ), ], 'update_tags': {'importer/import/1-2': Placeholder('publish')}, }, [ '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', ], ), ] ) @patch('gitubuntu.importer.get_import_tag_msg') @patch('gitubuntu.importer.get_import_commit_msg') def test_import_unapplied_spi_parenting( get_import_commit_msg_mock, get_import_tag_msg_mock, repo, input_repo, changelog_versions, validation_repo_delta, validation_repo_expected_identical_refs, ): """Test that unapplied import commits have the correct parents :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function that determines the commit message to use for a given import :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function that determines the tag message to use for a given import :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param list(str) changelog_versions: the versions in the changelog of a fake package to test import :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository Verify that if an import of a package is made into input_repo where the package being imported has the given changelog_versions, then the output repository has commits with the parents we expect. This is tested by comparing specific output references against the validation repository. """ # Match the repo_builder objects get_import_tag_msg_mock.return_value = 'Test tag' get_import_commit_msg_mock.return_value = b'Test commit' > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:1381: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp2hpsgu1d/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_import_unapplied_spi_parenting[input_repo2-changelog_versions2-validation_repo_delta2-validation_repo_expected_identical_refs2] _ get_import_commit_msg_mock = get_import_tag_msg_mock = repo = input_repo = changelog_versions = ['1-3', '1-2', '1-1'] validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-3': }} validation_repo_expected_identical_refs = ['refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-3'] @pytest.mark.parametrize( [ 'input_repo', 'changelog_versions', 'validation_repo_delta', 'validation_repo_expected_identical_refs', ], [ pytest.param( repo_builder.Repo(), ['1-1'], { 'add_commits': [ repo_builder.Commit.from_spec(name='publish'), ], 'update_tags': {'importer/import/1-1': Placeholder('publish')}, }, [ 'refs/tags/importer/import/1-1', ] ), pytest.param( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), ['1-2', '1-1'], { 'add_commits': [ repo_builder.Commit.from_spec( name='publish', parents=[Placeholder('import')], changelog_versions=['1-2', '1-1'], ), ], 'update_tags': {'importer/import/1-2': Placeholder('publish')}, }, [ 'refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-2', ], ), pytest.param( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), ['1-3', '1-2', '1-1'], { 'add_commits': [ repo_builder.Commit.from_spec( parents=[Placeholder('import')], name='publish', changelog_versions=['1-3', '1-2', '1-1'], ), ], 'update_tags': {'importer/import/1-3': Placeholder('publish')}, }, [ 'refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-3', ], ), ( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec( name='reimport', mutate='Reimport tag contents', ), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), ['1-2', '1-1'], { 'add_commits': [ repo_builder.Commit.from_spec( parents=[ Placeholder('import'), Placeholder('reimport'), ], name='publish', changelog_versions=['1-2', '1-1'], ), ], 'update_tags': {'importer/import/1-2': Placeholder('publish')}, }, [ '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', ], ), ] ) @patch('gitubuntu.importer.get_import_tag_msg') @patch('gitubuntu.importer.get_import_commit_msg') def test_import_unapplied_spi_parenting( get_import_commit_msg_mock, get_import_tag_msg_mock, repo, input_repo, changelog_versions, validation_repo_delta, validation_repo_expected_identical_refs, ): """Test that unapplied import commits have the correct parents :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function that determines the commit message to use for a given import :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function that determines the tag message to use for a given import :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param list(str) changelog_versions: the versions in the changelog of a fake package to test import :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository Verify that if an import of a package is made into input_repo where the package being imported has the given changelog_versions, then the output repository has commits with the parents we expect. This is tested by comparing specific output references against the validation repository. """ # Match the repo_builder objects get_import_tag_msg_mock.return_value = 'Test tag' get_import_commit_msg_mock.return_value = b'Test commit' > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:1381: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpuzrkwp7m/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_import_unapplied_spi_parenting[input_repo3-changelog_versions3-validation_repo_delta3-validation_repo_expected_identical_refs3] _ get_import_commit_msg_mock = get_import_tag_msg_mock = repo = input_repo = changelog_versions = ['1-2', '1-1'] validation_repo_delta = {'add_commits': [], 'update_tags': {'importer/import/1-2': }} 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'] @pytest.mark.parametrize( [ 'input_repo', 'changelog_versions', 'validation_repo_delta', 'validation_repo_expected_identical_refs', ], [ pytest.param( repo_builder.Repo(), ['1-1'], { 'add_commits': [ repo_builder.Commit.from_spec(name='publish'), ], 'update_tags': {'importer/import/1-1': Placeholder('publish')}, }, [ 'refs/tags/importer/import/1-1', ] ), pytest.param( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), ['1-2', '1-1'], { 'add_commits': [ repo_builder.Commit.from_spec( name='publish', parents=[Placeholder('import')], changelog_versions=['1-2', '1-1'], ), ], 'update_tags': {'importer/import/1-2': Placeholder('publish')}, }, [ 'refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-2', ], ), pytest.param( repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import')], tags={'importer/import/1-1': Placeholder('import')}, ), ['1-3', '1-2', '1-1'], { 'add_commits': [ repo_builder.Commit.from_spec( parents=[Placeholder('import')], name='publish', changelog_versions=['1-3', '1-2', '1-1'], ), ], 'update_tags': {'importer/import/1-3': Placeholder('publish')}, }, [ 'refs/tags/importer/import/1-1', 'refs/tags/importer/import/1-3', ], ), ( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import'), repo_builder.Commit.from_spec( name='reimport', mutate='Reimport tag contents', ), ], tags={ 'importer/import/1-1': Placeholder('import'), 'importer/reimport/import/1-1/0': Placeholder('import'), 'importer/reimport/import/1-1/1': Placeholder('reimport'), }, ), ['1-2', '1-1'], { 'add_commits': [ repo_builder.Commit.from_spec( parents=[ Placeholder('import'), Placeholder('reimport'), ], name='publish', changelog_versions=['1-2', '1-1'], ), ], 'update_tags': {'importer/import/1-2': Placeholder('publish')}, }, [ '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', ], ), ] ) @patch('gitubuntu.importer.get_import_tag_msg') @patch('gitubuntu.importer.get_import_commit_msg') def test_import_unapplied_spi_parenting( get_import_commit_msg_mock, get_import_tag_msg_mock, repo, input_repo, changelog_versions, validation_repo_delta, validation_repo_expected_identical_refs, ): """Test that unapplied import commits have the correct parents :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function that determines the commit message to use for a given import :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function that determines the tag message to use for a given import :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param list(str) changelog_versions: the versions in the changelog of a fake package to test import :param dict validation_repo_delta: how to transform the input repository into a "validation repository", expressed as a dict to provide as **kwargs to gitubuntu.repo_builder.Repo.copy() against the input repository. The validation repository is then used for the purposes of comparison against the output repository. :param list(str) validation_repo_expected_identical_refs: refs that must be identical between the validation repository and the output repository Verify that if an import of a package is made into input_repo where the package being imported has the given changelog_versions, then the output repository has commits with the parents we expect. This is tested by comparing specific output references against the validation repository. """ # Match the repo_builder objects get_import_tag_msg_mock.return_value = 'Test tag' get_import_commit_msg_mock.return_value = b'Test commit' > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:1381: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpxmj3e6is/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version __________________ test_import_unapplied_spi_parent_override ___________________ get_import_commit_msg_mock = get_import_tag_msg_mock = repo = @patch('gitubuntu.importer.get_import_tag_msg') @patch('gitubuntu.importer.get_import_commit_msg') def test_import_unapplied_spi_parent_override( get_import_commit_msg_mock, get_import_tag_msg_mock, repo, ): """Test import_unapplied_spi() parent_override functionality Test that if parent_overrides is used in the import_unapplied_spi call then the resulting commit correctly uses the overridden parents specified. :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function that determines the commit message to use for a given import :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function that determines the tag message to use for a given import :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data """ # Match the repo_builder objects get_import_tag_msg_mock.return_value = 'Test tag' get_import_commit_msg_mock.return_value = b'Test commit' input_repo = repo_builder.Repo( commits=[ repo_builder.Commit.from_spec(name='import1-1', version='1-1'), repo_builder.Commit.from_spec(name='import1-2', version='1-2'), ], tags={ 'importer/import/1-1': Placeholder('import1-1'), 'importer/import/1-2': Placeholder('import1-2'), }, ) > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:1444: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpdz48an92/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version ______________ test_import_unapplied_spi_parent_override_failure _______________ repo = def test_import_unapplied_spi_parent_override_failure(repo): """ Test override_parents ParentOverrideError raise When a parent override is specified but the specified version doesn't have an import tag, an exception should be raised. :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository """ repo_builder.Repo( commits=[repo_builder.Commit.from_spec(name='import1-1')], tags={'importer/import/1-1': Placeholder('import1-1')}, > ).write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:1499: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpwjrdpgpx/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_import_applied_spi_parenting[input_repo0-expected_ancestor_commits0-expected_parent_commits0] _ get_import_commit_msg_mock = get_import_tag_msg_mock = repo = input_repo = expected_ancestor_commits = ['refs/tags/importer/import/1-2'] expected_parent_commits = ['refs/tags/importer/applied/1-1'] @pytest.mark.parametrize( 'input_repo, expected_ancestor_commits, expected_parent_commits', [ # In general, these tests do not set applied commit parents in the # input repository since we have no mechanism to do that correctly, but # this doesn't matter for the purposes of these tests. # if only one import tag exists, then it is the parent pytest.param( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec( name='unapplied1', has_patches=True, ), repo_builder.Commit.from_spec( parents=[Placeholder('unapplied1')], name='unapplied2', changelog_versions=['1-2', '1-1'], has_patches=True, ), repo_builder.Commit.from_spec( name='applied1', patches_applied=True, ), ], # no branches: technically not possible but branches are not # relevant to the test branches={}, tags={ 'importer/import/1-1': Placeholder('unapplied1'), 'importer/import/1-2': Placeholder('unapplied2'), 'importer/applied/1-1': Placeholder('applied1'), }, ), ['refs/tags/importer/import/1-2'], ['refs/tags/importer/applied/1-1'], ), # if multiple import tags exist, then do they all end up as parents? pytest.param( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec( name='unapplied1', has_patches=True, ), repo_builder.Commit.from_spec( parents=[Placeholder('unapplied1')], name='unapplied2', changelog_versions=['1-2', '1-1'], has_patches=True, ), repo_builder.Commit.from_spec( parents=[Placeholder('unapplied1')], name='unapplied2reimport', changelog_versions=['1-2', '1-1'], has_patches=True, mutate='reimport tag', ), repo_builder.Commit.from_spec( name='applied1', patches_applied=True, ), ], # no branches: technically not possible but branches are not # relevant to the test branches={}, tags={ 'importer/import/1-1': Placeholder('unapplied1'), 'importer/import/1-2': Placeholder('unapplied2'), 'importer/reimport/import/1-2/0': Placeholder('unapplied2'), 'importer/reimport/import/1-2/1': Placeholder('unapplied2reimport'), 'importer/applied/1-1': Placeholder('applied1'), }, ), [ 'refs/tags/importer/reimport/import/1-2/0', 'refs/tags/importer/reimport/import/1-2/1', ], [ 'refs/tags/importer/applied/1-1', ], marks=pytest.mark.xfail(reason='LP: #1755247'), ), # do we correctly create a reimport tag because a different import # already exists? pytest.param( repo_builder.Repo( commits=[ repo_builder.Commit.from_spec( name='unapplied1', has_patches=True, ), repo_builder.Commit.from_spec( name='unapplied1_reimport', has_patches=True, mutate='reimport contents', ), repo_builder.Commit.from_spec( parents=[Placeholder('unapplied1')], name='unapplied2', changelog_versions=['1-2', '1-1'], has_patches=True, ), repo_builder.Commit.from_spec( name='applied1', patches_applied=True, ), repo_builder.Commit.from_spec( name='applied1_reimport', patches_applied=True, mutate='reimport contents', ), ], # no branches: technically not possible but branches are not # relevant to the test branches={}, tags={ 'importer/import/1-1': Placeholder('unapplied1'), 'importer/reimport/import/1-1/0': Placeholder('unapplied1'), 'importer/reimport/import/1-1/1': Placeholder('unapplied1_reimport'), 'importer/import/1-2': Placeholder('unapplied2'), 'importer/applied/1-1': Placeholder('applied1'), 'importer/reimport/applied/1-1/0': Placeholder('applied1'), 'importer/reimport/applied/1-1/1': Placeholder('applied1_reimport'), }, ), [ 'refs/tags/importer/reimport/import/1-2/0', 'refs/tags/importer/reimport/import/1-2/1', ], [ 'refs/tags/importer/reimport/applied/1-1/0', 'refs/tags/importer/reimport/applied/1-1/1', ], marks=pytest.mark.xfail(reason='LP: #1755247'), ), ], ) @patch('gitubuntu.importer.get_import_tag_msg') @patch('gitubuntu.importer.get_import_commit_msg') def test_import_applied_spi_parenting( get_import_commit_msg_mock, get_import_tag_msg_mock, repo, input_repo, expected_ancestor_commits, expected_parent_commits, ): """Test that applied import commits have the right parents :param unittest.mock.Mock get_import_commit_msg_mock: mock of the function that determines the commit message to use for a given import :param unittest.mock.Mock get_import_tag_msg_mock: mock of the function that determines the tag message to use for a given import :param repo gitubuntu.git_repository.GitUbuntuRepository: fixture to hold a temporary output repository :param repo_builder.Repo input_repo: input repository data :param list(str) expected_ancestor_commits: list of commit-ish strings that must be ancestors of the 'applied/1-2' tag following the applied import :param list(str) expected_parent_commits: list of commit-ish strings that must be parents of the 'applied/1-2' tag following the applied import. A fake package with version '1-2' that has a changelog parent of '1-1' is imported on top of the provided input_repo. The test fails if any of the expected_ancestor_commits or expected_parent_commits are not present. This test is ugly because we do not yet have a programmatic way to get the interstitial commits of the patch applications. """ # Match the repo_builder objects get_import_tag_msg_mock.return_value = 'Test tag' get_import_commit_msg_mock.return_value = b'Test commit' > input_repo.write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:1698: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpmhtsuyv9/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying a dpkg-source: info: applying b dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying a dpkg-source: info: applying b dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: building source-builder-package in source-builder-package_1-2.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-2.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying a dpkg-source: info: applying b dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying a dpkg-source: info: applying b dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying a dpkg-source: info: applying b dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version _ test_authorship_date[False-Fri, 2 Feb 1971 12:34:56 +0100-expected_result0] __ repo = dsc = {'Format': '3.0 (quilt)', 'Source': 'source-builder-package', 'Binary': 'source-builder-package', 'Architecture': 'all...'}, {'md5sum': '747671b312c2077100fc1e9c1c5c3d7d', 'size': '532', 'name': 'source-builder-package_1-1.debian.tar.xz'}]} namespace = 'importer', version = '1-1', dist = 'ubuntu' def import_dsc(repo, dsc, namespace, version, dist): """Imports the dsc file to importer/{debian,ubuntu}/dsc Arguments: spi - A GitUbuntuSourcePackageInformation instance """ # Add DSC file to the appropriate branch dsc_branch_name = '%s/importer/%s/dsc' % (namespace, dist) dsc_ref_name = 'refs/heads/%s' % dsc_branch_name try: repo.raw_repo.lookup_reference(dsc_ref_name) except KeyError: runq(['git', 'checkout', '--orphan', dsc_branch_name], env=repo.env) runq(['git', 'reset', '--hard'], env=repo.env) else: runq(['git', 'checkout', dsc_branch_name], env=repo.env) # It is possible the same-named DSC is published multiple times # with different contents, e.g. on epoch bumps local_dir = os.path.join(repo.local_dir, version) os.makedirs(local_dir, exist_ok=True) shutil.copy(dsc.dsc_path, local_dir) repo.git_run(['add', repo.local_dir]) try: # Anything to commit? (this will be 0 if, for instance, the # same dsc is being imported again) > runq(['git', 'diff', '--exit-code', 'HEAD'], env=repo.env) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:735: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:31: in runq return run(*args, **kwargs) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:87: in run raise e /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:64: in run cp = subprocess.run( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['git', 'diff', '--exit-code', 'HEAD'],) kwargs = {'env': {'ASFLAGS': '', 'ASFLAGS_FOR_BUILD': '', 'BUILDUSERGECOS': 'first user,first room,first work-phone,first home-phone,first other', 'BUILDUSERNAME': 'pbuilder1', ...}, 'shell': False, 'stderr': -3, 'stdin': -3, ...} process = stdout = None, stderr = None, retcode = 128 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['git', 'diff', '--exit-code', 'HEAD']' returned non-zero exit status 128. /usr/lib/python3.12/subprocess.py:571: CalledProcessError During handling of the above exception, another exception occurred: repo = override = False, input_string = 'Fri, 2 Feb 1971 12:34:56 +0100' expected_result = (1971, 2, 2, 11, 34, 56, ...) @pytest.mark.parametrize(['override', 'input_string', 'expected_result'], [ # Standard date that should parse and be used (False, 'Fri, 2 Feb 1971 12:34:56 +0100', (1971, 2, 2, 11, 34, 56, 60)), # Deliberately illegal date that cannot be parsed (True, 'Failday, 30 Feb 1971 99:99:99 +9999', (1972, 3, 3, 12, 45, 57, 0)), ]) def test_authorship_date(repo, override, input_string, expected_result): """Synthesized commit should use changelog or override when provided A synthesized commit should use the date of the changelog entry in the usual case, or commit_date when an override is requested. :param GitUbuntuRepository repo: fixture providing a temporary GitUbuntuRepository instance to use :param bool override: whether a changelog date override should be requested from import_unapplied_dsc() :param str input_string: the timestamp part of the changelog entry to use :param tuple expected_result: the expected author date of the synthesized commit, specified as six parameters to datetime.datetime() followed by the expected tz offset in minutes. """ spec = source_builder.SourceSpec(changelog_date=input_string) with source_builder.Source(spec) as dsc_pathname: > target.import_unapplied_dsc( repo=repo, version='1-1', namespace='importer', dist='ubuntu', dsc_pathname=dsc_pathname, head_name='ubuntu/focal', skip_orig=True, parent_overrides={}, commit_date=datetime.datetime( 1972, 3, 3, 12, 45, 57, tzinfo=datetime.timezone.utc, ), changelog_date_overrides=( frozenset({'1-1'}) if override else frozenset() ), ) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:1815: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:2197: in import_unapplied_dsc import_dsc( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:737: in import_dsc repo.git_run(['commit', '-m', 'DSC file for %s' % version]) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1841: in git_run return git_run( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:267: in git_run return run(['git'] + list(args), env=env, **kwargs) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:87: in run raise e /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:64: in run cp = subprocess.run( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['git', 'commit', '-m', 'DSC file for 1-1'],) kwargs = {'env': {'ASFLAGS': '', 'ASFLAGS_FOR_BUILD': '', 'BUILDUSERGECOS': 'first user,first room,first work-phone,first home-phone,first other', 'BUILDUSERNAME': 'pbuilder1', ...}, 'shell': False, 'stderr': -1, 'stdin': -3, ...} process = stdout = b'' stderr = b'Author identity unknown\n\n*** Please tell me who you are.\n\nRun\n\n git config --global user.email "you@example.c...-global to set the identity only in this repository.\n\nfatal: empty ident name (for ) not allowed\n' retcode = 128 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['git', 'commit', '-m', 'DSC file for 1-1']' returned non-zero exit status 128. /usr/lib/python3.12/subprocess.py:571: CalledProcessError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version ------------------------------ Captured log call ------------------------------- ERROR root:run.py:78 Command exited 128: git commit -m "DSC file for 1-1" ERROR root:run.py:79 stdout: ERROR root:run.py:83 stderr: Author identity unknown *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for ) not allowed _ test_authorship_date[True-Failday, 30 Feb 1971 99:99:99 +9999-expected_result1] _ repo = dsc = {'Format': '3.0 (quilt)', 'Source': 'source-builder-package', 'Binary': 'source-builder-package', 'Architecture': 'all...'}, {'md5sum': '6ab50bf391c280c3a594770334672747', 'size': '532', 'name': 'source-builder-package_1-1.debian.tar.xz'}]} namespace = 'importer', version = '1-1', dist = 'ubuntu' def import_dsc(repo, dsc, namespace, version, dist): """Imports the dsc file to importer/{debian,ubuntu}/dsc Arguments: spi - A GitUbuntuSourcePackageInformation instance """ # Add DSC file to the appropriate branch dsc_branch_name = '%s/importer/%s/dsc' % (namespace, dist) dsc_ref_name = 'refs/heads/%s' % dsc_branch_name try: repo.raw_repo.lookup_reference(dsc_ref_name) except KeyError: runq(['git', 'checkout', '--orphan', dsc_branch_name], env=repo.env) runq(['git', 'reset', '--hard'], env=repo.env) else: runq(['git', 'checkout', dsc_branch_name], env=repo.env) # It is possible the same-named DSC is published multiple times # with different contents, e.g. on epoch bumps local_dir = os.path.join(repo.local_dir, version) os.makedirs(local_dir, exist_ok=True) shutil.copy(dsc.dsc_path, local_dir) repo.git_run(['add', repo.local_dir]) try: # Anything to commit? (this will be 0 if, for instance, the # same dsc is being imported again) > runq(['git', 'diff', '--exit-code', 'HEAD'], env=repo.env) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:735: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:31: in runq return run(*args, **kwargs) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:87: in run raise e /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:64: in run cp = subprocess.run( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['git', 'diff', '--exit-code', 'HEAD'],) kwargs = {'env': {'ASFLAGS': '', 'ASFLAGS_FOR_BUILD': '', 'BUILDUSERGECOS': 'first user,first room,first work-phone,first home-phone,first other', 'BUILDUSERNAME': 'pbuilder1', ...}, 'shell': False, 'stderr': -3, 'stdin': -3, ...} process = stdout = None, stderr = None, retcode = 128 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['git', 'diff', '--exit-code', 'HEAD']' returned non-zero exit status 128. /usr/lib/python3.12/subprocess.py:571: CalledProcessError During handling of the above exception, another exception occurred: repo = override = True, input_string = 'Failday, 30 Feb 1971 99:99:99 +9999' expected_result = (1972, 3, 3, 12, 45, 57, ...) @pytest.mark.parametrize(['override', 'input_string', 'expected_result'], [ # Standard date that should parse and be used (False, 'Fri, 2 Feb 1971 12:34:56 +0100', (1971, 2, 2, 11, 34, 56, 60)), # Deliberately illegal date that cannot be parsed (True, 'Failday, 30 Feb 1971 99:99:99 +9999', (1972, 3, 3, 12, 45, 57, 0)), ]) def test_authorship_date(repo, override, input_string, expected_result): """Synthesized commit should use changelog or override when provided A synthesized commit should use the date of the changelog entry in the usual case, or commit_date when an override is requested. :param GitUbuntuRepository repo: fixture providing a temporary GitUbuntuRepository instance to use :param bool override: whether a changelog date override should be requested from import_unapplied_dsc() :param str input_string: the timestamp part of the changelog entry to use :param tuple expected_result: the expected author date of the synthesized commit, specified as six parameters to datetime.datetime() followed by the expected tz offset in minutes. """ spec = source_builder.SourceSpec(changelog_date=input_string) with source_builder.Source(spec) as dsc_pathname: > target.import_unapplied_dsc( repo=repo, version='1-1', namespace='importer', dist='ubuntu', dsc_pathname=dsc_pathname, head_name='ubuntu/focal', skip_orig=True, parent_overrides={}, commit_date=datetime.datetime( 1972, 3, 3, 12, 45, 57, tzinfo=datetime.timezone.utc, ), changelog_date_overrides=( frozenset({'1-1'}) if override else frozenset() ), ) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:1815: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:2197: in import_unapplied_dsc import_dsc( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer.py:737: in import_dsc repo.git_run(['commit', '-m', 'DSC file for %s' % version]) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1841: in git_run return git_run( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:267: in git_run return run(['git'] + list(args), env=env, **kwargs) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:87: in run raise e /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/run.py:64: in run cp = subprocess.run( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['git', 'commit', '-m', 'DSC file for 1-1'],) kwargs = {'env': {'ASFLAGS': '', 'ASFLAGS_FOR_BUILD': '', 'BUILDUSERGECOS': 'first user,first room,first work-phone,first home-phone,first other', 'BUILDUSERNAME': 'pbuilder1', ...}, 'shell': False, 'stderr': -1, 'stdin': -3, ...} process = stdout = b'' stderr = b'Author identity unknown\n\n*** Please tell me who you are.\n\nRun\n\n git config --global user.email "you@example.c...-global to set the identity only in this repository.\n\nfatal: empty ident name (for ) not allowed\n' retcode = 128 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['git', 'commit', '-m', 'DSC file for 1-1']' returned non-zero exit status 128. /usr/lib/python3.12/subprocess.py:571: CalledProcessError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: srcpkg/debian/changelog(l4): ignoring invalid week day 'Failday' LINE: -- git ubuntu Failday, 30 Feb 1971 99:99:99 +9999 dpkg-source: warning: srcpkg/debian/changelog(l4): cannot parse non-conformant date '30 Feb 1971 99:99:99 +9999' LINE: -- git ubuntu Failday, 30 Feb 1971 99:99:99 +9999 dpkg-source: warning: missing information for output field Standards-Version ------------------------------ Captured log call ------------------------------- ERROR root:run.py:78 Command exited 128: git commit -m "DSC file for 1-1" ERROR root:run.py:79 stdout: ERROR root:run.py:83 stderr: Author identity unknown *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for ) not allowed __________________ test_fetch_rich_history_from_changes_file ___________________ repo = pygit2_repo = pygit2.Repository('/tmp/tmp3ddoad82/.git/') @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) def test_fetch_rich_history_from_changes_file(repo, pygit2_repo): """Rich history specified in a changes file is found and validated""" > rich_commit, parent_commit, import_tree = populate_rich_history( import_repo=repo.raw_repo, uploader_repo=pygit2_repo, ) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:2111: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:2080: in populate_rich_history ).write(import_repo) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp3imewvyr/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version ________ test_fetch_rich_history_from_changes_file_fetch_failure_retry _________ repo = pygit2_repo = pygit2.Repository('/tmp/tmp8p4onk85/.git/') @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) def test_fetch_rich_history_from_changes_file_fetch_failure_retry( repo, pygit2_repo, ): """If rich history cannot be fetched once, it is retried""" > rich_commit, parent_commit, import_tree = populate_rich_history( import_repo=repo.raw_repo, uploader_repo=pygit2_repo, ) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:2204: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:2080: in populate_rich_history ).write(import_repo) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp_jfb99bp/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version ____________ test_fetch_rich_history_from_changes_file_missing_ref _____________ repo = pygit2_repo = pygit2.Repository('/tmp/tmp7kdp1d3u/.git/') @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) def test_fetch_rich_history_from_changes_file_missing_ref( repo, pygit2_repo, ): """If rich history is specified but the ref cannot be found, a hard exception is raised """ > rich_commit, _, _ = populate_rich_history( import_repo=repo.raw_repo, uploader_repo=pygit2_repo, ) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:2243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:2080: in populate_rich_history ).write(import_repo) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpug5qugjf/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version ___________ test_fetch_rich_history_from_changes_file_missing_commit ___________ repo = pygit2_repo = pygit2.Repository('/tmp/tmpk9asqkbu/.git/') @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) def test_fetch_rich_history_from_changes_file_missing_commit( repo, pygit2_repo, ): """If rich history is specified but the commit cannot be found, an exception is raised """ > rich_commit, _, _ = populate_rich_history( import_repo=repo.raw_repo, uploader_repo=pygit2_repo, ) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:2271: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:2080: in populate_rich_history ).write(import_repo) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmphabkx_ro/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version ____________ test_fetch_rich_history_from_changes_file_not_a_commit ____________ repo = pygit2_repo = pygit2.Repository('/tmp/tmp6921sbzi/.git/') @patch('gitubuntu.importer.LAUNCHPAD_GIT_HOSTING_URL_PREFIX', 'file://') @patch('gitubuntu.importer.VCS_GIT_URL_VALIDATION', re.compile(r'.*')) def test_fetch_rich_history_from_changes_file_not_a_commit(repo, pygit2_repo): """If rich history is specified but the commit hash resolves to something other than a commit, an exception is raised """ > rich_commit, _, _ = populate_rich_history( import_repo=repo.raw_repo, uploader_repo=pygit2_repo, ) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:2297: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/importer_test.py:2080: in populate_rich_history ).write(import_repo) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp6z13f423/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version dpkg-source: warning: missing information for output field Standards-Version ___________________ TestObjectCreation.testRepoBranchesTags ____________________ self = def testRepoBranchesTags(self): graph = Repo( commits=[ Commit( Tree({}), parents=[Placeholder('parent')], name='child', ), Commit(Tree({}), name='parent'), ], branches={ 'branch1': Placeholder('parent'), 'branch2': Commit(Tree({'foo': Blob(b'qux')})), }, tags={ 'tag1': Placeholder('child'), 'tag2': Commit(Tree({'foo': Blob(b'quz')})), }, ) > child_ref = graph.write(self.repo) gitubuntu/repo_builder_test.py:154: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmp7h8pljbd/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? gitubuntu/repo_builder.py:389: AttributeError ______________________ TestObjectCreation.testRepoTagger _______________________ self = def testRepoTagger(self): """The tagger parameter should make it through to the tag""" input_repo = Repo( commits=[Commit(name='root')], tags={'root': Placeholder('root')}, tagger=pygit2.Signature( 'Test Tagger', 'test@example.com', 1, 2, ), ) > input_repo.write(self.repo) gitubuntu/repo_builder_test.py:178: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpqdagbyse/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? gitubuntu/repo_builder.py:389: AttributeError _______________________________ test_source_tree _______________________________ pygit2_repo = pygit2.Repository('/tmp/tmprbrv5i9r/.git/') def test_source_tree(pygit2_repo): commit_str = Commit(SourceTree(Source())).write(pygit2_repo) commit = pygit2_repo.get(commit_str) > assert gitubuntu.git_repository.follow_symlinks_to_blob( repo=pygit2_repo, treeish_object=commit, path='debian/changelog', ) gitubuntu/repo_builder_test.py:190: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmprbrv5i9r/.git/') top_tree_object = search_path = 'debian/changelog' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? gitubuntu/git_repository.py:68: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version ______________________________ test_preservation _______________________________ tmpdir = local('/tmp/pytest-of-pbuilder1/pytest-0/test_preservation0') repo = def test_preservation(tmpdir, repo): """An export followed by an import should preserve rich history Given a minimal repository that should be able to have upload tags be exported, when we import the export result into a similar repository with a subtly different upload tag in which the rich history should still apply, the result should be a correctly reconstructed upload tag. :param py.path tmpdir: the pytest standard tmpdir fixture. :param repo: our standard repo fixture. """ Repo( commits=[ Commit( name='1', tree=Tree({ 'a': Blob(b'a'), }), ), Commit( name='2', parents=[Placeholder('1')], tree=Tree({ 'a': Blob(b'ab'), }), ), Commit( name='3', parents=[Placeholder('2')], tree=Tree({ 'a': Blob(b'abc'), }), ), ], tags={ 'importer/import/1': Placeholder('1'), 'importer/upload/2': Placeholder('3'), } > ).write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/rich_history_test.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpc0e_1t8j/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError ______________________ test_preservation_multiple_parents ______________________ tmpdir = local('/tmp/pytest-of-pbuilder1/pytest-0/test_preservation_multiple_par0') repo = def test_preservation_multiple_parents(tmpdir, repo): """An export of rich history should omit multiple parent cases If an upload tag leads to multiple parents before we reach an import tag, it should be excluded from the export as this type of upload tag is not supported for rich history preservation. This test also serves to verify code paths that handle the MultipleParentError exception in the export code. :param py.path tmpdir: the pytest standard tmpdir fixture. :param repo: our standard repo fixture. """ Repo( commits=[ Commit(name='1', message='a'), Commit(name='2', message='b'), Commit(name='child', parents=[Placeholder('1'), Placeholder('2')]), ], tags={ 'importer/import/1': Placeholder('1'), 'importer/upload/2': Placeholder('child'), } > ).write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/rich_history_test.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpexe8huxt/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError _________________________ test_preservation_no_parents _________________________ tmpdir = local('/tmp/pytest-of-pbuilder1/pytest-0/test_preservation_no_parents0') repo = def test_preservation_no_parents(tmpdir, repo): """An export of rich history should omit no parent cases If an upload tag leads to no parents before we reach an import tag, it should be excluded from the export as this type of upload tag is not supported for rich history preservation. This test also serves to verify code paths that handle the NoParentError exception in the export code. :param py.path tmpdir: the pytest standard tmpdir fixture. :param repo: our standard repo fixture. """ Repo( commits=[ Commit(name='1', message='a'), Commit(name='2', message='b'), ], tags={ 'importer/import/1': Placeholder('1'), 'importer/upload/2': Placeholder('2'), } > ).write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/rich_history_test.py:129: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpgjmg6cno/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError _____________ test_input_edge_cases[before_export0-before_import0] _____________ tmpdir = local('/tmp/pytest-of-pbuilder1/pytest-0/test_input_edge_cases_before_e0') repo = before_export = {'commits': [, , 'importer/upload/2': }} before_import = {'commits': [], 'tags': {'importer/import/1': }} @pytest.mark.parametrize(['before_export', 'before_import'], [ ( # Commit messages with patch-like contents should not fail # If a commit message in rich history contains text in a patch-like # format (such as a diff of some file), it should not prevent correct # round-tripping. "git format-patch" followed by "git am" fails this # test, for example. { 'commits': [ Commit(name='1', message='a', tree=Tree({'a': Blob(b'a')})), Commit( name='2', message='''First line Inline patch that isn't part of the real patch starts here --- a/foo +++ b/foo @@ -1 +1,2 @@ foo +bar ''', tree=Tree({'a': Blob(b'ab')}), parents=[Placeholder('1')], ), ], 'tags': { 'importer/import/1': Placeholder('1'), 'importer/upload/2': Placeholder('2'), } }, { 'commits': [ Commit(name='b1', message='c', tree=Tree({'a': Blob(b'a')})), ], 'tags': {'importer/import/1': Placeholder('b1')}, }, ), ( # Commits that have no changes should round trip { 'commits': [ Commit( name='1', message='a', ), Commit( name='2', message='b', parents=[Placeholder('1')], ), ], 'tags': { 'importer/import/1': Placeholder('1'), 'importer/upload/2': Placeholder('2'), }, }, { 'commits': [Commit(name='b1', message='c')], 'tags': {'importer/import/1': Placeholder('b1')}, }, ), ( # Commits that have no commit message should round trip { 'commits': [ Commit( name='1', message='a', ), Commit( name='2', message='', tree=Tree({'a': Blob(b'a')}), parents=[Placeholder('1')], ), ], 'tags': { 'importer/import/1': Placeholder('1'), 'importer/upload/2': Placeholder('2'), } }, { 'commits': [Commit(name='b1', message='c')], 'tags': {'importer/import/1': Placeholder('b1')}, }, ), ]) def test_input_edge_cases(tmpdir, repo, before_export, before_import): """ Edge cases in input rich history should reimport without failure Check that rich history preservation completes without an exception in various cases. Details of each case are described in comments in the test parameters above. Since these tests generally cover the mutated case (where rich history has to be ported forward because parent commits have mutated), we must remove and recreate the 'importer/import/1' tag so that it is different before attempting reimport. This is done by deleting all ('importer/*') tags and then using the before_import parameter to recreate it again. :param py.path tmpdir: the pytest standard tmpdir fixture. :param GitUbuntuRepository repo: our standard repo fixture. :param dict before_export: the parameters to supply to Repo() to construct the repository that will be exported. :param dict before_import: the parametsrs to supply to Repo() to add to the repository before attempting reimport. """ > Repo(**before_export).write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/rich_history_test.py:260: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpj9aw4ja8/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError _____________ test_input_edge_cases[before_export1-before_import1] _____________ tmpdir = local('/tmp/pytest-of-pbuilder1/pytest-0/test_input_edge_cases_before_e1') repo = before_export = {'commits': [, , 'importer/upload/2': }} before_import = {'commits': [], 'tags': {'importer/import/1': }} @pytest.mark.parametrize(['before_export', 'before_import'], [ ( # Commit messages with patch-like contents should not fail # If a commit message in rich history contains text in a patch-like # format (such as a diff of some file), it should not prevent correct # round-tripping. "git format-patch" followed by "git am" fails this # test, for example. { 'commits': [ Commit(name='1', message='a', tree=Tree({'a': Blob(b'a')})), Commit( name='2', message='''First line Inline patch that isn't part of the real patch starts here --- a/foo +++ b/foo @@ -1 +1,2 @@ foo +bar ''', tree=Tree({'a': Blob(b'ab')}), parents=[Placeholder('1')], ), ], 'tags': { 'importer/import/1': Placeholder('1'), 'importer/upload/2': Placeholder('2'), } }, { 'commits': [ Commit(name='b1', message='c', tree=Tree({'a': Blob(b'a')})), ], 'tags': {'importer/import/1': Placeholder('b1')}, }, ), ( # Commits that have no changes should round trip { 'commits': [ Commit( name='1', message='a', ), Commit( name='2', message='b', parents=[Placeholder('1')], ), ], 'tags': { 'importer/import/1': Placeholder('1'), 'importer/upload/2': Placeholder('2'), }, }, { 'commits': [Commit(name='b1', message='c')], 'tags': {'importer/import/1': Placeholder('b1')}, }, ), ( # Commits that have no commit message should round trip { 'commits': [ Commit( name='1', message='a', ), Commit( name='2', message='', tree=Tree({'a': Blob(b'a')}), parents=[Placeholder('1')], ), ], 'tags': { 'importer/import/1': Placeholder('1'), 'importer/upload/2': Placeholder('2'), } }, { 'commits': [Commit(name='b1', message='c')], 'tags': {'importer/import/1': Placeholder('b1')}, }, ), ]) def test_input_edge_cases(tmpdir, repo, before_export, before_import): """ Edge cases in input rich history should reimport without failure Check that rich history preservation completes without an exception in various cases. Details of each case are described in comments in the test parameters above. Since these tests generally cover the mutated case (where rich history has to be ported forward because parent commits have mutated), we must remove and recreate the 'importer/import/1' tag so that it is different before attempting reimport. This is done by deleting all ('importer/*') tags and then using the before_import parameter to recreate it again. :param py.path tmpdir: the pytest standard tmpdir fixture. :param GitUbuntuRepository repo: our standard repo fixture. :param dict before_export: the parameters to supply to Repo() to construct the repository that will be exported. :param dict before_import: the parametsrs to supply to Repo() to add to the repository before attempting reimport. """ > Repo(**before_export).write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/rich_history_test.py:260: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpafejrpel/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError _____________ test_input_edge_cases[before_export2-before_import2] _____________ tmpdir = local('/tmp/pytest-of-pbuilder1/pytest-0/test_input_edge_cases_before_e2') repo = before_export = {'commits': [, , 'importer/upload/2': }} before_import = {'commits': [], 'tags': {'importer/import/1': }} @pytest.mark.parametrize(['before_export', 'before_import'], [ ( # Commit messages with patch-like contents should not fail # If a commit message in rich history contains text in a patch-like # format (such as a diff of some file), it should not prevent correct # round-tripping. "git format-patch" followed by "git am" fails this # test, for example. { 'commits': [ Commit(name='1', message='a', tree=Tree({'a': Blob(b'a')})), Commit( name='2', message='''First line Inline patch that isn't part of the real patch starts here --- a/foo +++ b/foo @@ -1 +1,2 @@ foo +bar ''', tree=Tree({'a': Blob(b'ab')}), parents=[Placeholder('1')], ), ], 'tags': { 'importer/import/1': Placeholder('1'), 'importer/upload/2': Placeholder('2'), } }, { 'commits': [ Commit(name='b1', message='c', tree=Tree({'a': Blob(b'a')})), ], 'tags': {'importer/import/1': Placeholder('b1')}, }, ), ( # Commits that have no changes should round trip { 'commits': [ Commit( name='1', message='a', ), Commit( name='2', message='b', parents=[Placeholder('1')], ), ], 'tags': { 'importer/import/1': Placeholder('1'), 'importer/upload/2': Placeholder('2'), }, }, { 'commits': [Commit(name='b1', message='c')], 'tags': {'importer/import/1': Placeholder('b1')}, }, ), ( # Commits that have no commit message should round trip { 'commits': [ Commit( name='1', message='a', ), Commit( name='2', message='', tree=Tree({'a': Blob(b'a')}), parents=[Placeholder('1')], ), ], 'tags': { 'importer/import/1': Placeholder('1'), 'importer/upload/2': Placeholder('2'), } }, { 'commits': [Commit(name='b1', message='c')], 'tags': {'importer/import/1': Placeholder('b1')}, }, ), ]) def test_input_edge_cases(tmpdir, repo, before_export, before_import): """ Edge cases in input rich history should reimport without failure Check that rich history preservation completes without an exception in various cases. Details of each case are described in comments in the test parameters above. Since these tests generally cover the mutated case (where rich history has to be ported forward because parent commits have mutated), we must remove and recreate the 'importer/import/1' tag so that it is different before attempting reimport. This is done by deleting all ('importer/*') tags and then using the before_import parameter to recreate it again. :param py.path tmpdir: the pytest standard tmpdir fixture. :param GitUbuntuRepository repo: our standard repo fixture. :param dict before_export: the parameters to supply to Repo() to construct the repository that will be exported. :param dict before_import: the parametsrs to supply to Repo() to add to the repository before attempting reimport. """ > Repo(**before_export).write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/rich_history_test.py:260: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpxumwfvff/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError _______________________ test_preservation_fast_forwards ________________________ tmpdir = local('/tmp/pytest-of-pbuilder1/pytest-0/test_preservation_fast_forward0') repo = def test_preservation_fast_forwards(tmpdir, repo): """Rich history that can be fast forwarded should not mutate :param py.path tmpdir: the pytest standard tmpdir fixture. :param GitUbuntuRepository repo: our standard repo fixture. """ Repo( commits=[ Commit( name='1', message='a', ), Commit( name='2', message='', tree=Tree({'a': Blob(b'a')}), parents=[Placeholder('1')], ), ], tags={ 'importer/import/1': Placeholder('1'), 'importer/upload/2': Placeholder('2'), } > ).write(repo.raw_repo) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/rich_history_test.py:294: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = repo = pygit2.Repository('/tmp/tmpcjv67i4k/.git/'), record = {} def write(self, repo, record=None): replace_placeholders(self) record = record or dict() written_commits = [ commit.write(repo=repo, record=record) for commit in self.commit_list ] for name, target in self.branches.items(): repo.create_branch( name, repo.get(target.write(repo)).peel(pygit2.Commit), ) for name, target in self.tags.items(): repo.create_tag( name, target.write(repo), > pygit2.GIT_OBJ_COMMIT, self.tagger.signature, 'Tag message', ) E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_COMMIT'. Did you mean: 'GIT_OBJECT_COMMIT'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/repo_builder.py:389: AttributeError _______________________ test_source_create_with_version ________________________ repo = def test_source_create_with_version(repo): > version = get_spec_changelog_version(repo, version='3', native=True) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/source_builder_test.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version changelog = repo.get_changelog_from_treeish(tree_hash) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish return Changelog.from_treeish( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:569: in from_treeish blob = follow_symlinks_to_blob( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmp51937gt8/.git/') top_tree_object = search_path = 'debian/changelog' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:68: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (native)' dpkg-source: info: building source-builder-package in source-builder-package_3.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_3.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version _______________________ test_source_create_with_versions _______________________ repo = def test_source_create_with_versions(repo): source_spec = target.SourceSpec(changelog_versions=['3', '4'], native=True) with target.Source(source_spec) as f: tree_hash = importer.dsc_to_tree_hash(repo.raw_repo, f) > changelog = repo.get_changelog_from_treeish(tree_hash) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/source_builder_test.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish return Changelog.from_treeish( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:569: in from_treeish blob = follow_symlinks_to_blob( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmpkbxj6f8x/.git/') top_tree_object = search_path = 'debian/changelog' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:68: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (native)' dpkg-source: info: building source-builder-package in source-builder-package_3.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_3.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version ____________ test_source_native_source_format[True-3.0 (native)\n] _____________ repo = native = True, expected = b'3.0 (native)\n' @pytest.mark.parametrize('native,expected', [ (True, b"3.0 (native)\n"), (False, b"3.0 (quilt)\n"), ]) def test_source_native_source_format(repo, native, expected): with target.Source(target.SourceSpec(native=native)) as dsc_path: > blob = git_repository.follow_symlinks_to_blob( repo.raw_repo, dsc_path_to_tree(repo, dsc_path), 'debian/source/format', ) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/source_builder_test.py:133: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmp4vcsvwng/.git/') top_tree_object = search_path = 'debian/source/format' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:68: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (native)' dpkg-source: info: building source-builder-package in source-builder-package_1.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version ____________ test_source_native_source_format[False-3.0 (quilt)\n] _____________ repo = native = False, expected = b'3.0 (quilt)\n' @pytest.mark.parametrize('native,expected', [ (True, b"3.0 (native)\n"), (False, b"3.0 (quilt)\n"), ]) def test_source_native_source_format(repo, native, expected): with target.Source(target.SourceSpec(native=native)) as dsc_path: > blob = git_repository.follow_symlinks_to_blob( repo.raw_repo, dsc_path_to_tree(repo, dsc_path), 'debian/source/format', ) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/source_builder_test.py:133: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmpd9hn7l91/.git/') top_tree_object = search_path = 'debian/source/format' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:68: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version _________________________ test_source_quilt_no_patches _________________________ repo = def test_source_quilt_no_patches(repo): with target.Source(target.SourceSpec()) as dsc_path: top = dsc_path_to_tree(repo, dsc_path) debian_entry = top['debian'] > assert debian_entry.type in [pygit2.GIT_OBJ_TREE, 'tree'] E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/source_builder_test.py:144: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version ________________________ test_source_quilt_with_patches ________________________ repo = def test_source_quilt_with_patches(repo): spec = target.SourceSpec(has_patches=True) with target.Source(spec) as dsc_path: top = dsc_path_to_tree(repo, dsc_path) expected_files = ['series', 'a', 'b'] for basename in expected_files: > assert git_repository.follow_symlinks_to_blob( repo.raw_repo, top, 'debian/patches/%s' % basename, ) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/source_builder_test.py:156: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmpcv0twdn3/.git/') top_tree_object = search_path = 'debian/patches/series' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:68: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying a dpkg-source: info: applying b dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version ____________________ test_source_quilt_with_patches_applied ____________________ repo = def test_source_quilt_with_patches_applied(repo): spec = target.SourceSpec(has_patches=True) with target.Source(spec) as dsc_path: top = dsc_path_to_tree(repo, dsc_path, patches_applied=True) expected_files = [ 'debian/patches/series', 'debian/patches/a', 'debian/patches/b', 'a', 'b', ] for filename in expected_files: > assert git_repository.follow_symlinks_to_blob( repo.raw_repo, top, filename, ) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/source_builder_test.py:183: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmphhn7ldra/.git/') top_tree_object = search_path = 'debian/patches/series' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:68: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying a dpkg-source: info: applying b dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version ______________________ test_source_version_native_default ______________________ repo = def test_source_version_native_default(repo): """The default version string for a native package should not have a '-' in it. """ > version = get_spec_changelog_version(repo, native=True) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/source_builder_test.py:194: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version changelog = repo.get_changelog_from_treeish(tree_hash) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish return Changelog.from_treeish( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:569: in from_treeish blob = follow_symlinks_to_blob( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmpcq1iomt9/.git/') top_tree_object = search_path = 'debian/changelog' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:68: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (native)' dpkg-source: info: building source-builder-package in source-builder-package_1.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version ____________________ test_source_version_non_native_default ____________________ repo = def test_source_version_non_native_default(repo): """The default version string for a non-native package should have a '-' in it. """ > version = get_spec_changelog_version(repo, native=False) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/source_builder_test.py:202: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version changelog = repo.get_changelog_from_treeish(tree_hash) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish return Changelog.from_treeish( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:569: in from_treeish blob = follow_symlinks_to_blob( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmp4xec4olx/.git/') top_tree_object = search_path = 'debian/changelog' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:68: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version _____________________ test_source_version_native_specific ______________________ repo = def test_source_version_native_specific(repo): """We should be able to create a native package with a native-looking version string. """ > version = get_spec_changelog_version(repo, native=True, version='1.0') /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/source_builder_test.py:210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version changelog = repo.get_changelog_from_treeish(tree_hash) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish return Changelog.from_treeish( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:569: in from_treeish blob = follow_symlinks_to_blob( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmpemcpragn/.git/') top_tree_object = search_path = 'debian/changelog' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:68: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (native)' dpkg-source: info: building source-builder-package in source-builder-package_1.0.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1.0.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version ___________________ test_source_version_non_native_specific ____________________ repo = def test_source_version_non_native_specific(repo): """We should be able to create a non-native package with a non-native-looking version string. """ > version = get_spec_changelog_version(repo, native=False, version='1.0-1') /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/source_builder_test.py:218: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/source_builder_test.py:47: in get_spec_changelog_version changelog = repo.get_changelog_from_treeish(tree_hash) /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:1873: in get_changelog_from_treeish return Changelog.from_treeish( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:569: in from_treeish blob = follow_symlinks_to_blob( /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:101: in follow_symlinks_to_blob return _follow_symlinks_to_blob( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ repo = pygit2.Repository('/tmp/tmp9rosxeqn/.git/') top_tree_object = search_path = 'debian/changelog' _rel_tree = _rel_path = '' def _follow_symlinks_to_blob(repo, top_tree_object, search_path, _rel_tree=None, _rel_path='' ): '''Recursively follow a path down a tree, following symlinks, to find blob repo: pygit2.Repository object top_tree: pygit2.Tree object of the top of the tree structure search_path: '/'-separated path string of blob to find _rel_tree: (internal) which tree to look further into _rel_path: (internal) the path we are in so far ''' NORMAL_BLOB_MODES = set([ pygit2.GIT_FILEMODE_BLOB, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE, ]) _rel_tree = _rel_tree or top_tree_object head, tail = posixpath.split(search_path) # A traditional functional split would put a single entry in head with tail # empty, but posixpath.split doesn't necessarily do this. Jiggle it round # to make it appear to have traditional semantics. if not head: head = tail tail = None entry = _rel_tree[head] > if entry.type in [pygit2.GIT_OBJ_TREE, 'tree']: E AttributeError: module 'pygit2' has no attribute 'GIT_OBJ_TREE'. Did you mean: 'GIT_OBJECT_TREE'? /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository.py:68: AttributeError ----------------------------- Captured stdout call ----------------------------- dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building source-builder-package using existing ./source-builder-package_1.0.orig.tar.gz dpkg-source: info: building source-builder-package in source-builder-package_1.0-1.debian.tar.xz dpkg-source: info: building source-builder-package in source-builder-package_1.0-1.dsc ----------------------------- Captured stderr call ----------------------------- dpkg-source: warning: missing information for output field Standards-Version =============================== warnings summary =============================== gitubuntu/git_repository_test.py:5 /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build/gitubuntu/git_repository_test.py:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[0] FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[1] FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[2] FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[3] FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob[4] FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob_not_found[tree1] FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob_not_found[tree2] FAILED gitubuntu/git_repository_test.py::test_follow_symlinks_to_blob_not_found[tree3] FAILED gitubuntu/git_repository_test.py::test_git_escape_dir_to_tree - Attrib... FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data1-debian/patches/series] FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data2-debian/patches/series] FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data3-debian/patches/debian.series] FAILED gitubuntu/git_repository_test.py::test_determine_quilt_series_path[tree_data4-debian/patches/debian.series] FAILED gitubuntu/git_repository_test.py::test_quilt_env - AttributeError: mod... FAILED gitubuntu/git_repository_test.py::test_repo_quilt_env - AttributeError... FAILED gitubuntu/git_repository_test.py::test_repo_quilt_env_from_treeish_str 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] 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] 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] FAILED gitubuntu/git_repository_test.py::test_commit_tree - AttributeError: m... FAILED gitubuntu/git_repository_test.py::test_descendant_of[root-root-False] FAILED gitubuntu/git_repository_test.py::test_descendant_of[child1-root-True] FAILED gitubuntu/git_repository_test.py::test_descendant_of[root-child1-False] FAILED gitubuntu/git_repository_test.py::test_descendant_of[grandchild1-root-True] FAILED gitubuntu/git_repository_test.py::test_descendant_of[child1-child2-False] FAILED gitubuntu/git_repository_test.py::test_descendant_of[root-disjoint-False] FAILED gitubuntu/git_repository_test.py::test_create_tag - AttributeError: mo... FAILED gitubuntu/git_repository_test.py::test_get_all_reimport_tags - Attribu... FAILED gitubuntu/git_repository_test.py::test_get_head_info - AttributeError:... 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] 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] 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] 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] 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] 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] 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] 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] FAILED gitubuntu/importer_tag_test.py::test_import_applied_spi_tags[input_repo0-validation_repo_delta0-validation_repo_expected_treewise_refs0-True] FAILED gitubuntu/importer_tag_test.py::test_import_applied_spi_tags[input_repo2-validation_repo_delta2-validation_repo_expected_treewise_refs2-False] FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo1-PatchState.UNAPPLIED-expected1] FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo2-PatchState.UNAPPLIED-expected2] FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo4-PatchState.APPLIED-expected4] FAILED gitubuntu/importer_test.py::test_get_existing_import_tags[input_repo5-PatchState.APPLIED-expected5] FAILED gitubuntu/importer_test.py::test_get_existing_import_tags_ordering - A... FAILED gitubuntu/importer_test.py::test_create_import_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] FAILED gitubuntu/importer_test.py::test_create_import_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] FAILED gitubuntu/importer_test.py::test_create_import_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] FAILED gitubuntu/importer_test.py::test_create_import_tag_hash_stability_on_first_import FAILED gitubuntu/importer_test.py::test_create_import_tag_hash_stability_on_reimport FAILED gitubuntu/importer_test.py::test_create_applied_tag[input_repo0-validation_repo_delta0-validation_repo_expected_identical_refs0] FAILED gitubuntu/importer_test.py::test_create_applied_tag[input_repo1-validation_repo_delta1-validation_repo_expected_identical_refs1] FAILED gitubuntu/importer_test.py::test_create_applied_tag[input_repo2-validation_repo_delta2-validation_repo_expected_identical_refs2] FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo1-parent_overrides1-changelog_versions1-PatchState.UNAPPLIED-expected_refs1] FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo2-parent_overrides2-changelog_versions2-PatchState.UNAPPLIED-expected_refs2] FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo3-parent_overrides3-changelog_versions3-PatchState.UNAPPLIED-expected_refs3] FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo5-parent_overrides5-changelog_versions5-PatchState.APPLIED-expected_refs5] FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo6-parent_overrides6-changelog_versions6-PatchState.APPLIED-expected_refs6] FAILED gitubuntu/importer_test.py::test_get_changelog_parent_commits[input_repo7-parent_overrides7-changelog_versions7-PatchState.APPLIED-expected_refs7] FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo0-published_spec0-True] FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo1-published_spec1-True] FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo2-published_spec2-RichHistoryTreeMismatch] FAILED gitubuntu/importer_test.py::test_validate_rich_history[input_repo3-published_spec3-RichHistoryHasNoChangelogParentAncestor] FAILED gitubuntu/importer_test.py::test_add_changelog_note_to_commit - Attrib... FAILED gitubuntu/importer_test.py::test_add_changelog_note_to_commit_utf8 - A... FAILED gitubuntu/importer_test.py::test_double_changelog_note_add_does_not_fail FAILED gitubuntu/importer_test.py::test_create_import_note - AttributeError: ... FAILED gitubuntu/importer_test.py::test_create_import_note_timestamp - Attrib... FAILED gitubuntu/importer_test.py::test_import_creates_import_note - subproce... FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_quilt_patches - ... FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo0-changelog_versions0-validation_repo_delta0-validation_repo_expected_identical_refs0] FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo1-changelog_versions1-validation_repo_delta1-validation_repo_expected_identical_refs1] FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo2-changelog_versions2-validation_repo_delta2-validation_repo_expected_identical_refs2] FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parenting[input_repo3-changelog_versions3-validation_repo_delta3-validation_repo_expected_identical_refs3] FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parent_override FAILED gitubuntu/importer_test.py::test_import_unapplied_spi_parent_override_failure FAILED gitubuntu/importer_test.py::test_import_applied_spi_parenting[input_repo0-expected_ancestor_commits0-expected_parent_commits0] FAILED gitubuntu/importer_test.py::test_authorship_date[False-Fri, 2 Feb 1971 12:34:56 +0100-expected_result0] FAILED gitubuntu/importer_test.py::test_authorship_date[True-Failday, 30 Feb 1971 99:99:99 +9999-expected_result1] FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_fetch_failure_retry FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_missing_ref FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_missing_commit FAILED gitubuntu/importer_test.py::test_fetch_rich_history_from_changes_file_not_a_commit FAILED gitubuntu/repo_builder_test.py::TestObjectCreation::testRepoBranchesTags FAILED gitubuntu/repo_builder_test.py::TestObjectCreation::testRepoTagger - A... FAILED gitubuntu/repo_builder_test.py::test_source_tree - AttributeError: mod... FAILED gitubuntu/rich_history_test.py::test_preservation - AttributeError: mo... FAILED gitubuntu/rich_history_test.py::test_preservation_multiple_parents - A... FAILED gitubuntu/rich_history_test.py::test_preservation_no_parents - Attribu... FAILED gitubuntu/rich_history_test.py::test_input_edge_cases[before_export0-before_import0] FAILED gitubuntu/rich_history_test.py::test_input_edge_cases[before_export1-before_import1] FAILED gitubuntu/rich_history_test.py::test_input_edge_cases[before_export2-before_import2] FAILED gitubuntu/rich_history_test.py::test_preservation_fast_forwards - Attr... FAILED gitubuntu/source_builder_test.py::test_source_create_with_version - At... FAILED gitubuntu/source_builder_test.py::test_source_create_with_versions - A... FAILED gitubuntu/source_builder_test.py::test_source_native_source_format[True-3.0 (native)\n] FAILED gitubuntu/source_builder_test.py::test_source_native_source_format[False-3.0 (quilt)\n] FAILED gitubuntu/source_builder_test.py::test_source_quilt_no_patches - Attri... FAILED gitubuntu/source_builder_test.py::test_source_quilt_with_patches - Att... FAILED gitubuntu/source_builder_test.py::test_source_quilt_with_patches_applied FAILED gitubuntu/source_builder_test.py::test_source_version_native_default FAILED gitubuntu/source_builder_test.py::test_source_version_non_native_default FAILED gitubuntu/source_builder_test.py::test_source_version_native_specific FAILED gitubuntu/source_builder_test.py::test_source_version_non_native_specific = 104 failed, 296 passed, 4 skipped, 3 xfailed, 1 warning in 71.57s (0:01:11) == E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd /build/reproducible-path/git-ubuntu-1.1/.pybuild/cpython3_3.12/build; python3.12 -m pytest dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.12 returned exit code 13 make: *** [debian/rules:4: binary] Error 25 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 I: copying local configuration E: Failed autobuilding of package I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env I: removing directory /srv/workspace/pbuilder/10398 and its subdirectories