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

Re: How would you use britney for Kali and are generalization patches welcome?



On Mon, 21 Jul 2014, Niels Thykier wrote:
> > Was that due to lack of time or just that you have no idea what would be
> > better names?
> 
> Partly because your use of "etc." suggested it was not a full list, so I
> wanted the full list.  But also because I feel there is more this than
> "just" changing the names.  In their current form, their names gives
> them a well-defined meaning (at least, to Debian).
> 

Certainly I have not put much thought into this suggestion, and it was
not meant as a very concrete suggestion yet. I just wanted to have a
feeling of whether you'd be open to that kind of change.

>  * Are two "updates" suites sufficient?
>    - Currently you don't seem to need more than two, but if we are
>      generalising the terms, then this might be the time to generalise
>      the concept of an "updates"-suite as well.
>  * What are the names of the "updates" suites?
>    - It will be a tough sell if they "just" become "updates1" and
>      "updates2" (from "tpu" and "pu").

The concept of updates suite might as well disappear if we support
multiple "source" repositories with specific rules for each. (Or at least
the naming problem is moved somewhere else: how to properly
distinguish each source repository, most likely with a user-supplied
name)

> > FWIW, while I was doing some tries I produced the attached patch to
> > implement a --skip-auto-hinter option (and another one for whitespace
> > cleanups done automatically by vim's python-mode plugin
> > https://github.com/klen/python-mode).
> 
> Missing attachment(s). :)

Gah. Here they are.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Discover the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/
>From 495de0d7c1213a7465e1f0d7cbd73375aa16ba27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= <hertzog@debian.org>
Date: Fri, 18 Jul 2014 11:28:46 +0200
Subject: [PATCH 1/3] Add --skip-auto-hinter option

---
 britney.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/britney.py b/britney.py
index d0fcdd0..7680d36 100755
--- a/britney.py
+++ b/britney.py
@@ -361,6 +361,9 @@ class Britney(object):
                                help="do not build the non-installability status, use the cache from file")
         parser.add_option("", "--print-uninst", action="store_true", dest="print_uninst", default=False,
                                help="just print a summary of uninstallable packages")
+        parser.add_option("", "--skip-auto-hinter", action="store_true",
+                          dest="skip_auto_hinter", default=False,
+                          help="do not run the auto hinter")
         (self.options, self.args) = parser.parse_args()
         
         # integrity checks
@@ -2376,7 +2379,8 @@ class Britney(object):
                 hintcnt += 1
 
         # run the auto hinter
-        self.auto_hinter()
+        if not self.options.skip_auto_hinter:
+            self.auto_hinter()
 
         # obsolete source packages
         # a package is obsolete if none of the binary packages in testing
-- 
2.0.1

>From 6ff682de5951c250478ff1cfe14a0dd4704f28f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= <hertzog@debian.org>
Date: Fri, 18 Jul 2014 11:33:13 +0200
Subject: [PATCH 2/3] Whitespace cleanups done automatically by vim's
 python-mode

---
 britney.py | 68 +++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 34 insertions(+), 34 deletions(-)

diff --git a/britney.py b/britney.py
index 7680d36..051208d 100755
--- a/britney.py
+++ b/britney.py
@@ -28,7 +28,7 @@ to always be fully installable and close to being a release candidate.
 
 Britney's source code is split between two different but related tasks:
 the first one is the generation of the update excuses, while the
-second tries to update testing with the valid candidates; first 
+second tries to update testing with the valid candidates; first
 each package alone, then larger and even larger sets of packages
 together. Each try is accepted if testing is not more uninstallable
 after the update than before.
@@ -53,7 +53,7 @@ Other than source and binary packages, Britney loads the following data:
   * BugsV, which contains the list of release-critical bugs for a given
     version of a source or binary package (see Britney.read_bugs).
 
-  * Dates, which contains the date of the upload of a given version 
+  * Dates, which contains the date of the upload of a given version
     of a source package (see Britney.read_dates).
 
   * Urgencies, which contains the urgency of the upload of a given
@@ -69,9 +69,9 @@ instead explained in the chapter "Excuses Generation".
 = Excuses =
 
 An excuse is a detailed explanation of why a package can or cannot
-be updated in the testing distribution from a newer package in 
+be updated in the testing distribution from a newer package in
 another distribution (like for example unstable). The main purpose
-of the excuses is to be written in an HTML file which will be 
+of the excuses is to be written in an HTML file which will be
 published over HTTP. The maintainers will be able to parse it manually
 or automatically to find the explanation of why their packages have
 been updated or not.
