[Slackbuilds-users] What if we `source`d the version number

Klaatu klaatu at mixedsignals.ml
Wed Jan 5 05:11:04 UTC 2022


On Wednesday, January 5, 2022 5:31:35 PM NZDT Daniel Prosser wrote:
> I believe the suggestion was to make life easier for package maintainers,
> not builders. 
> 

Both, actually.  The idea came to me because I was updating an application  
that was versioned 1.8 on SBo, but I found version 1.9 on Github. So I edited 
the .info file so that my build script would download 1.9, and then I commenced 
the build. Because I'd forgotten to update the .SlackBuild file, though, the 
build failed.

A quick fix, admittedly, but it occurred to me that it seemed non-optimized to 
have the same value in two places. Why not have it in one place instead? That 
way the human only has to interact with one file, instead of two, and anyway it 
"feels" like it's better design to have the value once, not twice.

-klaatu



> On Jan 4, 2022 4:48 PM, Andrzej Telszewski <andrzej at telszewski.com> wrote:
> 
> Jan 4, 2022 10:11:00 PM Klaatu <klaatu at mixedsignals.ml>:
> > Why do we define the VERSION for a package in two separate files?
> >  
> > What if we replaced this line in foo.SlackBuild:
> > VERSION={VERSION:-0.0.1}
> >  
> > with this instead:
> > . ./$PRGNAM.info
> >  
> > The VERSION variable would get imported from a consolidated location (the
> > .info file). 
> > It seems to make more sense to me, and it makes trivial upgrades (the ones
> > where I go in and just bump a version number to something I want to
> > build) a one-file task. 
> > Thoughts?
> 
> You can source .info before executing .SlackBuild to get the same effect. No
> changes needed. :-)
> > _______________________________________________
> > SlackBuilds-users mailing list
> > SlackBuilds-users at slackbuilds.org
> > https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
> > Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
> > FAQ - https://slackbuilds.org/faq/
> 
> _______________________________________________
> SlackBuilds-users mailing list
> SlackBuilds-users at slackbuilds.org
> https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
> Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
> FAQ - https://slackbuilds.org/faq/




More information about the SlackBuilds-users mailing list