Bug 696485 - Review Request: django-countries - Provides a country field for Django models
Review Request: django-countries - Provides a country field for Django models
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Arun S A G
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-14 02:50 EDT by Rahul Sundaram
Modified: 2011-07-12 08:41 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-10 20:14:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
sagarun: fedora‑review+
limburgher: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description Rahul Sundaram 2011-04-14 02:50:33 EDT
Spec URL: http://sundaram.fedorapeople.org/packages/django-countries.spec
SRPM URL: http://sundaram.fedorapeople.org/packages/django-countries-1.0.5-1.fc15.src.rpm
Description: 
Django application which provides country choices for use with forms, and a 
country field for models.
Comment 1 Arun S A G 2011-05-08 08:49:48 EDT
Hi Rahul,

Every thing seems fine except the rpmlint on the binary rpm

[zer0c00l@gnubox SPECS]$ rpmlint ~/rpmbuild/RPMS/noarch/django-countries-1.0.5-1.fc14.noarch.rpm 
django-countries.noarch: E: zero-length /usr/lib/python2.7/site-packages/django_countries/models.py
1 packages and 0 specfiles checked; 1 errors, 0 warnings.


It is completely OK to have an empty models.py in a django app, On the other hand i tried removing this models.py and reinstalled this app, the test application worked fine without any issues.


Please remove the empty files by using

'find $RPM_BUILD_ROOT -size 0 -delete' at the end of install section
Comment 2 Rahul Sundaram 2011-05-08 11:40:51 EDT
I am not sure deleting this file isn't affecting the functionality somehow but for now let's go ahead with this.  Doing what you suggest would screw around with the byte code files.  I have done it differently with the same end result

http://sundaram.fedorapeople.org/packages/django-countries.spec
http://sundaram.fedorapeople.org/packages/django-countries-1.0.5-2.fc15.src.rpm
Comment 3 Arun S A G 2011-05-08 13:18:21 EDT
Rahul,

I got that trick from http://fedoraproject.org/wiki/PackageMaintainers/Packaging_Tricks#Zero_length_files

You are correct __init__ files in python packages can be empty, if we remove those files that will screw up the package.

On the other hand, If the upstream chooses to have some code inside models.py in future (unlikely), you _might_ accidentally end up deleting it :-) 


complete review:

+ = OK
- = NA
? = issue


+ Package meets naming and packaging guidelines
+ Spec file matches base package name.
+ Spec has consistant macro usage.
+ Meets Packaging Guidelines.
+ License
+ License field in spec matches
+ License file included in package
+ Spec in American English
+ Spec is legible.

+ Sources match upstream md5sum
b3c0ac13c382ac41bff786231dc20e79  /home/zer0c00l/rpmbuild/SOURCES/django-countries-1.0.5.tar.gz


- Package needs ExcludeArch
+ BuildRequires correct
- Spec handles locales/find_lang
- Package is relocatable and has a reason to be.
+ Package has %defattr and permissions on files is good.
+ Package is code or permissible content.
- Doc subpackage needed/used.
+ Packages %doc files don't affect runtime.

- Headers/static libs in -devel subpackage.
- Spec has needed ldconfig in post and postun
- .pc files in -devel subpackage/requires pkgconfig
- .so files in -devel subpackage.
- -devel package Requires: %{name} = %{version}-%{release}
- .la files are removed.


+ Package compiles and builds on at least one arch.
http://koji.fedoraproject.org/koji/taskinfo?taskID=3058140

+ Package has no duplicate files in %files.
+ Package doesn't own any directories other packages own.
+ Package owns all the directories it creates.
+ No rpmlint output.

- final provides and requires are sane:
(include output of for i in *rpm; do echo $i; rpm -qp --provides $i; echo =;
rpm -qp --requires $i; echo; done
manually indented after checking each line.  I also remove the rpmlib junk and
anything provided by glibc.)

SHOULD Items:

+ Should build in mock.
+ Should build on all supported archs
+ Should function as described.
+ Should have sane scriptlets.
- Should have subpackages require base package with fully versioned depend.
+ Should have dist tag
+ Should package latest version
- check for outstanding bugs on package. (For core merge reviews)


Package tested and working fine with Django-1.2.5
===================================================
In [2]: from users import models

In [3]from users.models import Person

In [4]:person = Person(name='Arun',country='IN')

In [5]: person.country
Out[5]: Country(code=u'IN')

In [6]: person.country.flag
Out[6]: u'/flags/in.gif'

=====================================================


XXXXXXXXXX APPROVED XXXXXXXXXXXXXXXXXXX
Comment 4 Rahul Sundaram 2011-05-09 05:33:23 EDT
New Package SCM Request
=======================
Package Name: django-countries
Short Description: Provides a country field for Django models
Owners: sundaram
Branches: f15
InitialCC:
Comment 5 Jason Tibbitts 2011-05-10 11:29:28 EDT
Git done (by process-git-requests).
Comment 6 Rahul Sundaram 2011-05-10 20:14:41 EDT
Thanks for the review,  Arun.
Comment 7 Rahul Sundaram 2011-07-12 01:27:22 EDT
Package Change Request
======================
Package Name: django-countries
New Branches: el6
Owners: sundaram pjp
InitialCC:
Comment 8 Jon Ciesla 2011-07-12 08:41:04 EDT
Git done (by process-git-requests).

Note You need to log in before you can comment on or make changes to this bug.