@@ -227,9 +227,9 @@ __version__ = '2.0'
 
 class Britney(object):
     """Britney, the Debian testing updater script
-    
+
     This is the script that updates the testing distribution. It is executed
-    each day after the installation of the updated packages. It generates the 
+    each day after the installation of the updated packages. It generates the
     `Packages' files for the testing distribution, but it does so in an
     intelligent manner; it tries to avoid any inconsistency and to use only
     non-buggy packages.
@@ -365,7 +365,7 @@ class Britney(object):
                           dest="skip_auto_hinter", default=False,
                           help="do not run the auto hinter")
         (self.options, self.args) = parser.parse_args()
-        
+
         # integrity checks
         if self.options.nuninst_cache and self.options.print_uninst:
             self.__log("nuninst_cache and print_uninst are mutually exclusive!", type="E")
@@ -404,7 +404,7 @@ class Britney(object):
 
     def __log(self, msg, type="I"):
         """Print info messages according to verbosity level
-        
+
         An easy-and-simple log method which prints messages to the standard
         output. The type parameter controls the urgency of the message, and
         can be equal to `I' for `Information', `W' for `Warning' and `E' for
@@ -473,7 +473,7 @@ class Britney(object):
 
     def read_sources(self, basedir, intern=intern):
         """Read the list of source packages from the specified directory
-        
+
         The source packages are read from the `Sources' file within the
         directory specified as `basedir' parameter. Considering the
         large amount of memory needed, not all the fields are loaded
@@ -512,14 +512,14 @@ class Britney(object):
 
     def read_binaries(self, basedir, distribution, arch, intern=intern):
         """Read the list of binary packages from the specified directory
-        
+
         The binary packages are read from the `Packages_${arch}' files
         within the directory specified as `basedir' parameter, replacing
         ${arch} with the value of the arch parameter. Considering the
         large amount of memory needed, not all the fields are loaded
         in memory. The available fields are Version, Source, Multi-Arch,
         Depends, Conflicts, Provides and Architecture.
-        
+
         After reading the packages, reverse dependencies are computed
         and saved in the `rdepends' keys, and the `Provides' field is
         used to populate the virtual packages list.
@@ -634,10 +634,10 @@ class Britney(object):
         # return a tuple with the list of real and virtual packages
         return (packages, provides)
 
-     
+
     def read_bugs(self, basedir):
         """Read the release critial bug summary from the specified directory
-        
+
         The RC bug summaries are read from the `BugsV' file within the
         directory specified in the `basedir' parameter. The file contains
         rows with the format:
@@ -662,7 +662,7 @@ class Britney(object):
 
     def __maxver(self, pkg, dist):
         """Return the maximum version for a given package name
-        
+
         This method returns None if the specified source package
         is not available in the `dist' distribution. If the package
         exists, then it returns the maximum version between the
@@ -680,7 +680,7 @@ class Britney(object):
 
     def normalize_bugs(self):
         """Normalize the release critical bug summaries for testing and unstable
-        
+
         The method doesn't return any value: it directly modifies the
         object attribute `bugs'.
         """
@@ -706,7 +706,7 @@ class Britney(object):
 
     def read_dates(self, basedir):
         """Read the upload date for the packages from the specified directory
-        
+
         The upload dates are read from the `Dates' file within the directory
         specified as `basedir' parameter. The file contains rows with the
         format:
@@ -746,7 +746,7 @@ class Britney(object):
 
     def read_urgencies(self, basedir):
         """Read the upload urgency of the packages from the specified directory
-        
+
         The upload urgencies are read from the `Urgency' file within the
         directory specified as `basedir' parameter. The file contains rows
         with the format:
@@ -791,12 +791,12 @@ class Britney(object):
 
     def read_hints(self, basedir):
         """Read the hint commands from the specified directory
