Bug 2388 - Duplicate repository is added when using .install file
: Duplicate repository is added when using .install file
Status: RESOLVED INVALID
Product: Settings and Maintenance
Application manager
: 4.0
: All Linux
: High normal (vote)
: ---
Assigned To: Marius Vollmer
: downloads@maemo.org
:
:
:
:
  Show dependency tree
 
Reported: 2007-11-26 20:33 UTC by Frederic Crozat
Modified: 2008-03-10 20:38 UTC (History)
5 users (show)

See Also:


Attachments


Note

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


Description Frederic Crozat (reporter) 2007-11-26 20:33:02 UTC
Using IT2008 on n800 (1.2007.44-7),
Maemo extras default repository is enabled

when using following .install file,
http://maemo.org/downloads/product/raw/OS2008/ukmp/?get_installfile , a new
duplicated Maemo Extras repository is added on the system.
Comment 1 Marius Vollmer nokia 2007-11-27 12:48:16 UTC
This happens because the ukmp.install file contains a slightly different
catalogue description than the pre-configured one, and thus the Application
Manager doesn't recognize them as being the same.

ukmp.install has this description:

  [maemo-extras-chinook]
  filter_dist = chinook
  name = maemo Extras
  uri = http://repostory.maemo.org/extras/
  dist = chinook
  components = free non-free

The pre-configured one would have this description

  [maemo-extras]
  name = maemo Extras
  uri = http://repostory.maemo.org/extras/
  components = free non-free

Note that the "dist" key is empty.  This is the crucial difference.

A empty dist key will be replaced with the current distribution name (which is
"chinook").


The duplicate entry is essentially harmless, if a bit ugly and confusing.

I would recommend to use the [maemo-extras] description above for all the
.install files for packages that are in the maemo Extras repository.

Thus, I'll reassign this to the website people.
Comment 2 Frederic Crozat (reporter) 2007-11-27 12:55:03 UTC
Maybe, in a future release of application manager, you could enhance the
duplication check code to handle such case too ? :p
Comment 3 Quim Gil nokia 2007-11-27 14:06:07 UTC
This looks like belonging to the Repository component, although it is not clear
to me what needs to be done. Aren't the .install files produced by the
developers themselves? 

Why is the format used by UKMP 'wrong'? Shouldn't the documentation for
producing .install files explain the 'right' way of doing it? Or am I missing
totally the point?
Comment 4 Marius Vollmer nokia 2007-11-27 15:56:34 UTC
(In reply to comment #3)
> Why is the format used by UKMP 'wrong'? Shouldn't the documentation for
> producing .install files explain the 'right' way of doing it?

Both formats are right, but we need to choose one over the other since using
both will lead to two entries in the Application Catalogue.

Right now, the pre-configured catalogue is stronger, and I am afraid that we
need to change the .install files.
Comment 5 Niels Breet maemo.org 2007-11-28 11:08:41 UTC
It seems to me that the duplicate check just needs to make sure that no
duplicate entries are added. I don't understand why you just can't expand
dist==empty to dist=='current distro' and do the duplicate check after
expanding?

It also confuses the user when Application manager asks to add the repository,
while he/she already knows it is already in there. 

What happens when you click 'cancel' to not add the repository is even less
user friendly. (It completely cancels the install.)

If there is a 'wrong' format for .install files, it should give an error. That
would give the developer a clear message.

I really think this is a 'Application manager' bug and not at all website
related.
Comment 6 Marius Vollmer nokia 2007-11-28 13:49:44 UTC
(In reply to comment #5)
> It seems to me that the duplicate check just needs to make sure that no
> duplicate entries are added. I don't understand why you just can't expand
> dist==empty to dist=='current distro' and do the duplicate check after
> expanding?

Hmm, yeah.  There is a difference between dist="" field and dist="current
distro": A empty dist is expanded to the current distribution 'at run-time'. 
Thus, when the current distribution changes, a catalogue with an empty dist
field will pick up that change automatically.

> It also confuses the user when Application manager asks to add the repository,
> while he/she already knows it is already in there. 

Yes, that's why I thinkg that .install files should use a empty dist field, to
avoid this duplicate entry.

> What happens when you click 'cancel' to not add the repository is even less
> user friendly. (It completely cancels the install.)

No, that's the right thing to do.  If a .install file says that a certain
catalogue is needed to install a package, then the AM should not continue when
the user refuses to add it.  The problem here is really only that two
descriptions of essentially the same catalogue are not recognized as identical.

> If there is a 'wrong' format for .install files, it should give an error. That
> would give the developer a clear message.

No, there is nothing wrong about either way to describe a catalogue.

> I really think this is a 'Application manager' bug and not at all website
> related.

Well, I assigned this to the website since I propose to make sure that all
.install files that include a description of the "maemo Extras" catalogue do so
in such a way that the AM will recognize it as the pre-configured "maemo
Extras" catalogue.

This seems to me to be the preferred thing to do, since it will have immediate
effect.  Changing the AM will only have an effect when diablo is released.

In addition, changing the .install files in the way I have proposed is the
Right Thing anyway, independent of this bug, in my opinion.
Comment 7 Quim Gil nokia 2007-11-29 08:13:06 UTC
But Marius, isn't this about deciding what is the canonical way (Marius),
documenting it (Marius) and then communicating (Marius, DP and/or myself) to
the maemo developers?

In reply to comment #6

> No, there is nothing wrong about either way to describe a catalogue.

There is something wrong when users get the issues being described here. The
cause is having two ways of doing the same thing. It is our responsibility to
decide which is the one recommended, if not compulsory. Developers only expect
us to say how to do the things, nobody wants hassle for end users.

> changing the .install files in the way I have proposed is the Right Thing anyway

Who has to do this? Each developer maintaining an application in extras &
extras-devel, isn't it.

Then this is a bug to be clarified basically by you Marius. Once you are done
then we can help communicating the issue and the solution.

I'm still keeping the bug here, but if Marius agrees on the poijts above it
should go back to the Application Manager component, since the .install files
and theuir documentation are part of it.
Comment 8 Marius Vollmer nokia 2007-11-29 14:04:51 UTC
(In reply to comment #7)
> But Marius, isn't this about deciding what is the canonical way (Marius),
> documenting it (Marius) and then communicating (Marius, DP and/or myself) to
> the maemo developers?

Hmm.  There are three layers here:

 1) The definition of the .install file syntax and semantics.

 2) Recommendations for their use.

 3) Specifically, how to use them for the pre-configured catalagues, and most
    importantly for the maemo Extras catalogue.

