reproducer is basically test_errata.py - TestErrata.test_repo_erratum (just comment lines that remove errata from repo) No updateinfo.xml is ever created. Running $ pulp-admin repo metadata --id=... doesn't help.
What build are you using? I just tested it on master and it works as expected, $ sudo pulp-admin repo add_errata --id=testerrata -e RHEA-2010:9999 No dependencies to process.. Successfully added Errata ['RHEA-2010:9999'] to repo [testerrata]. This call is directly calling the repoapi.add_errata $ ls -l /var/lib/pulp/repos/testerrata/repodata/ total 32 -rw-r--r--. 1 apache apache 421 Apr 29 09:44 3510dbe512f9622ebb2457be15672abe979dd875b63889abb82ef6aeffbc4568-updateinfo.xml.gz -rw-r--r--. 1 apache apache 591 Apr 29 09:17 filelists.sqlite.bz2 -rw-r--r--. 1 apache apache 180 Apr 29 09:17 filelists.xml.gz -rw-r--r--. 1 apache apache 565 Apr 29 09:17 other.sqlite.bz2 -rw-r--r--. 1 apache apache 176 Apr 29 09:17 other.xml.gz -rw-r--r--. 1 apache apache 1140 Apr 29 09:17 primary.sqlite.bz2 -rw-r--r--. 1 apache apache 189 Apr 29 09:17 primary.xml.gz -rw-r--r--. 1 apache apache 3078 Apr 29 09:44 repomd.xml if you're directly using the api, Use repoapi.add_errata this should do look up packages in the errata add em to the repo, and generate updateinfo.xml def add_errata(self, repoid, errataids=()): """ Adds a list of errata to this repo """ repo = self._get_existing_repo(repoid) for erratumid in errataids: self._add_erratum(repo, erratumid) self.collection.save(repo, safe=True) self._update_errata_packages(repoid, errataids, action='add') updateinfo.generate_updateinfo(repo) But in either case updateinfo.xml is definitely created.
build: pulp-0.0.172-1 Maybe the problem is that I didn't specify any packages in the erratum. This use case has to be supported too (sometimes we deliver text-only errata). CLI ends here when adding text-only erratum to a repo: if not effected_pkgs: system_exit(os.EX_DATAERR) I'll provide more details on Monday (will use erratum with files this time).
Created attachment 496279 [details] reproducer can you run attached script and run $ find /tmp/pulp/repos ?
Text-only errata are skipped due to following code. file: src/pulp/server/updateinfo.py function: generate_updateinfo() code: if not e['pkglist']: # for unit tests continue
fixed! eec3319fb6c3d54851c2955b7881fb67211ac05b Reproducer script: $ sudo python test.py [u'test_errata_id_1', u'test_errata_id_2'] . ---------------------------------------------------------------------- Ran 1 test in 1.447s OK [unit{master}]$ ls -l /tmp/pulp/repos/some-id/ total 8 drwxr-xr-x. 2 root root 4096 May 3 14:18 repodata -rw-r--r--. 1 root root 520 May 3 14:18 updateinfo.xml [pkilambi@prad unit{master}]$ ls -l /tmp/pulp/repos/some-id/repodata/ total 32 -rw-r--r--. 1 root root 219 May 3 14:18 1b37295449988d5b8b8efaa1c437ba2f2779b85500d6de5e2764000f1043c010-updateinfo.xml.gz -rw-r--r--. 1 root root 589 May 3 14:18 filelists.sqlite.bz2 -rw-r--r--. 1 root root 172 May 3 14:18 filelists.xml.gz -rw-r--r--. 1 root root 567 May 3 14:18 other.sqlite.bz2 -rw-r--r--. 1 root root 168 May 3 14:18 other.xml.gz -rw-r--r--. 1 root root 1156 May 3 14:18 primary.sqlite.bz2 -rw-r--r--. 1 root root 181 May 3 14:18 primary.xml.gz -rw-r--r--. 1 root root 3079 May 3 14:18 repomd.xml
build: 0.173
verified with the script above [root@preethi unit]# rpm -q pulp pulp-0.0.173-1.fc14.noarch [root@preethi unit]# python test.py [u'test_errata_id_1', u'test_errata_id_2'] . ---------------------------------------------------------------------- Ran 1 test in 1.299s OK [root@preethi unit]# ls -l /tmp/pulp/repos/some-id/ repodata/ updateinfo.xml [root@preethi unit]# ls -l /tmp/pulp/repos/some-id/ total 8 drwxr-xr-x. 2 root root 4096 May 5 09:08 repodata -rw-r--r--. 1 root root 520 May 5 09:08 updateinfo.xml [root@preethi unit]# ls -l /tmp/pulp/repos/some-id/repodata/ total 32 -rw-r--r--. 1 root root 219 May 5 09:08 1b37295449988d5b8b8efaa1c437ba2f2779b85500d6de5e2764000f1043c010-updateinfo.xml.gz -rw-r--r--. 1 root root 581 May 5 09:08 filelists.sqlite.bz2 -rw-r--r--. 1 root root 172 May 5 09:08 filelists.xml.gz -rw-r--r--. 1 root root 570 May 5 09:08 other.sqlite.bz2 -rw-r--r--. 1 root root 168 May 5 09:08 other.xml.gz -rw-r--r--. 1 root root 1236 May 5 09:08 primary.sqlite.bz2 -rw-r--r--. 1 root root 181 May 5 09:08 primary.xml.gz -rw-r--r--. 1 root root 3076 May 5 09:08 repomd.xml [root@preethi unit]#
Closing with Community Release 15 pulp-0.0.223-4.