Author Topic: Specs from outside - what to do with %mdkversion?  (Read 899 times)

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1318
Specs from outside - what to do with %mdkversion?
« on: April 22, 2010, 08:54:19 AM »
I often see %mdkversion in our specs, but don't know the impact in pclinuxos. It appear to be Mandrake/driva version.

I always try to remove them. Is that the preferred approach, or is there a clever way of handling them?

cheers,
MBantz

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: Specs from outside - what to do with %mdkversion?
« Reply #1 on: April 22, 2010, 08:24:20 PM »
I think it is probably OK..  the macro is still defined; it evals as "201000":

Code: [Select]
# rpm --eval '%mdkversion'
201000

..appearently we still have quite a few mandriva macros in use..  

Quote
macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/usr/lib/rpm/mandriva/macros:/usr/lib/rpm/mandriva/%{_target}/macros:/etc/rpm/macros:/etc/rpm/%{_target}/macros:/etc/rpm/macros.cdb:/etc/rpm/macros.d/*.macros:~/.rpmmacros

Quote from: /usr/lib/rpm/mandriva/macros
# Mandriva Linux version
# - "9.1"    =>  910
# - "10.2.2" => 1022
# (user may copy the following line in specfile)
# %mdkversion      %(perl -pe '/(\\d+)\\.(\\d)\\.?(\\d)?/; $_="$1$2".($3||0)' /etc/mandriva-release)

# %distsuffix mdv
%distsuffix pclos
« Last Edit: April 23, 2010, 10:53:40 AM by travisn000 »

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1318
Re: Specs from outside - what to do with %mdkversion?
« Reply #2 on: April 23, 2010, 01:42:34 AM »
thanks a bunch travis  :)

in the samba.spec mdkversion is even redefined.

i 8can't write cap's right now...9 just expect it to find out what mandriva version the build is for. if this is the case, do you know what mdkversion suits us+ 8that's supposed to be a question mark9...lol...

8rebooting now..9  :D

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: Specs from outside - what to do with %mdkversion?
« Reply #3 on: April 23, 2010, 10:46:35 AM »
i 8can't write cap's right now...9 just expect it to find out what mandriva version the build is for. if this is the case, do you know what mdkversion suits us+ 8that's supposed to be a question mark9...lol...

8rebooting now..9  :D

 ;D ::) ;D

...I don't know that the version info is really relevant as we don't have multiple releases, but I would guess that any of the conditional info in the spec that is for older releases could be deleted from the spec..  last time I dealt with this (I haven't been building much recently..)  I just deleted all of the conditional stuff that was for newer releases (we were still on 2007 base) and left the 2007 stuff without the version checking and it seemed to work well.

Since we are now rolling from what I'm guessing is a 2010 equivalent base I would think a similarly adapted approach would work..  but if you learn differently I'm sure we would all like to know!  :D

« Last Edit: April 23, 2010, 10:49:07 AM by travisn000 »