[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/5] tools/mkrpm: improve version.release handling



On Mon, Mar 23, George Dunlap wrote:

> On Mon, Mar 23, 2015 at 5:52 PM, Olaf Hering <olaf@xxxxxxxxx> wrote:
> > On Mon, Mar 23, George Dunlap wrote:
> >> xen-4.6_unstable-20150323160547.x86_64.rpm
> > Do you want to continue to get "unstable" as release?
> > My patch uses everything passed as "$2" as Version string. I think thats
> > ok.
> I think "unstable" (or "pre" for the stable branches) should
> definitely be in there to distinguish it from an actual release.  If I
> were writing the patch I might consider taking out the _ (i.e., s/-//;
> instead of s/-/_/;) but that's not a big deal.
> 
> > Release will be either 0 or $PKG_DATE.
> You mean, "0 or $PKG_RELEASE"?  I had in mind that someone might want
> to either set their own package release manually (PKG_RELEASE="9"), or
> do PKG_RELEASE="$(git log RELEASE-4.5.0.. | wc -l)"

Ok. Then the essential part of the patch could look like this:

--- a/tools/misc/mkrpm
+++ b/tools/misc/mkrpm
@@ -17,9 +17,7 @@ xenroot="$1"
 # version and release.  Default to "0" if there isn't a release.
 v=(${2/-/ })
 version=${v[0]}
-release=${v[1]}
-
-[[ -n "$release" ]] || release="0"
+release="${v[1]:-0}${PKG_RELEASE:+.$PKG_RELEASE}"

 cd $xenroot

release will be anything after a dash, or 0. And an optional ".$PKG_RELEASE"
will be appended.

Olaf

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.