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

[Git][ftp-team/dak][master] ReleaseWriter: do not follow `updates -> .` symlink for SuiteSuffix deprecation



Title: GitLab

Ansgar pushed to branch master at Debian FTP Team / dak

Commits:

1 changed file:

Changes:

  • dak/generate_releases.py
    ... ... @@ -302,6 +302,7 @@ class ReleaseWriter(object):
    302 302
                         )
    
    303 303
     
    
    304 304
             cnf = Config()
    
    305
    +        cnf_suite_suffix = cnf.get("Dinstall::SuiteSuffix", "")
    
    305 306
     
    
    306 307
             suite_suffix = utils.suite_suffix(suite.suite_name)
    
    307 308
     
    
    ... ... @@ -383,6 +384,18 @@ class ReleaseWriter(object):
    383 384
             uncompnotseen = {}
    
    384 385
     
    
    385 386
             for dirpath, dirnames, filenames in os.walk(".", followlinks=True, topdown=True):
    
    387
    +            # SuiteSuffix deprecation:
    
    388
    +            # components on security-master are updates/{main,contrib,non-free}, but
    
    389
    +            # we want dists/${suite}/main.  Until we can rename the components,
    
    390
    +            # we cheat by having an updates -> . symlink.  This should not be visited.
    
    391
    +            if cnf_suite_suffix:
    
    392
    +                path = os.path.join(dirpath, cnf_suite_suffix)
    
    393
    +                try:
    
    394
    +                    target = os.readlink(path)
    
    395
    +                    if target == ".":
    
    396
    +                        dirnames.remove(cnf_suite_suffix)
    
    397
    +                except OSError, ValueError:
    
    398
    +                    pass
    
    386 399
                 for entry in filenames:
    
    387 400
                     if dirpath == '.' and entry in ["Release", "Release.gpg", "InRelease"]:
    
    388 401
                         continue
    


  • Reply to: