Macros in Source fields (was: Re: Prelink success story :))

Matthias Saou thias at spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net
Fri Feb 27 18:43:20 UTC 2004


Panu Matilainen wrote :

> On Fri, 27 Feb 2004, Michael Schwendt wrote:
> 
> > On Thu, 26 Feb 2004 21:33:49 -0500, Toshio wrote:
> > 
> > > On Thu, 2004-02-26 at 20:30, Michael Schwendt wrote:
> > > > Is an URL which contains macros still an URL? What do you do with an URL
> > > > that contains macros? You can't cut'n'paste it into a browser, because it
> > > > contains macros. So why include protocol, hostname and path in Source
> > > > fields at all? How does the packager fetch a new release? Does he visit
> > > > the web page from bookmarks? Or does he reconstruct a valid URL from
> > > > the macros?
> > > >  
> > > Thanks, Michael, that's a great explanation.
> > > 
> > > I've got a new scenario to ask about: do any of the autobuilders the
> > > Fedora Project is going to use depend on being able to parse the Source:
> > > line into a URL?
> > 
> > I doubt that.
> 
> IIRC mach can parse Source and Patch entries (even in presence of macros), 
> fetch what's needed and build based on that. Actually if those entries 
> aren't URL's it's going to fail, unless you use rebuild (to rebuild from 
> existing src.rpm)

Let me add on this one.

Yes, mach parses source and patch tags, expands them and searches the
current directory for a matching file name, then searches for an already
downloaded file in the chroot, and if none are found, tries to download
the file.

This is a feature Thomas (mach's author) implemented upon my suggestion. It
makes things ("IMHO" required here, these threads about who is right or
wrong when no one is either are getting boring) very easy, readable and
quickly maintainable. Yes, I just update the version in the version tag
when a new release is out, then launch a build, and finally inspect things.
It can be as simple as that.

My personal taste is to actually like tags like these :
Source: http://dl.sf.net/projectname/%{name}-%{version}.tar.gz

Of course, YTMV(*), and that's perfectly normal.

Matthias

* YTMV : Your Taste May Vary

-- 
Clean custom Red Hat Linux rpm packages : http://freshrpms.net/
Fedora Core release 1 (Yarrow) - Linux kernel 2.6.3-1.91
Load : 0.09 0.19 0.22





More information about the devel mailing list