Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011)

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Jaka Kranjc <smgl AT lynxlynx.info>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] [RFC] Compressed filetype detection (Bug #16011)
  • Date: Sun, 15 May 2016 23:15:37 +0200

On Sunday 15 of May 2016 17:00:42 Ismael Luceno wrote:
> On 15/May/2016 21:23, Jaka Kranjc wrote:
> > On Sunday 15 of May 2016 15:45:47 Ismael Luceno wrote:
> > > On 15/May/2016 13:29, Jaka Kranjc wrote:
> > > > On Saturday 14 of May 2016 16:12:34 Ismael Luceno wrote:
> > > > > I would like to hear opinions about this implementation and any
> > > > > ideas
> > > > > about how it could be improved.
> > > >
> > > > Hey,
> > > >
> > > > maybe I'm missing something, but I don't see an improvement here. When
> > > > we
> > > > get in the same situation next time, how will we be able to ensure the
> > > > user updates this script first? Seems easier with a spell
> > > > (force_depends).
> > >
> > > Good point. However, it seems to me that we're always going to run
> > > into this kind of problem
> >
> > So what does the script bring to the table then?
> >
> > > because we don't have any way to force
> > > a minimum version, if we could, we may be able to solve this thru
> > > the base-system spell, and an upgrade guide with a big warning about
> > > making extra sure base-system is up to date, or perhaps a way for a
> > > grimoire to have dependencies itself, that might be even better.
> >
> > But we do have a way for enforcing minimum versions, it just has to be
> > done at the spell level. Depend on file in all of the xz-using spells and
> > force_depends on it if the installed version is not good enough. We
> > already have some code in grimoire FUNCTIONS for this: is_version_less
> > and
> > simple_version_check_force_depends (which should really be using the
> > former).
> >
> > Sorcery could always force an update of basesystem, but that'd be pretty
> > disruptive, since it includes the toolchain, potentially starting a
> > cascade. A subset could work, but what else should be on the list? This
> > is probably the only chance for a clean solution in the long run. Adding
> > depends on the script or spell would potentially never end.
>
> That's exactly my concern for those solutions, there's no central
> place to define the requirement, the only way is doing it manually
> at each place it is used, and it's not truly a build dependency,
> plus some upstream projects provide more than one format.
>
> The less disruptive way would be to add file as a dependency for
> xz-utils, and force a minimum version, but it's a hack.
I wouldn't consider it a hack, but if xz-utils is already there, without a
bump this isn't a solution.

> By having our own implementation supporting just what we need, we
> may avoid those issues to a certain extent, only making mandatory
> the upgrade of sorcery in the future, something already needed unless
> special support is provided by the spell.
Even if we change sorcery now, old users won't have it. Updating it has never
been mandatory, except perhaps in the days when it itself was a spell. I do
support the idea though, a warning about newer sorcery before cast starts (if
we managed to check against an online marker).

> Changes on the supported formats require to accomodate other parts
> of sorcery anyway, so it would not be a big deal to update the utility.
They don't, this can all be done in the grimoire. That's how the lzma
functions started too IIRC.

> And we should consider it seriously because `file` isn't small nor
> simple, and depends on zlib. OTOH, our implementation can be very
> simple, unlike `file` it doesn't need to look deep into files nor
> extract any information, just identifying the file is enough.
Do you have some basic embedded uses in mind? zlib is part of basesystem and
file file size shouldn't really matter nowadays.

> > And really, file has supported xz for a long while (late 2011 or earlier),
> > so I'm surprised you managed to hit the problem at all.
>
> This comes from trying to upgrade an old system, and IMO we should
> support upgrades for as many versions as possible if the issue isn't
> with the spells themselves, even if only unofficially.
I agree, but the sane way is to go from stable to stable, not just jump to
latest. We already try to handle more complexity than we can.

LP
--
To err is humour
www.gemrb.org




Archive powered by MHonArc 2.6.24.

Top of Page