I don't see any need to do something about 1.  Specifically, changing the rules
that determine equality of catalogues or OK, I would say.  There really _is_ a
difference between an empty dist, and a dist that happens to be the current
distribution.

For 2, I should provide more tutorial-like material in addition to the exsting
reference documentation, which is, admittedly, very dense.  One undocumented,
relevant recommended practice for this bug is: "Make sure that you always use
the same description for a specific catalogue in all the .install files that
refer to it.  This is to avoid duplicate entries in the Application Catalogue
listing of the Application Manager."

For 3, we need to specify the canonical description to be used for the
pre-configured catalogues and kick people to use it.  I did this in comment #1.

> > No, there is nothing wrong about either way to describe a catalogue.
> 
> There is something wrong when users get the issues being described here.

Yes.  It is OK to choose either way, but you always need to choose the same way
for a given catalogue.  This is more general than deciding whether to use an
empty dist or not.  For example, catalogue.tableteer.nokia.com is also
available as repository.maemo.org/catalogue; chinook is also available as
maemo4.0.

As an extreme example, "http://foo.com/bar" and "http://foo.com:80///bar/" are
really the same URI.  The Application Manager only compares strings, tho, and
treats them as different.  I think that is acceptable and people 'just' need to
agree on a common description.

My original idea was that the queue-manager for a repository generates the
.install files automatically and consistently anyway.  I remember giving
Ferenc an example script to do that.

> The cause is having two ways of doing the same thing.

It's not excatly the same thing, but pretty close to being the same, yeah.

> It is our responsibility to
> decide which is the one recommended, if not compulsory. Developers only expect
> us to say how to do the things, nobody wants hassle for end users.

Yes.

> > changing the .install files in the way I have proposed is the Right Thing anyway
> 
> Who has to do this? Each developer maintaining an application in extras &
> extras-devel, isn't it.

I can't answer this.  How do the .install files end up on downloads.maemo.org? 
For packages in the Extras repositories, I'd say we should generate the
.install  files ourselves.

The .install files can just declare the package to be available for all
releases (since we know that there is an Extras repository for every release),
and the Application Manager will give a "Package not found" error when they
aren't available for the distribution the user happens to be running.

> Then this is a bug to be clarified basically by you Marius. Once you are done
> then we can help communicating the issue and the solution.

Am I done? :-)

> I'm still keeping the bug here, but if Marius agrees on the poijts above it
> should go back to the Application Manager component, since the .install files
> and theuir documentation are part of it.

Yeah, but the recommendation on how to use them the Extras repositories could
be  the repsonsibility of the Extras repository maintainers...  On the other
hand, I am also the maintainer of the pre-configuration information for the OS
releases and the .install files have to match it...
Comment 9 Marius Vollmer nokia 2007-11-29 14:05:52 UTC
(In reply to comment #1)
>   uri = http://repostory.maemo.org/extras/

Did anybody notice that there actually is a typo in the ukmp.install file?
Comment 10 pgruebele 2007-12-21 17:03:00 UTC
"http://repostory.maemo.org/extras/" should read
"http://repository.maemo.org/extras/" no?

Seems to me that "repostory.maemo.org" is in invalid DNS name...

BTW, the same problem exists when installing canola2 for OS2008.

I think there needs to be better QA for package distribution.

In addition to this typo and duplicate repository creation, the repositories
are so slow that installs are failing all the time.  I'm a newbie to
N800/OS2008 so I'm just guessing here, but I can tell you that so far the
N800/OS2008 has been a rather poo experience.  I have tried to install canola2
umpteen times and the package manager always says that it is corrupt (after
taking forever to download 6.38MB!
Comment 11 Marcell Lengyel maemo.org 2008-03-10 14:05:42 UTC
Actually this bug report does not belong to the repositories. I am moving it to
System Management / Application Manager
Comment 12 Marius Vollmer nokia 2008-03-10 20:38:22 UTC
(In reply to comment #11)
> Actually this bug report does not belong to the repositories. I am moving it to
> System Management / Application Manager

Well, if you still think this is the case after reading all the comments, then
I am done with this.