From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:6f8:1178:2:5054:ff:fec0:8e10] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1XCn8c-0005tF-Ip for ptxdist@pengutronix.de; Thu, 31 Jul 2014 11:59:06 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1XCn8c-0001Ra-HH for ptxdist@pengutronix.de; Thu, 31 Jul 2014 11:59:06 +0200 Date: Thu, 31 Jul 2014 11:59:06 +0200 From: Michael Olbrich Message-ID: <20140731095906.GE29377@pengutronix.de> References: <1406743955-30185-1-git-send-email-u.kleine-koenig@pengutronix.de> <20140731081414.GB29377@pengutronix.de> <20140731084409.GU6146@pengutronix.de> <20140731090832.GD29377@pengutronix.de> <20140731091702.GV6146@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140731091702.GV6146@pengutronix.de> Subject: Re: [ptxdist] [PATCH] django: new package to provide Django 1.6.5 Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Thu, Jul 31, 2014 at 11:17:02AM +0200, Uwe Kleine-K=F6nig wrote: > On Thu, Jul 31, 2014 at 11:08:32AM +0200, Michael Olbrich wrote: > > On Thu, Jul 31, 2014 at 10:44:09AM +0200, Uwe Kleine-K=F6nig wrote: > > > On Thu, Jul 31, 2014 at 10:14:14AM +0200, Michael Olbrich wrote: > > > > On Wed, Jul 30, 2014 at 08:12:35PM +0200, Uwe Kleine-K=F6nig wrote: > > > > > + # everything but locales > > > > > + find "$(DJANGO_PKGDIR)" -type d -name locale -prune -o -type f = -printf '/%P\n' | while read fn; do \ > > > > > + $(call install_copy, django, 0, 0, 0644, -, $$fn); \ > > > > > + done > > > > = > > > > I dislike just dumping everything in the package, e.g. the egg-info= is not > > > > needed. Install /usr/bin/django-admin.py explicitly and then use: > > > > = > > > > @cd /usr/lib/python$(PYTHON_MAJORMINOR)/site-packages/django/ && f= ind ... > > > > = > > > > This way it breaks in case something went wrong and the directory is > > > > missing. > > > I didn't do that because your approach also breaks when the path for > > > such packages changes. AFAIK this is the case for Python 3. > > > But I don't care much and can use your approach. > > > = > > > > > + # locales > > > > > + find "$(DJANGO_PKGDIR)" -type d -name locale -printf '/%P\n' | = while read localedir; do \ > > > > > + for locale in $(DJANGO_LOCALES-y); do \ > > > > > + find "$(DJANGO_PKGDIR)$$localedir/$$locale" -type f -printf "= $$localedir/$$locale/%P\n" | while read fn; do \ > > > > = > > > > Same here with 'cd' and I think the django.po files are not needed,= just > > > > the Python stuff and the compiled django.mo > > > = > > > .../Django-1.6.5$ find django -type d -name locale | wc -l > > > 14 > > > = > > > should I really list all these explicitly? > > = > > What I meant is: > > = > > cd "$(DJANGO_PKGDIR)" && find ... > > for locale in $(DJANGO_LOCALES-y); do > > cd "$(DJANGO_PKGDIR)$$localedir/$$locale" && find ... > So you consider it an error if I want locale "sv" and this only exists > for django, but there is a contrib module that lacks "sv" l10n? Yes, it's an error on django... :-) All jokes aside, if we don't do it like this, then a typo or some change in a new version can mean that nothing is installed. We've had that in the past with other packages. That's why I hate installing with find. Are any important locales affected? I'd say, be strict for now, and when it becomes relevant, we can introduce an option for 'incomplete' locales. Michael -- = Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- = ptxdist mailing list ptxdist@pengutronix.de