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

Re: [GsoC] your latest commit of tasks_udd.py



Hi,

On Thu, Aug 6, 2015 at 12:14 PM, Andreas Tille <andreas@an3as.eu> wrote:
>
> Hi Akshita,
>
> On Thu, Aug 06, 2015 at 03:19:44AM +0530, Akshita Jha wrote:
> > > >
> > > > I admit I'm not very proud upon this since it looks a bit mixed but for
> > > > the sake of comparison it makes sense if you may be also simply use the
> > > > original query (or at least the ordering.
> > >
> > > Ok. So, initially I was using the already prepared queries - qurey_pkgs,
> > > query_new and now query_vcs as it is (without changing anything). Still
> > > there was a difference in Version and Archs of the tasks files that were
> > > generated from tasks_udd.py and tasks.py files. I'll recheck if I've missed
> > > something and let you know/
> >
> > The order of releases in versions and archs for debian-med tasks file: 1)
> > deployed [0], 2) created from tasks.py (in my system) and 3) created from
> > tasks_udd.py (ordering by 'sort') - all seem to be different.
> >
> > Eg: task : bio in debian-med
> >
> > package :Abacas
> > --------------------------
> >
> > 1) For deployed debian-med tasks html page [0]:
> >
> > wheezy
> > jessie
> > stretch
> > sid
> >
> > 2) For debian-med tasks file created from tasks.py:
> >
> > Release    Version    Architectures
> > wheezy    1.3.1-1    all
> > sid    1.3.1-2    all
> > stretch    1.3.1-2    all
> > jessie    1.3.1-2    all
>
> That's definitely *wrong* (and I wonder why it is different from the
> deployed page.
>

Can you please confirm whether releases in the tasks files created from tasks.py in your local machine have the same order as the deployed page ?

> > Package: bwa
> > ---------------------
> >
> > 1) For deployed debian-med tasks html page:
> >
> > Release    Version    Architectures
> > squeeze    0.5.8c-1
> > amd64,armel,i386,ia64,kfreebsd-amd64,kfreebsd-i386,mips,mipsel,powerpc,s390,sparc
> > wheezy    0.6.2-1
> > amd64,armel,armhf,i386,ia64,kfreebsd-amd64,kfreebsd-i386,mips,mipsel,powerpc,s390,s390x,sparc
> > sid    0.6.2-1    hurd-i386
> > jessie    0.7.10-1    amd64
> > stretch    0.7.12-4    amd64
> > sid    0.7.12-4    amd64,kfreebsd-amd64
>
> Thats an artefact from a remaining hurd-i386 build.
> However, it shows that my initial orderin is
>
>    ORDER BY version, release
>

Yes. I guess this ordering is due to the code snippet :

           SELECT package, ptmp.release as release, strip_binary_upload(version) AS version, archs, component FROM
              ( SELECT package, release, version, array_to_string(array_sort(array_accum(architecture)),',') AS archs, component
                  FROM (
                    SELECT package,
                           release || CASE WHEN char_length(substring(distribution from '-.*')) > 0
                                        THEN substring(distribution from '-.*')
                                        ELSE '' END AS release,
                            -- make *-volatile a "pseudo-release"
                            strip_binary_upload(regexp_replace(version, '^[0-9]:', '')) AS version,
                            architecture,
                            component
                      FROM packages
	             WHERE package = ANY ($1)
                   ) AS prvac
		   GROUP BY package, version, release, component
              ) ptmp
	      JOIN releases ON releases.release = ptmp.release
              ORDER BY version, releases.sort
	    ) tmp GROUP BY package
in blends_query_packages() [1]. There seems to be no other prepared query where such an ordering or grouping is done.

> > 2) For debian-med tasks file created from tasks.py:
> >
> > Release    Version    Architectures
> > sid    0.7.12-4    amd64,kfreebsd-amd64
> > sid    0.6.2-1    hurd-i386
> > wheezy    0.6.2-1
> > amd64,armel,armhf,i386,ia64,kfreebsd-amd64,kfreebsd-i386,mips,mipsel,powerpc,s390,s390x,sparc
> > squeeze    0.5.8c-1
> > amd64,armel,i386,ia64,kfreebsd-amd64,kfreebsd-i386,mips,mipsel,powerpc,s390,sparc
> > jessie    0.7.10-1    amd64
> > stretch    0.7.12-4    amd64
>
> That's also totally wong (looks like random order)
>
> > 3) For debian-med tasks file created from tasks_udd.py:
> >
> > Release    Version    Architectures
> > squeeze    0.5.8c-1
> > amd64,armel,i386,ia64,kfreebsd-amd64,kfreebsd-i386,mips,mipsel,powerpc,s390,sparc
> > wheezy    0.6.2-1
> > amd64,armel,armhf,i386,ia64,kfreebsd-amd64,kfreebsd-i386,mips,mipsel,powerpc,s390,s390x,sparc
> > jessie    0.7.10-1    amd64
> > stretch    0.7.12-4    amd64
> > sid    0.7.12-4    amd64,kfreebsd-amd64
> > sid    0.6.2-1    hurd-i386
>
> Is basically what we want. 
>

If this is basically what we want, then can't we keep ordering the releases by 'sort' as it is in new tasks_udd.py ?
 
> > For some reason, the order of releases is not same even for the deployed
> > html tasks files and tasks files created from tasks.py for debian-med
> > (task: bio). What is the expected order of releases ? Is it to be ordered
> > by 'sort' or by 'version, releases' ? Currently, tasks_udd.py orders
> > releases based on 'sort' field.
>
> May be for the moment we use
>
>      version, release
>
> ordering to have the same as the deployed site.  In most cases it should
> be the same.  I have no idea why your local builds are different.

I am also unable to figure out why my local builds are different. If I am right, the query - blends_query_packages()[1] orders by versions and releases. If this is what is needed for the time being, I don't think there is any need to make changes to the prepared queries query_pkgs, query_vcs or query_new (since these queries are same as the ones used in old tasks.py). I can revert the 'order by sort' commit, but apart from that I feel there is no other change needed. Please correct me, if I am wrong.

Also, just as a side note - I have ordered new pacakges alphabetically and added their version info.

Regards,
Akshita

> > [0] http://blends.debian.org/med/tasks/bio
[1] https://udd.debian.org/schema/udd.html#public.function.blends-query-packages-textARRAY-textARRAY

Reply to: