[Gambas-user] Update ide Package module for shared libraries, Make installation packages to have preinst and postinst scripts

Brian G brian at westwoodsvcs.com
Sat Mar 7 23:40:19 CET 2020


I think I agree.

Thank You
Brian G

----- Original Message -----
From: "Benoît Minisini" <g4mba5 at gmail.com>
To: "Gambas mailing list" <user at lists.gambas-basic.org>
Sent: Wednesday, March 4, 2020 11:01:15 AM
Subject: Re: [Gambas-user] Update ide Package module for shared libraries, Make installation packages to have preinst and postinst scripts

Le 04/03/2020 à 18:57, gbWilly via User a écrit :
> Hi Brian,
> 
> 
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Tuesday, February 25, 2020 5:59
> PM, Brian G <brian at westwoodsvcs.com> wrote:
> 
>> The problem is that the name of the package changes like this 
>> westwood-testexec_7.14.9-0ubuntu1_all.deb 
>> westwood-testexec_7.14.8-0ubuntu1_all.deb 
>> westwood-testexec_4.14.7-0ubuntu1_all.deb etc
>> 
>> The package name is only considered to the first _ and the rest is
>> versioning
>> 
>> So no mater what major(also considered interface version for shared
>> libraries), minor, release number Debian deletes all older versions
>> and replaces it with the newer version. Applications depending on
>> the older version of the interface will now fail. If you try to
>> install the older version, it will tell you that the newest is
>> already installed.
> 
> This is exactly the behavior I want and I wouldn't like it to be
> different. I work a lot with Gambas libraries in a production
> environment.
> 
> My new library versions are meant to replace the older ones. Thing
> is, you make sure that your changes in the new library are backward
> compatible so they don't mess up the applications using them.
> 
> So that means for example that if existing methods get a new argument
> it is always optional. If I don't want that optional argument, I
> check all applications using this method (simple search in the IDE
> will do that), change them accordingly and redistribute them.
> 
> Pretty strait forward in my opinion.
> 
> 
>> I would like to propose that the major version number become part
>> of a library name as this
>> 
>> westwood-testexec4_4.14.7-0ubuntu1_all.deb
>> 
>> This allows the Major/Inteface number to control the package name
>> for libraries and therefore allow the development and
>> implementation in a production environment of newer versions of the
>> interface. and the slow adoption for older applications to the new
>> interface.
>> 
>> This change for Libraries to the naming
> 
> You proposition in my case would mean that a library would have a
> name + number added by the packager (say it is named MyLib) and the
> deb would be mylib1_1.0.1-0ubuntu1_all.deb My application (name it
> MyApp) would thus actually be dependend on MyLib1 (instead of
> MyLib). If I create a new major version of the MyLib package (deb
> would then be named mylib2_2.0.0-0ubuntu1_all.deb). So, I would also
> have to change the dependency in MyApp to make it work with MyLib2
> (instead of MyLib1). This to me is an undesired behavior, as that
> means I would always have to update all applications using a the
> library and redistribute them to make them work with the newer
> library.
> 
> If you really would like to work in this manner simply name your
> library with the added major version number. So name your first
> version MyLib1 being version 1.0.0 Every update within 1 version (so
> 1.0.1, 1.1.20 etc) you stick to the name MyLib1
> 
> Once you go to a newer major version that is no longer backward
> compatible name the library MyLib2 (being version 2.0.0, 2.0.1,
> 2.1.20 etc.) Older applications depending on MyLib1 will not be
> bother by the MyLib2 update as the libraries are considered by the OS
> as different packages (since they have different names). Both MyLib1
> and MyLib2 will live alongside each other and older applications
> would need to be refurbished and redistributed to make them work with
> the major version 2 of your library.
> 
> This way the default expected behavior of how packages and
> dependencies work in a Debian/Ubuntu environment would still be met.
> 
> Just my two cents,
> 
> gbWilly
> 

I mostly agree with you... What I could do is adding an option that add 
the major version to the project name when making the package. But the 
simpler is what you say: put the major version directly in the project name.

Regards,

-- 
Benoît Minisini

----[ http://gambaswiki.org/wiki/doc/netiquette ]----


More information about the User mailing list