-        
+
         The hint commands are read from the files contained in the `Hints'
-        directory within the directory specified as `basedir' parameter. 
+        directory within the directory specified as `basedir' parameter.
         The names of the files have to be the same as the authorized users
         for the hints.
-        
+
         The file contains rows with the format:
 
         <command> <package-name>[/<version>]
@@ -979,7 +979,7 @@ class Britney(object):
 
     def should_remove_source(self, pkg):
         """Check if a source package should be removed from testing
-        
+
         This method checks if a source package should be removed from the
         testing distribution; this happens if the source package is not
         present in the unstable distribution anymore.
@@ -1019,7 +1019,7 @@ class Britney(object):
         This method checks if the binary packages produced by the source
         package on the given architecture should be upgraded; this can
         happen also if the migration is a binary-NMU for the given arch.
-       
+
         It returns False if the given packages don't need to be upgraded,
         True otherwise. In the former case, a new excuse is appended to
         the object attribute excuses.
@@ -1036,7 +1036,7 @@ class Britney(object):
         excuse.set_vers(source_t[VERSION], source_t[VERSION])
         source_u[MAINTAINER] and excuse.set_maint(source_u[MAINTAINER].strip())
         source_u[SECTION] and excuse.set_section(source_u[SECTION].strip())
-        
+
         # if there is a `remove' hint and the requested version is the same as the
         # version in testing, then stop here and return False
         # (as a side effect, a removal may generate such excuses for both the source
@@ -1160,9 +1160,9 @@ class Britney(object):
         """Check if source package should be upgraded
 
         This method checks if a source package should be upgraded. The analysis
-        is performed for the source package specified by the `src' parameter, 
+        is performed for the source package specified by the `src' parameter,
         for the distribution `suite'.
-       
+
         It returns False if the given package doesn't need to be upgraded,
         True otherwise. In the former case, a new excuse is appended to
         the object attribute excuses.
@@ -1189,7 +1189,7 @@ class Britney(object):
 
         # the starting point is that we will update the candidate
         update_candidate = True
-        
+
         # if the version in unstable is older, then stop here with a warning in the excuse and return False
         if source_t and apt_pkg.version_compare(source_u[VERSION], source_t[VERSION]) < 0:
             excuse.addhtml("ALERT: %s is newer in testing (%s %s)" % (src, source_t[VERSION], source_u[VERSION]))
@@ -1295,13 +1295,13 @@ class Britney(object):
             for arch in self.options.architectures:
                 if src not in self.sources["testing"]:
                     continue
-                    
+
                 # if the package in testing has no binaries on this
                 # architecture, it can't be out-of-date
                 if not any(x for x in self.sources["testing"][src][BINARIES]
                            if x.endswith("/"+arch) and self.binaries["testing"][arch][0][x.split("/")[0]][ARCHITECTURE] != 'all'):
                     continue
-                    
+
                 # if the (t-)p-u package has produced any binaries on
                 # this architecture then we assume it's ok. this allows for
                 # uploads to (t-)p-u which intentionally drop binary
@@ -1399,7 +1399,7 @@ class Britney(object):
                         bugs_t.extend(self.bugs['testing'][spkg])
                     if spkg in self.bugs['unstable']:
                         bugs_u.extend(self.bugs['unstable'][spkg])
- 
+
                 new_bugs = sorted(set(bugs_u).difference(bugs_t))
                 old_bugs = sorted(set(bugs_t).difference(bugs_u))
 
@@ -1497,7 +1497,7 @@ class Britney(object):
                     exclookup[x].addreason("depends")
                     exclookup[x].is_valid = False
             i = i + 1
- 
+
     def write_excuses(self, same_source=same_source):
         """Produce and write the update excuses
 
@@ -2259,7 +2259,7 @@ class Britney(object):
                     return None
                 selected.append(x)
                 upgrade_me.remove(x)
-        
+
         self.output_write("start: %s\n" % self.eval_nuninst(nuninst_start))
         if not force:
             self.output_write("orig: %s\n" % self.eval_nuninst(nuninst_start))
@@ -2400,7 +2400,7 @@ class Britney(object):
         if len(removals) > 0:
             self.output_write("Removing obsolete source packages from testing (%d):\n" % (len(removals)))
             self.do_all(actions=removals)
-                                                                                                                                     
+
         # smooth updates
         if self.options.smooth_updates:
             self.__log("> Removing old packages left in testing from smooth updates", type="I")
@@ -2594,7 +2594,7 @@ class Britney(object):
     def auto_hinter(self):
         """Auto-generate "easy" hints.
 
-        This method attempts to generate "easy" hints for sets of packages which    
+        This method attempts to generate "easy" hints for sets of packages which
         must migrate together. Beginning with a package which does not depend on
         any other package (in terms of excuses), a list of dependencies and
         reverse dependencies is recursively created.
@@ -2716,7 +2716,7 @@ class Britney(object):
 
     def main(self):
         """Main method
-        
+
         This is the entry point for the class: it includes the list of calls
         for the member methods which will produce the output files.
         """
-- 
2.0.1


Reply to: