Commit Graph

8 Commits

Author SHA1 Message Date
Lubomír Sedlář 004ef31917 gather: Ignore comps in lookaside repo
This fixes a case where extra packages are pulled in.

The scenario is:

 * there's a lookaside repo which contains group G which has package P
 * we want to pull group G into the compose, but our definition of G
   does not contain P
 * lookaside repo does not contain package P
 * current package set has P

DNF depsolver will then merge the two definitions and try to get all the
packages. For most cases this is not a problem, since the package is in
the lookaside repo and will not be pulled into the compose. But in the
example above since P is not in lookaside, Pungi will put it into
current compose.

This is also ugly in the depsolving log says it includes package P
because it was in input. But checking comps file does not show it.

The result of this change is that some packages might disappear from
current composes. This can only happen if there is a lookaside which
defines groups with similar IDs, which should be very rare. In cases
where this would be a problem the fix is to explicitly add wanted
packages either to comps or to additional packages.

Fixes: https://pagure.io/pungi/issue/978
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2018-06-08 13:32:24 +02:00
Lubomír Sedlář 35e72df99f Explicitly remove all temporary files
There is no guarantee __del__ will ever be called, and we were leaving a
ton of stuff in /tmp. With this patch we pass the temporary directories
explictly and make sure they are deleted at the end.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-03-24 09:24:49 +01:00
Lubomír Sedlář e753891e27 Remove FSF address from copyright headers
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-03-24 09:24:48 +01:00
Lubomír Sedlář 4f4fd845d9 Fix PEP8 complaints
* Remove dead imports
* Remove dead code
* Fix extra empty lines
* Fix formatting
* Break too long lines

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-03-24 09:24:48 +01:00
Lubos Kocman 14784847d4 add dnf_arch wrapper to workaround dnf.arch.basearch -> dnf.rpm.basearch change
Signed-off-by: Lubos Kocman <lkocman@redhat.com>
2017-03-24 09:24:47 +01:00
Daniel Mach 7cb9e9dc20 Add support for mirrorlists in DNF gathering code.
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-03-24 09:12:23 +01:00
Daniel Mach aff6ac906c Enable langpack gathering in DNF gather.
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-03-24 09:12:23 +01:00
Daniel Mach caf11f55d4 New gathering (depsolving) module based on DNF.
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-03-24 08:51:38 +01:00