[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

propogate-fixes



Hi,

AFAICS, there are three issues with the propogate-checks:

1. if the security-upload is overtaken by a normal one, that could lead
   to UNACCEPTs
2. if only some architectures are not built in unstable, that leads to
   REJECTs due to missing sources in unstable for the propogated
   architectures
3. if the package is removed from the overrides, the updates go to NEW.

For 1., the idea is to basically ignore the propogated distribution for
the security-upload, as the propogate isn't necessary anymore.

For 2., there are basically two ways: either the package can still be
propogated. Then of course, still the binary in unstable doesn't match
the source therein (but the source is in proposed-updates at least), but
- that's not worse than before. And it is at least security fixed. The
other way is to not propogate it, but - then the binary still doesn't
match the source in unstable (and perhaps even not somewhere else).
Also, the stil propogate-thing is cleaner to write :)

For 3., if the package is no longer in the overrides, it basically just
shouldn't be propogated.


The basic implementing idea on that is that adding the propogated
distributions in jennifer is wrong - it's enough if jennifer just makes
sure that the final decision is yes. On the other hand, if kelly does
the propogation, there is no chance of an UNACCEPT later on - as kelly
will just write the decision directly to the database.


Following these thoughts, I created a preliminary patch.  I also did an
test in the situation of 1.  Further talks and thoughts are definitly
necessary, but I'll still send the mail to (hopefully) get some further
input.


--- /usr/lib/python2.3/site-packages/katie.py~	2005-09-10 23:10:38.952168648 +0200
+++ /usr/lib/python2.3/site-packages/katie.py	2005-09-10 23:08:19.571357752 +0200
@@ -813,7 +813,8 @@
                             #
                             # And - we really should complain to the dorks who configured dak
                             self.reject("%s is mapped to, but not enhanced by %s - adding anyways" % (suite, addsuite), "Warning: ")
-                            self.pkg.changes["distribution"][addsuite] = 1
+                            self.pkg.changes.setdefault("propdistribution", {})
+                            self.pkg.changes["propdistribution"][addsuite] = 1
                             cansave = 1
                         elif not target_version:
                             # not targets_version is true when the package is NEW
@@ -827,8 +828,9 @@
                         elif apt_pkg.VersionCompare(new_version, add_version) > 0 and \
                              apt_pkg.VersionCompare(add_version, target_version) == 0:
                             # propogate!!
                             self.reject("Propogating upload to %s" % (addsuite), "Warning: ")
-                            self.pkg.changes["distribution"][addsuite] = 1
+                            self.pkg.changes.setdefault("propdistribution", {})
+                            self.pkg.changes["propdistribution"][addsuite] = 1
                             cansave = 1
                 
                     if not cansave:

This means: we just mark to which suites the package should go to, and
kelly can pick it up (instead of auto-adding it during jennifer).

--- /usr/bin/kelly~	2005-09-10 19:37:45.676001000 +0200
+++ /usr/bin/kelly	2005-09-10 20:43:38.961011112 +0200
@@ -129,8 +129,13 @@
                 (reject_msg, is_in_incoming) = Katie.check_dsc_against_db(file);
                 reject(reject_msg, "");
 
+        # propogate in the case it is in the override tables:
+        if changes.has_key("propdistribution"):
+            for suite in changes["propdistribution"].keys():
+                if not Katie.in_override_p(files[file]["package"], files[file]["component"], suite, files[file].get("dbtype",""), file): continue
+                changes["distribution"][suite] = 1
         # Check the package is still in the override tables
         for suite in changes["distribution"].keys():
             if not Katie.in_override_p(files[file]["package"], files[file]["component"], suite, files[file].get("dbtype",""), file):
                 reject("%s is NEW for %s." % (file, suite));

And now, kelly needs to pick up the suites to add.

The case 1. (newer version overtakes between jennifer and kelly) won't
even be noticed anymore, as kelly is doing the stuff in one rush, and if
the result of kelly is ok according to the rules, it's commited.

The case 2. (out-of-date archs in unstable) the binary package is just
accepted on the appropriate arches in unstable. There will be an
appropriate source package in the distribution, as that's checked for
the non-propogated arch. I will have to reconsider (and test) how that
works if the out-of-date arch is just the one the source package is
uploaded with.

In the case 3. (override changed) the continue will prevent propogation.


I'll welcome any feedback on these patches (and also which non-obvious
test cases I should run :).


Cheers,
Andi



Reply to: