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

Bug#699268: UDD: should learn about Extra-Source-Only: yes and ignore those packages in rmadison



Control: tags -1 +patch

Hi!

The attached patch skips entries in Sources that have the Extra-Source-Only 
field in them. It's not explicitly checking for "yes" in that field... Is dak 
going to start generating "Extra-Source-Only: no"? I suspect it's safe to 
ignore that.

Comments welcome -- other UDD people: feel free to merge the patch and update 
udd.d.o if you've got time as I am unlikely to have time to do either in the 
next few weeks.

cheers
Stuart

-- 
Stuart Prescott    http://www.nanonanonano.net/   stuart@nanonanonano.net
Debian Developer   http://www.debian.org/         stuart@debian.org
GPG fingerprint    BE65 FD1E F4EA 08F3 23D4 3C6D 9FE8 B8CD 71C5 D1A8
GPG fingerprint    90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
commit 8f2dff877fc325310de8e237d683c49b742c0658
Author: Stuart Prescott <stuart@debian.org>
Date:   Mon Feb 11 21:16:41 2013 +0000

    Don't import sources with Extra-Source-Only
    
    Skip importing source packages from Sources that have Extra-Source-Only; they
    are there only for mirroring purposes and shouldn't be visible to UDD or to
    rmadison (Closes: #699268).

diff --git a/udd/sources_gatherer.py b/udd/sources_gatherer.py
index 477baee..489b19a 100644
--- a/udd/sources_gatherer.py
+++ b/udd/sources_gatherer.py
@@ -25,7 +25,8 @@ class sources_gatherer(gatherer):
       'Standards-Version': 0, 'Homepage': 0, 'Build-Depends': 0,
       'Build-Depends-Indep': 0, 'Build-Conflicts': 0, 'Build-Conflicts-Indep': 0,
       'Priority': 0, 'Section': 0, 'Python-Version': 0, 'Ruby-Versions': 0, 'Checksums-Sha1':0,
-      'Checksums-Sha256':0, 'Original-Maintainer':0, 'Dm-Upload-Allowed':0} 
+      'Checksums-Sha256':0, 'Original-Maintainer':0, 'Dm-Upload-Allowed':0,
+      'Extra-Source-Only':0}
   ignorable = {'Vcs-Arch': 0, 'Vcs-Bzr': 0,
       'Vcs-Cvs': 0, 'Vcs-Darcs': 0, 'Vcs-Git': 0, 'Vcs-Hg': 0, 'Vcs-Svn': 0,
       'Vcs-Mtn':0,
@@ -110,6 +111,11 @@ class sources_gatherer(gatherer):
     uploaders = []
     for control in debian.deb822.Packages.iter_paragraphs(file):
       d = self.build_dict(control)
+
+      # Don't import packages marked as 'Extra-Source-Only' as per #699268
+      if d['Extra-Source-Only']:
+          continue
+
       d['maintainer_name'], d['maintainer_email'] = email.Utils.parseaddr(d['Maintainer'])
       pkgs.append(d)
 

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: